*** empty log message ***
This commit is contained in:
parent
e981645a9c
commit
c010dc6a27
8 changed files with 68 additions and 27 deletions
|
@ -253,7 +253,7 @@ switch($_REQUEST['act']){
|
||||||
default:
|
default:
|
||||||
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
||||||
$uiHandler->redirUrl = UI_BROWSER;
|
$uiHandler->redirUrl = UI_BROWSER;
|
||||||
if ($_REQUEST['was_popup'])
|
if ($_REQUEST['is_popup'])
|
||||||
$uiHandler->redirUrl .= '?popup[]=_reload_parent&popup[]=_close';
|
$uiHandler->redirUrl .= '?popup[]=_reload_parent&popup[]=_close';
|
||||||
}
|
}
|
||||||
if ($uiHandler->alertMsg) $_SESSION['alertMsg'] = $uiHandler->alertMsg;
|
if ($uiHandler->alertMsg) $_SESSION['alertMsg'] = $uiHandler->alertMsg;
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
|
|
||||||
{if $_Day.isEmpty}
|
{if $_Day.isEmpty}
|
||||||
<div>
|
<div>
|
||||||
|
{elseif $_Day.isToday}
|
||||||
|
<div style="background-color: grey">
|
||||||
{elseif $_Day.isCurrent}
|
{elseif $_Day.isCurrent}
|
||||||
<div style="background-color: lightblue">
|
<div style="background-color: lightblue">
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
{assign var="_divisor" value=70}
|
{assign var="_divisor" value=70}
|
||||||
|
|
||||||
<table border=1 bgcolor="#97bacf">
|
<table border=1 bgcolor="#97bacf">
|
||||||
|
<tr>
|
||||||
|
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=--')"><<</a></th>
|
||||||
|
<th colspan="3" {if $SCHEDULER->curr.isToday} bgcolor="grey"{/if}>{$SCHEDULER->curr.dayname}, {$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}</th>
|
||||||
|
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=%2B%2B')">>></a></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
{foreach from=$SCHEDULER->Day item="_Hour"}
|
{foreach from=$SCHEDULER->Day item="_Hour"}
|
||||||
{assign var="_year" value=$_Hour.year}
|
{assign var="_year" value=$_Hour.year}
|
||||||
{assign var="_month" value=$_Hour.month}
|
{assign var="_month" value=$_Hour.month}
|
||||||
|
@ -14,7 +20,7 @@
|
||||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}</a>
|
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
{if !$_one}
|
{if !$_passed}
|
||||||
<td rowspan="24">
|
<td rowspan="24">
|
||||||
{assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
{assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
@ -30,7 +36,7 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
{assign var="_one" value=TRUE}
|
{assign var="_passed" value=TRUE}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{foreach from=$_usage item="_entry"}
|
{foreach from=$_usage item="_entry"}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<td width="80">
|
<td width="80" {if $_Day.isToday} bgcolor="grey"{/if}>
|
||||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&year={$_Day.year}&month={$_Day.month}&day={$_Day.day}')"><b>{$_Day.day}</b>
|
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&year={$_Day.year}&month={$_Day.month}&day={$_Day.day}')"><b>{$_Day.day}</b>
|
||||||
<div><img src="img/percentage_red.png" width="{if $percentage>50}{$percentage}{elseif $percentage>0}{$percentage+2}{else}0{/if}%" height="10" border="0"><img src="img/percentage_blue.png" width="{if $percentage>50}{$null-$percentage+100}{elseif $percentage>0}{$NULL-$percentage-2+100}{else}100{/if}%" height="10" border="0"></div>
|
<div><img src="img/percentage_red.png" width="{if $percentage>50}{$percentage}{elseif $percentage>0}{$percentage+2}{else}0{/if}%" height="10" border="0"><img src="img/percentage_blue.png" width="{if $percentage>50}{$null-$percentage+100}{elseif $percentage>0}{$NULL-$percentage-2+100}{else}100{/if}%" height="10" border="0"></div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -7,18 +7,20 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
|
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
|
||||||
<th colspan="2" width="100"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')">{$_Day.label.full}</a></th>
|
{foreach from=$SCHEDULER->Week item="_Day"}
|
||||||
{/foreach}
|
<th colspan="2" width="100"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')">{$_Day.label.full}</a></th>
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
|
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
{foreach from=$SCHEDULER->Week item="_Day"}
|
||||||
<td colspan="2">
|
<td colspan="2" {if $_Day.isToday} bgcolor="grey"{/if}>
|
||||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')"><b>{$_Day.day}</b></a>
|
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day&day={$_Day.day}&month={$_Day.month}&year={$_Day.year}')"><b>{$_Day.day}</b></a>
|
||||||
</td>
|
</td>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -33,9 +33,25 @@
|
||||||
{
|
{
|
||||||
var screenX;
|
var screenX;
|
||||||
var screenY;
|
var screenY;
|
||||||
url = url + '&was_popup=1';
|
var Xpos;
|
||||||
screenX = (window.screenX + window.innerWidth/2 - width/2);
|
var Ypos;
|
||||||
screenY = (window.screenY + window.innerHeight/2 - height/2);
|
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;
|
arg = 'width='+width+', height='+height+', scrollbars=no, menubar=no, depend=yes, left='+screenX+', top='+screenY;
|
||||||
|
|
||||||
popupwin = window.open(url, name, arg);
|
popupwin = window.open(url, name, arg);
|
||||||
|
@ -44,7 +60,7 @@
|
||||||
|
|
||||||
function hpopup(url, name) //hidden popup! 'width=1, height=1'
|
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);
|
popupwin = window.open(url, name);
|
||||||
//window.parent.focus();
|
//window.parent.focus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,8 @@ class uiCalendar
|
||||||
'isFirst' => $Day->isFirst(),
|
'isFirst' => $Day->isFirst(),
|
||||||
'isLast' => $Day->isLast(),
|
'isLast' => $Day->isLast(),
|
||||||
'isSelected' => $Day->isSelected(),
|
'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)
|
'timestamp' => $Day->thisDay(TRUE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +87,7 @@ class uiCalendar
|
||||||
'label' => $this->_getDayName($Day),
|
'label' => $this->_getDayName($Day),
|
||||||
'isSelected' => $Day->isSelected(),
|
'isSelected' => $Day->isSelected(),
|
||||||
'isCurrent' => $Day->thisDay()==$this->curr['day'] ? TRUE : FALSE,
|
'isCurrent' => $Day->thisDay()==$this->curr['day'] ? TRUE : FALSE,
|
||||||
|
'isToday' => $Day->thisDay()==strftime("%d") && $Day->thisMonth()==strftime("%m") ? TRUE : FALSE,
|
||||||
'timestamp' => $Day->thisDay(TRUE)
|
'timestamp' => $Day->thisDay(TRUE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -131,7 +133,7 @@ class uiCalendar
|
||||||
'hour' => $Min->thisHour(),
|
'hour' => $Min->thisHour(),
|
||||||
'minute' => $Min->thisMinute(),
|
'minute' => $Min->thisMinute(),
|
||||||
'isSelected' => $Min->isSelected(),
|
'isSelected' => $Min->isSelected(),
|
||||||
'isCurrent' => $Min->thisDay()==$this->curr['day'] ? TRUE : FALSE
|
'isCurrent' => $Min->thisDay()==$this->curr['hour'] ? TRUE : FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,12 @@ class uiScheduler extends uiCalendar
|
||||||
$this->curr =& $_SESSION[UI_CALENDAR_SESSNAME]['current'];
|
$this->curr =& $_SESSION[UI_CALENDAR_SESSNAME]['current'];
|
||||||
if (!is_array($this->curr)) {
|
if (!is_array($this->curr)) {
|
||||||
$this->curr['view'] = 'month';
|
$this->curr['view'] = 'month';
|
||||||
$this->curr['year'] = date("Y");
|
$this->curr['year'] = strftime("%Y");
|
||||||
$this->curr['month'] = date("m");
|
$this->curr['month'] = strftime("%m");
|
||||||
$this->curr['day'] = date('d');
|
$this->curr['day'] = strftime("%d");
|
||||||
$this->curr['hour'] = date('H');
|
$this->curr['hour'] = strftime("%H");
|
||||||
|
$this->curr['dayname'] = strftime("%A");
|
||||||
|
$this->curr['isToday'] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->Base =& $uiBase;
|
$this->Base =& $uiBase;
|
||||||
|
@ -30,14 +32,15 @@ class uiScheduler extends uiCalendar
|
||||||
extract($arr);
|
extract($arr);
|
||||||
|
|
||||||
if (isset($view)) $this->curr['view'] = $view;
|
if (isset($view)) $this->curr['view'] = $view;
|
||||||
if (isset($year)) $this->curr['year'] = $year;
|
|
||||||
if (isset($day)) $this->curr['day'] = sprintf('%02d', $day);
|
if (is_numeric($year)) $this->curr['year'] = $year;
|
||||||
if (isset($hour)) $this->curr['hour'] = sprintf('%02d', $hour);
|
if (is_numeric($month)) $this->curr['month'] = sprintf('%02d', $month);
|
||||||
if (is_numeric($month))
|
if (is_numeric($day)) $this->curr['day'] = sprintf('%02d', $day);
|
||||||
$this->curr['month'] = sprintf('%02d', $month);
|
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');
|
$stampNow = $this->_datetime2timestamp($this->curr['year'].$this->curr['month'].$this->curr['day'].'T'.$this->curr['hour'].':00:00');
|
||||||
$stampTarget = $stampNow;
|
$stampTarget = $stampNow;
|
||||||
|
|
||||||
if ($month=='++')
|
if ($month=='++')
|
||||||
$stampTarget = strtotime("+1 month", $stampNow);
|
$stampTarget = strtotime("+1 month", $stampNow);
|
||||||
if ($month=='--')
|
if ($month=='--')
|
||||||
|
@ -46,6 +49,11 @@ class uiScheduler extends uiCalendar
|
||||||
$stampTarget = strtotime("+1 week", $stampNow);
|
$stampTarget = strtotime("+1 week", $stampNow);
|
||||||
if ($week=='--')
|
if ($week=='--')
|
||||||
$stampTarget = strtotime("-1 week", $stampNow);
|
$stampTarget = strtotime("-1 week", $stampNow);
|
||||||
|
if ($day=='++')
|
||||||
|
$stampTarget = strtotime("+1 day", $stampNow);
|
||||||
|
if ($day=='--')
|
||||||
|
$stampTarget = strtotime("-1 day", $stampNow);
|
||||||
|
|
||||||
if ($today)
|
if ($today)
|
||||||
$stampTarget = time();
|
$stampTarget = time();
|
||||||
|
|
||||||
|
@ -53,7 +61,12 @@ class uiScheduler extends uiCalendar
|
||||||
$this->curr['month'] = strftime("%m", $stampTarget);
|
$this->curr['month'] = strftime("%m", $stampTarget);
|
||||||
$this->curr['day'] = strftime("%d", $stampTarget);
|
$this->curr['day'] = strftime("%d", $stampTarget);
|
||||||
$this->curr['hour'] = strftime("%H", $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);
|
#print_r($this->curr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue