1
0
Fork 0
forked from 0x2620/oxjs

more docs

This commit is contained in:
j 2011-05-16 12:49:48 +02:00
commit cc75e25415
42 changed files with 664 additions and 93 deletions

View file

@ -7,7 +7,7 @@ Ox.App <f> Basic application instance that communicates with a JSON API
(options, self) -> <f> App object
options <o> Options object
timeout <n> request timeout
type <s> 'GET' or 'POST'
type <s> HTTP Request type, i.e. 'GET' or 'POST'
url <s> JSON API url
self <o> Shared private variable
load <!> app loaded
@ -109,10 +109,19 @@ Ox.App = (function() {
};
}
/*@
change <f> change key/value
(key, value) -> <u> currently not implemented
@*/
self.change = function(key, value) {
};
/*@
options <f> get/set options, see Ox.getset
() -> <o> get options
(options) -> <o> update/set options
@*/
that.options = function() {
return Ox.getset(self.options, Array.prototype.slice.call(arguments), self.change, that);
};

View file

@ -1,13 +1,13 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
/*@
Ox.Clipboard <f> Basic clipboard handler
() -> <o> Clipboard object
(options) -> <o> Clipboard object
(options, self) -> <o> Clipboard object
copy(data) <f> copy data to clipboard
paste <f> paste data from clipboard
options <o> Options object
self <o> Shared private variable
Ox.Clipboard <o> Basic clipboard handler
copy <f> copy to clipbloard
(data) -> <u> set clipboard to data
paste <f> paste from clipbload
() -> <o> get clipboard data
_print <f> debug function
() -> <u> print clipboard contents to console
data <o> clipboard object
@*/
Ox.Clipboard = function() {
var clipboard = {};

View file

@ -5,7 +5,7 @@
// would append (length - 1)?
/*@
Ox.Container <f> Container
Ox.Container <f> Container (depricated)
() -> <o> Container object
(options) -> <o> Container object
(options, self) -> <o> Container object

View file

@ -4,6 +4,7 @@ Ox.DocPage <f> DocPage
(options) -> <o> DocPage object
(options, self) -> <o> DocPage object
options <o> Options object
item <o> doc item
self <o> Shared private variable
@*/
Ox.DocPage = function(options, self) {

View file

@ -1,13 +1,9 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
/*@
Ox.Focus <o> Basic focus handler
@*/
Ox.Focus = function() {
/***
Ox.Focus
Basic focus handler
Methods
blur(id) blur element
focus(id) focus element
focused() return id of focused element, or null
***/
var stack = [];
return {
_print: function() {
@ -17,6 +13,10 @@ Ox.Focus = function() {
$('.OxFocus').removeClass('OxFocus');
stack = [];
},
/*@
blur <f> blur element
(id) -> <u> blur element by id
@*/
blur: function(id) {
var index = stack.indexOf(id);
if (index > -1 && index == stack.length - 1) {
@ -28,6 +28,10 @@ Ox.Focus = function() {
Ox.print('blur', id, stack);
}
},
/*@
focus <f> focus element
(id) -> <u> focus element by id
@*/
focus: function(id) {
var index = stack.indexOf(id);
if (index == -1 || index < stack.length - 1) {
@ -38,6 +42,10 @@ Ox.Focus = function() {
Ox.print('focus', id, stack);
}
},
/*@
focused <f> return id of focused element, or null
() -> <s> get id of currently focused element
@*/
focused: function() {
return stack.length ? stack[stack.length - 1] : null;
}

View file

@ -32,6 +32,7 @@ Ox.LoadingIcon = function(options, self) {
}, 250);
return that;
};
/*@
stop <f> Stop loading animation
() -> <f> Loading Icon Element