CC-3503 : Preserve the state of "Now Playing" screen - whether Library section is open or not
This commit is contained in:
parent
fe21abf16d
commit
aca6e995dd
|
@ -92,6 +92,15 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
$data = Application_Model_Preference::GetValue("nowplaying_screen", true);
|
||||
if ($data != "") {
|
||||
$settings = unserialize($data);
|
||||
|
||||
if ($settings["library"] == "true") {
|
||||
$this->view->headScript()->appendScript("AIRTIME.showLib = true;");
|
||||
}
|
||||
}
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('builder', 'showbuilder');
|
||||
}
|
||||
|
|
|
@ -55,30 +55,16 @@ $(document).ready(function(){
|
|||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||
AIRTIME.showbuilder.fnServerData.start = oRange.start;
|
||||
AIRTIME.showbuilder.fnServerData.end = oRange.end;
|
||||
|
||||
if (AIRTIME.showLib === true) {
|
||||
$lib.show()
|
||||
.width(Math.floor(screenWidth * 0.5));
|
||||
|
||||
$.ajax({
|
||||
url: "/usersettings/get-now-playing-screen-settings",
|
||||
type: "GET",
|
||||
data: {format: "json"},
|
||||
dataType: "json",
|
||||
success: function(json){
|
||||
var o = json.settings;
|
||||
|
||||
if (o === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (o.library === "true") {
|
||||
$lib.show()
|
||||
.width(Math.floor(screenWidth * 0.5));
|
||||
|
||||
$builder.width(Math.floor(screenWidth * 0.5))
|
||||
.find("#sb_edit")
|
||||
.remove()
|
||||
.end();
|
||||
}
|
||||
}
|
||||
});
|
||||
$builder.width(Math.floor(screenWidth * 0.5))
|
||||
.find("#sb_edit")
|
||||
.remove()
|
||||
.end();
|
||||
}
|
||||
|
||||
AIRTIME.library.libraryInit();
|
||||
AIRTIME.showbuilder.builderDataTable();
|
||||
|
|
Loading…
Reference in New Issue