diff --git a/livesupport/modules/htmlUI/var/formmask/generic.inc.php b/livesupport/modules/htmlUI/var/formmask/generic.inc.php index 3afa71e56..724ab8154 100755 --- a/livesupport/modules/htmlUI/var/formmask/generic.inc.php +++ b/livesupport/modules/htmlUI/var/formmask/generic.inc.php @@ -677,8 +677,12 @@ $ui_fmask = array( 'groupit' => TRUE ), array( - 'group' => array('duration', 'switchdown', 'switchup'), - 'label' => 'Duration' + 'group' => array('duration'), + 'label' => 'Duration (ms)' + ), + array( + 'group' => array('switchdown', 'switchup'), + 'label' => ' ' ), array( 'element' => 'cancel', diff --git a/livesupport/modules/htmlUI/var/html/img/ls_logo_animated.gif b/livesupport/modules/htmlUI/var/html/img/ls_logo_animated.gif new file mode 100755 index 000000000..41020f683 Binary files /dev/null and b/livesupport/modules/htmlUI/var/html/img/ls_logo_animated.gif differ diff --git a/livesupport/modules/htmlUI/var/locals.en_GB.xml b/livesupport/modules/htmlUI/var/locals.en_GB.xml index 17b0417d6..22100f4e7 100755 --- a/livesupport/modules/htmlUI/var/locals.en_GB.xml +++ b/livesupport/modules/htmlUI/var/locals.en_GB.xml @@ -1,6 +1,5 @@ - en_GB Are you sure to delete file "$1"? @@ -12,7 +11,7 @@ Are you sure to delete active Playlist? - + Are you sure to delete open Playlist? Are you sure to logout $1? @@ -44,7 +43,7 @@ Already active Playlist - Already active playlist. + Already open playlist. Audioclip Data saved @@ -132,7 +131,7 @@ No Item(s) selected - No file(s) selected. + No files selected. No Playlist is locked by You. @@ -140,7 +139,7 @@ Note: Station Preferences not setup proberly. - Note: Station Preferences not setup proberly. + Note: Station Preferences not setup properly. Old password was incorrect. @@ -244,11 +243,11 @@ Add file(s) to ScratchPad - Add file(s) to ScratchPad + Add files to ScratchPad Add file(s) to active Playlist - Add file(s) to active Playlist + Add files to open Playlist Add to ScratchPad @@ -256,7 +255,7 @@ Add to active Playlist - Add to active Playlist + Add to open Playlist Album @@ -596,11 +595,11 @@ New Playlist using this File - New playlist using this file + New playlist using file New Playlist using this file(s) - New playlist using this file(s) + New playlist using files New empty Playlist @@ -696,7 +695,7 @@ Remove file(s) - Remove file(s) + Remove files Remove from Scratchpad diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl index 8ade3de46..83e4bb90f 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl @@ -33,22 +33,24 @@ {if is_array($_entrys[$_hour])} - {$_hour|string_format:"%02d"}:00 + {$_hour|string_format:"%02d"}:00 {foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *} -
- {$i.title} - {$i.start}-{$i.end} - {$i.creator} +
+ +   + {$i.title} + {$i.start}-{$i.end} + {$i.creator}
- {*
*} + {*
*} {/foreach} {else} - + {$_hour|string_format:"%02d"}:00 diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day_onclick.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day_additem.tpl similarity index 100% rename from livesupport/modules/htmlUI/var/templates/scheduler/day_onclick.tpl rename to livesupport/modules/htmlUI/var/templates/scheduler/day_additem.tpl diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/removeitem.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/removeitem.tpl new file mode 100755 index 000000000..1dc2f1fcb --- /dev/null +++ b/livesupport/modules/htmlUI/var/templates/scheduler/removeitem.tpl @@ -0,0 +1 @@ +onClick="hidealttext(); return contextmenu('scheduleId={$i.scheduleid}', 'SCHEDULER.removeItem')" diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl index bcbac82a2..5e3ace44a 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl @@ -31,7 +31,7 @@ {foreach from=$SCHEDULER->Week item="_Day"} {* hier werden die Tagesnummern angezeigt *} - {$_Day.day} + {$_Day.day} {/foreach} @@ -46,20 +46,22 @@ {$_hour} {foreach from=$SCHEDULER->Week item="_day"} {if is_array($_entrys[$_day.day][$_hour])} - + - {foreach from=$_entrys[$_day.day][$_hour] item="i"} -
-

{$i.title|truncate:12}

-

{$i.start|truncate:8:""} - {$i.end|truncate:8:""}

-

{$i.creator}

+ {foreach from=$_entrys[$_day.day][$_hour] item="i"} +
+ +   +

{$i.title|truncate:12}

+

{$i.start|truncate:8:""} - {$i.end|truncate:8:""}

+

{$i.creator}

- {*
*} + {*
*} {/foreach} {else} - - + + {/if} {/foreach} diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week_onclick.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl similarity index 100% rename from livesupport/modules/htmlUI/var/templates/scheduler/week_onclick.tpl rename to livesupport/modules/htmlUI/var/templates/scheduler/week_additem.tpl diff --git a/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl b/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl index af969c692..793af6959 100755 --- a/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl +++ b/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl @@ -25,7 +25,7 @@ {if $i.type|lower == "playlist"} - {if $PL->isAvailable($i.id) == FALSE} + {if $PL->isAvailable($i.id) == false}
{else}
diff --git a/livesupport/modules/htmlUI/var/templates/script/alttext.js.tpl b/livesupport/modules/htmlUI/var/templates/script/alttext.js.tpl index 3225241d7..ab323fd0a 100755 --- a/livesupport/modules/htmlUI/var/templates/script/alttext.js.tpl +++ b/livesupport/modules/htmlUI/var/templates/script/alttext.js.tpl @@ -25,7 +25,7 @@ //return false; } - function showalttextthan(e) { // alert("now"); + function showalttextthan(e) { if (ie5) { if (event.clientX + contextmenuWidth > document.body.clientWidth) xPos = event.clientX - contextmenuWidth + document.body.scrollLeft; else xPos = event.clientX + document.body.scrollLeft; @@ -65,17 +65,17 @@ {/literal} diff --git a/livesupport/modules/htmlUI/var/templates/script/contextmenu.js.tpl b/livesupport/modules/htmlUI/var/templates/script/contextmenu.js.tpl index dcc6b5f6b..55ae96129 100755 --- a/livesupport/modules/htmlUI/var/templates/script/contextmenu.js.tpl +++ b/livesupport/modules/htmlUI/var/templates/script/contextmenu.js.tpl @@ -49,15 +49,15 @@ break; case "PL.changeFadeIn": - contextmenuHtml = contextmenuHtml + "
  •  ##Change Fadein## 
  • "; + contextmenuHtml = contextmenuHtml + "
  •  ##Change Fadein## 
  • "; break; case "PL.changeTransition": - contextmenuHtml = contextmenuHtml + "
  •  ##Change Transition## 
  • "; + contextmenuHtml = contextmenuHtml + "
  •  ##Change Transition## 
  • "; break; case "PL.changeFadeOut": - contextmenuHtml = contextmenuHtml + "
  •  ##Change Fadeout## 
  • "; + contextmenuHtml = contextmenuHtml + "
  •  ##Change Fadeout## 
  • "; break; case "SP.addItem": diff --git a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl b/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl index 1121fa54e..50c694c04 100755 --- a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl +++ b/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl @@ -1,4 +1,6 @@ {UIBROWSER->getMDataArr id=$i.id assign="_metaarr"} -onMouseover="showalttext('

    ##{$i.type|lower|capitalize}## {if ($_PL_activeId && $_PL_activeId == $i.id)}##(activated)##{/if}

    {foreach from=$_metaarr.metadata key=_key item=_item}{$_key}: {$_item}
    {/foreach}')" -onMouseout="hidealttext()" -{assign var="_metaarr" value=NULL} + +onMouseover = "showalttext('
    ##{$i.type|lower|capitalize}##: {$_metaarr.metadata.Title} {if $PL->isUSedBy($i.id) != false}##(used by {$PL->isUSedBy($i.id)})##{/if}
    {foreach from=$_metaarr.metadata key=_key item=_item}{if $_key != 'Title'}{$_key}: {$_item}
    {/if}{/foreach}')" +onMouseout = "hidealttext()" + +{assign var="_metaarr" value=null} diff --git a/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl b/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl index 17e53c0bc..6890c4c3c 100755 --- a/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl +++ b/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl @@ -84,6 +84,6 @@
    - +
    diff --git a/livesupport/modules/htmlUI/var/ui_conf.php b/livesupport/modules/htmlUI/var/ui_conf.php index 0ba8f0140..6d2a8a1ae 100755 --- a/livesupport/modules/htmlUI/var/ui_conf.php +++ b/livesupport/modules/htmlUI/var/ui_conf.php @@ -73,6 +73,17 @@ define('UI_BROWSE_DEFAULT_LIMIT', 10); define('UI_SCHEDULER_FIRSTWEEKDAY', 1); define('UI_SCHEDULER_PAUSE_PL2PL', '5 seconds'); +## File types +define('UI_FILETYPE_PLAYLIST', 'playlist'); +define('UI_FILETYPE_AUDIOCLIP', 'audioClip'); +define('UI_FILETYPE_WEBSTREAM', 'webstream'); + +## Playlist elements +define('UI_PL_ELEM_PLAYLIST', 'playlistElement'); +define('UI_PL_ELEM_FADEINFO', 'fadeInfo'); +define('UI_PL_ELEM_FADEIN', 'fadeIn'); +define('UI_PL_ELEM_FADEOUT', 'fadeOut'); + ## LS stuff diff --git a/livesupport/modules/htmlUI/var/ui_playlist.class.php b/livesupport/modules/htmlUI/var/ui_playlist.class.php index 9f99f742b..d05e87214 100755 --- a/livesupport/modules/htmlUI/var/ui_playlist.class.php +++ b/livesupport/modules/htmlUI/var/ui_playlist.class.php @@ -220,6 +220,7 @@ class uiPlaylist function getFlat() { + #print_r($this->get()); $this->plwalk($this->get()); #echo '
    '; print_r($this->flat); echo '
    '; return $this->flat; @@ -229,20 +230,20 @@ class uiPlaylist function plwalk($arr, $parent=0, $attrs=0) { foreach ($arr['children'] as $node=>$sub) { - if (strtolower($sub['elementname'])==='playlistelement') { + if ($sub['elementname']===UI_PL_ELEM_PLAYLIST) { $this->plwalk($sub, $node, $sub['attrs']); } - if (strtolower($sub['elementname'])==='audioclip' || strtolower($sub['elementname'])==='playlist') { + if ($sub['elementname']===UI_FILETYPE_AUDIOCLIP || $sub['elementname']===UI_FILETYPE_PLAYLIST) { #$this->flat["$parent.$node"] = $sub['attrs']; #$this->flat["$parent.$node"]['type'] = $sub['elementname']; $this->flat[$parent] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id'])); $this->flat[$parent]['attrs'] = $attrs; } - if (strtolower($sub['elementname'])==='fadeinfo') { - $this->flat[$parent]['fadein'] = GreenBox::_plTimeToSecs($sub['attrs']['fadein']); - $this->flat[$parent]['fadeout'] = GreenBox::_plTimeToSecs($sub['attrs']['fadeout']); - $this->flat[$parent]['fadein_ms'] = $sub['attrs']['fadein'] ? GreenBox::_plTimeToSecs($sub['attrs']['fadein']) * 1000 : 0; - $this->flat[$parent]['fadeout_ms'] = $sub['attrs']['fadeout'] ? GreenBox::_plTimeToSecs($sub['attrs']['fadeout']) * 1000 : 0; + if ($sub['elementname']===UI_PL_ELEM_FADEINFO) { + $this->flat[$parent][UI_PL_ELEM_FADEIN] = GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEIN]); + $this->flat[$parent][UI_PL_ELEM_FADEOUT] = GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEOUT]); + $this->flat[$parent]['fadein_ms'] = $sub['attrs'][UI_PL_ELEM_FADEIN] ? GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEIN]) * 1000 : 0; + $this->flat[$parent]['fadeout_ms'] = $sub['attrs'][UI_PL_ELEM_FADEOUT] ? GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEOUT]) * 1000 : 0; } } } @@ -257,30 +258,30 @@ class uiPlaylist switch ($type) { case "fadeX": $item[$prev['attrs']['id']] = - array('fadeIn' => GreenBox::_secsToPlTime($prev['fadein']), - 'fadeOut' => GreenBox::_secsToPlTime($duration/1000)); - $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($duration/1000), - 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout'])); + array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime($prev[UI_PL_ELEM_FADEIN]), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime($duration/1000)); + $item[$id] = array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime($duration/1000), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime($curr[UI_PL_ELEM_FADEOUT])); break; case "pause": $item[$prev['attrs']['id']] = - array('fadeIn' => GreenBox::_secsToPlTime($prev['fadein']), - 'fadeOut' => GreenBox::_secsToPlTime(-$duration/1000)); - $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime(-$duration/1000), - 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout'])); + array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime($prev[UI_PL_ELEM_FADEIN]), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime(-$duration/1000)); + $item[$id] = array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime(-$duration/1000), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime($curr[UI_PL_ELEM_FADEOUT])); break; case "fadeIn": - $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($duration/1000), - 'fadeOut' => GreenBox::_secsToPlTime($curr['fadeout'])); + $item[$id] = array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime($duration/1000), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime($curr[UI_PL_ELEM_FADEOUT])); break; case "fadeOut": - $item[$id] = array('fadeIn' => GreenBox::_secsToPlTime($curr['fadein']), - 'fadeOut' => GreenBox::_secsToPlTime($duration/1000)); + $item[$id] = array(UI_PL_ELEM_FADEIN => GreenBox::_secsToPlTime($curr[UI_PL_ELEM_FADEIN]), + UI_PL_ELEM_FADEOUT => GreenBox::_secsToPlTime($duration/1000)); break; } #print_r($item); foreach ($item as $i=>$val) { - $r = $this->Base->gb->changeFadeInfo($this->token, $i, $val['fadeIn'], $val['fadeOut'], $this->Base->sessid); + $r = $this->Base->gb->changeFadeInfo($this->token, $i, $val[UI_PL_ELEM_FADEIN], $val[UI_PL_ELEM_FADEOUT], $this->Base->sessid); #print_r($r); if (PEAR::isError($r)) { if (UI_VERBOSE) print_r($r); @@ -454,26 +455,23 @@ class uiPlaylist function isAvailable($id) { - if (strtolower($this->Base->gb->getFileType($id))==="playlist" && $this->Base->gb->playlistIsAvailable($id, $this->Base->sessid) === TRUE) + if ($this->Base->gb->getFileType($id) !== UI_FILETYPE_PLAYLIST) return TRUE; + + if ($this->Base->gb->playlistIsAvailable($id, $this->Base->sessid) === TRUE) + return TRUE; + return FALSE; } - - function _plTimeToSecs($plt, $length=4) + function isUsedBy($id) { - $arr = split(':', $plt); - if(isset($arr[2])){ return ($arr[0]*60 + $arr[1])*60 + $arr[2]; } - if(isset($arr[1])){ return $arr[0]*60 + $arr[1]; } - return $arr[0]; - } + if ($this->Base->gb->getFileType($id) !== UI_FILETYPE_PLAYLIST) + return FALSE; - function _secsToPlTime($s0) - { - $m = intval($s0 / 60); - $r = $s0 - $m*60; - $h = $m / 60; - $m = $m % 60; - return sprintf("%02d:%02d:%09.6f", $h, $m, $r); + if (($userid = $this->Base->gb->playlistIsAvailable($id, $this->Base->sessid)) !== TRUE) + return $this->Base->gb->getSubjName($userid); + + return FALSE; } }