*** empty log message ***
This commit is contained in:
parent
ca91953f79
commit
111b62de37
11 changed files with 84 additions and 34 deletions
|
@ -1,11 +1,11 @@
|
|||
body {
|
||||
background-color : ThreedLightShadow;
|
||||
background-color : #d4d0c8;
|
||||
font-family : monospace;
|
||||
}
|
||||
|
||||
#masterpanel {
|
||||
text-align: center;
|
||||
background-color : ThreedLightShadow;
|
||||
background-color : #d4d0c8;
|
||||
height: 800px;
|
||||
font-family : monospace;
|
||||
}
|
||||
|
|
|
@ -161,6 +161,7 @@ if ($uiBrowser->userid) {
|
|||
|
||||
case "PL.editMetaData":
|
||||
$Smarty->assign('PL_editMetaData', TRUE);
|
||||
$Smarty->assign('PL_id', $_REQUEST['id']);
|
||||
$Smarty->assign('PL_simpleManagement', TRUE);
|
||||
break;
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ switch($_REQUEST['act']){
|
|||
|
||||
case "PL.editMetaData":
|
||||
$uiHandler->PLAYLIST->editMetaData($_REQUEST);
|
||||
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
||||
break;
|
||||
|
||||
case "SCHEDULER.set":
|
||||
|
@ -240,6 +241,11 @@ switch($_REQUEST['act']){
|
|||
$uiHandler->SCHEDULER->setReload();
|
||||
break;
|
||||
|
||||
case "SCHEDULER.removeFromScheduleMethod":
|
||||
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST);
|
||||
$uiHandler->SCHEDULER->setReload();
|
||||
break;
|
||||
|
||||
default:
|
||||
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
||||
$uiHandler->redirUrl = UI_BROWSER;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{assign var="_form" value=$PL->metaDataForm()}
|
||||
{assign var="_form" value=$PL->metaDataForm($PL_id)}
|
||||
{assign var="dynform" value=$_form.main}
|
||||
|
||||
{$_form.langswitch}
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
<center>
|
||||
<h4>Simple Playlist Management</h4>
|
||||
|
||||
{if is_array($PL->get())} {* already activated Playlist *}
|
||||
{if $PL_editMetaData}
|
||||
{include file="playlist/metadata.tpl"}
|
||||
{else}
|
||||
{elseif is_array($PL->get())} {* already activated Playlist *}
|
||||
{include file="playlist/editor.tpl"}
|
||||
{/if}
|
||||
{else} {* no active Playlist *}
|
||||
{if $PL->reportLookedPL()}
|
||||
<input type="button" value="Unlook crashed Playlist" onClick="hpopup('{$UI_HANDLER}?act=PL.unlook')">
|
||||
|
|
|
@ -1,26 +1,47 @@
|
|||
{$SCHEDULER->buildDay()}
|
||||
{assign var="_usage" value=$SCHEDULER->getDayUsage($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
||||
{assign var="_divisor" value=70}
|
||||
|
||||
<table border=1>
|
||||
<table border=1 bgcolor="#97bacf">
|
||||
{foreach from=$SCHEDULER->Day item="_Hour"}
|
||||
{assign var="_hour" value=$_Hour.hour}
|
||||
{assign var="_border" value=""}
|
||||
|
||||
<tr>
|
||||
<td {include file="scheduler/contextmenu.tpl"}>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}
|
||||
</td>
|
||||
<td>
|
||||
{foreach from=$_usage item="_entry"}
|
||||
{if $_entry.timestamp >= $_Hour.timestamp && $_entry.timestamp < $_Hour.timestamp+3600}
|
||||
{$_border}
|
||||
<b>{$_entry.title}</b>
|
||||
{$_entry.start|regex_replace:"/[0-9]+T/":""|truncate:5:""}-{$_entry.end|regex_replace:"/[0-9]+T/":""|truncate:5:""}
|
||||
{$_entry.creator}
|
||||
{assign var="_border" value="|"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<td {include file="scheduler/contextmenu.tpl"} bgcolor="#d4d0c8" height="50" valign="top">
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}</a>
|
||||
</td>
|
||||
|
||||
{if !$_one}
|
||||
<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">
|
||||
{foreach from=$_oneday item="i"}
|
||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
|
||||
{if is_array($i.entry)}
|
||||
<td bgcolor="#ffcacb" width="10" onMouseover="" onMouseout=""></td>
|
||||
{else}
|
||||
<td bgcolor="#97bacf" width="10"></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
</td>
|
||||
{assign var="_one" value=TRUE}
|
||||
{/if}
|
||||
|
||||
{foreach from=$_usage item="_entry"}
|
||||
{if $_entry.pos >= $_Hour.timestamp && $_entry.pos < $_Hour.timestamp+3600}
|
||||
<td rowspan="{$_entry.span}" 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}
|
||||
<br>
|
||||
<a href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.removeFromScheduleMethod&gunid={$_entry.id}');"><b>X</b></a>
|
||||
</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
|
||||
{/foreach}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
{foreach from=$_oneday item="i"}
|
||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
|
||||
{if is_array($i.entry)}
|
||||
<td bgcolor="#ffcacb" width="100" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" onMouseover="" onMouseout="">
|
||||
<td bgcolor="#ffcacb" width="100" onMouseover="" onMouseout="">
|
||||
{if $i.length/$_divisor > $_minwidth}
|
||||
<small>
|
||||
<b>{$i.entry.title}</b>
|
||||
|
@ -34,7 +34,7 @@
|
|||
{/if}
|
||||
</td>
|
||||
{else}
|
||||
<td bgcolor="#97bacf" width="100" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
|
||||
<td bgcolor="#97bacf" width="100">
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
|
|
|
@ -60,6 +60,10 @@ function menu(param) {
|
|||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"popup('{/literal}{$UI_BROWSER}{literal}?popup[]=PL.changeTransition&type=fadeOut&id="+param+"', 'PL', '350', '100')\" "+oF+"> Change Fadeout </a></td></tr>";
|
||||
break;
|
||||
|
||||
case "PL.editMetaData":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='{/literal}{$UI_BROWSER}{literal}?act=PL.editMetaData&id="+param+"'"+oF+"> Edit MData </a></td></tr>";
|
||||
break;
|
||||
|
||||
case "SP.addItem":
|
||||
menuHtml = menuHtml + "<tr><td><a class='menu' href='#' onClick=\"hpopup('{/literal}{$UI_HANDLER}{literal}?act=SP.addItem&id="+param+"')\" "+oF+"> Add to ScratchPad </a></td></tr>";
|
||||
break;
|
||||
|
|
|
@ -21,7 +21,7 @@ onContextmenu="return menu('{$i.id}'
|
|||
, 'PL.addItem', 'delete'
|
||||
{/if}
|
||||
{else}
|
||||
, 'PL.activate', 'PL.create', 'edit', 'delete'
|
||||
, 'PL.activate', 'PL.create', 'PL.editMetaData', 'delete'
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -353,15 +353,18 @@ class uiPlaylist
|
|||
}
|
||||
|
||||
|
||||
function metaDataForm($get=TRUE)
|
||||
function metaDataForm($id, $get=TRUE, $data=FALSE)
|
||||
{
|
||||
include dirname(__FILE__).'/formmask/metadata.inc.php';
|
||||
|
||||
#$id = $this->activeId;
|
||||
|
||||
foreach ($mask['playlist'] as $k=>$v) {
|
||||
$mask['playlist'][$k]['element'] = $this->Base->_formElementEncode($v['element']);
|
||||
|
||||
## recive data from GreenBox
|
||||
if ($get) {
|
||||
$mask['playlist'][$k]['default'] = $this->Base->_getMDataValue($this->activeId, $v['element']);
|
||||
$mask['playlist'][$k]['default'] = $this->Base->_getMDataValue($id, $v['element']);
|
||||
}
|
||||
|
||||
## get data from parameter
|
||||
|
@ -374,7 +377,7 @@ class uiPlaylist
|
|||
$this->Base->_parseArr2Form($form, $mask['playlist']);
|
||||
$this->Base->_parseArr2Form($form, $mask['buttons']);
|
||||
$form->setConstants(array('act' => 'PL.editMetaData',
|
||||
'id' => $this->activeId));
|
||||
'id' => $id));
|
||||
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||
$form->accept($renderer);
|
||||
$output['main'] = $renderer->toArray();
|
||||
|
@ -392,6 +395,9 @@ class uiPlaylist
|
|||
{
|
||||
include dirname(__FILE__).'/formmask/metadata.inc.php';
|
||||
|
||||
#$id = $this->activeId;
|
||||
$id = $formdata['id'];
|
||||
|
||||
## first remove old entrys
|
||||
#$this->gb->replaceMetaData($id, $this->_analyzeFile($id, 'xml'), 'string', $this->sessid);
|
||||
|
||||
|
@ -402,13 +408,14 @@ class uiPlaylist
|
|||
|
||||
$data = $this->Base->_dateArr2Str($mData);
|
||||
foreach ($data as $key=>$val) {
|
||||
$r = $this->Base->gb->setMDataValue($this->activeId, $key, $this->Base->sessid, $val);
|
||||
$r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val);
|
||||
if (PEAR::isError($r)) {
|
||||
$this->Base->_retMsg('Unable to set $1: $2', $key, $val);
|
||||
}
|
||||
}
|
||||
$this->Base->_retMsg('Metadata saved');
|
||||
$this->Base->redirUrl = UI_BROWSER."?act=PL.simpleManagement&id=".$this->activeId;
|
||||
#$this->Base->redirUrl = UI_BROWSER."?act=PL.simpleManagement&id=$id";
|
||||
$this->Base->redirUrl = UI_BROWSER."?act=PL.editMetaData&id=$id";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@ class uiScheduler extends uiCalendar
|
|||
foreach ($arr as $key=>$val) {
|
||||
$arr[$key]['title'] = $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE);
|
||||
$arr[$key]['creator'] = $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_CREATOR);
|
||||
$arr[$key]['timestamp'] = $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;
|
||||
}
|
||||
#print_r($arr);
|
||||
return $arr;
|
||||
|
@ -261,7 +262,19 @@ class uiScheduler extends uiCalendar
|
|||
if ($this->_isError($r))
|
||||
return FALSE;
|
||||
if (isset($r['scheduleEntryId']))
|
||||
$this->Base->_retMsg('ScheduleId: $1', $r['scheduleEntryId']);
|
||||
$this->Base->_retMsg('Entry added at $1 with ScheduleId: $2', $datetime, $r['scheduleEntryId']);
|
||||
}
|
||||
|
||||
|
||||
function removeFromScheduleMethod(&$formdata)
|
||||
{
|
||||
$gunid = $formdata['gunid'];
|
||||
#echo "Unschedule Gunid: $gunid";
|
||||
$r = $this->spc->removeFromScheduleMethod($this->Base->sessid, $gunid);
|
||||
#print_r($r);
|
||||
if ($this->_isError($r))
|
||||
return FALSE;
|
||||
$this->Base->_retMsg('Entry with ScheduleId $1 removed', $gunid);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue