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';
/*@
Ox.Bar <f:Ox.Element> Bar

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,12 @@
'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) {
self = self || {};

View file

@ -1,5 +1,12 @@
'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) {
self = self || {};
@ -123,4 +130,4 @@ Ox.ExamplePanel = function(options, self) {
return that;
};
};

View file

@ -1,5 +1,12 @@
'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) {
self = self || {};
@ -73,4 +80,4 @@ Ox.SourceViewer = function(options, self) {
return that;
};
};

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

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';
/*@

View file

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

View file

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

View file

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

View file

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

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.ListPage <f:Ox.Element> ListPage Object
() -> <f> ListPage Object

View file

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

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

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';
/*@

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';
/*@
@ -211,6 +209,10 @@ Ox.MainMenu = function(options, self) {
};
/*@
replaceMenu <f> replace menu
(id, menu) -> <u> replace menu
@*/
that.replaceMenu = function(id, menu) {
var position = Ox.getIndexById(self.options.menus, id);
self.options.menus[position] = menu;
@ -238,6 +240,10 @@ Ox.MainMenu = function(options, self) {
return that;
};
/*@
setItemTitle <f> setItemTitle
(id, title) -> <o> set item title
@*/
that.setItemTitle = function(id, title) {
var item = that.getItem(id);
item && item.options({title: title});

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Menu <f:Ox.Element> Menu Object
() -> <f> Menu Object
@ -591,14 +591,15 @@ Ox.Menu = function(options, self) {
};
/*@
addItemBefore <f>
addItemBefore <f> addItemBefore
@*/
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) {
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) {
clickItem(position, files);
};
/*@
getItem <f>
getItem <f> getItem
(id) -> <o> get item
@*/
that.getItem = function(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) {
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() {
var ret = false;
@ -688,7 +696,7 @@ Ox.Menu = function(options, self) {
};
/*@
hideMenu <f>
hideMenu <f> hideMenu
() -> <f> Menu Object
@*/
that.hideMenu = function(hideParent) {
@ -717,6 +725,10 @@ Ox.Menu = function(options, self) {
return that;
};
/*@
remove <f> remove
() -> <o> remove menu
@*/
self.superRemove = that.remove;
that.remove = function() {
Ox.forEach(that.submenus, function(submenu) {
@ -740,6 +752,10 @@ Ox.Menu = function(options, self) {
return that;
};
/*@
setItemTitle <f> setItemTitle
(id, title) -> <o> set item title
@*/
that.setItemTitle = function(id, title) {
var item = getItem(id);
item && item.options({title: title});
@ -803,6 +819,10 @@ Ox.Menu = function(options, self) {
return that.is(':hidden') ? that.showMenu() : that.hideMenu();
};
/*@
uncheckItem <f> uncheckItem
(id) -> <o> uncheck item
@*/
that.uncheckItem = function(id) {
that.checkItem(id, false);
};

View file

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

View file

@ -1,5 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.MenuItem <f:Ox.Element> MenuItem Object
() -> <f> MenuItem 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,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.SplitPanel <f:Ox.Element> SpliPanel Object
() -> <o> SpliPanel Object
@ -341,4 +341,4 @@ Ox.SplitPanel = function(options, self) {
return that;
};
};

View file

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

View file

@ -1,5 +1,3 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
@ -583,12 +581,20 @@ Ox.AnnotationFolder = function(options, self) {
return that;
};
/*@
blurItem <f> blur item
() -> <o> blur selected item
@*/
that.blurItem = function() {
self.editing = false;
self.$annotations.blurItem();
return that;
};
/*@
editItem <f> edit item
() -> <o> edit selected item
@*/
that.editItem = function() {
self.editing = true;
self.$panel.options({collapsed: false});
@ -596,15 +602,27 @@ Ox.AnnotationFolder = function(options, self) {
return that;
};
/*@
gainFocus <f> gain focus
() -> <o> gain focus
@*/
that.gainFocus = function() {
self.$annotations.gainFocus();
return that;
};
/*@
removeItem <f> remove item
() -> <o> remove selected item
@*/
that.removeItem = function() {
self.$annotations.removeItem();
};
/*@
selectItem <f> select item
(position) -> <o> select item at position
@*/
that.selectItem = function(position) {
// selects the first (0) or last (-1) visible annotation
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) {
var item = Ox.getObjectById(self.options.items, id);
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) {
// called from addannotation callback
var i = Ox.getIndexById(self.options.layers, layer);
@ -476,18 +480,30 @@ Ox.AnnotationPanel = function(options, self) {
renderEditMenu();
};
/*@
blurItem <f> blur item
() -> <o> blur selected item
@*/
that.blurItem = function() {
self.editing = false;
getFolder(self.options.selected).blurItem();
renderEditMenu();
};
/*@
editItem <f> editItem
() -> <o> put selected item into edit mode
@*/
that.editItem = function() {
self.editing = true;
getFolder(self.options.selected).editItem();
renderEditMenu();
};
/*@
removeItem <f> removeItem
(remove) -> <o> remove item
@*/
that.removeItem = function(remove) {
if (remove) {
// 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) {
// called from editannotation callback
// 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';
/*@
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) {
self = self || {};

View file

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

View file

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

View file

@ -1,5 +1,11 @@
'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) {
self = self || {};

View file

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

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';
/*@
@ -2391,6 +2389,10 @@ Ox.VideoPlayer = function(options, self) {
}
};
/*@
changeVolume <f> change volume
(num) -> <o> change volume
@*/
that.changeVolume = function(num) {
changeVolume(num);
return that;

View file

@ -1,7 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'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) {
self = self || {};

View file

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

View file

@ -1,7 +1,11 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'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) {
self = self || {};
@ -802,6 +806,10 @@ Ox.VideoTimelinePlayer = function(options, self) {
}
};
/*@
togglePaused <f> toggle paused
() -> <o> toggle paused
@*/
that.togglePaused = function() {
togglePaused();
return that;

View file

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

View file

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

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