CC-3174 : showbuilder
adding checks to enable/disable buttons for playlist & timeline.
This commit is contained in:
parent
a6413f2d1a
commit
0f91f91c41
6 changed files with 142 additions and 48 deletions
29
airtime_mvc/public/js/airtime/buttons/buttons.js
Normal file
29
airtime_mvc/public/js/airtime/buttons/buttons.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
var AIRTIME = (function(AIRTIME){
|
||||
var mod,
|
||||
DEFAULT_CLASS = 'ui-button ui-state-default',
|
||||
DISABLED_CLASS = 'ui-state-disabled';
|
||||
|
||||
if (AIRTIME.button === undefined) {
|
||||
AIRTIME.button = {};
|
||||
}
|
||||
mod = AIRTIME.button;
|
||||
|
||||
mod.enableButton = function(c) {
|
||||
var button = $("."+c).find("button");
|
||||
|
||||
if (button.hasClass(DISABLED_CLASS)) {
|
||||
button.removeClass(DISABLED_CLASS);
|
||||
}
|
||||
};
|
||||
|
||||
mod.disableButton = function(c) {
|
||||
var button = $("."+c).find("button");
|
||||
|
||||
if (!button.hasClass(DISABLED_CLASS)) {
|
||||
button.addClass(DISABLED_CLASS);
|
||||
}
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
Loading…
Add table
Add a link
Reference in a new issue