add documentation stubs

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

View file

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

View file

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

View file

@ -1,4 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Tabbar <f:Ox.Bar> Tabbar Ox.Tabbar <f:Ox.Bar> Tabbar
@ -10,8 +9,6 @@ Ox.Tabbar <f:Ox.Bar> Tabbar
tabs <a|[]> tabs tabs <a|[]> tabs
self <o> Shared private variable self <o> Shared private variable
@*/ @*/
/**
*/
Ox.Tabbar = function(options, self) { Ox.Tabbar = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,4 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/** /**
fixme: no need for this fixme: no need for this

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -1257,6 +1255,10 @@ Ox.Calendar = function(options, self) {
} }
}; };
/*@
that.addEvent <f> addEvent
(event) -> <o> object
@*/
that.addEvent = function(event) { that.addEvent = function(event) {
// Ox.Log('Calendar', 'CALENDAR ADD EVENT', event) // Ox.Log('Calendar', 'CALENDAR ADD EVENT', event)
event = getEventData(event); event = getEventData(event);
@ -1305,15 +1307,27 @@ Ox.Calendar = function(options, self) {
return that; return that;
}; };
/*@
that.getBounds <f> get bounds
() -> <o> object
@*/
that.getBounds = function() { that.getBounds = function() {
return getCalendarEvent(); return getCalendarEvent();
}; };
/*@
that.panToEvent <f> pan to event
() -> <o> object
@*/
that.panToEvent = function() { that.panToEvent = function() {
panToSelected(); panToSelected();
return that; return that;
}; };
/*@
that.removeEvent <f> remvoe Event
() -> <o> object
@*/
that.removeEvent = function() { that.removeEvent = function() {
Ox.Log('Calendar', 'REMOVE ... SELF.OPTIONS', self.options) Ox.Log('Calendar', 'REMOVE ... SELF.OPTIONS', self.options)
var index = Ox.getIndexById(self.options.events, self.options.selected); var index = Ox.getIndexById(self.options.events, self.options.selected);
@ -1325,6 +1339,10 @@ Ox.Calendar = function(options, self) {
return that; return that;
}; };
/*@
that.resizeCalendar <f> resize
() -> <o> object
@*/
that.resizeCalendar = function() { that.resizeCalendar = function() {
self.options.width = that.width(); self.options.width = that.width();
self.options.height = that.height(); self.options.height = that.height();
@ -1333,6 +1351,10 @@ Ox.Calendar = function(options, self) {
return that; return that;
}; };
/*@
that.zoomToEvent <f> zoom to event
() -> <o> object
@*/
that.zoomToEvent = function() { that.zoomToEvent = function() {
zoomToSelected(); zoomToSelected();
return that; return that;

View file

@ -1,4 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.CalendarDate <f> CalendarDate Ox.CalendarDate <f> CalendarDate

View file

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

View file

@ -1,4 +1,5 @@
'use strict'; 'use strict';
/*@ /*@
Ox.DocPage <f> DocPage Ox.DocPage <f> DocPage
() -> <o> DocPage object () -> <o> DocPage object

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.API <o> bind remote api to object Ox.API <o> bind remote api to object
options <o> Options object options <o> Options object

View file

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

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Clipboard <o> Basic clipboard handler Ox.Clipboard <o> Basic clipboard handler
copy <f> Copy data to clipboard copy <f> Copy data to clipboard

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
// fixme: wouldn't it be better to let the elements be, // fixme: wouldn't it be better to let the elements be,
// rather then $element, $content, and potentially others, // rather then $element, $content, and potentially others,
// 0, 1, 2, etc, so that append would append 0, and appendTo // 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'; 'use strict';
/*@ /*@
@ -321,6 +319,10 @@ Ox.Element = function(options, self) {
return that; return that;
}; };
/*@
bindKeyboard <f> bind keyboard
() -> <o> object
@*/
that.bindKeyboard = function() { that.bindKeyboard = function() {
Ox.Keyboard.bind(that.id); Ox.Keyboard.bind(that.id);
return that; return that;
@ -410,6 +412,10 @@ Ox.Element = function(options, self) {
return that; return that;
}; };
/*@
setElement <f> set $element
($element) -> null
@*/
that.setElement = function($element) { that.setElement = function($element) {
//$element[0].className = that.$element[0].className; //$element[0].className = that.$element[0].className;
$element.addClass('OxElement').data({oxid: that.id}); $element.addClass('OxElement').data({oxid: that.id});
@ -418,6 +424,10 @@ Ox.Element = function(options, self) {
that[0] = that.$element[0]; that[0] = that.$element[0];
}; };
/*@
toggleOption <f> toggle option
() -> <o> object
@*/
that.toggleOption = function() { that.toggleOption = function() {
var options = {}; var options = {};
Ox.toArray(arguments[0]).forEach(function(key) { Ox.toArray(arguments[0]).forEach(function(key) {
@ -480,6 +490,10 @@ Ox.Element = function(options, self) {
return that; return that;
}; };
/*@
unbindKeyboard <f> unbind keyboard
() -> <o> object
@*/
that.unbindKeyboard = function() { that.unbindKeyboard = function() {
Ox.Keyboard.unbind(that.id); Ox.Keyboard.unbind(that.id);
return that; return that;

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Focus <o> Basic focus handler Ox.Focus <o> Basic focus handler
@*/ @*/
@ -64,6 +64,10 @@ Ox.Focus = (function() {
focused: function() { focused: function() {
return stack.length ? stack[stack.length - 1] : null; return stack.length ? stack[stack.length - 1] : null;
}, },
/*@
remove <f> remove
(id) -> <u>
@*/
remove: function(id) { remove: function(id) {
var index = stack.indexOf(id); var index = stack.indexOf(id);
index > -1 && stack.splice(index, 1); index > -1 && stack.splice(index, 1);

View file

@ -1,6 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@
Ox.GarbageCollection <function> GarbageCollection
() -> <o> run garbage collection
debug() -> {} output debug information
@*/
Ox.GarbageCollection = (function() { Ox.GarbageCollection = (function() {
var that = function() { var that = function() {
@ -26,6 +31,10 @@ Ox.GarbageCollection = (function() {
Ox.Log('GC', len, '-->', Ox.len(Ox.UI.elements)); Ox.Log('GC', len, '-->', Ox.len(Ox.UI.elements));
} }
/*@
debug <f> debug info
() -> <s>
@*/
that.debug = function() { that.debug = function() {
var classNames = {}, sorted = []; var classNames = {}, sorted = [];
Ox.forEach(Ox.UI.elements, function(element, id) { 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 Ox.History
***/ ***/

View file

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

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Keyboard <o> Basic keyboard handler Ox.Keyboard <o> Basic keyboard handler
@*/ @*/
@ -82,10 +82,18 @@ Ox.Keyboard = (function() {
} }
return { return {
/*@
bind <f> bind
(id) -> <u> bind id
@*/
bind: function(id) { bind: function(id) {
var index = bound.indexOf(id); var index = bound.indexOf(id);
index == -1 && bound.push(id); index == -1 && bound.push(id);
}, },
/*@
unbind <f> unbind
(id) -> <u> unbind id
@*/
unbind: function(id) { unbind: function(id) {
var index = bound.indexOf(id); var index = bound.indexOf(id);
index > -1 && bound.splice(index, 1); index > -1 && bound.splice(index, 1);

View file

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

View file

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

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Request <o> Basic request handler object Ox.Request <o> Basic request handler object
FIXME: options is not a property, just documenting defaults 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'; 'use strict';
/*@ /*@
@ -123,12 +121,18 @@ Ox.Theme = (function() {
return that; return that;
} }
/*@
formatColor <f> formatColor
@*/
that.formatColor = function(val, type) { that.formatColor = function(val, type) {
return renderElement(val, type) return renderElement(val, type)
.css({textAlign: 'center'}) .css({textAlign: 'center'})
.html(Ox.formatNumber(val, 3)); .html(Ox.formatNumber(val, 3));
}; };
/*@
formatColorLevel <f> formatColorLevel
@*/
that.formatColorLevel = function(index, values, hueRange) { that.formatColorLevel = function(index, values, hueRange) {
hueRange = hueRange || (Ox.isBoolean(index) ? [0, 120] : [120, 0]); hueRange = hueRange || (Ox.isBoolean(index) ? [0, 120] : [120, 0]);
var step = (hueRange[1] - hueRange[0]) / (values.length - 1), 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'; '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() { that.parse = function() {
var str = arguments.length == 2 ? arguments[0] var str = arguments.length == 2 ? arguments[0]
: document.location.pathname : document.location.pathname

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,11 @@
'use strict'; '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) { Ox.FileButton = function(options, self) {
self = self || {}; self = self || {};
@ -101,10 +107,16 @@ Ox.FileButton = function(options, self) {
} }
} }
/*@
blurButton <f> blurButton
@*/
that.blurButton = function() { that.blurButton = function() {
self.$input.blur(); self.$input.blur();
} }
/*@
focusButton <f> focusButton
@*/
that.focusButton = function() { that.focusButton = function() {
self.$input.focus(); self.$input.focus();
}; };

View file

@ -1,5 +1,12 @@
'use strict'; '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) { Ox.FileInput = function(options, self) {
self = self || {}; self = self || {};

View file

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

View file

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

View file

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

View file

@ -1,5 +1,11 @@
'use strict'; '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) { Ox.FormPanel = function(options, self) {
self = self || {}; self = self || {};
@ -147,6 +153,10 @@ Ox.FormPanel = function(options, self) {
return index; return index;
} }
/*@
renderPrintVersion <f> renderPrintVersion
(title) -> <s>
@*/
that.renderPrintVersion = function(title) { that.renderPrintVersion = function(title) {
var $printVersion = $('<div>').css({overflowY: 'auto'}); var $printVersion = $('<div>').css({overflowY: 'auto'});
$printVersion.append( $printVersion.append(
@ -185,6 +195,9 @@ Ox.FormPanel = function(options, self) {
return $printVersion; return $printVersion;
}; };
/*@
values <f> values
@*/
that.values = function() { that.values = function() {
var values = {}; var values = {};
self.options.form.forEach(function(section, i) { 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'; 'use strict';
/*@ /*@
Ox.Input <f:Ox.Element> Input Element Ox.Input <f:Ox.Element> Input Element
() -> <f> Input Element () -> <f> Input Element
@ -886,11 +886,17 @@ Ox.Input = function(options, self) {
} }
}; };
/*@
blurInput <f> blurInput
@*/
that.blurInput = function() { that.blurInput = function() {
self.$input.blur(); self.$input.blur();
return that; return that;
}; };
/*@
clearInput <f> clearInput
@*/
that.clearInput = function() { that.clearInput = function() {
clear(); clear();
return that; return that;
@ -918,6 +924,9 @@ Ox.Input = function(options, self) {
return that; return that;
}; };
/*@
value <f> get/set value
@*/
// FIXME: deprecate, options are enough // FIXME: deprecate, options are enough
that.value = function() { that.value = function() {
if (arguments.length == 0) { if (arguments.length == 0) {

View file

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

View file

@ -1,5 +1,11 @@
'use strict'; '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) { Ox.InsertHTMLDialog = function(options, self) {
var that; var that;

View file

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

View file

@ -1,5 +1,17 @@
'use strict'; '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) { Ox.ObjectArrayInput = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,5 +1,11 @@
'use strict'; '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) { Ox.ObjectInput = function(options, self) {
self = self || {}; self = self || {};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,11 @@
'use strict'; '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) { Ox.SelectInput = function(options, self) {
var that; 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() { that.value = function() {
if (arguments.length == 0) { if (arguments.length == 0) {
return getValue(); return getValue();

View file

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

View file

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

View file

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

View file

@ -1,4 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=js
'use strict'; 'use strict';
/*@ /*@
Ox.IconList <f:Ox.Element> IconList Object Ox.IconList <f:Ox.Element> IconList Object
@ -155,15 +154,24 @@ Ox.IconList = function(options, self) {
return that; return that;
}; };
/*@
gainFocus <f> gainFocus
@*/
that.gainFocus = function() { that.gainFocus = function() {
that.$element.gainFocus(); that.$element.gainFocus();
return that; return that;
}; };
/*@
hasFocus <f> hasFocus
@*/
that.hasFocus = function() { that.hasFocus = function() {
return that.$element.hasFocus(); return that.$element.hasFocus();
}; };
/*@
loseFocus <f> loseFocus
@*/
that.loseFocus = function() { that.loseFocus = function() {
that.$element.loseFocus(); that.$element.loseFocus();
return that; return that;

View file

@ -1,5 +1,11 @@
'use strict'; 'use strict';
/*@
Ox.InfoList <function> Info List
(options[, self]) -> <o> Info List
options <o> Options
self <o> Shared private variable
@*/
Ox.InfoList = function(options, self) { Ox.InfoList = function(options, self) {
self = self || {}; self = self || {};
@ -171,44 +177,72 @@ Ox.InfoList = function(options, self) {
} }
}; };
/*@
closePreivew <f> closePreview
@*/
that.closePreview = function() { that.closePreview = function() {
that.$element.closePreview(); that.$element.closePreview();
return that; return that;
}; };
/*@
gainFocus <f> gainFocus
@*/
that.gainFocus = function() { that.gainFocus = function() {
that.$element.gainFocus(); that.$element.gainFocus();
return that; return that;
}; };
/*@
hasFocus <f> hasFocus
@*/
that.hasFocus = function() { that.hasFocus = function() {
return that.$element.hasFocus(); return that.$element.hasFocus();
}; };
/*@
loseFocus <f> loseFocus
@*/
that.loseFocus = function() { that.loseFocus = function() {
that.$element.loseFocus(); that.$element.loseFocus();
return that; return that;
}; };
/*@
paste <f> paste
@*/
that.paste = function(data) { that.paste = function(data) {
that.$element.paste(data); that.$element.paste(data);
return that; return that;
}; };
/*@
reloadList <f> reloadList
@*/
that.reloadList = function(stayAtPosition) { that.reloadList = function(stayAtPosition) {
that.$element.reloadList(stayAtPosition); that.$element.reloadList(stayAtPosition);
return that; return that;
}; };
/*@
scrollToSelection <f> scrollToSelection
@*/
that.scrollToSelection = function() { that.scrollToSelection = function() {
that.$element.scrollToSelection(); that.$element.scrollToSelection();
return that; return that;
}; };
/*@
size <f> size
@*/
that.size = function() { that.size = function() {
that.$element.size(); that.$element.size();
}; };
/*@
sortList <f> sortList
(key, operator) -> <o>
@*/
that.sortList = function(key, operator) { that.sortList = function(key, operator) {
self.options.sort = [{ self.options.sort = [{
key: key, key: key,
@ -219,6 +253,12 @@ Ox.InfoList = function(options, self) {
return that; return that;
}; };
/*@
value <f> value
(id) -> values
(id, key) -> value
(id, key, value) -> <o>
@*/
that.value = function(id, key, value) { that.value = function(id, key, value) {
// fixme: make this accept id, {k: v, ...} // fixme: make this accept id, {k: v, ...}
if (arguments.length == 1) { if (arguments.length == 1) {

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -1633,6 +1631,10 @@ Ox.List = function(options, self) {
return that; return that;
} }
/*@
sort <f> sort
@*/
// needed when a value has changed // needed when a value has changed
// but, fixme: better function name // but, fixme: better function name
that.sort = function() { that.sort = function() {

View file

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

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -838,11 +836,18 @@ Ox.TextList = function(options, self) {
*/ */
} }
/*@
closePreivew <f> closePreview
@*/
that.closePreview = function() { that.closePreview = function() {
that.$body.closePreview(); that.$body.closePreview();
return that; return that;
}; };
/*@
editCell <f> editCell
(id, key, select) -> <u> edit cell
@*/
that.editCell = function(id, key, select) { that.editCell = function(id, key, select) {
Ox.Log('List', 'editCell', id, key) Ox.Log('List', 'editCell', id, key)
var $item = getItem(id), var $item = getItem(id),
@ -894,40 +899,67 @@ Ox.TextList = function(options, self) {
} }
} }
/*@
gainFocus <f> gainFocus
@*/
that.gainFocus = function() { that.gainFocus = function() {
that.$body.gainFocus(); that.$body.gainFocus();
return that; return that;
}; };
/*@
hasFocus <f> hasFocus
@*/
that.hasFocus = function() { that.hasFocus = function() {
return that.$body.hasFocus(); return that.$body.hasFocus();
}; };
/*@
loseFocus <f> loseFocus
@*/
that.loseFocus = function() { that.loseFocus = function() {
that.$body.loseFocus(); that.$body.loseFocus();
return that; return that;
}; };
/*@
openPreview <f> openPreview
@*/
that.openPreview = function() { that.openPreview = function() {
that.$body.openPreview(); that.$body.openPreview();
return that; return that;
}; };
/*@
paste <f> paste
(data) -> <o> paste data
@*/
that.paste = function(data) { that.paste = function(data) {
that.$body.paste(); that.$body.paste();
return that; return that;
}; };
/*@
reloadList <f> reloadList
(stayAtPosition) -> <o> reload list
@*/
that.reloadList = function(stayAtPosition) { that.reloadList = function(stayAtPosition) {
that.$body.reloadList(stayAtPosition); that.$body.reloadList(stayAtPosition);
return that; return that;
}; };
/*@
resizeColumn <f> resizeColumn
(id, width) -> <o> resize column id to width
@*/
that.resizeColumn = function(id, width) { that.resizeColumn = function(id, width) {
resizeColumn(id, width); resizeColumn(id, width);
return that; return that;
} }
/*@
size <f> size
@*/
that.size = function() { that.size = function() {
setWidth(); setWidth();
that.$body.size(); that.$body.size();
@ -966,6 +998,12 @@ Ox.TextList = function(options, self) {
return that; return that;
}; };
/*@
value <f> value
(id) -> get values of row id
(id, key) -> get value of cell id, key
(id, key, value) -> set id, key to value
@*/
that.value = function(id, key, value) { that.value = function(id, key, value) {
// fixme: make this accept id, {k: v, ...} // fixme: make this accept id, {k: v, ...}
//Ox.Log('List', 'value', id, key, value) //Ox.Log('List', 'value', id, key, value)

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -259,15 +257,24 @@ Ox.TreeList = function(options, self) {
} }
}; };
/*@
gainFocus <f> gainFocus
@*/
that.gainFocus = function() { that.gainFocus = function() {
self.$list.gainFocus(); self.$list.gainFocus();
return that; return that;
}; };
/*@
hasFocus <f> hasFocus
@*/
that.hasFocus = function() { that.hasFocus = function() {
return self.$list.hasFocus(); return self.$list.hasFocus();
}; };
/*@
loseFocus <f> loseFocus
@*/
that.loseFocus = function() { that.loseFocus = function() {
self.$list.loseFocus(); self.$list.loseFocus();
return that; return that;

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -1442,25 +1440,45 @@ Ox.Map = function(options, self) {
} }
}; };
/*@
addPlace <f> addPlace
(data) -> <u> add place to places
@*/
that.addPlace = function(data) { that.addPlace = function(data) {
addPlaceToPlaces(data); addPlaceToPlaces(data);
}; };
/*@
getKey <f> getKey
() -> <o> get key
@*/
that.getKey = function() { that.getKey = function() {
return self.shiftKey ? 'shift' return self.shiftKey ? 'shift'
: self.metaKey ? 'meta' : self.metaKey ? 'meta'
: null; : null;
}; };
/*@
getSelectedPlace <f> getSelectedPlace
() -> <o> get selected place
@*/
that.getSelectedPlace = function() { that.getSelectedPlace = function() {
return getSelectedPlace(); return getSelectedPlace();
} }
/*@
editPlace <f> editPlace
() -> <o> edit selected place
@*/
that.editPlace = function() { that.editPlace = function() {
getSelectedPlace().edit(); getSelectedPlace().edit();
return that; return that;
}; };
/*@
findPlace <f> findPlace
(name, callback) -> <o> find place and pass to callback
@*/
that.findPlace = function(name, callback) { that.findPlace = function(name, callback) {
getPlaceByName(name, function(place) { getPlaceByName(name, function(place) {
if (place) { if (place) {
@ -1474,22 +1492,38 @@ Ox.Map = function(options, self) {
return that; return that;
}; };
/*@
newPlace <f> newPlace
(place) -> <o> add place to map
@*/
that.newPlace = function(place) { that.newPlace = function(place) {
addPlaceToMap(place); addPlaceToMap(place);
return that; return that;
}; };
/*@
panToPlace <f> panToPlace
() -> <o> pan to place
@*/
that.panToPlace = function() { that.panToPlace = function() {
panToPlace(); panToPlace();
return that; return that;
}; };
/*@
removePlace <f> removePlace
() -> <o> remove selected place from places
@*/
that.removePlace = function() { that.removePlace = function() {
// fixme: removePlaceFromPlaces() ? // fixme: removePlaceFromPlaces() ?
removePlace(); removePlace();
return that; return that;
}; };
/*@
resizeMap <f> resizeMap
() -> <o> resize map
@*/
that.resizeMap = function() { that.resizeMap = function() {
// keep center on resize has been commented out // keep center on resize has been commented out
// var center = self.map.getCenter(); // var center = self.map.getCenter();
@ -1517,6 +1551,10 @@ Ox.Map = function(options, self) {
return that; return that;
} }
/*@
value <f> value
(id, key, value) -> <o> set id, key to value
@*/
that.value = function(id, key, value) { that.value = function(id, key, value) {
// fixme: should be like the corresponding List/TextList/etc value function // fixme: should be like the corresponding List/TextList/etc value function
Ox.Log('Map', 'Map.value', id, key, value); Ox.Log('Map', 'Map.value', id, key, value);
@ -1535,11 +1573,19 @@ Ox.Map = function(options, self) {
return that; return that;
} }
/*@
zoomToPlace <f> zoomToPlace
() -> <o> zoom to selected place
@*/
that.zoomToPlace = function() { that.zoomToPlace = function() {
zoomToPlace(); zoomToPlace();
return that; return that;
}; };
/*@
zoom <f> zoom
(value) -> <o> zoom to value
@*/
that.zoom = function(value) { that.zoom = function(value) {
zoom(value); zoom(value);
return that; return that;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -211,6 +209,10 @@ Ox.MainMenu = function(options, self) {
}; };
/*@
replaceMenu <f> replace menu
(id, menu) -> <u> replace menu
@*/
that.replaceMenu = function(id, menu) { that.replaceMenu = function(id, menu) {
var position = Ox.getIndexById(self.options.menus, id); var position = Ox.getIndexById(self.options.menus, id);
self.options.menus[position] = menu; self.options.menus[position] = menu;
@ -238,6 +240,10 @@ Ox.MainMenu = function(options, self) {
return that; return that;
}; };
/*@
setItemTitle <f> setItemTitle
(id, title) -> <o> set item title
@*/
that.setItemTitle = function(id, title) { that.setItemTitle = function(id, title) {
var item = that.getItem(id); var item = that.getItem(id);
item && item.options({title: title}); item && item.options({title: title});

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Menu <f:Ox.Element> Menu Object Ox.Menu <f:Ox.Element> Menu Object
() -> <f> Menu Object () -> <f> Menu Object
@ -591,14 +591,15 @@ Ox.Menu = function(options, self) {
}; };
/*@ /*@
addItemBefore <f> addItemBefore <f> addItemBefore
@*/ @*/
that.addItemBefore = function(item, id) { that.addItemBefore = function(item, id) {
}; };
/*@ /*@
checkItem <f> checkItem <f> checkItem
(id, checked) -> <u> check item, checked can be undefined/true or false
@*/ @*/
that.checkItem = function(id, checked) { that.checkItem = function(id, checked) {
Ox.Log('Menu', 'checkItem id', id) Ox.Log('Menu', 'checkItem id', id)
@ -629,12 +630,17 @@ Ox.Menu = function(options, self) {
} }
}; };
/*@
clickItem <f> clickItem
(position, files) -> <o> click item at position
@*/
that.clickItem = function(position, files) { that.clickItem = function(position, files) {
clickItem(position, files); clickItem(position, files);
}; };
/*@ /*@
getItem <f> getItem <f> getItem
(id) -> <o> get item
@*/ @*/
that.getItem = function(id) { that.getItem = function(id) {
//Ox.Log('Menu', 'getItem id', id) //Ox.Log('Menu', 'getItem id', id)
@ -660,7 +666,8 @@ Ox.Menu = function(options, self) {
}; };
/*@ /*@
getSubmenu <f> getSubmenu <f> getSubmenu
(id) -> <o> get submenu by id
@*/ @*/
that.getSubmenu = function(id) { that.getSubmenu = function(id) {
var ids = id.split('_'), var ids = id.split('_'),
@ -675,7 +682,8 @@ Ox.Menu = function(options, self) {
} }
/*@ /*@
hasEnabledItems <f> hasEnabledItems <f> hasEditableItems
() -> <b> menu has editable items
@*/ @*/
that.hasEnabledItems = function() { that.hasEnabledItems = function() {
var ret = false; var ret = false;
@ -688,7 +696,7 @@ Ox.Menu = function(options, self) {
}; };
/*@ /*@
hideMenu <f> hideMenu <f> hideMenu
() -> <f> Menu Object () -> <f> Menu Object
@*/ @*/
that.hideMenu = function(hideParent) { that.hideMenu = function(hideParent) {
@ -717,6 +725,10 @@ Ox.Menu = function(options, self) {
return that; return that;
}; };
/*@
remove <f> remove
() -> <o> remove menu
@*/
self.superRemove = that.remove; self.superRemove = that.remove;
that.remove = function() { that.remove = function() {
Ox.forEach(that.submenus, function(submenu) { Ox.forEach(that.submenus, function(submenu) {
@ -740,6 +752,10 @@ Ox.Menu = function(options, self) {
return that; return that;
}; };
/*@
setItemTitle <f> setItemTitle
(id, title) -> <o> set item title
@*/
that.setItemTitle = function(id, title) { that.setItemTitle = function(id, title) {
var item = getItem(id); var item = getItem(id);
item && item.options({title: title}); item && item.options({title: title});
@ -803,6 +819,10 @@ Ox.Menu = function(options, self) {
return that.is(':hidden') ? that.showMenu() : that.hideMenu(); return that.is(':hidden') ? that.showMenu() : that.hideMenu();
}; };
/*@
uncheckItem <f> uncheckItem
(id) -> <o> uncheck item
@*/
that.uncheckItem = function(id) { that.uncheckItem = function(id) {
that.checkItem(id, false); that.checkItem(id, false);
}; };

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -116,28 +114,32 @@ Ox.MenuButton = function(options, self) {
} }
/*@ /*@
checkItem <f> checkItem <f> checkItem
(id) -> <u> check item with id
@*/ @*/
that.checkItem = function(id) { that.checkItem = function(id) {
self.$menu.checkItem(id); self.$menu.checkItem(id);
}; };
/*@ /*@
disableItem <f> disableItem <f> disableItem
(id) -> <u> disable item with id
@*/ @*/
that.disableItem = function(id) { that.disableItem = function(id) {
self.$menu.getItem(id).options({disabled: true}); self.$menu.getItem(id).options({disabled: true});
}; };
/*@ /*@
enableItem <f> enableItem <f> enableItem
(id) -> <u> enable item
@*/ @*/
that.enableItem = function(id) { that.enableItem = function(id) {
self.$menu.getItem(id).options({disabled: false}); self.$menu.getItem(id).options({disabled: false});
}; };
/*@ /*@
remove <f> remove <f> remove
() -> <u> remove item
@*/ @*/
self.superRemove = that.remove; self.superRemove = that.remove;
that.remove = function() { that.remove = function() {
@ -145,11 +147,19 @@ Ox.MenuButton = function(options, self) {
self.superRemove(); self.superRemove();
}; };
/*@
setItemTitle <f> setItemTitle
(id, title) -> <o> set item title
@*/
that.setItemTitle = function(id, title) { that.setItemTitle = function(id, title) {
self.$menu.setItemTitle(id, title); self.$menu.setItemTitle(id, title);
return that; return that;
}; };
/*@
uncheckItem <f> uncheck item
(id) -> <o> uncheck item with id
@*/
that.uncheckItem = function(id) { that.uncheckItem = function(id) {
self.$menu.uncheckItem(id); self.$menu.uncheckItem(id);
}; };

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript 'use strict';
/*@ /*@
Ox.TabPanel <f> Tabbed panel Ox.TabPanel <f> Tabbed panel
@ -15,8 +15,6 @@ Ox.TabPanel <f> Tabbed panel
self <o> Shared private variable self <o> Shared private variable
@*/ @*/
'use strict';
Ox.TabPanel = function(options, self) { Ox.TabPanel = function(options, self) {
self = self || {}; self = self || {};
@ -77,6 +75,10 @@ Ox.TabPanel = function(options, self) {
return (selected.length ? selected : self.options.tabs)[0].id; return (selected.length ? selected : self.options.tabs)[0].id;
} }
/*@
select <f> select
(id) -> <o> select panel
@*/
// fixme: does this collide with a jquery fn? // fixme: does this collide with a jquery fn?
that.select = function(id) { that.select = function(id) {
if (Ox.getIndexById(self.options.tabs, id) > -1) { if (Ox.getIndexById(self.options.tabs, id) > -1) {
@ -85,6 +87,10 @@ Ox.TabPanel = function(options, self) {
return that; return that;
}; };
/*@
selected <f> selected
() -> <b> return selected panel
@*/
that.selected = function() { that.selected = function() {
return self.selected; return self.selected;
}; };

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -583,12 +581,20 @@ Ox.AnnotationFolder = function(options, self) {
return that; return that;
}; };
/*@
blurItem <f> blur item
() -> <o> blur selected item
@*/
that.blurItem = function() { that.blurItem = function() {
self.editing = false; self.editing = false;
self.$annotations.blurItem(); self.$annotations.blurItem();
return that; return that;
}; };
/*@
editItem <f> edit item
() -> <o> edit selected item
@*/
that.editItem = function() { that.editItem = function() {
self.editing = true; self.editing = true;
self.$panel.options({collapsed: false}); self.$panel.options({collapsed: false});
@ -596,15 +602,27 @@ Ox.AnnotationFolder = function(options, self) {
return that; return that;
}; };
/*@
gainFocus <f> gain focus
() -> <o> gain focus
@*/
that.gainFocus = function() { that.gainFocus = function() {
self.$annotations.gainFocus(); self.$annotations.gainFocus();
return that; return that;
}; };
/*@
removeItem <f> remove item
() -> <o> remove selected item
@*/
that.removeItem = function() { that.removeItem = function() {
self.$annotations.removeItem(); self.$annotations.removeItem();
}; };
/*@
selectItem <f> select item
(position) -> <o> select item at position
@*/
that.selectItem = function(position) { that.selectItem = function(position) {
// selects the first (0) or last (-1) visible annotation // selects the first (0) or last (-1) visible annotation
if (self.annotations.length) { if (self.annotations.length) {
@ -619,6 +637,10 @@ Ox.AnnotationFolder = function(options, self) {
} }
}; };
/*@
updateItem <f> update item
(id, data) -> <o> update item
@*/
that.updateItem = function(id, data) { that.updateItem = function(id, data) {
var item = Ox.getObjectById(self.options.items, id); var item = Ox.getObjectById(self.options.items, id);
Ox.forEach(data, function(value, key) { Ox.forEach(data, function(value, key) {

View file

@ -463,6 +463,10 @@ Ox.AnnotationPanel = function(options, self) {
} }
}; };
/*@
addItem <f> add item
(layer, item) -> <o> add item to layer
@*/
that.addItem = function(layer, item) { that.addItem = function(layer, item) {
// called from addannotation callback // called from addannotation callback
var i = Ox.getIndexById(self.options.layers, layer); var i = Ox.getIndexById(self.options.layers, layer);
@ -476,18 +480,30 @@ Ox.AnnotationPanel = function(options, self) {
renderEditMenu(); renderEditMenu();
}; };
/*@
blurItem <f> blur item
() -> <o> blur selected item
@*/
that.blurItem = function() { that.blurItem = function() {
self.editing = false; self.editing = false;
getFolder(self.options.selected).blurItem(); getFolder(self.options.selected).blurItem();
renderEditMenu(); renderEditMenu();
}; };
/*@
editItem <f> editItem
() -> <o> put selected item into edit mode
@*/
that.editItem = function() { that.editItem = function() {
self.editing = true; self.editing = true;
getFolder(self.options.selected).editItem(); getFolder(self.options.selected).editItem();
renderEditMenu(); renderEditMenu();
}; };
/*@
removeItem <f> removeItem
(remove) -> <o> remove item
@*/
that.removeItem = function(remove) { that.removeItem = function(remove) {
if (remove) { if (remove) {
// remove initiated by video editor // remove initiated by video editor
@ -501,6 +517,10 @@ Ox.AnnotationPanel = function(options, self) {
} }
}; };
/*@
updateItem <f> updateItem
(id, item) -> <o> update item
@*/
that.updateItem = function(id, item) { that.updateItem = function(id, item) {
// called from editannotation callback // called from editannotation callback
// on the first update of a new annotation, the id will change // on the first update of a new annotation, the id will change

View file

@ -1,7 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@
Ox.BlockVideoTimeline <function> Block Video Timeline
(options[, self]) -> <o> Block Video Timeline
options <o> Options
self <o> Shared private variable
@*/
Ox.BlockVideoTimeline = function(options, self) { Ox.BlockVideoTimeline = function(options, self) {
self = self || {}; self = self || {};

View file

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

View file

@ -3,7 +3,6 @@
/*@ /*@
Ox.SmallVideoTimeline <f> Small Video Timeline Ox.SmallVideoTimeline <f> Small Video Timeline
@*/ @*/
Ox.SmallVideoTimeline = function(options, self) { Ox.SmallVideoTimeline = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,5 +1,11 @@
'use strict'; 'use strict';
/*@
Ox.SmallVideoTimelineImage <function> Small Video Timeline Image
(options[, self]) -> <o> Small Video Timeline Image
options <o> Options
self <o> Shared private variable
@*/
Ox.SmallVideoTimelineImage = function(options, self) { Ox.SmallVideoTimelineImage = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -1409,6 +1407,10 @@ Ox.VideoEditor = function(options, self) {
self.$annotationPanel.addItem(layer, annotation); self.$annotationPanel.addItem(layer, annotation);
}; };
/*@
updateAnnotation <f> updateAnnotation
(id, annotation) -> <o> update annotation with id
@*/
that.updateAnnotation = function(id, annotation) { that.updateAnnotation = function(id, annotation) {
// called from editannotation callback // called from editannotation callback
self.options.selected = annotation.id; // fixme: needed? self.options.selected = annotation.id; // fixme: needed?

View file

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

View file

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

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -2391,6 +2389,10 @@ Ox.VideoPlayer = function(options, self) {
} }
}; };
/*@
changeVolume <f> change volume
(num) -> <o> change volume
@*/
that.changeVolume = function(num) { that.changeVolume = function(num) {
changeVolume(num); changeVolume(num);
return that; return that;

View file

@ -1,7 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@
Ox.VideoPreview <function> Video Preview
(options[, self]) -> <o> Video Preview
options <o> Options
self <o> Shared private variable
@*/
Ox.VideoPreview = function(options, self) { Ox.VideoPreview = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
@ -280,6 +278,10 @@ Ox.VideoTimelinePanel = function(options, self) {
} }
}; };
/*@
toggleAnnotations <f> toggle annotations
() -> <o> toggle annotations
@*/
that.toggleAnnotations = function() { that.toggleAnnotations = function() {
that.$element.toggle(1); that.$element.toggle(1);
}; };

View file

@ -1,7 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@
Ox.VideoTimelinePlayer <function> Video Timeline Player
(options[, self]) -> <o> Video Timeline Player
options <o> Options
self <o> Shared private variable
@*/
Ox.VideoTimelinePlayer = function(options, self) { Ox.VideoTimelinePlayer = function(options, self) {
self = self || {}; self = self || {};
@ -802,6 +806,10 @@ Ox.VideoTimelinePlayer = function(options, self) {
} }
}; };
/*@
togglePaused <f> toggle paused
() -> <o> toggle paused
@*/
that.togglePaused = function() { that.togglePaused = function() {
togglePaused(); togglePaused();
return that; return that;

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict'; 'use strict';
/*@ /*@
Ox.Dialog <f:Ox.Element> Dialog object Ox.Dialog <f:Ox.Element> Dialog object
() -> <f> Dialog object () -> <f> Dialog object
@ -637,6 +637,10 @@ Ox.Dialog = function(options, self) {
} }
}; };
/*@
close <f> close
(callback) -> <o> close
@*/
that.close = function(callback) { that.close = function(callback) {
if (self.isOpen) { if (self.isOpen) {
self.isOpen = false; self.isOpen = false;
@ -661,28 +665,48 @@ Ox.Dialog = function(options, self) {
return that; return that;
}; };
/*@
disableButton <f> disable button
(id) -> <o> disable button
@*/
that.disableButton = function(id) { that.disableButton = function(id) {
getButtonById(id).options({disabled: true}); getButtonById(id).options({disabled: true});
return that; return that;
}; };
/*@
disableButtons <f> disable buttons
() -> <o> disable all buttons
@*/
that.disableButtons = function() { that.disableButtons = function() {
self.options.buttons.forEach(function(button) { self.options.buttons.forEach(function(button) {
!Ox.isEmpty(button) && button.options({disabled: true}); !Ox.isEmpty(button) && button.options({disabled: true});
}); });
}; };
/*@
enableButton <f> enable button
(id) -> <o> enable button
@*/
that.enableButton = function(id) { that.enableButton = function(id) {
getButtonById(id).options({disabled: false}); getButtonById(id).options({disabled: false});
return that; return that;
}; };
/*@
enableButtons <f> enable buttons
() -> <o> enable all buttons
@*/
that.enableButtons = function() { that.enableButtons = function() {
self.options.buttons.forEach(function(button) { self.options.buttons.forEach(function(button) {
!Ox.isEmpty(button) && button.options({disabled: false}); !Ox.isEmpty(button) && button.options({disabled: false});
}); });
}; };
/*@
open <f> open
() -> <o> open dialog
@*/
that.open = function() { that.open = function() {
if (!self.isOpen) { if (!self.isOpen) {
self.isOpen = true; self.isOpen = true;
@ -719,6 +743,10 @@ Ox.Dialog = function(options, self) {
return that; return that;
}; };
/*@
setSize <f> set size
(width, height) -> <o> set size
@*/
that.setSize = function(width, height) { that.setSize = function(width, height) {
self.options.width = width; self.options.width = width;
self.options.height = height; self.options.height = height;
@ -734,6 +762,7 @@ Ox.Dialog = function(options, self) {
width: self.options.width, width: self.options.width,
height: self.options.height height: self.options.height
}); });
return that;
}; };
return that; return that;

View file

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

Some files were not shown because too many files have changed in this diff Show more