This commit is contained in:
parent
0723557ef9
commit
50af857cda
9 changed files with 120 additions and 0 deletions
|
@ -769,5 +769,48 @@ $ui_fmask = array(
|
|||
array(
|
||||
'group' => array('cancel', 'reset', 'submitter')
|
||||
)
|
||||
),
|
||||
'PL.export' => array(
|
||||
'act' => array(
|
||||
'element' => 'act',
|
||||
'type' => 'hidden',
|
||||
),
|
||||
'id' => array(
|
||||
'element' => 'id',
|
||||
'type' => 'hidden'
|
||||
),
|
||||
array(
|
||||
'element' => 'exporttype',
|
||||
'type' => 'select',
|
||||
'label' => 'Type',
|
||||
'options' => array('allComponents' => 'All components','playlistOnly' => 'Playlist only')
|
||||
),
|
||||
array(
|
||||
'element' => 'playlisttype',
|
||||
'type' => 'select',
|
||||
'label' => 'File Format',
|
||||
'options' => array(
|
||||
'smil' => 'SMIL',
|
||||
// 'xspf' => 'XSPF',
|
||||
'm3u' => 'M3U'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'element' => 'cancel',
|
||||
'type' => 'button',
|
||||
'label' => 'Cancel',
|
||||
'attributes'=> array('onClick' => 'window.close()'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'submitter',
|
||||
'type' => 'button',
|
||||
'label' => 'OK',
|
||||
'attributes'=> array('onClick' => 'this.form.submit()'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'group' => array('cancel', 'submitter')
|
||||
)
|
||||
)
|
||||
);
|
|
@ -105,6 +105,33 @@ if (is_array($_REQUEST['popup'])){
|
|||
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->setItemPlaylengthForm($_REQUEST['id'], $_REQUEST['elemId'], $ui_fmask['PL.setItemPlaylength']));
|
||||
$Smarty->display('popup/PLAYLIST.setItemPlaylength.tpl');
|
||||
break;
|
||||
|
||||
case "PL.export":
|
||||
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->exportForm($_REQUEST['id'], $ui_fmask['PL.export']));
|
||||
$Smarty->display('popup/PLAYLIST.export.tpl');
|
||||
break;
|
||||
|
||||
case "PL.redirect2DownloadExportedFile":
|
||||
$Smarty->assign('href', UI_BROWSER."?popup[]=PL.downloadExportedFile&id={$_REQUEST['id']}&playlisttype={$_REQUEST['playlisttype']}&exporttype={$_REQUEST['exporttype']}");
|
||||
$Smarty->display('popup/PLAYLIST.downloadExportedFile.tpl');
|
||||
break;
|
||||
|
||||
case "PL.downloadExportedFile":
|
||||
$exportedPlaylist = $uiBrowser->gb->exportPlaylistOpen($uiBrowser->sessid,
|
||||
$uiBrowser->gb->_gunidFromId($_REQUEST['id']),
|
||||
$_REQUEST['playlisttype'],
|
||||
$_REQUEST['exporttype']=='playlistOnly'?true:false);
|
||||
$fp=fopen($exportedPlaylist['fname'],'r');
|
||||
if (is_resource($fp)) {
|
||||
header("Content-Type: application/octet-stream");
|
||||
header("Content-Length: " . filesize($exportedPlaylist['fname']));
|
||||
header('Content-Disposition: attachment; filename="playlist.tar"');
|
||||
header("Content-Transfer-Encoding: binary\n");
|
||||
fpassthru($fp);
|
||||
$uiBrowser->gb->exportPlaylistClose($exportedPlaylist['token']);
|
||||
}
|
||||
//$Smarty->display('popup/PLAYLIST.downloadExportedFile.tpl');
|
||||
break;
|
||||
|
||||
case "SCHEDULER.addItem":
|
||||
$Smarty->display('popup/SCHEDULER.addItem.tpl');
|
||||
|
|
|
@ -254,6 +254,10 @@ switch($_REQUEST['act']){
|
|||
$uiHandler->SCRATCHPAD->removeItems($ui_tmpid);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
case "PL.export":
|
||||
$uiHandler->redirUrl = UI_BROWSER."?popup[]=PL.redirect2DownloadExportedFile&id={$_REQUEST['id']}&playlisttype={$_REQUEST['playlisttype']}&exporttype={$_REQUEST['exporttype']}";
|
||||
break;
|
||||
|
||||
case "SCHEDULER.set":
|
||||
$uiHandler->SCHEDULER->set($_REQUEST);
|
||||
|
|
|
@ -797,4 +797,8 @@
|
|||
<key>yesterday</key>
|
||||
<value>yesterday</value>
|
||||
</item>
|
||||
<item>
|
||||
<key>Export Playlist</key>
|
||||
<value>Export Playlist</value>
|
||||
</item>
|
||||
</translations>
|
|
@ -0,0 +1,5 @@
|
|||
<img src="img/ls_logo_animated.gif">
|
||||
<script language="javascript">
|
||||
location.href="{$href}";
|
||||
setTimeout("window.close()", 5000);
|
||||
</script>
|
20
livesupport/src/modules/htmlUI/var/templates/popup/PLAYLIST.export.tpl
Executable file
20
livesupport/src/modules/htmlUI/var/templates/popup/PLAYLIST.export.tpl
Executable file
|
@ -0,0 +1,20 @@
|
|||
{include file="popup/header.tpl"}
|
||||
|
||||
|
||||
<table height="100%" width="100%">
|
||||
<tr>
|
||||
<td style="border: 0">
|
||||
<center>
|
||||
<table width="100%" height="100%">
|
||||
<tr><td style="border: 0">
|
||||
{include file="sub/dynForm_plain.tpl}
|
||||
</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -46,6 +46,7 @@ onClick="return contextmenu('{$i.id}'
|
|||
, 'PL.activate'
|
||||
, 'PL.create'
|
||||
, 'delete'
|
||||
, 'PL.export'
|
||||
{/if}
|
||||
{/if}
|
||||
)"
|
|
@ -66,6 +66,10 @@ function contextmenu(param) {
|
|||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.changeTransition&type=fadeOut&id="+param+"', 'PL', '400', '150')\" "+oF+"> ##Change Fadeout## </a></li>";
|
||||
break;
|
||||
|
||||
case "PL.export":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.export&type=fadeOut&id="+param+"', 'PL', '400', '150')\" "+oF+"> ##Export Playlist## </a></li>";
|
||||
break;
|
||||
|
||||
case "SP.addItem":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=SP.addItem&id="+param+"')\" "+oF+"> ##Add to ScratchPad## </a></li>";
|
||||
break;
|
||||
|
|
|
@ -604,4 +604,16 @@ class uiPlaylist
|
|||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
function exportForm($id,$mask)
|
||||
{
|
||||
$mask['act']['constant'] = 'PL.export';
|
||||
$mask['id']['constant'] = $id;
|
||||
$form = new HTML_QuickForm('PL_exportForm', 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();
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue