*** empty log message ***

This commit is contained in:
sebastian 2005-03-19 09:24:08 +00:00
parent e981645a9c
commit c010dc6a27
8 changed files with 68 additions and 27 deletions

View file

@ -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;

View file

@ -47,6 +47,8 @@
{if $_Day.isEmpty}
<div>
{elseif $_Day.isToday}
<div style="background-color: grey">
{elseif $_Day.isCurrent}
<div style="background-color: lightblue">
{else}

View file

@ -3,6 +3,12 @@
{assign var="_divisor" value=70}
<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"}
{assign var="_year" value=$_Hour.year}
{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>
</td>
{if !$_one}
{if !$_passed}
<td rowspan="24">
{assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
<table border="0" cellspacing="0" cellpadding="0">
@ -30,7 +36,7 @@
</table>
</td>
{assign var="_one" value=TRUE}
{assign var="_passed" value=TRUE}
{/if}
{foreach from=$_usage item="_entry"}

View file

@ -20,7 +20,7 @@
<tr>
{/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>
<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>

View file

@ -7,18 +7,20 @@
<tr>
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
{foreach from=$SCHEDULER->Week item="_Day"}
{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}
{/foreach}
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
</tr>
<tr>
{foreach from=$SCHEDULER->Week item="_Day"}
<td colspan="2">
{foreach from=$SCHEDULER->Week item="_Day"}
<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>
</td>
{/foreach}
{/foreach}
</tr>
<tr>

View file

@ -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();
}

View file

@ -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
);
}
}

View file

@ -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);
}