1
0
Fork 0
forked from 0x2620/oxjs

add documentation stubs

This commit is contained in:
j 2012-05-21 12:38:18 +02:00
commit 509745407b
102 changed files with 613 additions and 163 deletions

View file

@ -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;

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -37,6 +35,10 @@ Ox.Layer = function(options, self) {
that.stop().animate({opacity: 0}, 250);
}
/*@
hide <f> hide
() -> <u> hide layer
@*/
that.hide = function() {
if (self.options.type == 'dialog') {
Ox.UI.$window.unbind({mouseup: mouseup});
@ -44,6 +46,10 @@ Ox.Layer = function(options, self) {
that.remove();
};
/*@
show <f> show
() -> <o> show layer
@*/
that.show = function() {
if (self.options.type == 'dialog') {
Ox.UI.$window.bind({mouseup: mouseup});
@ -54,4 +60,4 @@ Ox.Layer = function(options, self) {
return that;
}
}

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -34,6 +32,10 @@ Ox.Tooltip = function(options, self) {
}
};
/*@
hide <f> hide tooltip
() -> <o> hide tooltip
@*/
that.hide = function() {
var last = Ox.last(arguments);
if (self.options.title) {
@ -53,6 +55,10 @@ Ox.Tooltip = function(options, self) {
// can pass event instead of x/y
// fixme: use this in widgets
/*@
show <f> show tooltip
(x, y) -> <o> show tooltip at x,y
@*/
that.show = function(x, y) {
var last = Ox.last(arguments),
left, top, width, height;