hiding/showing show overflow message properly.
This commit is contained in:
parent
e853a6ff6e
commit
b992801a45
|
@ -28,7 +28,7 @@
|
||||||
<div id="show_progressbar"></div>
|
<div id="show_progressbar"></div>
|
||||||
<span id="show_length" class="time"><?php echo $this->showLength; ?></span>
|
<span id="show_length" class="time"><?php echo $this->showLength; ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="show_time_warning"></div>
|
<div id="show_time_warning" style="display:none"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,6 +9,22 @@ function closeDialog(event, ui) {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkShowLength() {
|
||||||
|
var showFilled = $("#show_time_filled").text().split('.')[0];
|
||||||
|
var showLength = $("#show_length").text();
|
||||||
|
|
||||||
|
if (showFilled > showLength){
|
||||||
|
$("#show_time_warning")
|
||||||
|
.text("Shows longer than their scheduled time will be cut off by a following show.")
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#show_time_warning")
|
||||||
|
.empty()
|
||||||
|
.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function setScheduleDialogHtml(json) {
|
function setScheduleDialogHtml(json) {
|
||||||
var dt;
|
var dt;
|
||||||
|
@ -23,14 +39,7 @@ function setScheduleDialogHtml(json) {
|
||||||
$("#show_time_filled").empty().append(json.timeFilled);
|
$("#show_time_filled").empty().append(json.timeFilled);
|
||||||
$("#show_progressbar").progressbar( "value" , json.percentFilled );
|
$("#show_progressbar").progressbar( "value" , json.percentFilled );
|
||||||
|
|
||||||
var showFilled = $("#show_time_filled").text().split('.')[0];
|
checkShowLength();
|
||||||
var showLength = $("#show_length").text();
|
|
||||||
|
|
||||||
if (showFilled > showLength){
|
|
||||||
$("#show_time_warning").text("Shows longer than their scheduled time will be cut off by a following show.");
|
|
||||||
} else {
|
|
||||||
$("#show_time_warning").empty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setScheduleDialogEvents(dialog) {
|
function setScheduleDialogEvents(dialog) {
|
||||||
|
@ -221,7 +230,7 @@ function buildScheduleDialog(json){
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
title: 'Schedule Playlist',
|
title: 'Schedule Playlist',
|
||||||
width: 1100,
|
width: 1100,
|
||||||
height: 500,
|
height: 550,
|
||||||
modal: true,
|
modal: true,
|
||||||
close: closeDialog,
|
close: closeDialog,
|
||||||
buttons: {"Ok": function() {
|
buttons: {"Ok": function() {
|
||||||
|
@ -231,6 +240,7 @@ function buildScheduleDialog(json){
|
||||||
});
|
});
|
||||||
|
|
||||||
dialog.dialog('open');
|
dialog.dialog('open');
|
||||||
|
checkShowLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildEditDialog(json){
|
function buildEditDialog(json){
|
||||||
|
|
Loading…
Reference in New Issue