*** empty log message ***

This commit is contained in:
sebastian 2005-03-22 23:39:58 +00:00
parent 5853bd2f1f
commit de1e870d3f
10 changed files with 86 additions and 69 deletions

View file

@ -690,6 +690,7 @@ $ui_fmask = array(
'element' => 'cancel',
'type' => 'button',
'label' => 'Cancel',
'attributes'=> array('onClick' => 'window.close()'),
'groupit' => TRUE
),
array(

View file

@ -60,7 +60,7 @@ if (is_array($_REQUEST['popup'])){
break;
case "SCHEDULER.removeItem":
$Smarty->assign('gunid', $_REQUEST['gunid']);
$Smarty->assign('scheduleId', $_REQUEST['scheduleId']);
$Smarty->display('popup/SCHEDULER.removeItem.tpl');
break;
}

View file

@ -252,7 +252,7 @@ switch($_REQUEST['act']){
break;
case "SCHEDULER.removeItem":
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST);
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST['scheduleId']);
$uiHandler->SCHEDULER->setReload();
break;

View file

@ -1,7 +1,9 @@
{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"}
<script type="text/javascript">

View file

@ -4,7 +4,7 @@
<b>Are you sure to remove this entry?</b>
<br>
<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>
</body>

View file

@ -1,5 +1,6 @@
{$SCHEDULER->buildDay()}
{assign var="_scale" value=$SCHEDULER->getDayTimingScale()}
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()}
<div class="content">
<div class="container_elements">
@ -10,7 +11,7 @@
<form name="SCHEDULER">
<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>
<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>
@ -24,29 +25,35 @@
<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>
</tr>
{assign var="_entrys" value=$SCHEDULER->getDayEntrys()}
{foreach from=$_scale item="_hour"}
{assign var="_year" value=$_Day.year}
{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])}
<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 *}
{$i.title}:
<div onContextmenu="return contextmenu('scheduleId={$i.id}', 'SCHEDULER.removeItem')">
<b>{$i.title}</b>
{$i.start}-{$i.end}
{$i.creator}
</div>
{/foreach}
{/if}
</td>
</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}
</table>
</form>

View file

@ -19,7 +19,7 @@
<table class="scheduler_week">
<tr>
{* 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 *}
<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>
@ -28,9 +28,9 @@
</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 *}
<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>
</td>
<td class="day_secondcol"></td>
@ -43,15 +43,17 @@
{assign var="_month" value=$_Day.month}
<tr>
<td class="firstrow">{$_hour}</td>
<td class="firstrow" style="border-left: 1px solid #ccc">{$_hour}</td>
{foreach from=$SCHEDULER->Week item="_day"}
{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="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"}
<div onContextmenu="return contextmenu('scheduleId={$i.id}', 'SCHEDULER.removeItem')">
<h2>{$i.title|truncate:12}</h2>
<p>{$i.start|truncate:5:""} - {$i.end|truncate:5:""}</p>
<p>{$i.creator}</p>
</div>
{/foreach}
</td>
{else}

View file

@ -391,7 +391,9 @@ class uiPlaylist
$form = new HTML_QuickForm('langswitch', UI_STANDARD_FORM_METHOD, UI_BROWSER);
$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);
return $output;

View file

@ -78,23 +78,25 @@ class uiScheduler extends uiCalendar
function getWeekEntrys()
{
## build array within all entrys of current week ##
$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');
#print_r($arr);
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 (
'id' => $val['id'],
'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;
}
@ -103,22 +105,24 @@ class uiScheduler extends uiCalendar
function getDayEntrys()
{
## build array within all entrys of current day ##
$this->buildDay();
$day = strftime("%Y%m%d", $this->Day[0]['timestamp']);
$arr = $this->displayScheduleMethod($day.'T00:00:00', $day.'T23:59:59.999999');
#print_r($arr);
if (!count($arr))
return FALSE;
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),
'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;
}
@ -415,20 +419,19 @@ class uiScheduler extends uiCalendar
}
function removeFromScheduleMethod(&$formdata)
function removeFromScheduleMethod($id)
{
$gunid = $formdata['gunid'];
#echo "Unschedule Gunid: $gunid";
$r = $this->spc->removeFromScheduleMethod($this->Base->sessid, $gunid);
$r = $this->spc->removeFromScheduleMethod($this->Base->sessid, $id);
#print_r($r);
if ($this->_isError($r))
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)
{ return;
{
#echo $from.$to;
$r = $this->spc->displayScheduleMethod($this->Base->sessid, $from, $to);
if ($this->_isError($r))