diff --git a/livesupport/modules/htmlUI/var/html/ui_handler.php b/livesupport/modules/htmlUI/var/html/ui_handler.php
index 70726e2f9..b3b1e4f80 100644
--- a/livesupport/modules/htmlUI/var/html/ui_handler.php
+++ b/livesupport/modules/htmlUI/var/html/ui_handler.php
@@ -253,7 +253,7 @@ switch($_REQUEST['act']){
default:
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
$uiHandler->redirUrl = UI_BROWSER;
- if ($_REQUEST['was_popup'])
+ if ($_REQUEST['is_popup'])
$uiHandler->redirUrl .= '?popup[]=_reload_parent&popup[]=_close';
}
if ($uiHandler->alertMsg) $_SESSION['alertMsg'] = $uiHandler->alertMsg;
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/calendar.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/calendar.tpl
index 38fcce1f3..cb3eb4af4 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/calendar.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/calendar.tpl
@@ -47,6 +47,8 @@
{if $_Day.isEmpty}
+ {elseif $_Day.isToday}
+
{elseif $_Day.isCurrent}
{else}
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
index 6ad6f778e..c0ccc70dd 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
@@ -3,6 +3,12 @@
{assign var="_divisor" value=70}
+
+ << |
+ curr.isToday} bgcolor="grey"{/if}>{$SCHEDULER->curr.dayname}, {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day} |
+ >> |
+
+
{foreach from=$SCHEDULER->Day item="_Hour"}
{assign var="_year" value=$_Hour.year}
{assign var="_month" value=$_Hour.month}
@@ -14,7 +20,7 @@
{$_Hour.hour}
- {if !$_one}
+ {if !$_passed}
{assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
- {assign var="_one" value=TRUE}
+ {assign var="_passed" value=TRUE}
{/if}
{foreach from=$_usage item="_entry"}
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl
index 69cd2cfa8..8a2eb4427 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/month.tpl
@@ -20,7 +20,7 @@
{/if}
-
+ |
{$_Day.day}
|
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
index 1f7d9c5f9..2fbb3e7c2 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
@@ -7,18 +7,20 @@
<< |
- {foreach from=$SCHEDULER->Week item="_Day"}
- {$_Day.label.full} |
- {/foreach}
+
+{foreach from=$SCHEDULER->Week item="_Day"}
+ {$_Day.label.full} |
+{/foreach}
+
>> |
- {foreach from=$SCHEDULER->Week item="_Day"}
-
- {$_Day.day}
- |
- {/foreach}
+{foreach from=$SCHEDULER->Week item="_Day"}
+
+ {$_Day.day}
+ |
+{/foreach}
diff --git a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
index c9b04d74e..1252a74fa 100755
--- a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
+++ b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
@@ -33,9 +33,25 @@
{
var screenX;
var screenY;
- url = url + '&was_popup=1';
- screenX = (window.screenX + window.innerWidth/2 - width/2);
- screenY = (window.screenY + window.innerHeight/2 - height/2);
+ var Xpos;
+ var Ypos;
+ var Pwidth;
+ var Pheight;
+
+ if (ie5) {
+ Xpos = window.screenLeft;
+ Ypos = window.screenTop;
+ Pwidth = document.body.clientWidth;
+ Pheight = document.body.clientHeight;
+ } else {
+ Xpos = window.screenX;
+ Ypos = window.screenY;
+ Pwidth = window.innerWidth;
+ Pheight = window.innerHeight;
+ }
+ url = url + '&is_popup=1';
+ screenX = (Xpos + Pwidth/2 - width/2);
+ screenY = (Ypos + Pheight/2 - height/2);
arg = 'width='+width+', height='+height+', scrollbars=no, menubar=no, depend=yes, left='+screenX+', top='+screenY;
popupwin = window.open(url, name, arg);
@@ -44,7 +60,7 @@
function hpopup(url, name) //hidden popup! 'width=1, height=1'
{
- url = url + '&was_popup=1';
+ url = url + '&is_popup=1';
popupwin = window.open(url, name);
//window.parent.focus();
}
diff --git a/livesupport/modules/htmlUI/var/ui_calendar.class.php b/livesupport/modules/htmlUI/var/ui_calendar.class.php
index 79195d9a2..61f047c11 100755
--- a/livesupport/modules/htmlUI/var/ui_calendar.class.php
+++ b/livesupport/modules/htmlUI/var/ui_calendar.class.php
@@ -62,7 +62,8 @@ class uiCalendar
'isFirst' => $Day->isFirst(),
'isLast' => $Day->isLast(),
'isSelected' => $Day->isSelected(),
- 'isCurrent' => $Day->thisDay()==$this->curr['day'] ? TRUE : FALSE,
+ 'isCurrent' => $Day->thisDay()==$this->curr['day'] && $Day->thisMonth()==$this->curr['month'] ? TRUE : FALSE,
+ 'isToday' => $Day->thisDay()==strftime("%d") && $Day->thisMonth()==strftime("%m") ? TRUE : FALSE,
'timestamp' => $Day->thisDay(TRUE)
);
}
@@ -86,6 +87,7 @@ class uiCalendar
'label' => $this->_getDayName($Day),
'isSelected' => $Day->isSelected(),
'isCurrent' => $Day->thisDay()==$this->curr['day'] ? TRUE : FALSE,
+ 'isToday' => $Day->thisDay()==strftime("%d") && $Day->thisMonth()==strftime("%m") ? TRUE : FALSE,
'timestamp' => $Day->thisDay(TRUE)
);
}
@@ -131,7 +133,7 @@ class uiCalendar
'hour' => $Min->thisHour(),
'minute' => $Min->thisMinute(),
'isSelected' => $Min->isSelected(),
- 'isCurrent' => $Min->thisDay()==$this->curr['day'] ? TRUE : FALSE
+ 'isCurrent' => $Min->thisDay()==$this->curr['hour'] ? TRUE : FALSE
);
}
}
diff --git a/livesupport/modules/htmlUI/var/ui_scheduler.class.php b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
index 375edf5ff..bb5590c94 100755
--- a/livesupport/modules/htmlUI/var/ui_scheduler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
@@ -6,10 +6,12 @@ class uiScheduler extends uiCalendar
$this->curr =& $_SESSION[UI_CALENDAR_SESSNAME]['current'];
if (!is_array($this->curr)) {
$this->curr['view'] = 'month';
- $this->curr['year'] = date("Y");
- $this->curr['month'] = date("m");
- $this->curr['day'] = date('d');
- $this->curr['hour'] = date('H');
+ $this->curr['year'] = strftime("%Y");
+ $this->curr['month'] = strftime("%m");
+ $this->curr['day'] = strftime("%d");
+ $this->curr['hour'] = strftime("%H");
+ $this->curr['dayname'] = strftime("%A");
+ $this->curr['isToday'] = TRUE;
}
$this->Base =& $uiBase;
@@ -30,14 +32,15 @@ class uiScheduler extends uiCalendar
extract($arr);
if (isset($view)) $this->curr['view'] = $view;
- if (isset($year)) $this->curr['year'] = $year;
- if (isset($day)) $this->curr['day'] = sprintf('%02d', $day);
- if (isset($hour)) $this->curr['hour'] = sprintf('%02d', $hour);
- if (is_numeric($month))
- $this->curr['month'] = sprintf('%02d', $month);
+
+ if (is_numeric($year)) $this->curr['year'] = $year;
+ if (is_numeric($month)) $this->curr['month'] = sprintf('%02d', $month);
+ if (is_numeric($day)) $this->curr['day'] = sprintf('%02d', $day);
+ if (is_numeric($hour)) $this->curr['hour'] = sprintf('%02d', $hour);
$stampNow = $this->_datetime2timestamp($this->curr['year'].$this->curr['month'].$this->curr['day'].'T'.$this->curr['hour'].':00:00');
$stampTarget = $stampNow;
+
if ($month=='++')
$stampTarget = strtotime("+1 month", $stampNow);
if ($month=='--')
@@ -46,6 +49,11 @@ class uiScheduler extends uiCalendar
$stampTarget = strtotime("+1 week", $stampNow);
if ($week=='--')
$stampTarget = strtotime("-1 week", $stampNow);
+ if ($day=='++')
+ $stampTarget = strtotime("+1 day", $stampNow);
+ if ($day=='--')
+ $stampTarget = strtotime("-1 day", $stampNow);
+
if ($today)
$stampTarget = time();
@@ -53,7 +61,12 @@ class uiScheduler extends uiCalendar
$this->curr['month'] = strftime("%m", $stampTarget);
$this->curr['day'] = strftime("%d", $stampTarget);
$this->curr['hour'] = strftime("%H", $stampTarget);
+ $this->curr['dayname'] = strftime("%A", $stampTarget);
+ if ($this->curr['year'] == strftime("%Y") && $this->curr['month'] == strftime("%m") && $this->curr['day'] == strftime("%d"))
+ $this->curr['isToday'] = TRUE;
+ else
+ $this->curr['isToday'] = FALSE;
#print_r($this->curr);
}