set theme on load
This commit is contained in:
parent
b58c7b0ce7
commit
d8d14cffe7
79 changed files with 136 additions and 97 deletions
|
@ -2,12 +2,12 @@ console.log('calling Ox.UI()')
|
||||||
//console.log('Ox =', Ox)
|
//console.log('Ox =', Ox)
|
||||||
//console.log('Ox.UI =', Ox.UI)
|
//console.log('Ox.UI =', Ox.UI)
|
||||||
|
|
||||||
Ox.UI({display: 'modern'}, function() {
|
Ox.UI({display: 'icon', theme: 'modern'}, function() {
|
||||||
|
|
||||||
console.log('running Ox.UI()')
|
console.log('running Ox.UI()')
|
||||||
//console.log('Ox =', Ox)
|
//console.log('Ox =', Ox)
|
||||||
|
|
||||||
Ox.theme('modern');
|
// Ox.theme('modern');
|
||||||
|
|
||||||
//Ox.print('$$$$', Ox.Calendar)
|
//Ox.print('$$$$', Ox.Calendar)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/*
|
/*
|
||||||
============================================================================
|
============================================================================
|
||||||
Application
|
Application
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.Bar = function(options, self) {
|
Ox.Bar = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Button = function(options, self) {
|
Ox.Button = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.ButtonGroup = function(options, self) {
|
Ox.ButtonGroup = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Calendar = function(options, self) {
|
Ox.Calendar = function(options, self) {
|
||||||
|
|
||||||
self = self || {};
|
self = self || {};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.CalendarDate = function(options) {
|
Ox.CalendarDate = function(options) {
|
||||||
|
|
||||||
var self = {},
|
var self = {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Checkbox = function(options, self) {
|
Ox.Checkbox = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.CheckboxGroup = function(options, self) {
|
Ox.CheckboxGroup = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Clipboard = function() {
|
Ox.Clipboard = function() {
|
||||||
/***
|
/***
|
||||||
Ox.Clipboard
|
Ox.Clipboard
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.CollapsePanel = function(options, self) {
|
Ox.CollapsePanel = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {}, {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.DateInput = function(options, self) {
|
Ox.DateInput = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Filter = function(options, self) {
|
Ox.Filter = function(options, self) {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
// fixme: rename!
|
// fixme: rename!
|
||||||
|
|
||||||
Ox.Flipbook = function(options, self) {
|
Ox.Flipbook = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Focus = function() {
|
Ox.Focus = function() {
|
||||||
/***
|
/***
|
||||||
Ox.Focus
|
Ox.Focus
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Form = function(options, self) {
|
Ox.Form = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/***
|
/***
|
||||||
Ox.History
|
Ox.History
|
||||||
***/
|
***/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Input = function(options, self) {
|
Ox.Input = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.InputGroup = function(options, self) {
|
Ox.InputGroup = function(options, self) {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/***
|
/***
|
||||||
Ox.Keyboard
|
Ox.Keyboard
|
||||||
***/
|
***/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.List = function(options, self) {
|
Ox.List = function(options, self) {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.MainMenu = function(options, self) {
|
Ox.MainMenu = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.MapImage = function(options, self) {
|
Ox.MapImage = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.MapPlace = function(options) {
|
Ox.MapPlace = function(options) {
|
||||||
|
|
||||||
options = Ox.extend({
|
options = Ox.extend({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.OptionGroup = function(items, min, max, property) {
|
Ox.OptionGroup = function(items, min, max, property) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.Panel = function(options, self) {
|
Ox.Panel = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {}, {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {}, {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
Ox.Progressbar
|
Ox.Progressbar
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Range = function(options, self) {
|
Ox.Range = function(options, self) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Request = function(options) {
|
Ox.Request = function(options) {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.Resizebar = function(options, self) {
|
Ox.Resizebar = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.TabPanel = function(options, self) {
|
Ox.TabPanel = function(options, self) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
Ox.Tabbar = function(options, self) {
|
Ox.Tabbar = function(options, self) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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.
|
||||||
|
@ -10,6 +10,39 @@
|
||||||
set theme to 'foo'
|
set theme to 'foo'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Ox.Theme = function(theme) {
|
||||||
|
|
||||||
|
return theme ? setTheme(theme) : getTheme();
|
||||||
|
|
||||||
|
function getTheme() {
|
||||||
|
var theme = '';
|
||||||
|
Ox.forEach(Ox.UI.$body.attr('class').split(' '), function(className) {
|
||||||
|
if (Ox.startsWith(className, 'OxTheme')) {
|
||||||
|
theme = className.replace('OxTheme', '').toLowerCase();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setTheme(theme) {
|
||||||
|
var currentTheme = getTheme();
|
||||||
|
if (theme != currentTheme) {
|
||||||
|
Ox.UI.$body.addClass('OxTheme' + Ox.toTitleCase(theme));
|
||||||
|
$('img').add('input[type=image]').each(function() {
|
||||||
|
var $this = $(this);
|
||||||
|
$this.attr({
|
||||||
|
src: $this.attr('src')
|
||||||
|
.replace('ox.ui.' + currentTheme, 'ox.ui.' + theme)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return Ox.Theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
Ox.UI.ready(function() {
|
Ox.UI.ready(function() {
|
||||||
|
|
||||||
Ox.theme = function() {
|
Ox.theme = function() {
|
||||||
|
@ -63,4 +96,4 @@ Ox.UI.ready(function() {
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/**
|
/**
|
||||||
fixme: no need for this
|
fixme: no need for this
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
/***
|
/***
|
||||||
Ox.URL
|
Ox.URL
|
||||||
***/
|
***/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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 || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
Ox.Window = function(options, self) {
|
Ox.Window = function(options, self) {
|
||||||
|
|
||||||
self = self || {},
|
self = self || {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// 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) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//vim: et:ts=4:sw=4:sts=4:ft=js
|
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||||
|
|
||||||
/*
|
/*
|
||||||
OxUI Loader
|
OxUI Loader
|
||||||
|
@ -22,13 +22,19 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
head = document.getElementsByTagName('head')[0],
|
head = document.getElementsByTagName('head')[0],
|
||||||
logs = [],
|
logs = [],
|
||||||
oxUICallback = function() {},
|
oxUICallback = function() {},
|
||||||
oxUIDefaults = {
|
|
||||||
// 'classic', 'modern', 'console' or 'none'
|
|
||||||
display: 'classic'
|
|
||||||
},
|
|
||||||
oxUIFunction = function(options, callback) {
|
oxUIFunction = function(options, callback) {
|
||||||
|
var key;
|
||||||
oxUICallback = arguments.length == 2 ? callback : options;
|
oxUICallback = arguments.length == 2 ? callback : options;
|
||||||
oxUIOptions = arguments.length == 2 && options ? options : oxUIDefaults;
|
if (arguments.length == 2) {
|
||||||
|
for (key in oxUIOptions) {
|
||||||
|
oxUIOptions[key] = options[key] || oxUIOptions[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
oxUIOptions = {
|
||||||
|
// 'icon', 'console' or 'none'
|
||||||
|
display: 'none',
|
||||||
|
theme: 'classic'
|
||||||
};
|
};
|
||||||
|
|
||||||
files.forEach(function(file, i) {
|
files.forEach(function(file, i) {
|
||||||
|
@ -200,10 +206,9 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
{name: 'Chrome', url: 'http://www.google.com/chrome/', version: 10},
|
{name: 'Chrome', url: 'http://www.google.com/chrome/', version: 10},
|
||||||
{name: 'Firefox', url: 'http://www.mozilla.org/firefox/', version: 4},
|
{name: 'Firefox', url: 'http://www.mozilla.org/firefox/', version: 4},
|
||||||
{name: 'Safari', url: 'http://www.apple.com/safari/', version: 5}
|
{name: 'Safari', url: 'http://www.apple.com/safari/', version: 5}
|
||||||
],
|
]
|
||||||
options = oxUIOptions || oxUIDefaults;
|
|
||||||
|
|
||||||
if (options.display != 'none') {
|
if (oxUIOptions.display != 'none') {
|
||||||
body = getElement('body');
|
body = getElement('body');
|
||||||
css = {
|
css = {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -216,7 +221,7 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
WebkitUserSelect: 'none'
|
WebkitUserSelect: 'none'
|
||||||
};
|
};
|
||||||
div = getElement('<div>')
|
div = getElement('<div>')
|
||||||
.addClass(options.display == 'console' ? 'console' : '')
|
.addClass(oxUIOptions.display == 'console' ? 'console' : '')
|
||||||
.css({
|
.css({
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: 0,
|
left: 0,
|
||||||
|
@ -225,10 +230,10 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
padding: '4px',
|
padding: '4px',
|
||||||
background: 'rgb(' + (
|
background: 'rgb(' + (
|
||||||
options.display == 'classic' ? '240, 240, 240' : '16, 16, 16')
|
oxUIOptions.theme == 'classic' ? '240, 240, 240' : '16, 16, 16')
|
||||||
+ ')',
|
+ ')',
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
overflow: options.display == 'console' ? 'auto' : 'hidden',
|
overflow: oxUIOptions.display == 'console' ? 'auto' : 'hidden',
|
||||||
zIndex: 1000
|
zIndex: 1000
|
||||||
})
|
})
|
||||||
.appendTo(body);
|
.appendTo(body);
|
||||||
|
@ -255,11 +260,11 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
var image, src;
|
var image, src;
|
||||||
if (options.display == 'console') {
|
if (oxUIOptions.display == 'console') {
|
||||||
log('Loading additional scripts and images...')
|
log('Loading additional scripts and images...')
|
||||||
} else {
|
} else if (oxUIOptions.display == 'icon') {
|
||||||
image = new Image(),
|
image = new Image(),
|
||||||
src = path + 'svg/ox.ui.' + options.display + '/symbolLoading.svg';
|
src = path + 'svg/ox.ui.' + oxUIOptions.theme + '/symbolLoading.svg';
|
||||||
image.onload = function() {
|
image.onload = function() {
|
||||||
getElement('<img>')
|
getElement('<img>')
|
||||||
.attr({
|
.attr({
|
||||||
|
@ -287,11 +292,11 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
i == userAgents.length - 2 ? ' or' : ','
|
i == userAgents.length - 2 ? ' or' : ','
|
||||||
);
|
);
|
||||||
}).join(' ');
|
}).join(' ');
|
||||||
if (options.display == 'none') {
|
if (oxUIOptions.display == 'none') {
|
||||||
throw new Error(message);
|
throw new Error(message);
|
||||||
} else {
|
} else {
|
||||||
div.addClass('error');
|
div.addClass('error');
|
||||||
if (options.display == 'console') {
|
if (oxUIOptions.display == 'console') {
|
||||||
log(message);
|
log(message);
|
||||||
log = function() {};
|
log = function() {};
|
||||||
} else {
|
} else {
|
||||||
|
@ -421,6 +426,7 @@ Provides function Ox.UI([options], callback) that fires when
|
||||||
Ox.UI.$document = $(document);
|
Ox.UI.$document = $(document);
|
||||||
Ox.UI.$head = $('head');
|
Ox.UI.$head = $('head');
|
||||||
Ox.UI.$window = $(window);
|
Ox.UI.$window = $(window);
|
||||||
|
Ox.UI.$body.addClass('OxTheme' + Ox.toTitleCase(oxUIOptions.theme));
|
||||||
documentReadyCallbacks.forEach(function(callback) {
|
documentReadyCallbacks.forEach(function(callback) {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue