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.API <o> bind remote api to object
options <o> Options object

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@

View file

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

View file

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

View file

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

View file

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

View file

@ -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) {

View file

@ -1,4 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
/***
Ox.History
***/

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@

View file

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

View file

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

View file

@ -1,6 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/**
Ox.Progressbar
*/
// FIXME: remove this!
// FIXME: remove this!

View file

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

View file

@ -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),

View file

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