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

@ -337,6 +337,10 @@ Ox.ArrayEditable = function(options, self) {
}
}
/*@
addItem <f> addItem
(position, item) -> <o> add item at position
@*/
that.addItem = function(position, item) {
if (self.options.editable) {
self.options.items.splice(position, 0, item);
@ -354,6 +358,9 @@ Ox.ArrayEditable = function(options, self) {
*/
};
/*@
blurItem <f> blurItem
@*/
that.blurItem = function() {
/*
if (self.options.selected) {
@ -368,6 +375,9 @@ Ox.ArrayEditable = function(options, self) {
return that;
};
/*@
editItem <f> editItem
@*/
that.editItem = function() {
Ox.Log('AE', 'EDIT ITEM', self.options.editable, self.options.selected);
if (self.options.editable && self.options.selected) {
@ -379,11 +389,17 @@ Ox.ArrayEditable = function(options, self) {
return that;
};
/*@
reloadItems <f> reloadItems
@*/
that.reloadItems = function() {
renderItems();
return that;
};
/*@
removeItem <f> removeItem
@*/
that.removeItem = function() {
if (self.options.editable && self.options.selected) {
deleteItem();

View file

@ -175,6 +175,10 @@ Ox.ArrayInput = function(options, self) {
}
}
/*@
setErrors <f> setErrors
(values) -> <u> set erros
@*/
that.setErrors = function(values) {
self.$input.forEach(function($input) {
$input[
@ -185,4 +189,4 @@ Ox.ArrayInput = function(options, self) {
return that;
};
};

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -142,6 +140,10 @@ Ox.Button = function(options, self) {
}
};
/*@
toggle <f> toggle
() -> <o> toggle button
@*/
that.toggle = function() {
if (self.options.values.length) {
self.value = 1 - Ox.getIndexById(self.options.values, self.options.value);

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.ButtonGroup <f:Ox.Element> ButtonGroup Object
() -> <f> ButtonGroup Object

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Checkbox <f:Ox.Element> Checkbox Element
() -> <f> Checkbox Element

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.ColorInput <f:Ox.InputGroup> ColorInput Element
() -> <f> ColorInput Element

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.ColorPicker <f:Ox.Element> ColorPicker Element
() -> <f> ColorPicker Element

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.DateInput <f:Ox.Element> DateInput Element
() -> <f> DateInput Element

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.DateTimeInput <f:Ox.Element> DateTimeInput Element
() -> <f> DateTimeInput Element

View file

@ -1,4 +1,5 @@
'use strict';
/*@
Ox.Editable <f> Editable element
() -> <f> Input Element

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.FileButton <function> File Button
(options[, self]) -> <o> File Button
options <o> Options
self <o> Shared private variable
@*/
Ox.FileButton = function(options, self) {
self = self || {};
@ -101,14 +107,20 @@ Ox.FileButton = function(options, self) {
}
}
/*@
blurButton <f> blurButton
@*/
that.blurButton = function() {
self.$input.blur();
}
/*@
focusButton <f> focusButton
@*/
that.focusButton = function() {
self.$input.focus();
};
return that;
}
}

View file

@ -1,5 +1,12 @@
'use strict';
/*@
Ox.FileInput <function> File Input
(options[, self]) -> <o> File Input
options <o> Options
self <o> Shared private variable
@*/
Ox.FileInput = function(options, self) {
self = self || {};

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -818,6 +816,9 @@ Ox.Filter = function(options, self) {
that.triggerEvent('change', {query: query});
}
/*@
getList <f> getList
@*/
// fixme: is this the best way/name?
that.getList = function() {
if (self.$save) {

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -129,6 +127,10 @@ Ox.Form = function(options, self) {
}
}
/*@
addItem <f> addItem
(pos, item) -> <u> add item at position
@*/
that.addItem = function(pos, item) {
Ox.Log('Form', 'addItem', pos)
self.options.items.splice(pos, 0, item);
@ -138,6 +140,10 @@ Ox.Form = function(options, self) {
self.$items[pos].insertAfter(self.$items[pos - 1]);
}
/*@
removeItem <f> removeItem
(pos) -> <u> remove item from position
@*/
that.removeItem = function(pos) {
Ox.Log('Form', 'removeItem', pos);
self.$items[pos].remove();
@ -145,16 +151,25 @@ Ox.Form = function(options, self) {
self.$items.splice(pos, 1);
}
/*@
submit <f> submit
@*/
that.submit = function() {
// fixme: this seems to be unneeded
//Ox.Log('Form', '---- that.values()', that.values())
self.options.submit(that.values(), submitCallback);
};
/*@
valid <f> valid
@*/
that.valid = function() {
return self.formIsValid;
};
/*@
values <f> values
@*/
that.values = function() {
// FIXME: this should accept a single string argument to get a single value
/*

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -107,12 +105,19 @@ Ox.FormElementGroup = function(options, self) {
}
};
/*@
replaceElement <f> replaceElement
(pos, element) -> <u> replcae element at position
@*/
that.replaceElement = function(pos, element) {
Ox.Log('Form', 'Ox.FormElementGroup replaceElement', pos, element)
self.options.elements[pos].replaceWith(element.$element);
self.options.elements[pos] = element;
};
/*@
value <f> value
@*/
that.value = function() {
var values = self.options.elements.map(function(element) {
return element.value();

View file

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

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.FormPanel <function> Form Panel
(options[, self]) -> <o> Form Panel
options <o> Options
self <o> Shared private variable
@*/
Ox.FormPanel = function(options, self) {
self = self || {};
@ -147,6 +153,10 @@ Ox.FormPanel = function(options, self) {
return index;
}
/*@
renderPrintVersion <f> renderPrintVersion
(title) -> <s>
@*/
that.renderPrintVersion = function(title) {
var $printVersion = $('<div>').css({overflowY: 'auto'});
$printVersion.append(
@ -185,6 +195,9 @@ Ox.FormPanel = function(options, self) {
return $printVersion;
};
/*@
values <f> values
@*/
that.values = function() {
var values = {};
self.options.form.forEach(function(section, i) {

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Input <f:Ox.Element> Input Element
() -> <f> Input Element
@ -886,11 +886,17 @@ Ox.Input = function(options, self) {
}
};
/*@
blurInput <f> blurInput
@*/
that.blurInput = function() {
self.$input.blur();
return that;
};
/*@
clearInput <f> clearInput
@*/
that.clearInput = function() {
clear();
return that;
@ -918,6 +924,9 @@ Ox.Input = function(options, self) {
return that;
};
/*@
value <f> get/set value
@*/
// FIXME: deprecate, options are enough
that.value = function() {
if (arguments.length == 0) {

View file

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

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.InsertHTMLDialog <function> Insert HTML Dialog
(options[, self]) -> <o> Insert HTML Dialog
options <o> Options
self <o> Shared private variable
@*/
Ox.InsertHTMLDialog = function(options, self) {
var that;

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Label <f:Ox.Element> Label Object
() -> <f> Label Object

View file

@ -1,5 +1,17 @@
'use strict';
/*@
Ox.ObjectArrayInput <function> Object Array Input
(options[, self]) -> <o> Object Array Input
options <o> Options
buttonTitles
inputs
labelWidth
max
value
width
self <o> Shared private variable
@*/
Ox.ObjectArrayInput = function(options, self) {
self = self || {};
@ -159,4 +171,4 @@ Ox.ObjectArrayInput = function(options, self) {
return that;
};
};

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.ObjectInput <function> Object Input
(options[, self]) -> <o> Object Input
options <o> Options
self <o> Shared private variable
@*/
Ox.ObjectInput = function(options, self) {
self = self || {};
@ -61,4 +67,4 @@ Ox.ObjectInput = function(options, self) {
return that;
};
};

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -107,6 +105,9 @@ Ox.OptionGroup = function(items, min, max, property) {
return toggled;
}
/*@
value <f> get value
@*/
this.value = function() {
var value = Ox.map(items, function(item) {
return item[property] ? item.id : null;

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Picker <f:Ox.Element> Picker Object
() -> <f> Picker Object

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -222,14 +220,23 @@ Ox.Select = function(options, self) {
}
};
/*@
disableItem <f> disableItem
@*/
that.disableItem = function(id) {
self.$menu.getItem(id).options({disabled: true});
};
/*@
enableItem <f> enableItem
@*/
that.enableItem = function(id) {
self.$menu.getItem(id).options({disabled: false});
};
/*@
remove <f> remove
@*/
self.superRemove = that.remove;
that.remove = function() {
self.$menu.remove();

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.SelectInput <function> Select Input
(options[, self]) -> <o> Select Input
options <o> Options
self <o> Shared private variable
@*/
Ox.SelectInput = function(options, self) {
var that;
@ -114,6 +120,11 @@ Ox.SelectInput = function(options, self) {
}
};
/*@
value <f> get/set value
() -> value get value
(value) -> <o> set value
@*/
that.value = function() {
if (arguments.length == 0) {
return getValue();
@ -126,4 +137,4 @@ Ox.SelectInput = function(options, self) {
return that;
};
};

View file

@ -1,5 +1,11 @@
'use strict';
/*@
Ox.Spreadsheet <function> Spreadsheet
(options[, self]) -> <o> Spreadsheet
options <o> Options
self <o> Shared private variable
@*/
Ox.Spreadsheet = function(options, self) {
self = self || {};
@ -237,4 +243,4 @@ Ox.Spreadsheet = function(options, self) {
return that;
};
};

View file

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