Fixed empty show Showbuilder bug and started making checkboxes work like cursors used to

This commit is contained in:
Albert Santoni 2015-04-14 11:30:18 -04:00
parent 1194a0f959
commit b1ea1f27a3
2 changed files with 9 additions and 6 deletions
airtime_mvc/public/js/airtime
library/events
showbuilder

View File

@ -8,7 +8,7 @@ var AIRTIME = (function(AIRTIME) {
mod = AIRTIME.library;
mod.checkAddButton = function() {
var selected = mod.getChosenItemsLength(), $cursor = $('tr.cursor-selected-row'), check = false;
var selected = mod.getChosenItemsLength(), $cursor = $('tr.sb-selected'), check = false;
// make sure library items are selected and a cursor is selected.
if (selected !== 0 && $cursor.length !== 0) {
@ -146,7 +146,7 @@ var AIRTIME = (function(AIRTIME) {
});
}
$("#show_builder_table tr.cursor-selected-row")
$("#show_builder_table tr.sb-selected")
.each(function(i, el) {
aData.push($(el).prev().data("aData"));
});

View File

@ -320,7 +320,7 @@ var AIRTIME = (function(AIRTIME){
mod.fnMove = function(aSelect, aAfter) {
//mod.disableUI();
mod.disableUI();
$.post(baseUrl+"showbuilder/schedule-move",
{"format": "json", "selectedItem": aSelect, "afterItem": aAfter},
@ -592,7 +592,9 @@ var AIRTIME = (function(AIRTIME){
//$node = $(nRow.children[0]).replaceWith(emptyNode);;
//$node.html('');
$node.empty();
if ($node) {
$node.empty();
}
sSeparatorHTML = '<span>'+$.i18n._("Show Empty")+'</span>';
cl = cl + " sb-empty odd";
@ -827,7 +829,7 @@ var AIRTIME = (function(AIRTIME){
$parent.append($table);
}
*/
//order of importance of elements for setting the next timeout.
elements = [
$sbTable.find("tr."+NOW_PLAYING_CLASS),
@ -850,7 +852,8 @@ var AIRTIME = (function(AIRTIME){
mod.timeout = setTimeout(function() {mod.refresh(aData.id)}, refreshInterval); //need refresh in milliseconds
break;
}
}*/
}
mod.checkToolBarIcons();
},