Merge branch 'cc-2211-changes-to-playlist-not-shown' into devel
This commit is contained in:
commit
50c649dc59
|
@ -27,6 +27,7 @@ class LibraryController extends Zend_Controller_Action
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js');
|
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js','text/javascript');
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,8 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$this->view->length = $pl->getLength();
|
$this->view->length = $pl->getLength();
|
||||||
|
|
||||||
unset($this->view->pl);
|
unset($this->view->pl);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCueAction()
|
public function setCueAction()
|
||||||
|
|
|
@ -39,6 +39,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker-0.0.6.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker-0.0.6.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js','text/javascript');
|
||||||
|
|
|
@ -22,6 +22,7 @@ class UserController extends Zend_Controller_Action
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
|
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/user/user.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/user/user.js','text/javascript');
|
||||||
|
|
||||||
$form = new Application_Form_AddUser();
|
$form = new Application_Form_AddUser();
|
||||||
|
|
|
@ -377,7 +377,7 @@ class Playlist {
|
||||||
->computeLength();
|
->computeLength();
|
||||||
|
|
||||||
if(is_null($res))
|
if(is_null($res))
|
||||||
return '00:00:00.000000';
|
return '00:00:00';
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,9 @@ function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(nRow).attr("id", type+'_'+id);
|
$(nRow).attr("id", type+'_'+id);
|
||||||
|
|
||||||
|
// insert id on lenth field
|
||||||
|
$('td:eq(4)', nRow).attr("id", "length");
|
||||||
|
|
||||||
$('td:eq(5) img', nRow).qtip({
|
$('td:eq(5) img', nRow).qtip({
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,10 @@ function setSPLContent(json) {
|
||||||
$(".spl_fade_control").click(openFadeEditor);
|
$(".spl_fade_control").click(openFadeEditor);
|
||||||
//$(".spl_playlength").click(openCueEditor);
|
//$(".spl_playlength").click(openCueEditor);
|
||||||
$(".spl_cue").click(openCueEditor);
|
$(".spl_cue").click(openCueEditor);
|
||||||
|
|
||||||
|
//redraw the library list
|
||||||
|
dt = $("#library_display").dataTable();
|
||||||
|
dt.fnStandingRedraw();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -359,7 +363,11 @@ function createPlaylistMetaForm(json) {
|
||||||
|
|
||||||
$.post(url, data, function(json){
|
$.post(url, data, function(json){
|
||||||
openDiffSPL(json);
|
openDiffSPL(json);
|
||||||
|
//redraw the library list
|
||||||
|
dt = $("#library_display").dataTable();
|
||||||
|
dt.fnStandingRedraw();
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#side_playlist")
|
$("#side_playlist")
|
||||||
|
@ -381,6 +389,10 @@ function deleteSPL() {
|
||||||
url = '/Playlist/delete-active/format/json';
|
url = '/Playlist/delete-active/format/json';
|
||||||
|
|
||||||
$.post(url, noOpenPL);
|
$.post(url, noOpenPL);
|
||||||
|
|
||||||
|
//redraw the library list
|
||||||
|
dt = $("#library_display").dataTable();
|
||||||
|
dt.fnStandingRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDiffSPL(json) {
|
function openDiffSPL(json) {
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
$.fn.dataTableExt.oApi.fnStandingRedraw = function(oSettings) {
|
||||||
|
//redraw to account for filtering and sorting
|
||||||
|
// concept here is that (for client side) there is a row got inserted at the end (for an add)
|
||||||
|
// or when a record was modified it could be in the middle of the table
|
||||||
|
// that is probably not supposed to be there - due to filtering / sorting
|
||||||
|
// so we need to re process filtering and sorting
|
||||||
|
// BUT - if it is server side - then this should be handled by the server - so skip this step
|
||||||
|
if(oSettings.oFeatures.bServerSide === false){
|
||||||
|
var before = oSettings._iDisplayStart;
|
||||||
|
oSettings.oApi._fnReDraw(oSettings);
|
||||||
|
//iDisplayStart has been reset to zero - so lets change it back
|
||||||
|
oSettings._iDisplayStart = before;
|
||||||
|
oSettings.oApi._fnCalculateEnd(oSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
//draw the 'current' page
|
||||||
|
oSettings.oApi._fnDraw(oSettings);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.dataTableExt.oApi.fnAddDataAndDisplay = function ( oSettings, aData )
|
||||||
|
{
|
||||||
|
/* Add the data */
|
||||||
|
var iAdded = this.oApi._fnAddData( oSettings, aData );
|
||||||
|
var nAdded = oSettings.aoData[ iAdded ].nTr;
|
||||||
|
|
||||||
|
/* Need to re-filter and re-sort the table to get positioning correct, not perfect
|
||||||
|
* as this will actually redraw the table on screen, but the update should be so fast (and
|
||||||
|
* possibly not alter what is already on display) that the user will not notice
|
||||||
|
*/
|
||||||
|
this.oApi._fnReDraw( oSettings );
|
||||||
|
|
||||||
|
/* Find it's position in the table */
|
||||||
|
var iPos = -1;
|
||||||
|
for( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
|
||||||
|
{
|
||||||
|
if( oSettings.aoData[ oSettings.aiDisplay[i] ].nTr == nAdded )
|
||||||
|
{
|
||||||
|
iPos = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get starting point, taking account of paging */
|
||||||
|
if( iPos >= 0 )
|
||||||
|
{
|
||||||
|
oSettings._iDisplayStart = ( Math.floor(i / oSettings._iDisplayLength) ) * oSettings._iDisplayLength;
|
||||||
|
this.oApi._fnCalculateEnd( oSettings );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.oApi._fnDraw( oSettings );
|
||||||
|
return {
|
||||||
|
"nTr": nAdded,
|
||||||
|
"iPos": iAdded
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue