Fix small showbuilder bugs

This commit is contained in:
Duncan Sommerville 2015-08-06 10:40:50 -04:00
parent 4cbc49391b
commit 83902ebbbe
2 changed files with 14 additions and 4 deletions

View File

@ -197,7 +197,7 @@ var AIRTIME = (function(AIRTIME) {
function addToCurrentOrNext(arr) {
var el;
// Add to the end of the current show by getting the footer
el = $(".sb-footer.sb-current-show");
el = $(".sb-footer.sb-future:first");
var data = el.prev().data("aData");
if (data === undefined) {

View File

@ -13,6 +13,7 @@ var AIRTIME = (function(AIRTIME){
showInstanceIds = [],
headerFooter = [],
DISABLED_CLASS = 'ui-state-disabled',
selected,
$previouslySelected;
if (AIRTIME.showbuilder === undefined) {
@ -280,9 +281,10 @@ var AIRTIME = (function(AIRTIME){
checkError(json);
mod.getSelectedCursors();
selected = $(".sb-selected");
oSchedTable.fnDraw();
mod.enableUI();
//Unneccessary reload of the library pane after moving tracks in the showbuilder pane.
//$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
@ -343,7 +345,7 @@ var AIRTIME = (function(AIRTIME){
{"items": aItems, "format": "json"},
mod.fnItemCallback
);
}else{
} else {
mod.enableUI();
}
};
@ -468,7 +470,7 @@ var AIRTIME = (function(AIRTIME){
//sure everything works properly.
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = (a[i] === "true") ? true : false;
a[i] = (a[i] === "true");
}
}
@ -733,6 +735,14 @@ var AIRTIME = (function(AIRTIME){
mod.checkToolBarIcons();
var sid;
if (selected !== undefined) {
selected.each(function (i, el) {
sid = $(el).attr("id");
$("#" + sid).addClass(SB_SELECTED_CLASS);
});
}
},
// R = ColReorder, C = ColVis