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')
|
$ajaxContext->addActionContext('new', 'json')
|
||||||
->addActionContext('save', 'json')
|
->addActionContext('save', 'json')
|
||||||
->addActionContext('edit', 'json')
|
->addActionContext('edit', 'json')
|
||||||
|
->addActionContext('delete', 'json')
|
||||||
->initContext();
|
->initContext();
|
||||||
//TODO
|
//TODO
|
||||||
//$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
//$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');
|
$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()
|
public function saveAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (isset($this->ws)) : ?>
|
<?php if (isset($this->ws)) : ?>
|
||||||
<input id="ws_id" type="hidden" value="<?php echo $this->ws->getId(); ?>"></input>
|
<input id="obj_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_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="status" style="display:none;"></div>
|
||||||
|
|
||||||
<div class="playlist_title">
|
<div class="playlist_title">
|
||||||
<div id="name-error" class="errors" style="display:none;"></div>
|
<div id="name-error" class="errors" style="display:none;"></div>
|
||||||
<h3 id="ws_name">
|
<h3 id="ws_name">
|
||||||
|
|
|
@ -6,7 +6,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
if (AIRTIME.playlist === undefined) {
|
if (AIRTIME.playlist === undefined) {
|
||||||
AIRTIME.playlist = {};
|
AIRTIME.playlist = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
var mod = AIRTIME.playlist,
|
var mod = AIRTIME.playlist,
|
||||||
viewport,
|
viewport,
|
||||||
|
@ -802,6 +802,23 @@ var AIRTIME = (function(AIRTIME){
|
||||||
redrawLib();
|
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() {
|
mod.disableUI = function() {
|
||||||
|
|
||||||
|
@ -903,6 +920,10 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$pl.delegate("#spl_delete", {"click": function(ev){
|
$pl.delegate("#spl_delete", {"click": function(ev){
|
||||||
AIRTIME.playlist.fnDelete();
|
AIRTIME.playlist.fnDelete();
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
$pl.delegate("#ws_delete", {"click": function(ev){
|
||||||
|
AIRTIME.playlist.fnWsDelete();
|
||||||
|
}});
|
||||||
|
|
||||||
setPlaylistEntryEvents();
|
setPlaylistEntryEvents();
|
||||||
setCueEvents();
|
setCueEvents();
|
||||||
|
|
Loading…
Reference in New Issue