more documentation, more semicolons, some fixmes

This commit is contained in:
j 2012-05-21 21:23:16 +02:00
parent 509745407b
commit 520eac7a22
11 changed files with 56 additions and 25 deletions

View file

@ -1015,7 +1015,7 @@ Ox.Calendar = function(options, self) {
if (!Ox.isUndefined(line)) {
scrollTo(line * 16 + 8 - self.$container.height() / 2, true);
}
};
}
function panToSelected() {
// fixme: '0' should zoom to selected if selected is already centered

View file

@ -1,9 +1,11 @@
'use strict';
/*@
Ox.ListCalendar <f> ListCalendar object
Ox.ListCalendar <function> List Calendar
(options[, self]) -> <o> List Calendar
options <o> Options
self <o> Shared private variable
@*/
// FIXME: should be Ox.CalendarEditor
Ox.ListCalendar = function(options, self) {

View file

@ -4,6 +4,7 @@
Ox.Event <o> Basic event handler
@*/
Ox.Event = (function() {
var self = {}, that = {};

View file

@ -2,9 +2,7 @@
/*@
Ox.JQueryElement <function> Wrapper for jQuery
# Usage
($element) -> <object> Wrapped jQuery DOM element
# Arguments
$element <object> jQuery DOM Element
@*/

View file

@ -1,5 +0,0 @@
'use strict';
/**
Ox.Progressbar
*/
// FIXME: remove this!

View file

@ -1,7 +1,10 @@
'use strict';
/*@
Ox.ArrayEditable <f> Array Editable Object
Ox.ArrayEditable <function> Array Editable
(options, self) -> <f> Array Editable
options <o> Options object
self <o> Shared private variable
@*/
Ox.ArrayEditable = function(options, self) {

View file

@ -1,7 +1,15 @@
'use strict';
/*@
Ox.ArrayInput <f> Array input
Ox.ArrayInput <function> Array input
(options, self) -> <f> Array input
options <o> Options object
label <s> string, ''
max <n> integer, maximum number of items, 0 for all
sort <b> fixme: this should probably be removed
value <[]> value
width <n|256> width
self <o> Shared private variable
@*/
Ox.ArrayInput = function(options, self) {

View file

@ -45,7 +45,7 @@ Ox.Filter = function(options, self) {
} else if (self.options.query.operator == '') {
self.options.query.operator = '&';
}
Ox.Log('Form', 'Ox.Filter self.options', self.options)
Ox.Log('Form', 'Ox.Filter self.options', self.options);
self.conditionOperators = {
boolean: [

View file

@ -143,7 +143,7 @@ Ox.InputGroup = function(options, self) {
if (key == 'value') {
setValue();
}
}
};
// fixme: is this used?
that.getInputById = function(id) {

View file

@ -308,7 +308,7 @@ Ox.TextList = function(options, self) {
(self.options.sort[0].operator == '+' ? '-' : '+') :
self.options.columns[i].operator,
map: self.options.columns[i].map
}]
}];
updateColumn();
// fixme: strangely, sorting the list blocks updating the column,
// so we use a timeout for now
@ -322,6 +322,7 @@ Ox.TextList = function(options, self) {
}
function constructHead() {
var pos;
self.$heads = [];
self.$titles = [];
self.$orderButtons = [];
@ -354,7 +355,7 @@ Ox.TextList = function(options, self) {
dragend: function(data) {
dragendColumn(column.id, data);
}
})
});
}
self.$titles[i] = Ox.Element()
.addClass('OxTitle')
@ -368,7 +369,7 @@ Ox.TextList = function(options, self) {
$('<img>').attr({
src: Ox.UI.getImageURL('symbol' + Ox.toTitleCase(column.titleImage))
})
)
);
} else {
self.$titles[i].html(column.title);
}
@ -413,9 +414,10 @@ Ox.TextList = function(options, self) {
that.$head.$content.css({
width: (Ox.sum(self.columnWidths) + 2) + 'px'
});
if (getColumnPositionById(self.options.columns[self.selectedColumn].id) > -1) { // fixme: save in var
pos = getColumnPositionById(self.options.columns[self.selectedColumn].id);
if (pos > -1) {
toggleSelected(self.options.columns[self.selectedColumn].id);
self.$titles[getColumnPositionById(self.options.columns[self.selectedColumn].id)].css({
self.$titles[pos].css({
width: (self.options.columns[self.selectedColumn].width - 25) + 'px'
});
}
@ -878,7 +880,8 @@ Ox.TextList = function(options, self) {
submit: submit
})
.appendTo($cell);
// fixme: why do we need a timeout?
// use timeout to prevent key to be inserted
// into $input if triggered via keyboard shortcut
setTimeout(function() {
$input.focusInput(select);
}, 0);
@ -897,7 +900,7 @@ Ox.TextList = function(options, self) {
value: value
});
}
}
};
/*@
gainFocus <f> gainFocus
@ -955,7 +958,7 @@ Ox.TextList = function(options, self) {
that.resizeColumn = function(id, width) {
resizeColumn(id, width);
return that;
}
};
/*@
size <f> size
@ -963,7 +966,7 @@ Ox.TextList = function(options, self) {
that.size = function() {
setWidth();
that.$body.size();
}
};
// fixme: deprecated
that.sortList = function(key, operator) {
@ -1031,7 +1034,7 @@ Ox.TextList = function(options, self) {
}
return that;
}
}
};
return that;

View file

@ -2,6 +2,27 @@
/*@
Ox.AnnotationPanel <f> Video Annotation Panel
() -> <f> AnnotationPanel Object
(options) -> <f> AnnotationPanel Object
(options, self) -> <f> AnnotationPanel Object
options <o> Options object
calendarSize <n|256> calendar size
clickLink <f|null> click link callback
editable: <b|false> if true, annotations can be edited
font <s|'small'> small, medium, large
highlight <s|''> highlight given string in annotations
layers <a|[]> array with annotation objects
mapSize <n|256> map size
range <s|'all'> all, position, selection
selected <s|''> selected annotation
showCalendar <b|false> if true, calendar is shown
showFonts <b|false> if true, option to select font size is show
showLayers <o|{}> object with layers to show
showMap <b|false> if true, show map
showUsers <b|false> if true show user
sort <s|'position'> position, start, text
width <n|256> panel width
self <o> shared private variable
@*/
Ox.AnnotationPanel = function(options, self) {