sintonia/airtime_mvc/public/js/airtime/buttons/buttons.js
Naomi Aro 711d1f202a CC-3463 : Usability of timeline
changing buttons to be jquery ui icons.

adding button to trim overbooked
adding button toscroll current item to top.
2012-03-23 16:42:08 +01:00

39 lines
No EOL
749 B
JavaScript

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.isDisabled = function(c) {
var button = $("."+c);
if (button.hasClass(DISABLED_CLASS)) {
return true;
}
return false;
};
mod.enableButton = function(c) {
var button = $("."+c);
if (button.hasClass(DISABLED_CLASS)) {
button.removeClass(DISABLED_CLASS);
}
};
mod.disableButton = function(c) {
var button = $("."+c);
if (!button.hasClass(DISABLED_CLASS)) {
button.addClass(DISABLED_CLASS);
}
};
return AIRTIME;
}(AIRTIME || {}));