'use strict';

This commit is contained in:
rolux 2011-11-05 17:46:53 +01:00
parent 291b75c43b
commit 56370aa0a7
113 changed files with 207 additions and 15 deletions

View file

@ -1,3 +1,5 @@
'use strict';
Ox.load.Geo = function(options, callback) {
Ox.getJSON(Ox.PATH + 'Ox.Geo/json/Ox.Geo.json', function(data) {

View file

@ -1,3 +1,5 @@
'use strict';
Ox.load.Image = function(options, callback) {
//@ Image ------------------------------------------------------------------

View file

@ -1,3 +1,5 @@
'use strict';
Ox.load.UI = function(options, callback) {
options = Ox.extend({
@ -250,7 +252,7 @@ Ox.load.UI = function(options, callback) {
callbacks.forEach(function(callback) {
callback();
});
delete callbacks;
//delete callbacks;
});
return function(callback) {
if (Ox.UI.$window) {

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
Ox.Progressbar = function(options, self) {
self = self || {};

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.App <f> Basic application instance that communicates with a JSON API
() -> <f> App object

View file

@ -1,4 +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,9 +1,9 @@
// 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
// would append (length - 1)?
/*@
Ox.Container <f> Container (depricated)
() -> <o> Container object

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.DocPanel <f> Documentation Panel
() -> <f> Documentation Panel

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Element <function:Ox.JQueryElement> Basic UI element object
# Usage --------------------------------------------------------------------

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.Event <o> Basic event handler
@*/

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Focus <o> Basic focus handler
@*/

View file

@ -2,4 +2,5 @@
/***
Ox.History
***/
'use strict';

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.JQueryElement <function> Wrapper for jQuery
# Usage

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Keyboard <o> Basic keyboard handler
@*/

View file

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

View file

@ -1,4 +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,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.SyntaxHighlighter <function> Syntax Highlighter
(options[, self]) -> <o> Syntax Highlighter

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Theme <f> get/set theme
() -> <s> Get current theme

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.ArrayInput <f> Array input
@*/

View file

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

View file

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

View file

@ -1,4 +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,3 +1,4 @@
'use strict';
/*@
Ox.Editable <f> Editable element
() -> <f> Input Element

View file

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

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.FormItem <f:Ox.Element> FormItem Element, wrap form element with an error message
() -> <f> FormItem Element

View file

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

View file

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

View file

@ -1,4 +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,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.OptionGroup <f> OptionGroup
Helper object, used by ButtonGroup, CheckboxGroup, Select and Menu

View file

@ -1,4 +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,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.PlaceInput <f:Ox.FormElementGroup> PlaceInput Object
() -> <f> PlaceInput Object

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
Ox.InfoList = function(options, self) {
self = self || {};

View file

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

View file

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

View file

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

View file

@ -1,4 +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,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.TextList <f:Ox.Element> TextList Object
() -> <f> TextList Object

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Map <function> Basic map object
# DESCRIPTION --------------------------------------------------------------

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.MapMarkerImage <f:google.maps.MarkerImage> MapMarkerImage Object
(options) -> <f> google.maps.MarkerImage

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +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,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.CollapsePanel <f:Ox.Panel> CollapsePanel Object
() -> <f> CollapsePanel Object

View file

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

View file

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

View file

@ -1,4 +1,5 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
Ox.TabPanel = function(options, self) {
self = self || {};

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
Ox.BlockVideoTimeline = function(options, self) {
self = self || {};

View file

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

View file

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

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
Ox.SmallVideoTimeline = function(options, self) {
self = self || {};

View file

@ -1,3 +1,5 @@
'use strict';
Ox.SmallVideoTimelineImage = function(options, self) {
self = self || {};

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.VideoPlayer <f> Generic Video Player
(options, self) -> <o> Video Player

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
Ox.VideoPreview = function(options, self) {
self = self || {};

View file

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

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
/*@
Ox.Layer <o> Background layer for dialogs and menus
(options, self) -> <o> Layer

View file

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

View file

@ -1,3 +1,5 @@
'use strict';
Ox.load.Unicode = function(options, callback) {
Ox.getJSON(Ox.PATH + 'Ox.Unicode/json/Ox.Unicode.json', function(chars) {

View file

@ -1,3 +1,5 @@
'use strict';
// Ox.js Developer Version
/*
@ -8,7 +10,7 @@ Usage:
Ox.load({module: options, module: options}, callback)
*/
Ox = {
window.Ox = {
load: function() {

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.compact <f> Returns an array w/o <code>null</code> or <code>undefined</code>
> Ox.compact([null,,1,,2,,3])

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.avg <f> Returns the average of an array's values, or an object's properties
(collection) -> <n> Average value

View file

@ -1,3 +1,5 @@
'use strict';
/*@
Ox.hsl <f> Takes RGB values and returns HSL values
(rgb) <[n]> HSL values

View file

@ -1,3 +1,5 @@
'use strict';
//@ Ox.AMPM <[str]> ['AM', 'PM']
Ox.AMPM = ['AM', 'PM'];
//@ Ox.BASE_32_ALIASES <o> Base 32 aliases

View file

@ -2,6 +2,8 @@
// OxJS (c) 2011 0x2620, dual-licensed GPL/MIT, see http://oxjs.org for details
'use strict';
/*
Some conventions:
Functions
@ -113,6 +115,7 @@ Ox.load = function() {
length = Ox.len(modules);
Ox.forEach(modules, function(options, module) {
Ox.loadFile(Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js', function() {
Ox.print('?', module)
Ox.load[module](options, function(s) {
success += s;
++counter == length && callback(success == counter);
@ -172,9 +175,9 @@ Ox.Log = (function() {
if (!log.filterEnabled || log.filter.indexOf(args[0]) > -1) {
date = new Date();
args.unshift(
Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().substr(-3),
Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().substr(-3)/*,
(arguments.callee.caller && arguments.callee.caller.name)
|| '(anonymous)'
|| '(anonymous)'*/
);
window.console && window.console.log.apply(window.console, args);
ret = args.join(' ');
@ -198,9 +201,9 @@ Ox.print = function() {
var args = Ox.makeArray(arguments),
date = new Date();
args.unshift(
Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().substr(-3),
Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().substr(-3)/*,
(arguments.callee.caller && arguments.callee.caller.name)
|| '(anonymous)'
|| '(anonymous)'*/
);
window.console && window.console.log.apply(window.console, args);
return args.join(' ');
@ -248,7 +251,11 @@ Ox.wrap = function(val, chained) {
}
};
Object.getOwnPropertyNames(Ox).forEach(function(name) {
if (name[0] == name[0].toLowerCase() && Ox.isFunction(Ox[name])) {
if (
['arguments', 'callee', 'caller', 'length'].indexOf(name) == -1
&& name[0] == name[0].toLowerCase()
&& Ox.isFunction(Ox[name])
) {
wrapper[name] = function() {
var args = Array.prototype.slice.call(arguments), ret;
args.unshift(val);

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