*** empty log message ***
This commit is contained in:
parent
5853bd2f1f
commit
de1e870d3f
10 changed files with 86 additions and 69 deletions
|
@ -690,6 +690,7 @@ $ui_fmask = array(
|
||||||
'element' => 'cancel',
|
'element' => 'cancel',
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'label' => 'Cancel',
|
'label' => 'Cancel',
|
||||||
|
'attributes'=> array('onClick' => 'window.close()'),
|
||||||
'groupit' => TRUE
|
'groupit' => TRUE
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -60,7 +60,7 @@ if (is_array($_REQUEST['popup'])){
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.removeItem":
|
case "SCHEDULER.removeItem":
|
||||||
$Smarty->assign('gunid', $_REQUEST['gunid']);
|
$Smarty->assign('scheduleId', $_REQUEST['scheduleId']);
|
||||||
$Smarty->display('popup/SCHEDULER.removeItem.tpl');
|
$Smarty->display('popup/SCHEDULER.removeItem.tpl');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ switch($_REQUEST['act']){
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.removeItem":
|
case "SCHEDULER.removeItem":
|
||||||
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST);
|
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST['scheduleId']);
|
||||||
$uiHandler->SCHEDULER->setReload();
|
$uiHandler->SCHEDULER->setReload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{assign var="_form" value=$PL->metaDataForm($PL_id)}
|
{assign var="_form" value=$PL->metaDataForm($PL_id)}
|
||||||
{assign var="dynform" value=$_form.main}
|
|
||||||
|
|
||||||
{* $_form.langswitch *}
|
{assign var="dynform" value=$_form.langswitch}
|
||||||
|
{include file="sub/dynForm_plain.tpl"}
|
||||||
|
|
||||||
|
{assign var="dynform" value=$_form.main}
|
||||||
{include file="sub/dynForm_plain.tpl"}
|
{include file="sub/dynForm_plain.tpl"}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<b>Are you sure to remove this entry?</b>
|
<b>Are you sure to remove this entry?</b>
|
||||||
<br>
|
<br>
|
||||||
<input type="button" onClick="window.close()" value="Cancel">
|
<input type="button" onClick="window.close()" value="Cancel">
|
||||||
<input type="button" onClick="location.href='{$UI_HANDLER}?act=SCHEDULER.removeItem&gunid={$gunid}'" value="OK">
|
<input type="button" onClick="location.href='{$UI_HANDLER}?act=SCHEDULER.removeItem&scheduleId={$scheduleId}'" value="OK">
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{$SCHEDULER->buildDay()}
|
{$SCHEDULER->buildDay()}
|
||||||
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
|
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
|
||||||
|
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()}
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="container_elements">
|
<div class="container_elements">
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
<form name="SCHEDULER">
|
<form name="SCHEDULER">
|
||||||
<table class="scheduler_day" style="width: 606px;">
|
<table class="scheduler_day" style="width: 606px;">
|
||||||
|
|
||||||
{* Tag vor/zurück, code um heutigen Tag abzufragen
|
{* Tag vor/zurück + code um heutigen Tag abzufragen
|
||||||
<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>
|
||||||
|
@ -24,29 +25,35 @@
|
||||||
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SCHEDULER')"></td>
|
<td style="width: 30px"><input type="checkbox" name="all" onClick="collector_switchAll('SCHEDULER')"></td>
|
||||||
*}
|
*}
|
||||||
|
|
||||||
<td style="width: 95px">Time</td>
|
<td style="border-left: 1px solid #ccc; width: 95px">Time</td>
|
||||||
<td style="width: 481px; border-right: 0;">Show Info</td>
|
<td style="width: 481px; border-right: 0;">Show Info</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()}
|
|
||||||
{foreach from=$_scale item="_hour"}
|
{foreach from=$_scale item="_hour"}
|
||||||
{assign var="_year" value=$_Day.year}
|
{assign var="_year" value=$_Day.year}
|
||||||
{assign var="_month" value=$_Day.month}
|
{assign var="_month" value=$_Day.month}
|
||||||
|
|
||||||
<tr class="blue2" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
|
||||||
{* <td style="border-left: 1px solid #ccc;"><input type="checkbox" class="checkbox" /></td> *}
|
|
||||||
<td>{$_hour|string_format:"%02d"}:00</td>
|
|
||||||
<td style="border-right: 1px solid #ccc;">
|
|
||||||
{if is_array($_entrys[$_hour])}
|
{if is_array($_entrys[$_hour])}
|
||||||
|
<tr class="blue1">
|
||||||
|
<td style="border-left: 1px solid #ccc;" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">{$_hour|string_format:"%02d"}:00</td>
|
||||||
|
<td style="border-right: 1px solid #ccc;">
|
||||||
|
|
||||||
{foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *}
|
{foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *}
|
||||||
{$i.title}:
|
<div onContextmenu="return contextmenu('scheduleId={$i.id}', 'SCHEDULER.removeItem')">
|
||||||
|
<b>{$i.title}</b>
|
||||||
{$i.start}-{$i.end}
|
{$i.start}-{$i.end}
|
||||||
{$i.creator}
|
{$i.creator}
|
||||||
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{else}
|
||||||
|
<tr class="blue2" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
||||||
|
<td style="border-left: 1px solid #ccc;">{$_hour|string_format:"%02d"}:00</td>
|
||||||
|
<td style="border-right: 1px solid #ccc;"></td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<table class="scheduler_week">
|
<table class="scheduler_week">
|
||||||
<tr>
|
<tr>
|
||||||
{* Link Woche zurück <a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> *}
|
{* Link Woche zurück <a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&week=--')"><<</a> *}
|
||||||
<th class="firstrow"></th>
|
<th class="firstrow" style="border-left: 1px solid #ccc"></th>
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *}
|
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnamen angezeigt *}
|
||||||
<th class="date"></th>
|
<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>
|
<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>
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="firstrow_secondcol"></td>
|
<td class="firstrow_secondcol" style="border-left: 1px solid #ccc"></td>
|
||||||
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *}
|
{foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *}
|
||||||
<td class="date_secondcol" {* {if $_Day.isToday} bgcolor="grey"{/if} *}>
|
<td class="date_secondcol">
|
||||||
<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>
|
||||||
<td class="day_secondcol"></td>
|
<td class="day_secondcol"></td>
|
||||||
|
@ -43,15 +43,17 @@
|
||||||
{assign var="_month" value=$_Day.month}
|
{assign var="_month" value=$_Day.month}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="firstrow">{$_hour}</td>
|
<td class="firstrow" style="border-left: 1px solid #ccc">{$_hour}</td>
|
||||||
{foreach from=$SCHEDULER->Week item="_day"}
|
{foreach from=$SCHEDULER->Week item="_day"}
|
||||||
{if is_array($_entrys[$_day.day][$_hour])}
|
{if is_array($_entrys[$_day.day][$_hour])}
|
||||||
<td class="date_full" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')"></td>
|
<td class="date_full" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')"></td>
|
||||||
<td class="day_full" onContextmenu="return contextmenu('year={$_day.year}&month={$_day.month}&day={$_day.day}&hour={$_hour}', 'SCHEDULER.addItem')">
|
<td class="day_full">
|
||||||
{foreach from=$_entrys[$_day.day][$_hour] item="i"}
|
{foreach from=$_entrys[$_day.day][$_hour] item="i"}
|
||||||
|
<div onContextmenu="return contextmenu('scheduleId={$i.id}', 'SCHEDULER.removeItem')">
|
||||||
<h2>{$i.title|truncate:12}</h2>
|
<h2>{$i.title|truncate:12}</h2>
|
||||||
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
|
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
|
||||||
<p>{$i.creator}</p>
|
<p>{$i.creator}</p>
|
||||||
|
</div>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</td>
|
</td>
|
||||||
{else}
|
{else}
|
||||||
|
|
|
@ -391,7 +391,9 @@ class uiPlaylist
|
||||||
|
|
||||||
$form = new HTML_QuickForm('langswitch', UI_STANDARD_FORM_METHOD, UI_BROWSER);
|
$form = new HTML_QuickForm('langswitch', UI_STANDARD_FORM_METHOD, UI_BROWSER);
|
||||||
$this->Base->_parseArr2Form($form, $mask['langswitch']);
|
$this->Base->_parseArr2Form($form, $mask['langswitch']);
|
||||||
$output['langswitch'] = $form->toHTML();
|
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||||
|
$form->accept($renderer);
|
||||||
|
$output['langswitch'] = $renderer->toArray();
|
||||||
|
|
||||||
#print_r($output);
|
#print_r($output);
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
@ -78,23 +78,25 @@ class uiScheduler extends uiCalendar
|
||||||
function getWeekEntrys()
|
function getWeekEntrys()
|
||||||
{
|
{
|
||||||
## build array within all entrys of current week ##
|
## build array within all entrys of current week ##
|
||||||
|
|
||||||
$this->buildWeek();
|
$this->buildWeek();
|
||||||
|
|
||||||
$weekStart = strftime("%Y%m%d", $this->Week[0]['timestamp']);
|
$weekStart = strftime("%Y%m%d", $this->Week[0]['timestamp']);
|
||||||
$weekEnd = strftime("%Y%m%d", $this->Week[6]['timestamp']);
|
$weekEnd = strftime("%Y%m%d", $this->Week[6]['timestamp']);
|
||||||
|
|
||||||
$arr = $this->displayScheduleMethod($weekStart.'T00:00:00', $weekEnd.'T23:59:59.999999');
|
$arr = $this->displayScheduleMethod($weekStart.'T00:00:00', $weekEnd.'T23:59:59.999999');
|
||||||
|
#print_r($arr);
|
||||||
|
|
||||||
if (!count($arr))
|
if (!count($arr))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
foreach ($arr as $key => $val) {
|
foreach ($arr as $key => $val) {
|
||||||
$items[strftime('%d', $this->_datetime2timestamp($val['start']))][number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array (
|
$items[strftime('%d', $this->_datetime2timestamp($val['start']))][number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array (
|
||||||
|
'id' => $val['id'],
|
||||||
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
||||||
'end' => substr($val['end'], strpos($val['end'], '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),
|
'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),
|
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#print_r($items);
|
#print_r($items);
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
@ -103,22 +105,24 @@ class uiScheduler extends uiCalendar
|
||||||
function getDayEntrys()
|
function getDayEntrys()
|
||||||
{
|
{
|
||||||
## build array within all entrys of current day ##
|
## build array within all entrys of current day ##
|
||||||
|
|
||||||
$this->buildDay();
|
$this->buildDay();
|
||||||
|
|
||||||
$day = strftime("%Y%m%d", $this->Day[0]['timestamp']);
|
$day = strftime("%Y%m%d", $this->Day[0]['timestamp']);
|
||||||
|
|
||||||
$arr = $this->displayScheduleMethod($day.'T00:00:00', $day.'T23:59:59.999999');
|
$arr = $this->displayScheduleMethod($day.'T00:00:00', $day.'T23:59:59.999999');
|
||||||
|
#print_r($arr);
|
||||||
|
|
||||||
if (!count($arr))
|
if (!count($arr))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
foreach ($arr as $key => $val) {
|
foreach ($arr as $key => $val) {
|
||||||
$items[strftime('%d', $this->_datetime2timestamp($val['start']))][]= array (
|
$items[number_format(strftime('%H', $this->_datetime2timestamp($val['start'])))][]= array (
|
||||||
|
'id' => $val['id'],
|
||||||
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
'start' => substr($val['start'], strpos($val['start'], 'T')+1),
|
||||||
'end' => substr($val['end'], strpos($val['end'], '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),
|
'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),
|
'creator' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#print_r($items);
|
#print_r($items);
|
||||||
return $items;
|
return $items;
|
||||||
}
|
}
|
||||||
|
@ -415,20 +419,19 @@ class uiScheduler extends uiCalendar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function removeFromScheduleMethod(&$formdata)
|
function removeFromScheduleMethod($id)
|
||||||
{
|
{
|
||||||
$gunid = $formdata['gunid'];
|
|
||||||
#echo "Unschedule Gunid: $gunid";
|
#echo "Unschedule Gunid: $gunid";
|
||||||
$r = $this->spc->removeFromScheduleMethod($this->Base->sessid, $gunid);
|
$r = $this->spc->removeFromScheduleMethod($this->Base->sessid, $id);
|
||||||
#print_r($r);
|
#print_r($r);
|
||||||
if ($this->_isError($r))
|
if ($this->_isError($r))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
$this->Base->_retMsg('Entry with ScheduleId $1 removed', $gunid);
|
if (UI_VERBOSE) $this->Base->_retMsg('Entry with ScheduleId $1 removed', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function displayScheduleMethod($from, $to)
|
function displayScheduleMethod($from, $to)
|
||||||
{ return;
|
{
|
||||||
#echo $from.$to;
|
#echo $from.$to;
|
||||||
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
|
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
|
||||||
if ($this->_isError($r))
|
if ($this->_isError($r))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue