merging changes

This commit is contained in:
rolux 2011-04-23 02:21:46 +02:00
commit 13501e2da8
94 changed files with 139 additions and 103 deletions

View file

@ -1,2 +1,2 @@
.DS_Store .DS_Store
build/js build/js/*

View file

@ -4,10 +4,8 @@
<title>ox.js list demo</title> <title>ox.js list demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="js/list.js"></script> <script type="text/javascript" src="js/list.js"></script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -1,4 +1,4 @@
$(function() { Ox.UI(function() {
Ox.theme('modern'); Ox.theme('modern');
@ -42,7 +42,7 @@ $(function() {
}) })
.bindEvent({ .bindEvent({
click: function() { click: function() {
$text.html(JSON.stringify($treeList.$element.options('items'))) $text.html(JSON.stringify($treeList.$element.options('items')));
} }
}) })
.appendTo($debug), .appendTo($debug),
@ -60,4 +60,4 @@ $(function() {
orientation: 'horizontal' orientation: 'horizontal'
}).appendTo($('body')); }).appendTo($('body'));
}); });

View file

@ -4,10 +4,8 @@
<title>OxJS Mouse Events Demo</title> <title>OxJS Mouse Events Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.5.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="js/mouse.js"></script> <script type="text/javascript" src="js/mouse.js"></script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -1,4 +1,4 @@
$(function() { Ox.UI(function() {
var $target = Ox.Element() var $target = Ox.Element()
.css({ .css({
position: 'absolute', position: 'absolute',
@ -54,4 +54,4 @@ $(function() {
event == 'anyclick' && Ox.print(e); event == 'anyclick' && Ox.print(e);
}); });
}); });
}); });

View file

@ -4,8 +4,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style> <style>
</style> </style>
<script type="text/javascript" src="../../build/js/jquery-1.3.2.js"></script> <script type="text/javascript" src="../../build/js/jquery.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script> <script type="text/javascript" src="../../build/js/Ox.js"></script>
<script type="text/javascript" src="ox.png.js"></script> <script type="text/javascript" src="ox.png.js"></script>
<script> <script>
$(function() { $(function() {
@ -19,4 +19,4 @@
</script> </script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -4,11 +4,9 @@
<title>ox.js SplitPanel Demo</title> <title>ox.js SplitPanel Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script> <script>
$(function() { Ox.UI(function() {
new Ox.SplitPanel({ new Ox.SplitPanel({
elements: [ elements: [
{ {
@ -82,4 +80,4 @@
</script> </script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -4,12 +4,9 @@
<title>OxJS SplitPanel Demo</title> <title>OxJS SplitPanel Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.5.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.map.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script> <script>
$(function() { Ox.UI(function() {
function element(options, css) { function element(options, css) {
return Ox.extend({ return Ox.extend({
element: Ox.Element().html(JSON.stringify(options)) element: Ox.Element().html(JSON.stringify(options))
@ -134,4 +131,4 @@
</script> </script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -3,9 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="app.js"></script> <script type="text/javascript" src="app.js"></script>
</head> </head>
<body> <body>

View file

@ -1,4 +1,4 @@
$(function() { Ox.UI(function() {
var app = new Ox.App({ var app = new Ox.App({
requestURL: "http://blackbook.local:8000/api/" requestURL: "http://blackbook.local:8000/api/"
}), }),

View file

@ -30,11 +30,9 @@
padding: 0 4px 0 4px; padding: 0 4px 0 4px;
} }
</style> </style>
<script type="text/javascript" src="../../build/js/jquery-1.4.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script> <script>
$(function() { Ox.UI(function() {
var size = window.location.hash.substr(1) || "medium", var size = window.location.hash.substr(1) || "medium",
$body = $("body"), $body = $("body"),
$toolbars = []; $toolbars = [];
@ -594,4 +592,4 @@
</script> </script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -5,10 +5,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<link rel="stylesheet" type="text/css" href="list.css"/> <link rel="stylesheet" type="text/css" href="list.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="list.js"></script> <script type="text/javascript" src="list.js"></script>
</head> </head>
<body></body> <body></body>
</html> </html>

View file

@ -1,4 +1,4 @@
$(function() { Ox.UI(function() {
Ox.theme("modern"); Ox.theme("modern");
var $body = $("body"), var $body = $("body"),
$document = $(document), $document = $(document),

View file

@ -3,9 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../../build/css/ox.ui.css"/>
<script type="text/javascript" src="../../build/js/jquery-1.4.1.js"></script> <script type="text/javascript" src="../../build/js/OxUI.js"></script>
<script type="text/javascript" src="../../build/js/ox.js"></script>
<script type="text/javascript" src="../../build/js/ox.ui.js"></script>
<script type="text/javascript" src="menu.js"></script> <script type="text/javascript" src="menu.js"></script>
</head> </head>
<body></body> <body></body>

View file

@ -1,4 +1,4 @@
$(function() { Ox.UI(function() {
var button = new Ox.Button({ var button = new Ox.Button({
value: "First", value: "First",
}).css({ }).css({
@ -147,4 +147,4 @@ $(function() {
$("<option>").html(v) $("<option>").html(v)
); );
}); });
}); });

View file

@ -6,9 +6,8 @@
<link rel="stylesheet" type="text/css" href="../build/css/ox.ui.css"/> <link rel="stylesheet" type="text/css" href="../build/css/ox.ui.css"/>
<script type="text/javascript" src="../build/js/jquery-1.4.2.js"></script> <script type="text/javascript" src="../build/js/jquery.js"></script>
<script type="text/javascript" src="../build/js/ox.js"></script> <script type="text/javascript" src="../build/js/OxUI.js"></script>
<script type="text/javascript" src="../build/js/ox.ui.js"></script>
<script type="text/javascript" src="api.js"></script> <script type="text/javascript" src="api.js"></script>
</head> </head>
<body> <body>

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.AnnotationPanel = function(options, self) { Ox.AnnotationPanel = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/* /*
============================================================================ ============================================================================
Application Application
@ -86,26 +87,6 @@ Ox.App = (function() {
}; };
} }
function loadImages(callback) {
window.OxImageCache = [];
$.getJSON(Ox.UI.PATH + 'json/ox.ui.images.json', function(data) {
// fixme: find a better way to not wait for flags
data = data.filter(function(image) {
return !Ox.startsWith(image, 'svg/ox.map/')
});
var counter = 0,
length = data.length;
data.forEach(function(src, i) {
var image = new Image();
image.src = Ox.UI.PATH + src;
image.onload = function() {
(++counter == length) && callback();
}
window.OxImageCache.push(image); // fixme: global var???
});
});
}
self.change = function(key, value) { self.change = function(key, value) {
}; };
@ -165,23 +146,19 @@ Ox.App = (function() {
user = result.data.user; user = result.data.user;
// fixme: not generic // fixme: not generic
document.title = config.site.name; document.title = config.site.name;
launchCallback(); $(function() {
var $div = Ox.UI.$body.find('div');
Ox.UI.$body.find('img').remove();
$div.animate({
opacity: 0
}, 1000, function() {
$div.remove();
});
// fixme: not generic enough, just pass data
callback({config: config, user: user});
});
}); });
}); });
loadImages(launchCallback);
function launchCallback() {
++counter == 2 && $(function() {
var $div = Ox.UI.$body.find('div');
Ox.UI.$body.find('img').remove();
$div.animate({
opacity: 0
}, 1000, function() {
$div.remove();
});
// fixme: not generic enough, just pass data
callback({config: config, user: user});
});
}
} }
function stop() { function stop() {
that.request.send(self.options.init, getUserData(), function() {}); that.request.send(self.options.init, getUserData(), function() {});

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.Bar = function(options, self) { Ox.Bar = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.BlockTimeline = function(options, self) { Ox.BlockTimeline = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Button = function(options, self) { Ox.Button = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ButtonGroup = function(options, self) { Ox.ButtonGroup = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Calendar = function(options, self) { Ox.Calendar = function(options, self) {
self = self || {}; self = self || {};

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.CalendarDate = function(options) { Ox.CalendarDate = function(options) {
var self = {}, var self = {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Checkbox = function(options, self) { Ox.Checkbox = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.CheckboxGroup = function(options, self) { Ox.CheckboxGroup = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Clipboard = function() { Ox.Clipboard = function() {
/*** /***
Ox.Clipboard Ox.Clipboard

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.CollapsePanel = function(options, self) { Ox.CollapsePanel = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ColorInput = function(options, self) { Ox.ColorInput = function(options, self) {
var self = $.extend(self || {}, { var self = $.extend(self || {}, {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ColorPicker = function(options, self) { Ox.ColorPicker = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// 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,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.DateInput = function(options, self) { Ox.DateInput = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.DateTimeInput = function(options, self) { Ox.DateTimeInput = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Dialog = function(options, self) { Ox.Dialog = function(options, self) {
// fixme: dialog should be derived from a generic draggable // fixme: dialog should be derived from a generic draggable

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// check out http://ejohn.org/apps/learn/#36 (-#38, making fns work w/o new) // check out http://ejohn.org/apps/learn/#36 (-#38, making fns work w/o new)
Ox.Element = function() { Ox.Element = function() {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// fixme: this is not necessarily part of OxUI // fixme: this is not necessarily part of OxUI
/* /*

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Filter = function(options, self) { Ox.Filter = function(options, self) {
/*** /***

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// fixme: rename! // fixme: rename!
Ox.Flipbook = function(options, self) { Ox.Flipbook = function(options, self) {
@ -18,14 +19,14 @@ Ox.Flipbook = function(options, self) {
timestamp = $('<div>').css({ timestamp = $('<div>').css({
'position': 'absolute', 'position': 'absolute',
'text-align': 'center', 'text-align': 'center',
'width': '100%', 'width': '100%'
}) })
.hide(), .hide(),
that = new Ox.Element('div', self) that = new Ox.Element('div', self)
.defaults({ .defaults({
frames: {}, frames: {},
duration: 0, duration: 0,
icon: '', icon: ''
}) })
.options(options || {}) .options(options || {})
.append(icon) .append(icon)
@ -66,9 +67,10 @@ Ox.Flipbook = function(options, self) {
function getFrame(position) { function getFrame(position) {
var frame; var frame;
frames.forEach(function(img, i) { Ox.forEach(frames, function(img, i) {
if (!frame || i <= position) if (!frame || i <= position) {
frame = img; frame = img;
}
}); });
return frame; return frame;
} }
@ -78,7 +80,7 @@ Ox.Flipbook = function(options, self) {
frames[i] = new Image(); frames[i] = new Image();
frames[i].onload = function() { frames[i].onload = function() {
frameHeight = frames[i].height / frames[i].width * that.width(); frameHeight = frames[i].height / frames[i].width * that.width();
} };
frames[i].src = src; frames[i].src = src;
}); });
} }
@ -89,10 +91,11 @@ Ox.Flipbook = function(options, self) {
} else if (key == 'icon') { } else if (key == 'icon') {
icon.attr('src', value); icon.attr('src', value);
} }
} };
if(options.icon) if(options.icon) {
icon.attr('src', options.icon); icon.attr('src', options.icon);
}
cacheFrames(); cacheFrames();
return that; return that;
}; };

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Focus = function() { Ox.Focus = function() {
/*** /***
Ox.Focus Ox.Focus

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Form = function(options, self) { Ox.Form = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.FormElementGroup = function(options, self) { Ox.FormElementGroup = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.FormItem = function(options, self) { Ox.FormItem = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/*** /***
Ox.History Ox.History
***/ ***/

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.IconItem = function(options, self) { Ox.IconItem = function(options, self) {
//Ox.print('IconItem', options, self) //Ox.print('IconItem', options, self)

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.IconList = function(options, self) { Ox.IconList = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Input = function(options, self) { Ox.Input = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.InputGroup = function(options, self) { Ox.InputGroup = function(options, self) {
/*** /***
@ -130,4 +131,4 @@ Ox.InputGroup = function(options, self) {
return that; return that;
}; };

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ItemInput = function(options, self) { Ox.ItemInput = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// Basic jQuery element // Basic jQuery element
Ox.JQueryElement = function($element) { Ox.JQueryElement = function($element) {
var that = this; var that = this;

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/*** /***
Ox.Keyboard Ox.Keyboard
***/ ***/

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Label = function(options, self) { Ox.Label = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.LargeTimeline = function(options, self) { Ox.LargeTimeline = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.List = function(options, self) { Ox.List = function(options, self) {
/*** /***

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ListItem = function(options, self) { Ox.ListItem = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ListMap = function(options, self) { Ox.ListMap = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.ListPage = function(options, self) { Ox.ListPage = function(options, self) {
var self = self || {}, var self = self || {},
that = new Ox.Element({}, self) that = new Ox.Element({}, self)

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.LoadingIcon = function(options, self) { Ox.LoadingIcon = function(options, self) {
var self = self || {}, var self = self || {},
that = new Ox.Element('img', self) that = new Ox.Element('img', self)

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.MainMenu = function(options, self) { Ox.MainMenu = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Map = function(options, self) { Ox.Map = function(options, self) {
var self = self || {} var self = self || {}

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MapImage = function(options, self) { Ox.MapImage = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MapMarker = function(options) { Ox.MapMarker = function(options) {
var options = Ox.extend({ var options = Ox.extend({

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MapPlace = function(options) { Ox.MapPlace = function(options) {
options = Ox.extend({ options = Ox.extend({

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MapRectangle = function(options, self) { Ox.MapRectangle = function(options, self) {
var options = Ox.extend({ var options = Ox.extend({

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MapRectangleMarker = function(options, self) { Ox.MapRectangleMarker = function(options, self) {
var options = Ox.extend({ var options = Ox.extend({

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
options options
element the element the menu is attached to element the element the menu is attached to

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.MenuItem = function(options, self) { Ox.MenuItem = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.OptionGroup = function(items, min, max, property) { Ox.OptionGroup = function(items, min, max, property) {
/* /*

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.Panel = function(options, self) { Ox.Panel = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Picker = function(options, self) { Ox.Picker = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.PlaceInput = function(options, self) { Ox.PlaceInput = function(options, self) {
var self = $.extend(self || {}, { var self = $.extend(self || {}, {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.PlacePicker = function(options, self) { Ox.PlacePicker = function(options, self) {
var self = $.extend(self || {}, { var self = $.extend(self || {}, {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
Ox.Progressbar Ox.Progressbar
*/ */

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Range = function(options, self) { Ox.Range = function(options, self) {
/** /**

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Request = function(options) { Ox.Request = function(options) {
/*** /***

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.Resizebar = function(options, self) { Ox.Resizebar = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Select = function(options, self) { Ox.Select = function(options, self) {
// fixme: selected item needs attribute "checked", not "selected" ... that's strange // fixme: selected item needs attribute "checked", not "selected" ... that's strange

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.SmallTimeline = function(options, self) { Ox.SmallTimeline = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,4 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
options: options:
elements: [{ array of one, two or three elements elements: [{ array of one, two or three elements

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.TabPanel = function(options, self) { Ox.TabPanel = function(options, self) {
}; };

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
*/ */
Ox.Tabbar = function(options, self) { Ox.Tabbar = function(options, self) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.TextList = function(options, self) { Ox.TextList = function(options, self) {
// fixme: rename to TableList // fixme: rename to TableList

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// fixme: this should be Ox.Theme, and provide Ox.Theme.set(), Ox.Theme.load, etc. // fixme: this should be Ox.Theme, and provide Ox.Theme.set(), Ox.Theme.load, etc.
/** /**
if name is given as argument, switch to this theme. if name is given as argument, switch to this theme.

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.TimeInput = function(options, self) { Ox.TimeInput = function(options, self) {
// fixme: seconds get set even if options.seconds is false // fixme: seconds get set even if options.seconds is false

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/** /**
fixme: no need for this fixme: no need for this
*/ */

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Tooltip = function(options, self) { Ox.Tooltip = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.TreeList = function(options, self) { Ox.TreeList = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
/*** /***
Ox.URL Ox.URL
***/ ***/

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.VideoEditorPlayer = function(options, self) { Ox.VideoEditorPlayer = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.VideoElement = function(options, self) { Ox.VideoElement = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.VideoPanelPlayer = function(options, self) { Ox.VideoPanelPlayer = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.VideoEditor = function(options, self) { Ox.VideoEditor = function(options, self) {
var self = self || {}, var self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
Ox.Window = function(options, self) { Ox.Window = function(options, self) {
self = self || {}, self = self || {},

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
// todo: check http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ // todo: check http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Ox = function(val) { Ox = function(val) {

View file

@ -1,3 +1,4 @@
//vim: et:ts=4:sw=4:sts=4:ft=js
(function() { (function() {
var path = Array.prototype.slice.apply( var path = Array.prototype.slice.apply(
@ -44,11 +45,11 @@
Ox.UI = {}; Ox.UI = {};
Ox.UI.ready = function(callback) { Ox.UI.ready = function(callback) {
if (!ready) { if (!ready) {
readyCallbacks.push(callback); readyCallbacks.push(callback);
} else { } else {
callback(); callback();
} }
}; };
$(function() { $(function() {
Ox.UI.$body = $('body'); Ox.UI.$body = $('body');
@ -98,7 +99,7 @@
var sizes = { var sizes = {
small: 20, small: 20,
medium: 24, medium: 24,
large: 28, large: 28
}; };
return sizes[size]; return sizes[size];
}; };
@ -156,6 +157,7 @@
warning: '\u26A0', warning: '\u26A0',
white_star: '\u2606' white_star: '\u2606'
}; };
Ox.IMAGE_CACHE = [];
$.getJSON(Ox.UI.PATH + 'json/OxUI.json', function(data) { $.getJSON(Ox.UI.PATH + 'json/OxUI.json', function(data) {
function loadImage(src) { function loadImage(src) {
@ -165,6 +167,7 @@
dfd.resolve(); dfd.resolve();
}; };
image.src = Ox.UI.PATH + src; image.src = Ox.UI.PATH + src;
Ox.IMAGE_CACHE.push(src);
return dfd.promise(); return dfd.promise();
} }
@ -173,10 +176,7 @@
var dfd = new $.Deferred(); var dfd = new $.Deferred();
var script = document.createElement('script'); var script = document.createElement('script');
script.onload = function() { script.onload = function() {
//setTimeout(function() { dfd.resolve();
console.log('onload', src)
dfd.resolve();
//}, 1000)
}; };
script.src = Ox.UI.PATH + src; script.src = Ox.UI.PATH + src;
script.type = 'text/javascript'; script.type = 'text/javascript';
@ -188,7 +188,7 @@
promises = []; promises = [];
// fixme: find a better way to not wait for flags // fixme: find a better way to not wait for flags
data = data.filter(function(image) { data = data.filter(function(image) {
return !Ox.startsWith(image, 'svg/ox.map/') return !Ox.startsWith(image, 'svg/ox.map/');
}); });
data.forEach(function(src) { data.forEach(function(src) {
if (/\.js$/(src)) { if (/\.js$/(src)) {