*** 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 {
|
body {
|
||||||
background-color : ThreedLightShadow;
|
background-color : #d4d0c8;
|
||||||
font-family : monospace;
|
font-family : monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
#masterpanel {
|
#masterpanel {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color : ThreedLightShadow;
|
background-color : #d4d0c8;
|
||||||
height: 800px;
|
height: 800px;
|
||||||
font-family : monospace;
|
font-family : monospace;
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,6 +161,7 @@ if ($uiBrowser->userid) {
|
||||||
|
|
||||||
case "PL.editMetaData":
|
case "PL.editMetaData":
|
||||||
$Smarty->assign('PL_editMetaData', TRUE);
|
$Smarty->assign('PL_editMetaData', TRUE);
|
||||||
|
$Smarty->assign('PL_id', $_REQUEST['id']);
|
||||||
$Smarty->assign('PL_simpleManagement', TRUE);
|
$Smarty->assign('PL_simpleManagement', TRUE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -228,6 +228,7 @@ switch($_REQUEST['act']){
|
||||||
|
|
||||||
case "PL.editMetaData":
|
case "PL.editMetaData":
|
||||||
$uiHandler->PLAYLIST->editMetaData($_REQUEST);
|
$uiHandler->PLAYLIST->editMetaData($_REQUEST);
|
||||||
|
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.set":
|
case "SCHEDULER.set":
|
||||||
|
@ -240,6 +241,11 @@ switch($_REQUEST['act']){
|
||||||
$uiHandler->SCHEDULER->setReload();
|
$uiHandler->SCHEDULER->setReload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "SCHEDULER.removeFromScheduleMethod":
|
||||||
|
$uiHandler->SCHEDULER->removeFromScheduleMethod($_REQUEST);
|
||||||
|
$uiHandler->SCHEDULER->setReload();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
$uiHandler->_retMsg("Unknown method: $1", $_REQUEST["act"]);
|
||||||
$uiHandler->redirUrl = UI_BROWSER;
|
$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}
|
{assign var="dynform" value=$_form.main}
|
||||||
|
|
||||||
{$_form.langswitch}
|
{$_form.langswitch}
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
<center>
|
<center>
|
||||||
<h4>Simple Playlist Management</h4>
|
<h4>Simple Playlist Management</h4>
|
||||||
|
|
||||||
{if is_array($PL->get())} {* already activated Playlist *}
|
{if $PL_editMetaData}
|
||||||
{if $PL_editMetaData}
|
|
||||||
{include file="playlist/metadata.tpl"}
|
{include file="playlist/metadata.tpl"}
|
||||||
{else}
|
{elseif is_array($PL->get())} {* already activated Playlist *}
|
||||||
{include file="playlist/editor.tpl"}
|
{include file="playlist/editor.tpl"}
|
||||||
{/if}
|
|
||||||
{else} {* no active Playlist *}
|
{else} {* no active Playlist *}
|
||||||
{if $PL->reportLookedPL()}
|
{if $PL->reportLookedPL()}
|
||||||
<input type="button" value="Unlook crashed Playlist" onClick="hpopup('{$UI_HANDLER}?act=PL.unlook')">
|
<input type="button" value="Unlook crashed Playlist" onClick="hpopup('{$UI_HANDLER}?act=PL.unlook')">
|
||||||
|
|
|
@ -1,26 +1,47 @@
|
||||||
{$SCHEDULER->buildDay()}
|
{$SCHEDULER->buildDay()}
|
||||||
{assign var="_usage" value=$SCHEDULER->getDayUsage($SCHEDULER->curr.year, $SCHEDULER->curr.month, $SCHEDULER->curr.day)}
|
{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"}
|
{foreach from=$SCHEDULER->Day item="_Hour"}
|
||||||
{assign var="_hour" value=$_Hour.hour}
|
{assign var="_hour" value=$_Hour.hour}
|
||||||
{assign var="_border" value=""}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td {include file="scheduler/contextmenu.tpl"}>
|
<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 href="#" onClick="hpopup('{$UI_HANDLER}?act=SCHEDULER.set&hour={$_Hour.hour}')">{$_Hour.hour}</a>
|
||||||
</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>
|
</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>
|
</tr>
|
||||||
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
{foreach from=$_oneday item="i"}
|
{foreach from=$_oneday item="i"}
|
||||||
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
|
<tr height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}" style="font-family: monospace" valign="top">
|
||||||
{if is_array($i.entry)}
|
{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}
|
{if $i.length/$_divisor > $_minwidth}
|
||||||
<small>
|
<small>
|
||||||
<b>{$i.entry.title}</b>
|
<b>{$i.entry.title}</b>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
{else}
|
{else}
|
||||||
<td bgcolor="#97bacf" width="100" height="{$SCHEDULER->_oneOrMore($i.length/$_divisor)}">
|
<td bgcolor="#97bacf" width="100">
|
||||||
</td>
|
</td>
|
||||||
{/if}
|
{/if}
|
||||||
</tr>
|
</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>";
|
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;
|
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":
|
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>";
|
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;
|
break;
|
||||||
|
|
|
@ -21,7 +21,7 @@ onContextmenu="return menu('{$i.id}'
|
||||||
, 'PL.addItem', 'delete'
|
, 'PL.addItem', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
, 'PL.activate', 'PL.create', 'edit', 'delete'
|
, 'PL.activate', 'PL.create', 'PL.editMetaData', 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{/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';
|
include dirname(__FILE__).'/formmask/metadata.inc.php';
|
||||||
|
|
||||||
|
#$id = $this->activeId;
|
||||||
|
|
||||||
foreach ($mask['playlist'] as $k=>$v) {
|
foreach ($mask['playlist'] as $k=>$v) {
|
||||||
$mask['playlist'][$k]['element'] = $this->Base->_formElementEncode($v['element']);
|
$mask['playlist'][$k]['element'] = $this->Base->_formElementEncode($v['element']);
|
||||||
|
|
||||||
## recive data from GreenBox
|
## recive data from GreenBox
|
||||||
if ($get) {
|
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
|
## get data from parameter
|
||||||
|
@ -374,7 +377,7 @@ class uiPlaylist
|
||||||
$this->Base->_parseArr2Form($form, $mask['playlist']);
|
$this->Base->_parseArr2Form($form, $mask['playlist']);
|
||||||
$this->Base->_parseArr2Form($form, $mask['buttons']);
|
$this->Base->_parseArr2Form($form, $mask['buttons']);
|
||||||
$form->setConstants(array('act' => 'PL.editMetaData',
|
$form->setConstants(array('act' => 'PL.editMetaData',
|
||||||
'id' => $this->activeId));
|
'id' => $id));
|
||||||
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||||
$form->accept($renderer);
|
$form->accept($renderer);
|
||||||
$output['main'] = $renderer->toArray();
|
$output['main'] = $renderer->toArray();
|
||||||
|
@ -392,6 +395,9 @@ class uiPlaylist
|
||||||
{
|
{
|
||||||
include dirname(__FILE__).'/formmask/metadata.inc.php';
|
include dirname(__FILE__).'/formmask/metadata.inc.php';
|
||||||
|
|
||||||
|
#$id = $this->activeId;
|
||||||
|
$id = $formdata['id'];
|
||||||
|
|
||||||
## first remove old entrys
|
## first remove old entrys
|
||||||
#$this->gb->replaceMetaData($id, $this->_analyzeFile($id, 'xml'), 'string', $this->sessid);
|
#$this->gb->replaceMetaData($id, $this->_analyzeFile($id, 'xml'), 'string', $this->sessid);
|
||||||
|
|
||||||
|
@ -402,13 +408,14 @@ class uiPlaylist
|
||||||
|
|
||||||
$data = $this->Base->_dateArr2Str($mData);
|
$data = $this->Base->_dateArr2Str($mData);
|
||||||
foreach ($data as $key=>$val) {
|
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)) {
|
if (PEAR::isError($r)) {
|
||||||
$this->Base->_retMsg('Unable to set $1: $2', $key, $val);
|
$this->Base->_retMsg('Unable to set $1: $2', $key, $val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->Base->_retMsg('Metadata saved');
|
$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) {
|
foreach ($arr as $key=>$val) {
|
||||||
$arr[$key]['title'] = $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($val['playlistId']), UI_MDATA_KEY_TITLE);
|
$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]['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);
|
#print_r($arr);
|
||||||
return $arr;
|
return $arr;
|
||||||
|
@ -261,7 +262,19 @@ class uiScheduler extends uiCalendar
|
||||||
if ($this->_isError($r))
|
if ($this->_isError($r))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (isset($r['scheduleEntryId']))
|
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