parent
cfca8290a3
commit
f30283d544
14 changed files with 374 additions and 240 deletions
|
@ -642,6 +642,53 @@ $ui_fmask = array(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'PL.setItemPlaylength' => array(
|
||||||
|
'act' => array(
|
||||||
|
'element' => 'act',
|
||||||
|
'type' => 'hidden',
|
||||||
|
),
|
||||||
|
'id' => array(
|
||||||
|
'element' => 'id',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
'elemId' => array(
|
||||||
|
'element' => 'elemId',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
'duration' => array(
|
||||||
|
'element' => 'duration',
|
||||||
|
'type' => 'hidden'
|
||||||
|
),
|
||||||
|
'playlength' => array(
|
||||||
|
'element' => 'playlength',
|
||||||
|
'type' => 'date',
|
||||||
|
'label' => 'Playlength',
|
||||||
|
'options' => array('format' => 'His'),
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'cancel',
|
||||||
|
'type' => 'button',
|
||||||
|
'label' => 'Cancel',
|
||||||
|
'attributes'=> array('onClick' => 'window.close()'),
|
||||||
|
'groupit' => TRUE
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'reset',
|
||||||
|
'type' => 'reset',
|
||||||
|
'label' => 'Reset',
|
||||||
|
'groupit' => TRUE
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'submitter',
|
||||||
|
'type' => 'button',
|
||||||
|
'label' => 'Submit',
|
||||||
|
'attributes'=> array('onClick' => 'PL_checkItemPlaylength()'),
|
||||||
|
'groupit' => TRUE
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'group' => array('cancel', 'reset', 'submitter')
|
||||||
|
)
|
||||||
|
),
|
||||||
'schedule' => array(
|
'schedule' => array(
|
||||||
array(
|
array(
|
||||||
'element' => 'act',
|
'element' => 'act',
|
||||||
|
|
|
@ -101,6 +101,11 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->display('popup/PLAYLIST.arrangeItems.tpl');
|
$Smarty->display('popup/PLAYLIST.arrangeItems.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "PL.setItemPlaylengthForm":
|
||||||
|
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->setItemPlaylengthForm($_REQUEST['id'], $_REQUEST['elemId'], $ui_fmask['PL.setItemPlaylength']));
|
||||||
|
$Smarty->display('popup/PLAYLIST.setItemPlaylength.tpl');
|
||||||
|
break;
|
||||||
|
|
||||||
case "SCHEDULER.addItem":
|
case "SCHEDULER.addItem":
|
||||||
$Smarty->display('popup/SCHEDULER.addItem.tpl');
|
$Smarty->display('popup/SCHEDULER.addItem.tpl');
|
||||||
break;
|
break;
|
||||||
|
@ -119,9 +124,9 @@ if (is_array($_REQUEST['popup'])){
|
||||||
$Smarty->display('popup/testStream.tpl');
|
$Smarty->display('popup/testStream.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "listen2AudioClip":
|
case "listen2Audio":
|
||||||
$Smarty->assign('data', $uiBrowser->listen2AudioClip($_REQUEST['id']));
|
$Smarty->assign('data', $uiBrowser->listen2Audio($_REQUEST['id']));
|
||||||
$Smarty->display('popup/listen2AudioClip.tpl');
|
$Smarty->display('popup/listen2Audio.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "help":
|
case "help":
|
||||||
|
|
|
@ -180,11 +180,17 @@ switch($_REQUEST['act']){
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "PL.addItem":
|
case "PL.addItem":
|
||||||
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id']) !== FALSE)
|
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id'], $_REQUEST['playlength']) !== FALSE)
|
||||||
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
||||||
$uiHandler->PLAYLIST->setReload();
|
$uiHandler->PLAYLIST->setReload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case "PL.setItemPlaylength":
|
||||||
|
$uiHandler->PLAYLIST->setItemPlaylength($_REQUEST['elemId'], $_REQUEST['playlength']);
|
||||||
|
$uiHandler->PLAYLIST->setReload();
|
||||||
|
break;
|
||||||
|
|
||||||
case "PL.removeItem":
|
case "PL.removeItem":
|
||||||
$uiHandler->PLAYLIST->removeItem($_REQUEST['id']);
|
$uiHandler->PLAYLIST->removeItem($_REQUEST['id']);
|
||||||
$uiHandler->PLAYLIST->setReload();
|
$uiHandler->PLAYLIST->setReload();
|
||||||
|
@ -279,14 +285,20 @@ switch($_REQUEST['act']){
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case NULL:
|
||||||
if ($uiHandler->userid) {
|
if ($uiHandler->userid) {
|
||||||
$uiHandler->_retMsg('The uploaded filer is bigger than allowed in system settings. See "Help", chapter "Troubleshooting" for more information.');
|
$uiHandler->_retMsg('The uploaded filer is bigger than allowed in system settings. See "Help", chapter "Troubleshooting" for more information.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$uiHandler->redirUrl = UI_BROWSER;
|
$uiHandler->redirUrl = UI_BROWSER;
|
||||||
|
|
||||||
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$uiHandler->_retMsg(tra('Unknown method: $1', $_REQUEST['act']));
|
||||||
|
$uiHandler->redirUrl = UI_BROWSER;
|
||||||
|
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uiHandler->alertMsg) {
|
if ($uiHandler->alertMsg) {
|
||||||
|
|
|
@ -2,24 +2,29 @@ onClick="return contextmenu('{$i.id}'
|
||||||
, 'SP.addItem'
|
, 'SP.addItem'
|
||||||
|
|
||||||
{if $i.type|lower == 'audioclip'}
|
{if $i.type|lower == 'audioclip'}
|
||||||
, 'listen', '{$i.gunid}', '##audioclip##'
|
, 'listen', '{$i.gunid}'
|
||||||
|
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
, 'PL.addItem'
|
||||||
{else}
|
{else}
|
||||||
, 'PL.create', '{$i.title|truncate:20|escape:'html'}'
|
, 'PL.create'
|
||||||
{/if}
|
{/if}
|
||||||
, 'edit', '##audioclip##'
|
|
||||||
, 'delete', '##audioclip##'
|
, 'edit'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'webstream'}
|
{if $i.type|lower == 'webstream'}
|
||||||
|
, 'listen', '{$i.gunid}'
|
||||||
|
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
, 'PL.addStream'
|
||||||
{else}
|
{else}
|
||||||
, 'PL.create', '{$i.title|truncate:20}'
|
, 'PL.create'
|
||||||
{/if}
|
{/if}
|
||||||
, 'edit', '##webstream##'
|
|
||||||
, 'delete', '##webstream##'
|
, 'edit'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'playlist'}
|
{if $i.type|lower == 'playlist'}
|
||||||
|
@ -27,12 +32,15 @@ onClick="return contextmenu('{$i.id}'
|
||||||
{if $_PL_activeId == $i.id}
|
{if $_PL_activeId == $i.id}
|
||||||
, 'PL.release'
|
, 'PL.release'
|
||||||
{else}
|
{else}
|
||||||
, 'SCHEDULER.addPL', 'PL.addItem', 'delete'
|
, 'SCHEDULER.addPL'
|
||||||
|
, 'PL.addItem'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
, 'SCHEDULER.addPL', 'PL.activate'
|
, 'SCHEDULER.addPL'
|
||||||
, 'PL.create', '{$i.title|truncate:20}'
|
, 'PL.activate'
|
||||||
, 'delete', '##playlist##'
|
, 'PL.create'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
)"
|
)"
|
||||||
|
|
|
@ -20,7 +20,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
|
||||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Add Audio##</a>
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Add Audio##</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Audioclip##</a></li>
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Audioclip##</a></li>
|
||||||
{* <li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li> *}
|
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a>##Media Library##</a>
|
<li><a>##Media Library##</a>
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
onClick="return contextmenu('{$i.attrs.id}',
|
onClick="return contextmenu('{$i.attrs.id}',
|
||||||
{if $i.type|lower == 'audioclip'}
|
|
||||||
'listen', '{$i.gunid}', '{$i.type}',
|
{if $i.type|lower == 'webstream'}
|
||||||
|
'listen', '{$i.gunid}',
|
||||||
|
'PL.changeItemPlaylength',
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{if $i.type|lower == 'audioclip'}
|
||||||
|
'listen', '{$i.gunid}',
|
||||||
|
'PL.changeItemPlaylength',
|
||||||
|
{/if}
|
||||||
|
|
||||||
'PL.removeItem'
|
'PL.removeItem'
|
||||||
)"
|
)"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<td><input type="checkbox" class="checkbox" name="{$i.attrs.id}"/></td>
|
<td><input type="checkbox" class="checkbox" name="{$i.attrs.id}"/></td>
|
||||||
<td {include file="playlist/actionhandler.tpl"}>{$i.title}</td>
|
<td {include file="playlist/actionhandler.tpl"}>{$i.title}</td>
|
||||||
<td {include file="playlist/actionhandler.tpl"} style="text-align: right">
|
<td {include file="playlist/actionhandler.tpl"} style="text-align: right">
|
||||||
{assign var="_duration" value=$i.duration}{niceTime in=$_duration}
|
{assign var="_duration" value=$i.playlength}{niceTime in=$_duration}
|
||||||
</td>
|
</td>
|
||||||
<td {include file="playlist/actionhandler.tpl"}>{$i.creator}</td>
|
<td {include file="playlist/actionhandler.tpl"}>{$i.creator}</td>
|
||||||
<td {include file="playlist/actionhandler.tpl"}>
|
<td {include file="playlist/actionhandler.tpl"}>
|
||||||
|
|
|
@ -15,8 +15,10 @@
|
||||||
{if $data.type.valid === true}
|
{if $data.type.valid === true}
|
||||||
{tra str='Stream is wanted type <font color="green">$1</font>.' 1=$data.type.type}
|
{tra str='Stream is wanted type <font color="green">$1</font>.' 1=$data.type.type}
|
||||||
|
|
||||||
{else}
|
{elseif $data.type.type}
|
||||||
{tra str='Stream has wrong content type <font color="red">$1</font>.' 1=$data.type.type}
|
{tra str='Stream has wrong content type <font color="red">$1</font>.' 1=$data.type.type}
|
||||||
|
{else}
|
||||||
|
##No content type declared.##
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,24 +2,33 @@ onClick="return contextmenu('{$i.id}'
|
||||||
, 'SP.removeItem'
|
, 'SP.removeItem'
|
||||||
|
|
||||||
{if $i.type|lower == 'audioclip'}
|
{if $i.type|lower == 'audioclip'}
|
||||||
, 'listen', '{$i.gunid}', '##audioclip##'
|
, 'listen', '{$i.gunid}'
|
||||||
|
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
, 'PL.addItem'
|
||||||
{else}
|
{else}
|
||||||
, 'PL.create', '{$i.title|truncate:20|escape:'html'}'
|
, 'PL.create'
|
||||||
{/if}
|
{/if}
|
||||||
, 'edit', '##audioclip##'
|
|
||||||
, 'delete', '##audioclip##'
|
, 'edit'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'webstream'}
|
{if $i.type|lower == 'webstream'}
|
||||||
|
, 'listen', '{$i.gunid}'
|
||||||
|
|
||||||
{if $_PL_activeId}
|
{if $_PL_activeId}
|
||||||
, 'PL.addItem'
|
{if $i.duration == '00:00:00.000000'}
|
||||||
|
, 'PL.addStream'
|
||||||
{else}
|
{else}
|
||||||
, 'PL.create', '{$i.title|truncate:20}'
|
, 'PL.addItem'
|
||||||
{/if}
|
{/if}
|
||||||
, 'edit', '##webstream##'
|
{else}
|
||||||
, 'delete', '##webstream##'
|
, 'PL.create'
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
, 'edit'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $i.type|lower == 'playlist'}
|
{if $i.type|lower == 'playlist'}
|
||||||
|
@ -27,12 +36,16 @@ onClick="return contextmenu('{$i.id}'
|
||||||
{if $_PL_activeId == $i.id}
|
{if $_PL_activeId == $i.id}
|
||||||
, 'PL.release'
|
, 'PL.release'
|
||||||
{elseif $PL->isAvailable($i.id) == true}
|
{elseif $PL->isAvailable($i.id) == true}
|
||||||
, 'SCHEDULER.addPL', 'PL.addItem', 'PL.activate', 'PL.delete'
|
, 'SCHEDULER.addPL'
|
||||||
|
, 'PL.addItem'
|
||||||
|
, 'PL.activate'
|
||||||
|
, 'PL.delete'
|
||||||
{/if}
|
{/if}
|
||||||
{elseif $PL->isAvailable($i.id) == true}
|
{elseif $PL->isAvailable($i.id) == true}
|
||||||
, 'SCHEDULER.addPL', 'PL.activate'
|
, 'SCHEDULER.addPL'
|
||||||
, 'PL.create', '{$i.title|truncate:20}'
|
, 'PL.activate'
|
||||||
, 'delete', '##playlist##'
|
, 'PL.create'
|
||||||
|
, 'delete'
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
)"
|
)"
|
|
@ -1,17 +1,17 @@
|
||||||
{literal}
|
{literal}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// www.jjam.de - Kontextmenü mit JavaScript - Version 15.12.2002
|
// www.jjam.de - Kontextmenü mit JavaScript - Version 15.12.2002
|
||||||
|
|
||||||
// Browser detection
|
// Browser detection
|
||||||
ie5 = (document.getElementById && document.all && document.styleSheets) ? 1 : 0;
|
ie5 = (document.getElementById && document.all && document.styleSheets) ? 1 : 0;
|
||||||
nn6 = (document.getElementById && !document.all) ? 1 : 0;
|
nn6 = (document.getElementById && !document.all) ? 1 : 0;
|
||||||
|
|
||||||
document.write('<div id="contextmenucontainer"></div>');
|
document.write('<div id="contextmenucontainer"></div>');
|
||||||
contextmenuStatus = 0;
|
contextmenuStatus = 0;
|
||||||
document.onclick = hidecontextmenu;
|
document.onclick = hidecontextmenu;
|
||||||
|
|
||||||
|
|
||||||
function contextmenu(param) {
|
function contextmenu(param) {
|
||||||
var contextmenuHeader = "<div class='contextmenu' id='contextmenu' style='position: absolute; top: -1000; left: 0; z-index: 100'>" +
|
var contextmenuHeader = "<div class='contextmenu' id='contextmenu' style='position: absolute; top: -1000; left: 0; z-index: 100'>" +
|
||||||
"<ul>";
|
"<ul>";
|
||||||
var contextmenuFooter = "</ul></div>";
|
var contextmenuFooter = "</ul></div>";
|
||||||
|
@ -34,6 +34,14 @@
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.addItem&id="+param+"')\" "+oF+"> ##Add to playlist## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.addItem&id="+param+"')\" "+oF+"> ##Add to playlist## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "PL.addStream":
|
||||||
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.setItemPlaylengthForm&id="+param+"', 'PL.setStreamPlaylength', 400, 50)\" "+oF+"> ##Add to playlist## </a></li>";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "PL.changeItemPlaylength":
|
||||||
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.setItemPlaylengthForm&elemId="+param+"', 'PL.setItemPlaylength', 400, 50)\" "+oF+"> ##Change playlegth## </a></li>";
|
||||||
|
break;
|
||||||
|
|
||||||
case "PL.removeItem":
|
case "PL.removeItem":
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.removeItem&id="+param+"')\" "+oF+"> ##Remove from playlist## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.removeItem&id="+param+"')\" "+oF+"> ##Remove from playlist## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
@ -67,16 +75,14 @@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "listen":
|
case "listen":
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_BROWSER}?popup[]=listen2AudioClip&id="+contextmenu.arguments[++i]+"')\" "+oF+"> ##Listen## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_BROWSER}?popup[]=listen2Audio&id="+contextmenu.arguments[++i]+"')\" "+oF+"> ##Listen## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "edit":
|
case "edit":
|
||||||
i++;
|
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='{$UI_BROWSER}?act=editItem&id="+param+"' "+oF+"> ##Edit## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='{$UI_BROWSER}?act=editItem&id="+param+"' "+oF+"> ##Edit## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "delete":
|
case "delete":
|
||||||
i++;
|
|
||||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=deleteItem&id="+param+"', 'deleteItem', 400, 50)\" "+oF+"> ##Delete## </a></li>";
|
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=deleteItem&id="+param+"', 'deleteItem', 400, 50)\" "+oF+"> ##Delete## </a></li>";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -127,9 +133,9 @@
|
||||||
document.onclick = showcontextmenu;
|
document.onclick = showcontextmenu;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showcontextmenu(e) {
|
function showcontextmenu(e) {
|
||||||
var contextmenuWidth = document.getElementById('contextmenu').clientWidth;
|
var contextmenuWidth = document.getElementById('contextmenu').clientWidth;
|
||||||
var contextmenuHeight = document.getElementById('contextmenu').clientHeight;
|
var contextmenuHeight = document.getElementById('contextmenu').clientHeight;
|
||||||
|
|
||||||
|
@ -161,15 +167,15 @@
|
||||||
setTimeout("document.getElementById('contextmenu').style.left = "+xPos+"; document.getElementById('contextmenu').style.top = "+yPos+";", 10);
|
setTimeout("document.getElementById('contextmenu').style.left = "+xPos+"; document.getElementById('contextmenu').style.top = "+yPos+";", 10);
|
||||||
contextmenuStatus = 1;
|
contextmenuStatus = 1;
|
||||||
document.onclick = hidecontextmenu;
|
document.onclick = hidecontextmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function hidecontextmenu(e) {
|
function hidecontextmenu(e) {
|
||||||
if (contextmenuStatus == 1) {
|
if (contextmenuStatus == 1) {
|
||||||
setTimeout("document.getElementById('contextmenu').style.top =- 250", 0);
|
setTimeout("document.getElementById('contextmenu').style.top =- 250", 0);
|
||||||
contextmenuStatus = 0;
|
contextmenuStatus = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -432,17 +432,16 @@ class uiBrowser extends uiBase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function listen2AudioClip($clipid)
|
function listen2Audio($clipid)
|
||||||
{
|
{
|
||||||
#$pls = "[playlist]\n".
|
$id = $this->gb->_idFromGunid($clipid);
|
||||||
#$pls .= "File1=http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
$type = $this->gb->getFileType($id);
|
||||||
#$pls .= "Title1=Mein Titel\n";
|
|
||||||
#$pls .= "NumberOfEntries=1\nVersion=2";
|
|
||||||
|
|
||||||
#$m3u = "#EXTM3U\n";
|
|
||||||
#$m3u .= "#EXTINF:111,Mein Titel\n";
|
|
||||||
$m3u .= "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
|
||||||
|
|
||||||
|
if (strtolower($type) === strtolower(UI_FILETYPE_AUDIOCLIP)) {
|
||||||
|
$m3u = "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
||||||
|
} else {
|
||||||
|
$m3u = $this->_getMDataValue($id, UI_MDATA_KEY_URL);
|
||||||
|
}
|
||||||
touch(UI_TESTSTREAM_MU3_TMP);
|
touch(UI_TESTSTREAM_MU3_TMP);
|
||||||
$handle = fopen(UI_TESTSTREAM_MU3_TMP, "w");
|
$handle = fopen(UI_TESTSTREAM_MU3_TMP, "w");
|
||||||
fwrite($handle, $m3u);
|
fwrite($handle, $m3u);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
ini_set('memory_limit', '64M');
|
ini_set('memory_limit', '64M');
|
||||||
|
|
||||||
## Warning/Error level
|
## Warning/Error level
|
||||||
define('UI_DEBUG', TRUE);
|
define('UI_DEBUG', FALSE);
|
||||||
define('UI_VERBOSE', FALSE);
|
define('UI_VERBOSE', FALSE);
|
||||||
define('UI_WARNING', TRUE);
|
define('UI_WARNING', TRUE);
|
||||||
define('UI_ERROR', TRUE);
|
define('UI_ERROR', TRUE);
|
||||||
|
@ -111,7 +111,7 @@ define('UI_PL_ELEM_FADEOUT', 'fadeOut');
|
||||||
|
|
||||||
|
|
||||||
## LS stuff
|
## LS stuff
|
||||||
require_once '../../storageServer/var/conf.php';
|
require_once '../../../storageServer/var/conf.php';
|
||||||
## extent config
|
## extent config
|
||||||
$config = array_merge($config,
|
$config = array_merge($config,
|
||||||
array(
|
array(
|
||||||
|
@ -122,7 +122,8 @@ $config = array_merge($config,
|
||||||
),
|
),
|
||||||
'stream_types' => array(
|
'stream_types' => array(
|
||||||
'application/ogg',
|
'application/ogg',
|
||||||
'audio/mpeg'
|
'audio/mpeg',
|
||||||
|
'audio/x-mpegurl'
|
||||||
),
|
),
|
||||||
'languages' => array(
|
'languages' => array(
|
||||||
'ar_JO' => 'Arabic(JO)',
|
'ar_JO' => 'Arabic(JO)',
|
||||||
|
@ -144,7 +145,7 @@ require_once dirname(__FILE__).'/ui_scratchpad.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_search.class.php';
|
require_once dirname(__FILE__).'/ui_search.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_browse.class.php';
|
require_once dirname(__FILE__).'/ui_browse.class.php';
|
||||||
require_once '../../storageServer/var/GreenBox.php';
|
require_once '../../../storageServer/var/GreenBox.php';
|
||||||
require_once dirname(__FILE__).'/formmask/generic.inc.php';
|
require_once dirname(__FILE__).'/formmask/generic.inc.php';
|
||||||
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
||||||
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
||||||
|
|
|
@ -70,7 +70,7 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
||||||
if (PEAR::isError($token)) {
|
if (PEAR::isError($token)) {
|
||||||
#print_r($token);
|
if (UI_VERBOSE === TRUE) print_r($token);
|
||||||
$this->Base->_retMsg('Unable to open playlist "$1".', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
|
$this->Base->_retMsg('Unable to open playlist "$1".', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
$plgunid = $this->Base->gb->releaseLockedPlaylist($this->token, $this->Base->sessid);
|
$plgunid = $this->Base->gb->releaseLockedPlaylist($this->token, $this->Base->sessid);
|
||||||
if (PEAR::isError($plgunid)) {
|
if (PEAR::isError($plgunid)) {
|
||||||
#print_r($plgunid);
|
if (UI_VERBOSE === TRUE) print_r($plgunid);
|
||||||
if (UI_WARNING) $this->Base->_retMsg('Unable to release playlist.');
|
if (UI_WARNING) $this->Base->_retMsg('Unable to release playlist.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ class uiPlaylist
|
||||||
}
|
}
|
||||||
$plgunid = $this->Base->gb->revertEditedPlaylist($this->token, $this->Base->sessid);
|
$plgunid = $this->Base->gb->revertEditedPlaylist($this->token, $this->Base->sessid);
|
||||||
if (PEAR::isError($plgunid)) {
|
if (PEAR::isError($plgunid)) {
|
||||||
# print_r($plgunid);
|
if (UI_VERBOSE === TRUE) print_r($plgunid);
|
||||||
if (UI_WARNING) $this->Base->_retMsg('Unable to revert to locked state.');
|
if (UI_WARNING) $this->Base->_retMsg('Unable to revert to locked state.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -176,21 +176,27 @@ class uiPlaylist
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addItem($elemIds)
|
function addItem($elemIds, $duration=null)
|
||||||
{
|
{
|
||||||
$this->changed = TRUE;
|
$this->changed = TRUE;
|
||||||
|
$fadeIn = null;
|
||||||
|
$fadeOut = null;
|
||||||
|
$pause = null;
|
||||||
|
|
||||||
if (!$elemIds) {
|
if (!$elemIds) {
|
||||||
if (UI_WARNING) $this->Base->_retMsg('No item(s) selected.');
|
if (UI_WARNING) $this->Base->_retMsg('No item(s) selected.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!is_array($elemIds))
|
if (!is_array($elemIds)) {
|
||||||
$elemIds = array($elemIds);
|
$elemIds = array($elemIds);
|
||||||
|
}
|
||||||
|
if (isset($duration)) {
|
||||||
|
$length = sprintf('%02d', $duration['H']).':'.sprintf('%02d', $duration['i']).':'.sprintf('%02d', $duration['s']).'.000000';
|
||||||
|
}
|
||||||
foreach ($elemIds as $elemId) {
|
foreach ($elemIds as $elemId) {
|
||||||
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid);
|
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid, $fadeIn, $fadeOut, $length, $pause);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
#print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Error while trying to add item to playlist.');
|
$this->Base->_retMsg('Error while trying to add item to playlist.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -258,6 +264,7 @@ class uiPlaylist
|
||||||
unset($this->flat);
|
unset($this->flat);
|
||||||
$this->_plwalk($this->getPLArray($id));
|
$this->_plwalk($this->getPLArray($id));
|
||||||
|
|
||||||
|
if (is_Array($this->flat)) {
|
||||||
reset($this->flat);
|
reset($this->flat);
|
||||||
$this->flat[key($this->flat)]['firstInList'] = true;
|
$this->flat[key($this->flat)]['firstInList'] = true;
|
||||||
end($this->flat);
|
end($this->flat);
|
||||||
|
@ -265,6 +272,9 @@ class uiPlaylist
|
||||||
reset($this->flat);
|
reset($this->flat);
|
||||||
|
|
||||||
return $this->flat;
|
return $this->flat;
|
||||||
|
} else {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -279,6 +289,7 @@ class uiPlaylist
|
||||||
#$this->flat["$parent.$node"]['type'] = $sub['elementname'];
|
#$this->flat["$parent.$node"]['type'] = $sub['elementname'];
|
||||||
$this->flat[$parent] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id']));
|
$this->flat[$parent] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id']));
|
||||||
$this->flat[$parent]['attrs'] = $attrs;
|
$this->flat[$parent]['attrs'] = $attrs;
|
||||||
|
$this->flat[$parent]['playlength'] = $sub['attrs']['playlength'];
|
||||||
}
|
}
|
||||||
if ($sub['elementname']===UI_PL_ELEM_FADEINFO) {
|
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_FADEIN] = GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEIN]);
|
||||||
|
@ -337,7 +348,7 @@ class uiPlaylist
|
||||||
$r = $this->Base->gb->changeFadeInfo($this->token, $i, $val[UI_PL_ELEM_FADEIN], $val[UI_PL_ELEM_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);
|
#print_r($r);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
if (UI_VERBOSE) print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Changing fade information failed.');
|
$this->Base->_retMsg('Changing fade information failed.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -348,7 +359,7 @@ class uiPlaylist
|
||||||
$r = $this->Base->gb->changeFadeInfo($this->token, $v['attrs']['id'], $type==='pause'?$pause:$xfade, $type==='pause'?$pause:$xfade, $this->Base->sessid);
|
$r = $this->Base->gb->changeFadeInfo($this->token, $v['attrs']['id'], $type==='pause'?$pause:$xfade, $type==='pause'?$pause:$xfade, $this->Base->sessid);
|
||||||
#print_r($r);
|
#print_r($r);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
if (UI_VERBOSE) print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Changing fade information failed.');
|
$this->Base->_retMsg('Changing fade information failed.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +375,7 @@ class uiPlaylist
|
||||||
|
|
||||||
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
if (UI_VERBOSE) print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Cannot move item.');
|
$this->Base->_retMsg('Cannot move item.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +393,7 @@ class uiPlaylist
|
||||||
$pos++;
|
$pos++;
|
||||||
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
if (UI_VERBOSE) print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Cannot move item.');
|
$this->Base->_retMsg('Cannot move item.');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -468,6 +479,28 @@ class uiPlaylist
|
||||||
return $renderer->toArray();
|
return $renderer->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setItemPlaylengthForm($id, $elemId, $mask)
|
||||||
|
{
|
||||||
|
if (isset($elemId)) {
|
||||||
|
$mask['act']['constant'] = 'PL.setItemPlaylength';
|
||||||
|
$mask['elemId']['constant'] = $elemId;
|
||||||
|
$element = $this->getCurrElement($elemId);
|
||||||
|
$mask['playlength']['default'] = substr($element['playlength'], 0, 8);
|
||||||
|
$mask['duration']['constant'] = substr($element['duration'], 0, 8);
|
||||||
|
} else {
|
||||||
|
$mask['act']['constant'] = 'PL.addItem';
|
||||||
|
$mask['id']['constant'] = $id;
|
||||||
|
$mask['playlength']['default'] = substr($this->Base->_getMDataValue($id, UI_MDATA_KEY_DURATION), 0, 8);
|
||||||
|
$mask['duration']['constant'] = $mask['playlength']['default'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$form = new HTML_QuickForm('PL_setItemPlaylengthForm', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||||
|
$this->Base->_parseArr2Form($form, $mask);
|
||||||
|
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||||
|
$form->accept($renderer);
|
||||||
|
return $renderer->toArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function metaDataForm($langid)
|
function metaDataForm($langid)
|
||||||
{
|
{
|
||||||
|
@ -531,7 +564,7 @@ class uiPlaylist
|
||||||
foreach ($mData as $key=>$val) {
|
foreach ($mData as $key=>$val) {
|
||||||
$r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val, $curr_langid);
|
$r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val, $curr_langid);
|
||||||
if (PEAR::isError($r)) {
|
if (PEAR::isError($r)) {
|
||||||
#print_r($r);
|
if (UI_VERBOSE === TRUE) print_r($r);
|
||||||
$this->Base->_retMsg('Unable to set "$1" to value "$2".', $key, $val);
|
$this->Base->_retMsg('Unable to set "$1" to value "$2".', $key, $val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue