Merge branch 'saas-dev' into soundcloud

Conflicts:
	airtime_mvc/application/configs/constants.php
This commit is contained in:
Duncan Sommerville 2015-06-29 10:02:58 -04:00
commit 5cc8774e56
30 changed files with 194 additions and 182 deletions

View file

@ -10,7 +10,8 @@ var AIRTIME = (function(AIRTIME) {
mod.checkAddButton = function() {
var selected = mod.getChosenItemsLength(), $cursor = $('tr.sb-selected'), check = false,
shows = $('tr.sb-header'), current = $('tr.sb-current-show'),
cursorText = $.i18n._('Add to next show');
// TODO: this is an ugly way of doing this... we should find a more robust way of checking which view we're in.
cursorText = (window.location.href.toLowerCase().includes("schedule")) ? $.i18n._('Add to show') : $.i18n._('Add to next show');
// make sure library items are selected and a cursor is selected.
if (selected !== 0) {

View file

@ -148,7 +148,7 @@ var AIRTIME = (function(AIRTIME) {
mod.checkDeleteButton = function() {
var selected = mod.getChosenItemsLength(),
check = false;
if (selected !== 0) {
check = true;
}

View file

@ -134,12 +134,15 @@ var AIRTIME = (function(AIRTIME){
mod.checkDeleteButton = function() {
var $selected = $sbTable.find("tbody").find("input:checkbox").filter(":checked");
var button = $("#show_builder").find(".icon-trash").parent(),
DISABLED_CLASS = 'ui-state-disabled';
if ($selected.length !== 0) {
AIRTIME.button.enableButton("icon-trash", true);
}
else {
AIRTIME.button.disableButton("icon-trash", true);
button.removeClass(DISABLED_CLASS);
button.removeAttr('disabled');
} else {
button.addClass(DISABLED_CLASS);
button.attr('disabled', 'disabled');
}
};