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.API <o> bind remote api to object
|
||||
options <o> Options object
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Clipboard <o> Basic clipboard handler
|
||||
copy <f> Copy data to clipboard
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
// fixme: wouldn't it be better to let the elements be,
|
||||
// rather then $element, $content, and potentially others,
|
||||
// 0, 1, 2, etc, so that append would append 0, and appendTo
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
@ -321,6 +319,10 @@ Ox.Element = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
bindKeyboard <f> bind keyboard
|
||||
() -> <o> object
|
||||
@*/
|
||||
that.bindKeyboard = function() {
|
||||
Ox.Keyboard.bind(that.id);
|
||||
return that;
|
||||
|
|
@ -410,6 +412,10 @@ Ox.Element = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
setElement <f> set $element
|
||||
($element) -> null
|
||||
@*/
|
||||
that.setElement = function($element) {
|
||||
//$element[0].className = that.$element[0].className;
|
||||
$element.addClass('OxElement').data({oxid: that.id});
|
||||
|
|
@ -418,6 +424,10 @@ Ox.Element = function(options, self) {
|
|||
that[0] = that.$element[0];
|
||||
};
|
||||
|
||||
/*@
|
||||
toggleOption <f> toggle option
|
||||
() -> <o> object
|
||||
@*/
|
||||
that.toggleOption = function() {
|
||||
var options = {};
|
||||
Ox.toArray(arguments[0]).forEach(function(key) {
|
||||
|
|
@ -480,6 +490,10 @@ Ox.Element = function(options, self) {
|
|||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
unbindKeyboard <f> unbind keyboard
|
||||
() -> <o> object
|
||||
@*/
|
||||
that.unbindKeyboard = function() {
|
||||
Ox.Keyboard.unbind(that.id);
|
||||
return that;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Focus <o> Basic focus handler
|
||||
@*/
|
||||
|
|
@ -64,6 +64,10 @@ Ox.Focus = (function() {
|
|||
focused: function() {
|
||||
return stack.length ? stack[stack.length - 1] : null;
|
||||
},
|
||||
/*@
|
||||
remove <f> remove
|
||||
(id) -> <u>
|
||||
@*/
|
||||
remove: function(id) {
|
||||
var index = stack.indexOf(id);
|
||||
index > -1 && stack.splice(index, 1);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.GarbageCollection <function> GarbageCollection
|
||||
() -> <o> run garbage collection
|
||||
debug() -> {} output debug information
|
||||
@*/
|
||||
|
||||
Ox.GarbageCollection = (function() {
|
||||
|
||||
var that = function() {
|
||||
|
|
@ -26,6 +31,10 @@ Ox.GarbageCollection = (function() {
|
|||
Ox.Log('GC', len, '-->', Ox.len(Ox.UI.elements));
|
||||
}
|
||||
|
||||
/*@
|
||||
debug <f> debug info
|
||||
() -> <s>
|
||||
@*/
|
||||
that.debug = function() {
|
||||
var classNames = {}, sorted = [];
|
||||
Ox.forEach(Ox.UI.elements, function(element, id) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
/***
|
||||
Ox.History
|
||||
***/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Keyboard <o> Basic keyboard handler
|
||||
@*/
|
||||
|
|
@ -82,10 +82,18 @@ Ox.Keyboard = (function() {
|
|||
}
|
||||
|
||||
return {
|
||||
/*@
|
||||
bind <f> bind
|
||||
(id) -> <u> bind id
|
||||
@*/
|
||||
bind: function(id) {
|
||||
var index = bound.indexOf(id);
|
||||
index == -1 && bound.push(id);
|
||||
},
|
||||
/*@
|
||||
unbind <f> unbind
|
||||
(id) -> <u> unbind id
|
||||
@*/
|
||||
unbind: function(id) {
|
||||
var index = bound.indexOf(id);
|
||||
index > -1 && bound.splice(index, 1);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.LoadingIcon <f:Ox.Element> Loading Icon Element
|
||||
() -> <f> Loading Icon Element
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
/**
|
||||
Ox.Progressbar
|
||||
*/
|
||||
// FIXME: remove this!
|
||||
// FIXME: remove this!
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
Ox.Request <o> Basic request handler object
|
||||
FIXME: options is not a property, just documenting defaults
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
@ -123,12 +121,18 @@ Ox.Theme = (function() {
|
|||
return that;
|
||||
}
|
||||
|
||||
/*@
|
||||
formatColor <f> formatColor
|
||||
@*/
|
||||
that.formatColor = function(val, type) {
|
||||
return renderElement(val, type)
|
||||
.css({textAlign: 'center'})
|
||||
.html(Ox.formatNumber(val, 3));
|
||||
};
|
||||
|
||||
/*@
|
||||
formatColorLevel <f> formatColorLevel
|
||||
@*/
|
||||
that.formatColorLevel = function(index, values, hueRange) {
|
||||
hueRange = hueRange || (Ox.isBoolean(index) ? [0, 120] : [120, 0]);
|
||||
var step = (hueRange[1] - hueRange[0]) / (values.length - 1),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
'use strict';
|
||||
|
||||
/*@
|
||||
|
|
@ -633,6 +631,11 @@ Ox.URL = function(options) {
|
|||
|
||||
}
|
||||
|
||||
/*@
|
||||
parse <f> parse
|
||||
(callback) -> <o> parse state from document.location
|
||||
(url, callback) -> <o> parse state from passed url
|
||||
@*/
|
||||
that.parse = function() {
|
||||
var str = arguments.length == 2 ? arguments[0]
|
||||
: document.location.pathname
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue