forked from 0x2620/oxjs
add documentation stubs
This commit is contained in:
parent
b3fce3a28a
commit
509745407b
102 changed files with 613 additions and 163 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Dialog <f:Ox.Element> Dialog object
|
||||
() -> <f> Dialog object
|
||||
|
|
@ -637,6 +637,10 @@ Ox.Dialog = function(options, self) {
|
|||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
close <f> close
|
||||
(callback) -> <o> close
|
||||
@*/
|
||||
that.close = function(callback) {
|
||||
if (self.isOpen) {
|
||||
self.isOpen = false;
|
||||
|
|
@ -661,28 +665,48 @@ Ox.Dialog = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
disableButton <f> disable button
|
||||
(id) -> <o> disable button
|
||||
@*/
|
||||
that.disableButton = function(id) {
|
||||
getButtonById(id).options({disabled: true});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
disableButtons <f> disable buttons
|
||||
() -> <o> disable all buttons
|
||||
@*/
|
||||
that.disableButtons = function() {
|
||||
self.options.buttons.forEach(function(button) {
|
||||
!Ox.isEmpty(button) && button.options({disabled: true});
|
||||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
enableButton <f> enable button
|
||||
(id) -> <o> enable button
|
||||
@*/
|
||||
that.enableButton = function(id) {
|
||||
getButtonById(id).options({disabled: false});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
enableButtons <f> enable buttons
|
||||
() -> <o> enable all buttons
|
||||
@*/
|
||||
that.enableButtons = function() {
|
||||
self.options.buttons.forEach(function(button) {
|
||||
!Ox.isEmpty(button) && button.options({disabled: false});
|
||||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
open <f> open
|
||||
() -> <o> open dialog
|
||||
@*/
|
||||
that.open = function() {
|
||||
if (!self.isOpen) {
|
||||
self.isOpen = true;
|
||||
|
|
@ -719,6 +743,10 @@ Ox.Dialog = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
setSize <f> set size
|
||||
(width, height) -> <o> set size
|
||||
@*/
|
||||
that.setSize = function(width, height) {
|
||||
self.options.width = width;
|
||||
self.options.height = height;
|
||||
|
|
@ -734,6 +762,7 @@ Ox.Dialog = function(options, self) {
|
|||
width: self.options.width,
|
||||
height: self.options.height
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue