CC-1665: Scheduled stream rebroadcasting and recording
-Fixed delete button on right side of library screen not working
This commit is contained in:
parent
d517bf6e19
commit
3230f14231
|
@ -8,6 +8,7 @@ class WebstreamController extends Zend_Controller_Action
|
|||
$ajaxContext->addActionContext('new', 'json')
|
||||
->addActionContext('save', 'json')
|
||||
->addActionContext('edit', 'json')
|
||||
->addActionContext('delete', 'json')
|
||||
->initContext();
|
||||
//TODO
|
||||
//$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
||||
|
@ -46,6 +47,15 @@ class WebstreamController extends Zend_Controller_Action
|
|||
$this->view->html = $this->view->render('webstream/webstream.phtml');
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$id = $request->getParam("ids");
|
||||
|
||||
$webstream = CcWebstreamQuery::create()->findPK($id)->delete();
|
||||
|
||||
}
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($this->ws)) : ?>
|
||||
<input id="ws_id" type="hidden" value="<?php echo $this->ws->getId(); ?>"></input>
|
||||
<input id="pl_lastMod" type="hidden" value="<?php echo $this->ws->getLastModified('U'); ?>"></input>
|
||||
<input id="obj_id" type="hidden" value="<?php echo $this->ws->getId(); ?>"></input>
|
||||
<input id="obj_lastMod" type="hidden" value="<?php echo "1";//$this->ws->getLastModified('U'); ?>"></input>
|
||||
<input id="obj_type" type="hidden" value="webstream"></input>
|
||||
<div class="status" style="display:none;"></div>
|
||||
|
||||
<div class="playlist_title">
|
||||
<div id="name-error" class="errors" style="display:none;"></div>
|
||||
<h3 id="ws_name">
|
||||
|
|
|
@ -6,7 +6,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
if (AIRTIME.playlist === undefined) {
|
||||
AIRTIME.playlist = {};
|
||||
}
|
||||
}
|
||||
|
||||
var mod = AIRTIME.playlist,
|
||||
viewport,
|
||||
|
@ -802,6 +802,23 @@ var AIRTIME = (function(AIRTIME){
|
|||
redrawLib();
|
||||
});
|
||||
};
|
||||
|
||||
mod.fnWsDelete = function(wsid) {
|
||||
var url, id, lastMod;
|
||||
|
||||
stopAudioPreview();
|
||||
id = (wsid === undefined) ? getId() : wsid;
|
||||
lastMod = getModified();
|
||||
type = $('#obj_type').val();
|
||||
url = '/Webstream/delete';
|
||||
|
||||
$.post(url,
|
||||
{format: "json", ids: id, modified: lastMod, type: type},
|
||||
function(json){
|
||||
openPlaylist(json);
|
||||
redrawLib();
|
||||
});
|
||||
};
|
||||
|
||||
mod.disableUI = function() {
|
||||
|
||||
|
@ -903,6 +920,10 @@ var AIRTIME = (function(AIRTIME){
|
|||
$pl.delegate("#spl_delete", {"click": function(ev){
|
||||
AIRTIME.playlist.fnDelete();
|
||||
}});
|
||||
|
||||
$pl.delegate("#ws_delete", {"click": function(ev){
|
||||
AIRTIME.playlist.fnWsDelete();
|
||||
}});
|
||||
|
||||
setPlaylistEntryEvents();
|
||||
setCueEvents();
|
||||
|
|
Loading…
Reference in New Issue