CC-3724 : Now Playing -> Timeline view: to drag and drop single file very fast will block adding the same file

using jquery.blockUI.js on timeline/playlist builder pages.
This commit is contained in:
Naomi Aro 2012-05-04 15:00:18 +02:00
parent 12a5f17ff5
commit edaec54a5d
6 changed files with 80 additions and 60 deletions

View file

@ -145,13 +145,42 @@ var AIRTIME = (function(AIRTIME){
mod.checkToolBarIcons();
};
mod.disableUI = function() {
$lib.block({
message: "",
theme: true,
applyPlatformOpacityRules: false
});
$sbContent.block({
message: "",
theme: true,
applyPlatformOpacityRules: false
});
};
mod.enableUI = function() {
$lib.unblock();
$sbContent.unblock();
//Block UI changes the postion to relative to display the messages.
$lib.css("position", "static");
$sbContent.css("position", "static");
};
mod.fnItemCallback = function(json) {
checkError(json);
oSchedTable.fnDraw();
mod.enableUI();
};
mod.fnAdd = function(aMediaIds, aSchedIds) {
mod.disableUI();
$.post("/showbuilder/schedule-add",
{"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds},
mod.fnItemCallback
@ -160,6 +189,8 @@ var AIRTIME = (function(AIRTIME){
mod.fnMove = function(aSelect, aAfter) {
mod.disableUI();
$.post("/showbuilder/schedule-move",
{"format": "json", "selectedItem": aSelect, "afterItem": aAfter},
mod.fnItemCallback
@ -168,6 +199,8 @@ var AIRTIME = (function(AIRTIME){
mod.fnRemove = function(aItems) {
mod.disableUI();
$.post( "/showbuilder/schedule-remove",
{"items": aItems, "format": "json"},
mod.fnItemCallback