From cc3fc71a8aca6cbd6c6263b9b4e08eaebaa52a44 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sat, 19 May 2007 16:18:13 +0000 Subject: fix bug 1641928 change todo popup to be like event popup --- functions/event.js | 27 ++++++++++++++++++++------- functions/template.php | 13 +++++++++++-- includes/todo.php | 2 +- templates/default/header.tpl | 4 ++++ templates/default/sidebar.tpl | 6 +++--- templates/default/sidebar_year.tpl | 6 +++--- templates/green/sidebar.tpl | 6 +++--- templates/grey/sidebar.tpl | 6 +++--- templates/red/sidebar.tpl | 6 +++--- templates/red/sidebar_year.tpl | 6 +++--- templates/tan/sidebar.tpl | 6 +++--- 11 files changed, 57 insertions(+), 31 deletions(-) diff --git a/functions/event.js b/functions/event.js index 6895626..9020de9 100644 --- a/functions/event.js +++ b/functions/event.js @@ -23,16 +23,29 @@ function EventData(date, time, uid, cpath, event_data) { this.cpath = cpath; this.event_data = event_data; } +//--> + + diff --git a/functions/template.php b/functions/template.php index 62c9edc..1353f75 100644 --- a/functions/template.php +++ b/functions/template.php @@ -779,7 +779,7 @@ class Page { $important = trim($match2[1]); $normal = trim($match3[1]); $nugget2 = ''; - + $todo_popup_data_index = 0; if (is_array($master_array['-2'])) { foreach ($master_array['-2'] as $vtodo_times) { foreach ($vtodo_times as $val) { @@ -805,8 +805,17 @@ class Page { 'start_date' => $start_date, 'status' => $status, 'vtodo_text' => $vtodo_text); + $vtodo_array = base64_encode(urlencode(serialize($vtodo_array))); + $todo = " + "; - $vtodo_array = base64_encode(serialize($vtodo_array)); + $todo .= ''; + $todo_popup_data_index++; + $vtodo_array = $todo; + $vtodo_text = word_wrap(strip_tags(str_replace('
',' ',$vtodo_text), ''), 21, $tomorrows_events_lines); $data = array ('{VTODO_TEXT}', '{VTODO_ARRAY}'); $rep = array ($vtodo_text, $vtodo_array); diff --git a/includes/todo.php b/includes/todo.php index 007632d..6823405 100644 --- a/includes/todo.php +++ b/includes/todo.php @@ -5,7 +5,7 @@ include_once(BASE.'functions/init.inc.php'); include_once(BASE.'functions/date_functions.php'); require_once(BASE.'functions/template.php'); -$vtodo_array = unserialize(base64_decode($_GET['vtodo_array'])); +$vtodo_array = unserialize(urldecode(base64_decode($_REQUEST['todo_data']))); // Set the variables from the array $vtodo_text = (isset($vtodo_array['vtodo_text'])) ? $vtodo_array['vtodo_text'] : (''); diff --git a/templates/default/header.tpl b/templates/default/header.tpl index 07837a9..884b5fc 100644 --- a/templates/default/header.tpl +++ b/templates/default/header.tpl @@ -18,3 +18,7 @@ + diff --git a/templates/default/sidebar.tpl b/templates/default/sidebar.tpl index ba6ccd8..e5aa36a 100644 --- a/templates/default/sidebar.tpl +++ b/templates/default/sidebar.tpl @@ -161,21 +161,21 @@  -
{VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/default/sidebar_year.tpl b/templates/default/sidebar_year.tpl index a34da93..f4b40d9 100644 --- a/templates/default/sidebar_year.tpl +++ b/templates/default/sidebar_year.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/green/sidebar.tpl b/templates/green/sidebar.tpl index ba6ccd8..e5aa36a 100644 --- a/templates/green/sidebar.tpl +++ b/templates/green/sidebar.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/grey/sidebar.tpl b/templates/grey/sidebar.tpl index ba6ccd8..e5aa36a 100644 --- a/templates/grey/sidebar.tpl +++ b/templates/grey/sidebar.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/red/sidebar.tpl b/templates/red/sidebar.tpl index ba6ccd8..e5aa36a 100644 --- a/templates/red/sidebar.tpl +++ b/templates/red/sidebar.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/red/sidebar_year.tpl b/templates/red/sidebar_year.tpl index a34da93..f4b40d9 100644 --- a/templates/red/sidebar_year.tpl +++ b/templates/red/sidebar_year.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} diff --git a/templates/tan/sidebar.tpl b/templates/tan/sidebar.tpl index ba6ccd8..e5aa36a 100644 --- a/templates/tan/sidebar.tpl +++ b/templates/tan/sidebar.tpl @@ -161,21 +161,21 @@  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT}  - {VTODO_TEXT} + {VTODO_ARRAY} {VTODO_TEXT} -- cgit v1.2.3