diff --git a/livesupport/modules/htmlUI/var/formmask/metadata.inc.php b/livesupport/modules/htmlUI/var/formmask/metadata.inc.php
index 0828a304e..9d8a0ecd8 100755
--- a/livesupport/modules/htmlUI/var/formmask/metadata.inc.php
+++ b/livesupport/modules/htmlUI/var/formmask/metadata.inc.php
@@ -111,49 +111,20 @@ $mask = array(
'label' => 'File format',
'required' => TRUE,
'options' => array(
- '' => '',
'File' => 'File',
'live stream' => 'Live Stream',
'networked file'=> 'Networked File',
),
+ 'attributes'=> array('disabled' => 'on'),
'id3' => FALSE
),
array(
'element' => 'dcterms:extent',
'type' => 'text',
'label' => 'Length',
- 'attributes'=> array('readonly' => 'on'),
+ 'attributes'=> array('disabled' => 'on'),
'id3' => FALSE
),
- /*
- array(
- 'element' => 'Format_Extent_h',
- 'type' => 'select',
- 'options' => getDArr('h'),
- 'groupit' => TRUE
- ),
- array(
- 'element' => 'Format_Extent_m',
- 'type' => 'select',
- 'options' => getDArr('m'),
- 'groupit' => TRUE
- ),
- array(
- 'element' => 'Format_Extent_s',
- 'type' => 'select',
- 'options' => getDArr('h'),
- 'groupit' => TRUE
- ),
- array(
- 'group' => array('Main__Format_Extent_h', 'Main__Format_Extent_m', 'Main__Format_Extent_s'),
- #'name' => 'gr_Format_Extent',
- 'label' => 'Format_Extent',
- 'rule' => 'required',
- #'grouprule' => 'regex',
- #'format' => '/([1-9]0)|([1-9]{2})|(0[1-9])/',
- #'arg1' => 'Please enter Format_Extent',
- #'howmany' => 1
- ), */
),
'Music' => array(
array(
@@ -212,11 +183,11 @@ $mask = array(
'type' => 'select',
'label' => 'Format',
'options' => array(
- '' => '',
'File' => 'File',
'live stream' => 'Live Stream',
'networked file'=> 'Networked File'
),
+ 'attributes'=> array('disabled' => 'on'),
'id3' => FALSE
),
array(
@@ -237,7 +208,7 @@ $mask = array(
'element' => 'dcterms:extent',
'type' => 'text',
'label' => 'Length',
- 'attributes'=> array('readonly' => 'on'),
+ 'attributes'=> array('disabled' => 'on'),
'id3' => FALSE
),
array(
@@ -486,11 +457,11 @@ $mask = array(
'type' => 'select',
'label' => 'Format',
'options' => array(
- '' => '',
- 'File' => 'File',
- 'live stream' => 'Live Stream',
- 'networked file'=> 'Networked File',
- )
+ 'File' => 'File',
+ 'live stream' => 'Live Stream',
+ 'networked file'=> 'Networked File'
+ ),
+ 'attributes'=> array('disabled' => 'on')
),
array(
'element' => 'dc:contributor',
diff --git a/livesupport/modules/htmlUI/var/templates/masterpanel.tpl b/livesupport/modules/htmlUI/var/templates/masterpanel.tpl
index edd7ea55e..cdb247f14 100755
--- a/livesupport/modules/htmlUI/var/templates/masterpanel.tpl
+++ b/livesupport/modules/htmlUI/var/templates/masterpanel.tpl
@@ -7,7 +7,7 @@
{include file="statusbar.tpl"}
{if $showMenuTop}
- {include file="menu_top.tpl"}
+ {include file="menu.tpl"}
{/if}
{if $structure}
@@ -34,12 +34,8 @@
{include file="file/edit.tpl"}
{/if}
-{if $editMetaData}
- {include file="editMetaData.tpl"}
-{/if}
-
{if $changeStationPrefs}
- {include file="changeStationPrefs.tpl"}
+ {include file="stationprefs.tpl"}
{/if}
{if $PL_simpleManagement}
@@ -52,7 +48,7 @@
{/if}
{if $SCRATCHPAD}
- {include file="scratchPad.tpl"}
+ {include file="scratchpad.tpl"}
{/if}
diff --git a/livesupport/modules/htmlUI/var/templates/menu_top.tpl b/livesupport/modules/htmlUI/var/templates/menu.tpl
similarity index 100%
rename from livesupport/modules/htmlUI/var/templates/menu_top.tpl
rename to livesupport/modules/htmlUI/var/templates/menu.tpl
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
index 909c92d82..3afb053df 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl
@@ -16,7 +16,7 @@
{assign var="_hour" value=$_Hour.hour}
-
+ |
{$_Hour.hour}
|
@@ -41,7 +41,7 @@
{foreach from=$_usage item="_entry"}
{if $_entry.pos >= $_Hour.timestamp && $_entry.pos < $_Hour.timestamp+3600}
-
+ |
{$_entry.title}
{$_entry.start|regex_replace:"/[0-9]+T/":""|truncate:5:""}-{$_entry.end|regex_replace:"/[0-9]+T/":""|truncate:5:""}
diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
index 496d27946..8336223b4 100755
--- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
+++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl
@@ -35,7 +35,7 @@
{foreach from=$_scale item="_hour"}
-
+ |
{$_hour|string_format:'%02d'}
|
@@ -55,9 +55,9 @@
{if is_array($i.entry)}
{if $i.length/$_divisor > $_minwidth}
- {$_title} {$_period} {$_creator} |
+ {$_title} {$_period} {$_creator} |
{else}
- |
+ |
{/if}
{else}
|
diff --git a/livesupport/modules/htmlUI/var/templates/scratchPad.tpl b/livesupport/modules/htmlUI/var/templates/scratchpad.tpl
similarity index 100%
rename from livesupport/modules/htmlUI/var/templates/scratchPad.tpl
rename to livesupport/modules/htmlUI/var/templates/scratchpad.tpl
diff --git a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
index c14c9d378..c01650c4c 100755
--- a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
+++ b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl
@@ -59,10 +59,10 @@
}
function hpopup(url, name)
- {
+ { //, 'width=1, height=1'
url = url + '&is_popup=1';
- popupwin = window.open(url, name, 'width=1, height=1');
- window.parent.focus();
+ popupwin = window.open(url, name);
+ //window.parent.focus();
}
{/literal}
diff --git a/livesupport/modules/htmlUI/var/templates/script/contextMenue.js.tpl b/livesupport/modules/htmlUI/var/templates/script/contextMenue.js.tpl
index c6af808bc..39df007f5 100755
--- a/livesupport/modules/htmlUI/var/templates/script/contextMenue.js.tpl
+++ b/livesupport/modules/htmlUI/var/templates/script/contextMenue.js.tpl
@@ -84,7 +84,7 @@ function contextmenu(param) {
break;
case "delete":
- contextmenuHtml = contextmenuHtml + "";
+ contextmenuHtml = contextmenuHtml + "";
break;
case "fileList":
diff --git a/livesupport/modules/htmlUI/var/templates/changeStationPrefs.tpl b/livesupport/modules/htmlUI/var/templates/stationprefs.tpl
similarity index 100%
rename from livesupport/modules/htmlUI/var/templates/changeStationPrefs.tpl
rename to livesupport/modules/htmlUI/var/templates/stationprefs.tpl
diff --git a/livesupport/modules/htmlUI/var/templates/statusbar.tpl b/livesupport/modules/htmlUI/var/templates/statusbar.tpl
index ca1b76f28..30afdfac4 100755
--- a/livesupport/modules/htmlUI/var/templates/statusbar.tpl
+++ b/livesupport/modules/htmlUI/var/templates/statusbar.tpl
@@ -39,17 +39,22 @@
- {* {$SCHEDULER->getNowNextClip()} *}
- Now Playing: Don Quixote
-
-
- Elapsed:00:05:24
- Remaining:00:02:05
-
+ {assign var='_nowplaying' value=$SCHEDULER->getNowNextClip()}
+ {assign var='_nextplaying' value=$SCHEDULER->getNowNextClip(1)}
+ {if $_nowplaying}
+ Now Playing: {$_nowplaying.title}
+
+
+ Elapsed: {$_nowplaying.elapsed|truncate:8:""}
+ Remaining: {$_nowplaying.remaining|truncate:8:""}
+
+ {/if}
- Playing Next: Diego Diego 00:03:25
+ {if $_nextplaying}
+ Playing Next: {$_nextplaying.title} {$_nextplaying.duration|truncate:8:""}
+ {/if}
diff --git a/livesupport/modules/htmlUI/var/ui_conf.php b/livesupport/modules/htmlUI/var/ui_conf.php
index eb6c69426..d9a152abd 100755
--- a/livesupport/modules/htmlUI/var/ui_conf.php
+++ b/livesupport/modules/htmlUI/var/ui_conf.php
@@ -3,7 +3,7 @@ define('UI_VERBOSE', FALSE);
define('UI_WARNING', TRUE);
define('UI_ERROR', TRUE);
#define('UI_TIMEZONE', ' +100');
-define('UI_TIMEZONEOFFSET', date('Z'));
+define('UI_TIMEZONEOFFSET', date('Z'));
define('UI_HANDLER', 'ui_handler.php');
define('UI_BROWSER', 'ui_browser.php');
@@ -34,6 +34,9 @@ define('UI_MDATA_KEY_TITLE', 'dc:title');
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
define('UI_MDATA_KEY_URL', 'ls:url');
+define('UI_MDATA_KEY_FORMAT', 'dc:format');
+define('UI_MDATA_VALUE_FORMAT_FILE', 'File');
+define('UI_MDATA_VALUE_FORMAT_STREAM', 'live stream');
## Simple Search Preferences
define('UI_SIMPLESEARCH_FILETYPE', 'File');
diff --git a/livesupport/modules/htmlUI/var/ui_handler.class.php b/livesupport/modules/htmlUI/var/ui_handler.class.php
index 81d76b8e1..30f4c2648 100644
--- a/livesupport/modules/htmlUI/var/ui_handler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_handler.class.php
@@ -186,7 +186,8 @@ class uiHandler extends uiBase {
$s = $ia['playtime_seconds'];
$extent = date('H:i:s', floor($s)-date('Z')).substr(number_format($s, 6), strpos(number_format($s, 6), '.'));
$this->_setMdataValue($id, UI_MDATA_KEY_DURATION, $extent);
-
+ $this->gb->setMDataValue($r, UI_MDATA_KEY_FORMAT, $this->sessid, UI_MDATA_VALUE_FORMAT_FILE);
+
foreach ($mask['pages'] as $key=>$val) {
foreach ($mask['pages'][$key] as $k=>$v) {
if ($v['id3'] != FALSE) {
@@ -232,6 +233,7 @@ class uiHandler extends uiBase {
$length = sprintf('%02d', $formdata['length']['H']).':'.sprintf('%02d', $formdata['length']['i']).':'.sprintf('%02d', $formdata['length']['s']).'.000000';
$this->gb->setMDataValue($r, UI_MDATA_KEY_TITLE, $this->sessid, $formdata['title']);
$this->gb->setMDataValue($r, UI_MDATA_KEY_DURATION, $this->sessid, $length);
+ $this->gb->setMDataValue($r, UI_MDATA_KEY_FORMAT, $this->sessid, UI_MDATA_VALUE_FORMAT_STREAM);
$this->redirUrl = UI_BROWSER."?act=editWebstream&id=$r";
$this->_retMsg('Stream Data saved');
return $r;
@@ -361,14 +363,17 @@ class uiHandler extends uiBase {
*/
function delete($id, $delOverride=FALSE)
{
- $this->redirUrl = UI_BROWSER."?act=fileList&id=".$this->pid;
+ #$this->redirUrl = UI_BROWSER."?act=fileList&id=".$this->pid;
+ $this->redirUrl = UI_BROWSER."?popup[]=_reload_parent&popup[]=_close";
+ /* no folder support yet
if (!($delOverride==$id) && (count($this->gb->getObjType($id)=='Folder'?
$this->gb->listFolder($id, $this->sessid):NULL))) {
$this->_retMsg("Folder is not empty. You can override this protection by clicking DEL again");
$this->redirUrl = UI_BROWSER."?act=fileList&id=".$this->pid."&delOverride=$id";
return FALSE;
}
+ */
if ($this->gb->getFileType($id)=='playlist') {
$r = $this->gb->deletePlaylist($id, $this->sessid);
diff --git a/livesupport/modules/htmlUI/var/ui_playlist.class.php b/livesupport/modules/htmlUI/var/ui_playlist.class.php
index ea3424d8e..d161ef4b4 100755
--- a/livesupport/modules/htmlUI/var/ui_playlist.class.php
+++ b/livesupport/modules/htmlUI/var/ui_playlist.class.php
@@ -143,7 +143,7 @@ class uiPlaylist
foreach ($elemIds as $elemId) {
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid);
if (PEAR::isError($r)) {
- if (UI_VERBOSE) print_r($r);
+ #print_r($r);
$this->Base->_retMsg('Error on add item to Playlist');
return FALSE;
}
diff --git a/livesupport/modules/htmlUI/var/ui_scheduler.class.php b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
index ce0b5dc7a..c99a4ef41 100755
--- a/livesupport/modules/htmlUI/var/ui_scheduler.class.php
+++ b/livesupport/modules/htmlUI/var/ui_scheduler.class.php
@@ -205,6 +205,27 @@ class uiScheduler extends uiCalendar
}
+ function getNowNextClip($distance=0)
+ {
+ $datetime = strftime('%Y-%m-%dT%H:%M:%S');
+ $xmldatetime = str_replace('-', '', $datetime);
+ $pl = $this->displayScheduleMethod($xmldatetime, $xmldatetime);
+ if(count($pl) == 0)
+ return FALSE;
+ $pl = current($pl);
+ $offset = strftime('%H:%M:%S', $this->_strtotime($datetime) - $this->_datetime2timestamp($pl['start']) - UI_TIMEZONEOFFSET);
+ $clip = $this->Base->gb->displayPlaylistClipAtOffset($this->Base->sessid, $pl['playlistId'], $offset, $distance);
+
+ return array(
+ 'title' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_TITLE),
+ 'duration' => $this->Base->_getMDataValue($this->Base->gb->_idFromGunid($clip['gunid']), UI_MDATA_KEY_DURATION),
+ 'elapsed' => $clip['elapsed'],
+ 'remaining' => $clip['remaining'],
+ 'percentage'=> 50
+ );
+ }
+
+
function _copyPlFromSP()
{
foreach ($this->Base->SCRATCHPAD->get() as $val) {
@@ -217,13 +238,6 @@ class uiScheduler extends uiCalendar
}
- function getNowNextClip()
- {
- $playingNow = $this->GeneratePlayReportMethod(strftime('%Y%m%dT%H:%M:%S'), strftime('%Y%m%dT%H:%M:%S'));
- #print_r ($playingNow);
- }
-
-
function _oneOrMore($in)
{
return $id < 1 ? ceil($in) : round($in);
|