Scheduler Week and Day view non-scaled
This commit is contained in:
parent
fa7bee7ac7
commit
75c8529203
11 changed files with 354 additions and 304 deletions
|
@ -214,17 +214,22 @@ $ui_fmask = array(
|
||||||
'label' => 'Password',
|
'label' => 'Password',
|
||||||
'required' => TRUE
|
'required' => TRUE
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'element' => 'Submit',
|
|
||||||
'type' => 'submit',
|
|
||||||
'label' => 'Submit'
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'element' => 'cancel',
|
'element' => 'cancel',
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'label' => 'Cancel',
|
'label' => 'Cancel',
|
||||||
'attributes'=> array('onClick' => 'window.close()')
|
'attributes'=> array('onClick' => 'window.close()'),
|
||||||
)
|
'groupit' => TRUE
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'Submit',
|
||||||
|
'type' => 'submit',
|
||||||
|
'label' => 'Submit',
|
||||||
|
'groupit' => TRUE
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'group' => array('cancel', 'Submit')
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
'uploadFileM' => array(
|
'uploadFileM' => array(
|
||||||
|
|
|
@ -651,14 +651,32 @@ table.scheduler_day td { font-size: 12px;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*############# SCHEDULER WEEK #######*/
|
||||||
|
|
||||||
table.scheduler_week_time {
|
table.scheduler_week_time {
|
||||||
|
background: #ddd;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.scheduler_week_time tr {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
border: 1px solid #7392A6;
|
border-bottom: 1px solid #7392A6;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.scheduler_week_time td {
|
||||||
|
height: 20px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.scheduler_week {
|
table.scheduler_week {
|
||||||
width: 790px;
|
width: 790px;
|
||||||
border: 1px solid #7392A6;
|
border: 1px solid #7392A6;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.scheduler_week a {
|
table.scheduler_week a {
|
||||||
|
@ -679,7 +697,8 @@ table.scheduler_week th.date {
|
||||||
}
|
}
|
||||||
|
|
||||||
table.scheduler_week th.day {
|
table.scheduler_week th.day {
|
||||||
width: 186px;
|
width: 286px;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.scheduler_week td.firstrow_secondcol {
|
table.scheduler_week td.firstrow_secondcol {
|
||||||
|
@ -695,9 +714,10 @@ table.scheduler_week td.date_secondcol {
|
||||||
border: none;
|
border: none;
|
||||||
border-left: 1px solid #7392A6;
|
border-left: 1px solid #7392A6;
|
||||||
border-bottom: 1px solid #757575;
|
border-bottom: 1px solid #757575;
|
||||||
padding: 0px;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
table.scheduler_week td.date_secondcol a {color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
table.scheduler_week td.day_secondcol {
|
table.scheduler_week td.day_secondcol {
|
||||||
background-color: #CFDEE7;
|
background-color: #CFDEE7;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
body {
|
body { font-size: 12px;
|
||||||
font-size: 12px;
|
font-family: Arial, Verdana, Helvetica, sans-serif;
|
||||||
font-family: Arial, Verdana, Helvetica, sans-serif;
|
font-size: 12px;
|
||||||
font-size: 12px;
|
color: #2C2C2C;
|
||||||
color: #2C2C2C;
|
margin: 10px;
|
||||||
margin: 0px;
|
|
||||||
vertical-align : middle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img { font-size: 12px;
|
img { font-size: 12px;
|
||||||
|
@ -74,10 +72,11 @@ input, select { font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* #################################### CONTENTAREA ############################### */
|
/* #################################### CONTENTAREA ############################### */
|
||||||
|
|
||||||
|
|
||||||
.content { font-size: 12px;
|
.content {
|
||||||
margin: 19px;
|
margin: 19px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -126,6 +125,115 @@ table { font-size: 12px;
|
||||||
|
|
||||||
table td { font-size: 12px;
|
table td { font-size: 12px;
|
||||||
padding: 0 6px 0 12px;
|
padding: 0 6px 0 12px;
|
||||||
|
border-right: 1px solid #333;
|
||||||
height: 19px;
|
height: 19px;
|
||||||
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table tr.blue_head td { font-size: 12px;
|
||||||
|
background-color: #8baed1;
|
||||||
|
color: #FFF;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
A#blue_head { font-size: 12px;
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.blue1 td { font-size: 12px;
|
||||||
|
color: #000;
|
||||||
|
background-color: #d5e2ee;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.blue2 td { font-size: 12px;
|
||||||
|
color: #000;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr.red td { font-size: 12px;
|
||||||
|
background-color: #FBAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer { font-size: 12px;
|
||||||
|
padding: 4px 5px 5px 0;
|
||||||
|
background-color: #8baed1;
|
||||||
|
text-align: right;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_button { font-size: 12px;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_search {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment { font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
font-size: 10px;
|
||||||
|
margin: 5px 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_width_comment { font-size: 12px;
|
||||||
|
float:left;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_width_comment[class] { font-size: 12px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tablebottom { font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: 0px;
|
||||||
|
background-color: #8baed1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter { font-size: 12px;
|
||||||
|
float: left;
|
||||||
|
margin-left: 7px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #8baed1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter[class] { font-size: 12px;
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_browse {
|
||||||
|
width: 170px;
|
||||||
|
float: left;
|
||||||
|
margin: 0px 0px 10px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.area_browse {
|
||||||
|
width: 174px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.area_browse[class] {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment_browse {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_button_upload { font-size: 12px;
|
||||||
|
margin: 20px 0 0 204px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container_button_upload[class] { font-size: 12px;
|
||||||
|
margin-left: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
label { font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,13 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->display('popup/_clear_parent.tpl');
|
$Smarty->display('popup/_clear_parent.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "_2PL.simpleManagement":
|
||||||
|
$Smarty->assign('target', 'PL.simpleManagement');
|
||||||
|
$Smarty->display('popup/_redirector.tpl');
|
||||||
|
break;
|
||||||
|
|
||||||
case "login":
|
case "login":
|
||||||
$Smarty->assign('login', $uiBrowser->login($Smarty, $ui_fmask));
|
$Smarty->assign('dynform', $uiBrowser->login($ui_fmask));
|
||||||
$Smarty->display('popup/login.tpl');
|
$Smarty->display('popup/login.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -41,11 +46,6 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->display('popup/deleteItem.tpl');
|
$Smarty->display('popup/deleteItem.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "_2PL.simpleManagement":
|
|
||||||
$Smarty->assign('target', 'PL.simpleManagement');
|
|
||||||
$Smarty->display('popup/_redirector.tpl');
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "PL.changeTransition";
|
case "PL.changeTransition";
|
||||||
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->changeTransitionForm($_REQUEST['id'], $_REQUEST['type'], $ui_fmask['PL.changeTransition']));
|
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->changeTransitionForm($_REQUEST['id'], $_REQUEST['type'], $ui_fmask['PL.changeTransition']));
|
||||||
$Smarty->display('popup/PLAYLIST.changeTransition.tpl');
|
$Smarty->display('popup/PLAYLIST.changeTransition.tpl');
|
||||||
|
|
|
@ -1,23 +1,9 @@
|
||||||
{include file="popup/header.tpl"}
|
{include file="popup/header.tpl"}
|
||||||
{$login.javascript}
|
|
||||||
|
|
||||||
<table height="100%" border="0" width="100%">
|
|
||||||
<tr>
|
{include file="sub/dynForm_plain.tpl}
|
||||||
<td valign="middle">
|
|
||||||
<center>
|
|
||||||
<form {$login.attributes}>
|
|
||||||
{$login.hidden}
|
|
||||||
<table>
|
|
||||||
<tr><td align="right">{$login.login.label}</td><td>{$login.login.html}</td></tr>
|
|
||||||
<tr><td align="right">{$login.pass.label}</td><td>{$login.pass.html}</td></tr>
|
|
||||||
<tr><td align="right">{$login.langid.label}</td><td>{$login.langid.html}</td></tr>
|
|
||||||
<tr><td>{$login.requirednote}</td><td>{$login.Submit.html} {$login.cancel.html}</td></tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</center>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -4,29 +4,25 @@
|
||||||
{$SCHEDULER->buildWeek()}
|
{$SCHEDULER->buildWeek()}
|
||||||
|
|
||||||
<!-- start calendar tabs -->
|
<!-- start calendar tabs -->
|
||||||
<div id="tabnavsmall">
|
<div id="tabnavsmall">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day')">##Day##</a></li>
|
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=day')">##Day##</a></li>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week')">##Week##</a></li>
|
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week')">##Week##</a></li>
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=month')">##Month##</a></li>
|
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=month')">##Month##</a></li>
|
||||||
<!-- <input type="button" onClick="popup('{$UI_BROWSER}?popup[]=SCHEDULER.schedule', 'Schedule', 600, 400)" value="Schedule"> -->
|
<!-- <input type="button" onClick="popup('{$UI_BROWSER}?popup[]=SCHEDULER.schedule', 'Schedule', 600, 400)" value="Schedule"> -->
|
||||||
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&today=1')">##Today##</a></li>
|
<li><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&today=1')">##Today##</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- end calendar tabs -->
|
<!-- end calendar tabs -->
|
||||||
<!-- start calendar navigation -->
|
<!-- start calendar navigation -->
|
||||||
<div class="container_elements">
|
<div class="container_elements">
|
||||||
<h1>##Scheduler Navigation##</h1>
|
<h1>##Scheduler Navigation##</h1>
|
||||||
<script type="text/javascript">
|
<div class="container_calender_overview">
|
||||||
document.forms['calendar_month'].month.value = '{$SCHEDULER->curr.month}';
|
<div class="calender_overview">
|
||||||
document.forms['calendar_year'].year.value = '{$SCHEDULER->curr.year}';
|
<table class="calender_overview_table">
|
||||||
</script>
|
<tr>
|
||||||
<div class="container_calender_overview">
|
<td><a href="#" onCLick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=--')"><<</a></td>
|
||||||
<div class="calender_overview">
|
<td colspan=4>
|
||||||
<table class="calender_overview_table">
|
|
||||||
<tr>
|
|
||||||
<td><a href="#" onCLick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=--')"><<</a></td>
|
|
||||||
<td colspan=4>
|
|
||||||
<form name="calendar_month" style="margin: 2;">
|
<form name="calendar_month" style="margin: 2;">
|
||||||
<select id="month" style="margin-top: 0;font-size:9px;" name="month" onChange="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=' + document.forms['calendar_month'].month.value)">
|
<select id="month" style="margin-top: 0;font-size:9px;" name="month" onChange="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=' + document.forms['calendar_month'].month.value)">
|
||||||
{foreach from=$SCHEDULER->Year item="_Month"}
|
{foreach from=$SCHEDULER->Year item="_Month"}
|
||||||
|
@ -35,36 +31,40 @@
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td colspan=2>
|
<td colspan=2>
|
||||||
<form name="calendar_year" style="margin: 2;">
|
<form name="calendar_year" style="margin: 2;">
|
||||||
<select id="year" style="margin-top: 0;font-size:9px;" name="year" onChange="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&year=' + document.forms['calendar_year'].year.value)">
|
<select id="year" style="margin-top: 0;font-size:9px;" name="year" onChange="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&year=' + document.forms['calendar_year'].year.value)">
|
||||||
{foreach from=$SCHEDULER->Decade item="_Year"}
|
{foreach from=$SCHEDULER->Decade item="_Year"}
|
||||||
<option value="{$_Year.year}" {if $_Year.isSelected}selected{/if}>{$_Year.year}</option>
|
<option value="{$_Year.year}" {if $_Year.isSelected}selected{/if}>{$_Year.year}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.forms['calendar_month'].month.value = '{$SCHEDULER->curr.month}';
|
||||||
|
document.forms['calendar_year'].year.value = '{$SCHEDULER->curr.year}';
|
||||||
|
</script>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="#" onCLick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=%2B%2B')">>></a></td>
|
<td><a href="#" onCLick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&month=%2B%2B')">>></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="blue_head">
|
<tr class="blue_head">
|
||||||
<td class="week">##CW##</td>
|
<td class="week">##CW##</td>
|
||||||
{foreach from=$SCHEDULER->Week item="_Weekday"}
|
{foreach from=$SCHEDULER->Week item="_Weekday"}
|
||||||
<td>{$_Weekday.label.short|truncate:2:""}</td>
|
<td>{$_Weekday.label.short|truncate:2:""}</td>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
{foreach from=$SCHEDULER->Month item="_Day"}
|
{foreach from=$SCHEDULER->Month item="_Day"}
|
||||||
<!-- calendar week first -->
|
<!-- calendar week first -->
|
||||||
{if $_Day.isFirst}
|
{if $_Day.isFirst}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="week"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week&day={$_Day.day}&month={$_Day.month}')">{$_Day.week}</a></td>
|
<td class="week"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&view=week&day={$_Day.day}&month={$_Day.month}')">{$_Day.week}</a></td>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- check for different kind of day displays -->
|
<!-- check for different kind of day displays -->
|
||||||
|
|
||||||
{if $_Day.isEmpty}
|
{if $_Day.isEmpty}
|
||||||
<td class="not_this_month">
|
<td class="not_this_month">
|
||||||
{elseif $_Day.isToday}
|
{elseif $_Day.isToday}
|
||||||
<td class="today">
|
<td class="today">
|
||||||
{elseif $_Day.isCurrent}
|
{elseif $_Day.isCurrent}
|
||||||
<td class="current">
|
<td class="current">
|
||||||
{else}
|
{else}
|
||||||
|
@ -81,11 +81,14 @@
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- end calendar navigation -->
|
<!-- end calendar navigation -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{*
|
{*
|
||||||
<table border=1>
|
<table border=1>
|
||||||
<tr><th colspan="8">{$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}</th></tr>
|
<tr><th colspan="8">{$SCHEDULER->curr.year}-{$SCHEDULER->curr.month}-{$SCHEDULER->curr.day}</th></tr>
|
||||||
|
@ -127,7 +130,7 @@
|
||||||
{if $_Day.isEmpty}
|
{if $_Day.isEmpty}
|
||||||
<div>
|
<div>
|
||||||
{elseif $_Day.isToday}
|
{elseif $_Day.isToday}
|
||||||
<div style="background-color: grey">
|
<div style="background-color: grey">
|
||||||
{elseif $_Day.isCurrent}
|
{elseif $_Day.isCurrent}
|
||||||
<div style="background-color: lightblue">
|
<div style="background-color: lightblue">
|
||||||
{else}
|
{else}
|
||||||
|
@ -147,4 +150,4 @@
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
*}
|
*}
|
||||||
|
|
|
@ -1,57 +1,43 @@
|
||||||
{$SCHEDULER->buildDay()}
|
{$SCHEDULER->buildDay()}
|
||||||
{assign var="_usage" value=$SCHEDULER->getDayUsage($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
|
||||||
{assign var="_divisor" value=70}
|
|
||||||
|
|
||||||
<table border=1 bgcolor="#97bacf">
|
|
||||||
|
<table border=1>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=--')"><<</a></th>
|
<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 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>
|
<th><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&day=%2B%2B')">>></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{foreach from=$SCHEDULER->Day item="_Hour"}
|
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()}
|
||||||
{assign var="_year" value=$_Hour.year}
|
{foreach from=$_scale item="_hour"}
|
||||||
{assign var="_month" value=$_Hour.month}
|
|
||||||
{assign var="_day" value=$_Hour.day}
|
|
||||||
{assign var="_hour" value=$_Hour.hour}
|
|
||||||
|
|
||||||
<tr>
|
{assign var="_year" value=$_Day.year}
|
||||||
<td onContextmenu="return contextmenu('year={$_year}&month={$_month}&day={$_day}&hour={$_hour}', 'SCHEDULER.addItem')" bgcolor="grey" height="50" valign="top">
|
{assign var="_month" value=$_Day.month}
|
||||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}</a>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{if !$_passed}
|
<tr> {* jede Reiehe entspr. einer Stunde *}
|
||||||
<td rowspan="24">
|
<td>{$_hour}</td> {* linke spalte mit Uhrzeit *}
|
||||||
{assign var="_oneday" value=$SCHEDULER->getDayTiming($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
|
||||||
{foreach from=$_oneday item="i"}
|
<td bgcolor="grey" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
||||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
|
|
||||||
{if is_array($i.entry)}
|
{if is_array($_entrys[$_hour])}
|
||||||
<td bgcolor="#ffcacb" width="10" onMouseover="" onMouseout=""></td>
|
{foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *}
|
||||||
{else}
|
<div style="border-style: dotted">
|
||||||
<td bgcolor="#97bacf" width="10"></td>
|
{$i.title}
|
||||||
{/if}
|
<br>
|
||||||
</tr>
|
{$i.start}-{$i.end}
|
||||||
{/foreach}
|
<br>
|
||||||
</table>
|
{$i.creator}
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
{/if}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
{assign var="_passed" value=TRUE}
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{foreach from=$_usage item="_entry"}
|
</tr>
|
||||||
{if $_entry.pos >= $_Hour.timestamp && $_entry.pos < $_Hour.timestamp+3600}
|
|
||||||
<td rowspan="{$_entry.span}" onContextmenu="return contextmenu('gunid={$_entry.id}', 'SCHEDULER.removeItem')" valign="top" bgcolor="#ffcacb">
|
|
||||||
<b>{$_entry.title}</b>
|
|
||||||
{$_entry.start|regex_replace:"/[0-9]+T/":""|truncate:5:""}-{$_entry.end|regex_replace:"/[0-9]+T/":""|truncate:5:""}
|
|
||||||
<br>
|
|
||||||
{$_entry.creator}
|
|
||||||
</td>
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,182 +1,58 @@
|
||||||
{$SCHEDULER->buildWeek()}
|
{$SCHEDULER->buildWeek()}
|
||||||
{assign var="_divisor" value=180}
|
|
||||||
{assign var="_minwidth" value=20}
|
|
||||||
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
|
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
|
||||||
|
|
||||||
|
|
||||||
<!-- start scheduler -->
|
|
||||||
<div class="content">
|
|
||||||
<div class="container_elements" style="width: 790px;">
|
|
||||||
<div class="head_scheduler" style=""><h1>##Weekly View##</h1></div>
|
|
||||||
<div class="container_button_scheduler">
|
|
||||||
<input type="button" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')" class="button_large" value="##previous week##" />
|
|
||||||
<input type="button" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')" class="button_large" value="##next week##" />
|
|
||||||
</div>
|
|
||||||
<div class="clearer"> </div>
|
|
||||||
<table class="scheduler_week">
|
|
||||||
<tr>
|
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
|
||||||
<th class="date"></th><th class="day"><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}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="date_secondcol">29</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">30</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">31</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">01</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">02</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">03</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
<td class="date_secondcol">04</td>
|
|
||||||
<td class="day_secondcol"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
|
||||||
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
|
|
||||||
{assign var="_year" value=$_Day.year}
|
|
||||||
{assign var="_month" value=$_Day.month}
|
|
||||||
{assign var="_day" value=$_Day.day}
|
|
||||||
{assign var="_hour" value=$_Day.hour}
|
|
||||||
|
|
||||||
<td valign="top">
|
|
||||||
<table class="scheduler_week_time">
|
|
||||||
{foreach from=$_scale item="_hour"}
|
|
||||||
<tr height="20" style="font-family: monospace;" valign="top">
|
|
||||||
<td bgcolor="grey" onContextmenu="return contextmenu('year={$_year}&month={$_month}&day={$_day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
|
||||||
<div style="padding: 1px">{$_hour|string_format:'%02d'}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/foreach}
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
|
||||||
{foreach from=$_oneday item="i"}
|
|
||||||
{assign var = "_start" value = $i.entry.start|regex_replace:"/[0-9]+T/":""}
|
|
||||||
{assign var = "_end" value = $i.entry.end|regex_replace:"/[0-9]+T/":""}
|
|
||||||
{assign var = "_period" value = "$_start-$_end"}
|
|
||||||
{assign var = "_title" value = $i.entry.title}
|
|
||||||
{assign var = "_creator" value = $i.entry.creator}
|
|
||||||
|
|
||||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace;" valign="top">
|
|
||||||
{if is_array($i.entry)}
|
|
||||||
{if $i.length/$_divisor > $_minwidth}
|
|
||||||
<td bgcolor="#ffcacb" width="70" onContextmenu="return contextmenu('gunid={$i.entry.id}', 'SCHEDULER.removeItem')"><div style="padding: 1px"><small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small></div></td>
|
|
||||||
{else}
|
|
||||||
<td bgcolor="#ffcacb" width="70" onContextmenu="return contextmenu('gunid={$i.entry.id}', 'SCHEDULER.removeItem')" onMouseover="mouseoverShow('<small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small>')" onMouseout="mouseoverHide()"></td>
|
|
||||||
{/if}
|
|
||||||
{else}
|
|
||||||
<td bgcolor="#97bacf" width="70"></td>
|
|
||||||
{/if}
|
|
||||||
</tr>
|
|
||||||
{/foreach}
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{/foreach}
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="firstrow">12p</td>
|
|
||||||
<td class="date_full"></td>
|
|
||||||
<td class="day_full"><h2>Cat Fancy</h2><p>12:00 - 14:00</p><p>Dave Simmons</p></td>
|
|
||||||
<td class="date"></td>
|
|
||||||
<td class="day"></td>
|
|
||||||
<td class="date"></td>
|
|
||||||
<td class="day"></td>
|
|
||||||
<td class="date_locked"><img src="img/ic_locked.gif" alt="locked" /></td>
|
|
||||||
<td class="day_locked"><h2>Talk of the Nation</h2><p>21:00 - 24:00</p><p>Ira Flatow</p></td>
|
|
||||||
<td class="date"></td>
|
|
||||||
<td class="day"></td>
|
|
||||||
<td class="date"></td>
|
|
||||||
<td class="day"></td>
|
|
||||||
<td class="date"></td>
|
|
||||||
<td class="day"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
{*
|
|
||||||
<div class="container_button" style="float: right; margin-top: 10px;">
|
|
||||||
<input type="button" class="button_large" value="Edit Playlist" />
|
|
||||||
<input type="button" class="button_large" value="Delete Playlist" />
|
|
||||||
<input type="button" class="button_large" value="Add Playlist" />
|
|
||||||
</div>
|
|
||||||
*}
|
|
||||||
<div class="clearer"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- end playlist editor -->
|
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
|
<td rowspan="26" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> </td>
|
||||||
|
<td></td>
|
||||||
|
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *}
|
||||||
|
<th 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="26" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
<tr>
|
||||||
<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>
|
<td></td>
|
||||||
{/foreach}
|
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *}
|
||||||
|
<td {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}
|
||||||
|
</tr>
|
||||||
|
|
||||||
<td rowspan="3" valign="top"><a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=%2B%2B')">>></a></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
{assign var="_entrys" value=$SCHEDULER->getWeekEntrys()}
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
{foreach from=$_scale item="_hour"}
|
||||||
<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}
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
{assign var="_year" value=$_Day.year}
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"}
|
{assign var="_month" value=$_Day.month}
|
||||||
{assign var="_oneday" value=$SCHEDULER->getDayTiming($_Day.year, $_Day.month, $_Day.day)}
|
|
||||||
{assign var="_year" value=$_Day.year}
|
|
||||||
{assign var="_month" value=$_Day.month}
|
|
||||||
{assign var="_day" value=$_Day.day}
|
|
||||||
{assign var="_hour" value=$_Day.hour}
|
|
||||||
|
|
||||||
<td valign="top">
|
<tr> {* jede Reiehe entspr. einer Stunde *}
|
||||||
<table border="5" cellspacing="0" cellpadding="0">
|
<td>{$_hour}</td> {* linke spalte mit Uhrzeit *}
|
||||||
{foreach from=$_scale item="_hour"}
|
|
||||||
<tr height="20" style="font-family: monospace;" valign="top">
|
{foreach from=$SCHEDULER->Week item="_day"}
|
||||||
<td bgcolor="grey" onContextmenu="return contextmenu('year={$_year}&month={$_month}&day={$_day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
{* jede Zelle entpr. einem Tag (natürlich nur einer h davon) *}
|
||||||
<div style="padding: 1px">{$_hour|string_format:'%02d'}</div>
|
<td bgcolor="grey" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
||||||
</td>
|
|
||||||
</tr>
|
{if is_array($_entrys[$_day.day][$_hour])}
|
||||||
|
{foreach from=$_entrys[$_day.day][$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *}
|
||||||
|
<div style="border-style: dotted">
|
||||||
|
{$i.title}
|
||||||
|
<br>
|
||||||
|
{$i.start}-{$i.end}
|
||||||
|
<br>
|
||||||
|
{$i.creator}
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</td>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</tr>
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
{/foreach}
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
|
||||||
{foreach from=$_oneday item="i"}
|
|
||||||
{assign var = "_start" value = $i.entry.start|regex_replace:"/[0-9]+T/":""}
|
|
||||||
{assign var = "_end" value = $i.entry.end|regex_replace:"/[0-9]+T/":""}
|
|
||||||
{assign var = "_period" value = "$_start-$_end"}
|
|
||||||
{assign var = "_title" value = $i.entry.title}
|
|
||||||
{assign var = "_creator" value = $i.entry.creator}
|
|
||||||
|
|
||||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace;" valign="top">
|
|
||||||
{if is_array($i.entry)}
|
|
||||||
{if $i.length/$_divisor > $_minwidth}
|
|
||||||
<td bgcolor="#ffcacb" width="70" onContextmenu="return contextmenu('gunid={$i.entry.id}', 'SCHEDULER.removeItem')"><div style="padding: 1px"><small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small></div></td>
|
|
||||||
{else}
|
|
||||||
<td bgcolor="#ffcacb" width="70" onContextmenu="return contextmenu('gunid={$i.entry.id}', 'SCHEDULER.removeItem')" onMouseover="mouseoverShow('<small><b>{$_title}</b><br>{$_period}<br>{$_creator}</small>')" onMouseout="mouseoverHide()"></td>
|
|
||||||
{/if}
|
|
||||||
{else}
|
|
||||||
<td bgcolor="#97bacf" width="70"></td>
|
|
||||||
{/if}
|
|
||||||
</tr>
|
|
||||||
{/foreach}
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{/foreach}
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
|
@ -70,18 +70,14 @@ class uiBrowser extends uiBase {
|
||||||
* @param string $faillogin login name of failed login process
|
* @param string $faillogin login name of failed login process
|
||||||
* @return string (html)
|
* @return string (html)
|
||||||
*/
|
*/
|
||||||
function login(&$Smarty, &$mask)
|
function login(&$mask)
|
||||||
{
|
{
|
||||||
$form = new HTML_QuickForm('login', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
$form = new HTML_QuickForm('login', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||||
$form->setRequiredNote(file_get_contents(UI_QFORM_REQUIREDNOTE));
|
$form->setRequiredNote(file_get_contents(UI_QFORM_REQUIREDNOTE));
|
||||||
|
$this->_parseArr2Form($form, $mask['languages']);
|
||||||
$this->_parseArr2Form($form, $mask['login']);
|
$this->_parseArr2Form($form, $mask['login']);
|
||||||
$this->_parseArr2Form($form, $mask['languages']);
|
|
||||||
|
|
||||||
## using Static Smarty Renderer
|
|
||||||
$renderer =& new HTML_QuickForm_Renderer_ArraySmarty($Smarty, true);
|
|
||||||
$renderer->setRequiredTemplate(file_get_contents(UI_QFORM_REQUIRED));
|
|
||||||
#$renderer->setErrorTemplate(file_get_contents(UI_QFORM_ERROR));
|
|
||||||
|
|
||||||
|
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||||
$form->accept($renderer);
|
$form->accept($renderer);
|
||||||
|
|
||||||
return $renderer->toArray();
|
return $renderer->toArray();
|
||||||
|
|
|
@ -9,6 +9,8 @@ class uiCalendar
|
||||||
|
|
||||||
function buildDecade()
|
function buildDecade()
|
||||||
{
|
{
|
||||||
|
if (is_array($this->Decade)) return TRUE;
|
||||||
|
|
||||||
for ($Year = $this->curr['year']-5; $Year<=$this->curr['year']+5; $Year++) {
|
for ($Year = $this->curr['year']-5; $Year<=$this->curr['year']+5; $Year++) {
|
||||||
$this->Decade[] = array(
|
$this->Decade[] = array(
|
||||||
'year' => $Year,
|
'year' => $Year,
|
||||||
|
@ -42,7 +44,7 @@ class uiCalendar
|
||||||
|
|
||||||
function buildMonth()
|
function buildMonth()
|
||||||
{
|
{
|
||||||
if (is_array($this->Month)) return FALSE;
|
if (is_array($this->Month)) return TRUE;
|
||||||
|
|
||||||
require_once 'Calendar/Month/Weekdays.php';
|
require_once 'Calendar/Month/Weekdays.php';
|
||||||
require_once 'Calendar/Day.php';
|
require_once 'Calendar/Day.php';
|
||||||
|
@ -50,7 +52,7 @@ class uiCalendar
|
||||||
$Month = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], UI_SCHEDULER_FIRSTWEEKDAY);
|
$Month = new Calendar_Month_Weekdays($this->curr['year'], $this->curr['month'], UI_SCHEDULER_FIRSTWEEKDAY);
|
||||||
$Month->build($this->_scheduledDays('month')); ## scheduled days are selected
|
$Month->build($this->_scheduledDays('month')); ## scheduled days are selected
|
||||||
while ($Day = $Month->fetch()) {
|
while ($Day = $Month->fetch()) {
|
||||||
$corrMonth = $Day->thisMonth()<=12 ? sprintf('%02d', $Day->thisMonth()) : '01'; ## due to bug in
|
$corrMonth = $Day->thisMonth()<=12 ? sprintf('%02d', $Day->thisMonth()) : '01'; ## due to bug in
|
||||||
$corrYear = $Day->thisMonth()<=12 ? $Day->thisYear() : $Day->thisYear()+1; ## Calendar_Month_Weekdays
|
$corrYear = $Day->thisMonth()<=12 ? $Day->thisYear() : $Day->thisYear()+1; ## Calendar_Month_Weekdays
|
||||||
$this->Month[] = array(
|
$this->Month[] = array(
|
||||||
'day' => sprintf('%02d', $Day->thisDay()),
|
'day' => sprintf('%02d', $Day->thisDay()),
|
||||||
|
@ -79,11 +81,13 @@ class uiCalendar
|
||||||
$Week = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], UI_SCHEDULER_FIRSTWEEKDAY);
|
$Week = new Calendar_Week ($this->curr['year'], $this->curr['month'], $this->curr['day'], UI_SCHEDULER_FIRSTWEEKDAY);
|
||||||
$Week->build($this->_scheduledDays('week'));
|
$Week->build($this->_scheduledDays('week'));
|
||||||
while ($Day = $Week->fetch()) {
|
while ($Day = $Week->fetch()) {
|
||||||
|
$corrMonth = $Day->thisMonth()<=12 ? sprintf('%02d', $Day->thisMonth()) : '01'; ## due to bug in
|
||||||
|
$corrYear = $Day->thisMonth()<=12 ? $Day->thisYear() : $Day->thisYear()+1; ## Calendar_Month_Weekdays
|
||||||
$this->Week[] = array(
|
$this->Week[] = array(
|
||||||
'day' => sprintf('%02d', $Day->thisDay()),
|
'day' => sprintf('%02d', $Day->thisDay()),
|
||||||
'week' => $this->_getWeekNr($Day),
|
'week' => $this->_getWeekNr($Day),
|
||||||
'month' => sprintf('%02d', $Day->thisMonth()),
|
'month' => $corrMonth,
|
||||||
'year' => $Day->thisYear(),
|
'year' => $corrYear,
|
||||||
'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,
|
||||||
|
@ -103,11 +107,13 @@ class uiCalendar
|
||||||
$Day = new Calendar_Day ($this->curr['year'], $this->curr['month'], $this->curr['day']);
|
$Day = new Calendar_Day ($this->curr['year'], $this->curr['month'], $this->curr['day']);
|
||||||
$Day->build();
|
$Day->build();
|
||||||
while ($Hour = $Day->fetch()) {
|
while ($Hour = $Day->fetch()) {
|
||||||
|
$corrMonth = $Hour->thisMonth()<=12 ? sprintf('%02d', $Hour->thisMonth()) : '01'; ## due to bug in
|
||||||
|
$corrYear = $Hour->thisMonth()<=12 ? $Day->thisYear() : $Hour->thisYear()+1; ## Calendar_Month_Weekdays
|
||||||
$this->Day[] = array(
|
$this->Day[] = array(
|
||||||
'day' => sprintf('%02d', $Hour->thisDay()),
|
'day' => sprintf('%02d', $Hour->thisDay()),
|
||||||
'week' => $this->_getWeekNr($Hour),
|
'week' => $this->_getWeekNr($Hour),
|
||||||
'month' => sprintf('%02d', $Hour->thisMonth()),
|
'month' => $corrMonth,
|
||||||
'year' => $Hour->thisYear(),
|
'year' => $corrYear,
|
||||||
'hour' => $Hour->thisHour(),
|
'hour' => $Hour->thisHour(),
|
||||||
'isSelected' => $Hour->isSelected(),
|
'isSelected' => $Hour->isSelected(),
|
||||||
'isCurrent' => $Hour->thisDay()==$this->curr['day'] ? TRUE : FALSE,
|
'isCurrent' => $Hour->thisDay()==$this->curr['day'] ? TRUE : FALSE,
|
||||||
|
@ -120,6 +126,8 @@ class uiCalendar
|
||||||
|
|
||||||
function buildHour()
|
function buildHour()
|
||||||
{
|
{
|
||||||
|
if (is_array($this->Hour)) return FALSE;
|
||||||
|
|
||||||
require_once 'Calendar/Hour.php';
|
require_once 'Calendar/Hour.php';
|
||||||
|
|
||||||
$Hour = new Calendar_Hour ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->curr['hour']);
|
$Hour = new Calendar_Hour ($this->curr['year'], $this->curr['month'], $this->curr['day'], $this->curr['hour']);
|
||||||
|
|
|
@ -71,28 +71,74 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _datetime2timestamp($i)
|
function getWeekEntrys()
|
||||||
{
|
{
|
||||||
$formatted = $i[0].$i[1].$i[2].$i[3].'-'.$i[4].$i[5].'-'.$i[6].$i[7].strrchr($i, 'T');
|
## build array within all entrys of current week ##
|
||||||
#echo "input: $i formatted:".$formatted;
|
|
||||||
return $this->_strtotime($formatted);
|
$this->buildWeek();
|
||||||
|
|
||||||
|
$weekStart = strftime("%Y%m%d", $this->Week[0]['timestamp']);
|
||||||
|
$weekEnd = strftime("%Y%m%d", $this->Week[6]['timestamp']);
|
||||||
|
|
||||||
|
$arr = $this->displayScheduleMethod($weekStart.'T00:00:00', $weekEnd.'T23:59:59.999999');
|
||||||
|
if (!count($arr))
|
||||||
|
return FALSE;
|
||||||
|
foreach ($arr as $key => $val) {
|
||||||
|
$items[strftime('%d', $this->_datetime2timestamp($val['start']))][number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array (
|
||||||
|
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
||||||
|
'end' => substr($val['end'], strpos($val['end'], 'T') + 1),
|
||||||
|
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
|
||||||
|
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#print_r($items);
|
||||||
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _strtotime($input)
|
function getDayEntrys()
|
||||||
{
|
{
|
||||||
## !! bug in strtotime. zeigt 8h später an als reines datum, wenn Txx:xx:xx verwendet wird !!
|
## build array within all entrys of current day ##
|
||||||
if (strpos($input, 'T'))
|
|
||||||
return strtotime($input)-8*3600;
|
$this->buildDay();
|
||||||
return strtotime($input);
|
|
||||||
|
$day = strftime("%Y%m%d", $this->Day[0]['timestamp']);
|
||||||
|
|
||||||
|
$arr = $this->displayScheduleMethod($day.'T00:00:00', $day.'T23:59:59.999999');
|
||||||
|
if (!count($arr))
|
||||||
|
return FALSE;
|
||||||
|
foreach ($arr as $key => $val) {
|
||||||
|
$items[strftime('%d', $this->_datetime2timestamp($val['start']))][]= array (
|
||||||
|
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
||||||
|
'end' => substr($val['end'], strpos($val['end'], 'T') + 1),
|
||||||
|
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
|
||||||
|
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#print_r($items);
|
||||||
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDayHourlyEntrys($year, $month, $day)
|
||||||
|
{
|
||||||
|
$date = $year.$month.$day;
|
||||||
|
$arr = $this->displayScheduleMethod($date.'T00:00:00', $date.'T23:59:59.999999');
|
||||||
|
if (!count($arr))
|
||||||
|
return FALSE;
|
||||||
|
foreach ($arr as $key => $val) {
|
||||||
|
$items[date('H', $this->_datetime2timestamp($val['start']))][]= array (
|
||||||
|
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
||||||
|
'end' => substr($val['end'], strpos($val['end'], 'T') + 1),
|
||||||
|
'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE),
|
||||||
|
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
print_r($items);
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
||||||
function getDayUsage($year, $month, $day)
|
function getDayUsage($year, $month, $day)
|
||||||
{
|
{
|
||||||
$day_start = $this->_datetime2timestamp($year.$month.$day.'T00:00:00');
|
|
||||||
$day_end = $this->_datetime2timestamp($year.$month.$day.'T23:59:59');
|
|
||||||
|
|
||||||
$date = $year.$month.$day;
|
$date = $year.$month.$day;
|
||||||
$arr = $this->displayScheduleMethod($date.'T00:00:00', $date.'T23:59:59.999999');
|
$arr = $this->displayScheduleMethod($date.'T00:00:00', $date.'T23:59:59.999999');
|
||||||
if (!count($arr))
|
if (!count($arr))
|
||||||
|
@ -103,7 +149,7 @@ class uiScheduler extends uiCalendar
|
||||||
$arr[$key]['pos'] = $this->_datetime2timestamp($val['start']);
|
$arr[$key]['pos'] = $this->_datetime2timestamp($val['start']);
|
||||||
$arr[$key]['span'] = date('H', $this->_datetime2timestamp($val['end'])) - date('H', $this->_datetime2timestamp($val['start'])) +1;
|
$arr[$key]['span'] = date('H', $this->_datetime2timestamp($val['end'])) - date('H', $this->_datetime2timestamp($val['start'])) +1;
|
||||||
}
|
}
|
||||||
#print_r($arr);
|
print_r($arr);
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +178,7 @@ class uiScheduler extends uiCalendar
|
||||||
));
|
));
|
||||||
|
|
||||||
$curr = current($arr);
|
$curr = current($arr);
|
||||||
if ($this->_strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00
|
if ($this->_strtotime($curr['start']) > $day_start) ## insert gap if first entry start after 00:00:00
|
||||||
$list[] = array(
|
$list[] = array(
|
||||||
'type' => 'gap',
|
'type' => 'gap',
|
||||||
#'pos' => 0,
|
#'pos' => 0,
|
||||||
|
@ -238,6 +284,22 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _datetime2timestamp($i)
|
||||||
|
{
|
||||||
|
$formatted = $i[0].$i[1].$i[2].$i[3].'-'.$i[4].$i[5].'-'.$i[6].$i[7].strrchr($i, 'T');
|
||||||
|
#echo "input: $i formatted:".$formatted;
|
||||||
|
return $this->_strtotime($formatted);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _strtotime($input)
|
||||||
|
{
|
||||||
|
## !! bug in strtotime. zeigt 8h später an als reines datum, wenn Txx:xx:xx verwendet wird !!
|
||||||
|
if (strpos($input, 'T'))
|
||||||
|
return strtotime($input)-8*3600;
|
||||||
|
return strtotime($input);
|
||||||
|
}
|
||||||
|
|
||||||
function _oneOrMore($in)
|
function _oneOrMore($in)
|
||||||
{
|
{
|
||||||
return $id < 1 ? ceil($in) : round($in);
|
return $id < 1 ? ceil($in) : round($in);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue