CC-4166: Playlist Builder -> Regular Playlist : clicking Fade in/out button for a empty playlist will cause PHP Fatal Error
- fixed. Not displaying fade setting button if the playst/smartplaylist is empty.
This commit is contained in:
parent
83917ed894
commit
d1e6f8178b
6 changed files with 40 additions and 9 deletions
|
@ -305,11 +305,19 @@ var AIRTIME = (function(AIRTIME){
|
|||
$('#spl_sortable')
|
||||
.empty()
|
||||
.append(json.html);
|
||||
|
||||
setModified(json.modified);
|
||||
redrawLib();
|
||||
}
|
||||
|
||||
function setFadeIcon(){
|
||||
var empty = $(".spl_empty");
|
||||
if (empty.length > 0) {
|
||||
$("#spl_crossfade").hide();
|
||||
} else {
|
||||
$("#spl_crossfade").show();
|
||||
}
|
||||
}
|
||||
|
||||
function getId() {
|
||||
return parseInt($("#obj_id").val(), 10);
|
||||
}
|
||||
|
@ -803,6 +811,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
}
|
||||
else {
|
||||
setPlaylistContent(json);
|
||||
setFadeIcon();
|
||||
}
|
||||
|
||||
mod.enableUI();
|
||||
|
|
|
@ -181,6 +181,7 @@ function setSmartPlaylistEvents() {
|
|||
enableLoadingIcon();
|
||||
$.post(save_action, {format: "json", data: data, obj_id: obj_id}, function(data){
|
||||
callback(data, "save");
|
||||
setFadeIcon();
|
||||
disableLoadingIcon();
|
||||
});
|
||||
});
|
||||
|
@ -254,6 +255,16 @@ function setStaticLengthHolder(lenVal) {
|
|||
}
|
||||
*/
|
||||
|
||||
function setFadeIcon(){
|
||||
var contents = $("#spl_sortable");
|
||||
var show = contents.is(":visible");
|
||||
if (show) {
|
||||
$("#spl_crossfade").show();
|
||||
} else {
|
||||
$("#spl_crossfade").hide();
|
||||
}
|
||||
}
|
||||
|
||||
/* This function appends a '+' button for the last
|
||||
* modifier row of each criteria.
|
||||
* If there are no modifier rows, the '+' button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue