1
0
Fork 0
forked from 0x2620/oxjs

add disableButtons and enableButtons methods to Ox.Dialog

This commit is contained in:
rlx 2011-10-29 10:34:41 +00:00
commit 4c641db867
2 changed files with 19 additions and 1 deletions

View file

@ -688,11 +688,23 @@ Ox.Dialog = function(options, self) {
return that;
};
that.disableButtons = function() {
self.options.buttons.forEach(function(button) {
!Ox.isEmpty(button) && button.options({disabled: true});
});
};
that.enableButton = function(id) {
getButtonById(id).options({disabled: false});
return that;
};
that.enableButtons = function() {
self.options.buttons.forEach(function(button) {
!Ox.isEmpty(button) && button.options({disabled: false});
});
};
that.open = function() {
self.initialHeight = self.options.height;
self.initialWidth = self.options.width;
@ -723,6 +735,7 @@ Ox.Dialog = function(options, self) {
}
}
});
that.triggerEvent('open');
return that;
};