From d8d14cffe702a907a16d7f6ce4a0c7230fe88e37 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 23 Apr 2011 18:45:50 +0200 Subject: [PATCH] set theme on load --- demos/calendar/js/calendar.js | 4 +-- source/js/Ox.AnnotationPanel.js | 2 +- source/js/Ox.App.js | 2 +- source/js/Ox.Bar.js | 2 +- source/js/Ox.BlockTimeline.js | 2 +- source/js/Ox.Button.js | 2 +- source/js/Ox.ButtonGroup.js | 2 +- source/js/Ox.Calendar.js | 2 +- source/js/Ox.CalendarDate.js | 2 +- source/js/Ox.Checkbox.js | 2 +- source/js/Ox.CheckboxGroup.js | 2 +- source/js/Ox.Clipboard.js | 2 +- source/js/Ox.CollapsePanel.js | 2 +- source/js/Ox.ColorInput.js | 2 +- source/js/Ox.ColorPicker.js | 2 +- source/js/Ox.Container.js | 2 +- source/js/Ox.DateInput.js | 2 +- source/js/Ox.DateTimeInput.js | 2 +- source/js/Ox.Dialog.js | 2 +- source/js/Ox.Element.js | 2 +- source/js/Ox.FilesView.js | 2 +- source/js/Ox.Filter.js | 2 +- source/js/Ox.Flipbook.js | 2 +- source/js/Ox.Focus.js | 2 +- source/js/Ox.Form.js | 2 +- source/js/Ox.FormElementGroup.js | 2 +- source/js/Ox.FormItem.js | 2 +- source/js/Ox.History.js | 2 +- source/js/Ox.IconItem.js | 2 +- source/js/Ox.IconList.js | 2 +- source/js/Ox.Input.js | 2 +- source/js/Ox.InputGroup.js | 2 +- source/js/Ox.ItemInput.js | 2 +- source/js/Ox.JQueryElement.js | 2 +- source/js/Ox.Keyboard.js | 2 +- source/js/Ox.Label.js | 2 +- source/js/Ox.LargeTimeline.js | 2 +- source/js/Ox.List.js | 2 +- source/js/Ox.ListItem.js | 2 +- source/js/Ox.ListMap.js | 2 +- source/js/Ox.ListPage.js | 2 +- source/js/Ox.LoadingIcon.js | 2 +- source/js/Ox.MainMenu.js | 2 +- source/js/Ox.Map.js | 2 +- source/js/Ox.MapImage.js | 2 +- source/js/Ox.MapMarker.js | 2 +- source/js/Ox.MapPlace.js | 2 +- source/js/Ox.MapRectangle.js | 2 +- source/js/Ox.MapRectangleMarker.js | 2 +- source/js/Ox.Menu.js | 2 +- source/js/Ox.MenuItem.js | 2 +- source/js/Ox.OptionGroup.js | 2 +- source/js/Ox.Panel.js | 2 +- source/js/Ox.Picker.js | 2 +- source/js/Ox.PlaceInput.js | 2 +- source/js/Ox.PlacePicker.js | 2 +- source/js/Ox.Progressbar.js | 2 +- source/js/Ox.Range.js | 2 +- source/js/Ox.Request.js | 2 +- source/js/Ox.Resizebar.js | 2 +- source/js/Ox.Select.js | 2 +- source/js/Ox.SmallTimeline.js | 2 +- source/js/Ox.SplitPanel.js | 2 +- source/js/Ox.TabPanel.js | 2 +- source/js/Ox.Tabbar.js | 2 +- source/js/Ox.TextList.js | 2 +- source/js/Ox.Theme.js | 37 +++++++++++++++++++++++++-- source/js/Ox.TimeInput.js | 2 +- source/js/Ox.Toolbar.js | 2 +- source/js/Ox.Tooltip.js | 2 +- source/js/Ox.TreeList.js | 2 +- source/js/Ox.URL.js | 2 +- source/js/Ox.VideoEditorPlayer.js | 2 +- source/js/Ox.VideoElement.js | 2 +- source/js/Ox.VideoPanelPlayer.js | 2 +- source/js/Ox.VideoPlayer.js | 2 +- source/js/Ox.Window.js | 2 +- source/js/Ox.js | 2 +- source/js/OxUI.js | 40 +++++++++++++++++------------- 79 files changed, 136 insertions(+), 97 deletions(-) diff --git a/demos/calendar/js/calendar.js b/demos/calendar/js/calendar.js index d8aae052..1ef3c61e 100644 --- a/demos/calendar/js/calendar.js +++ b/demos/calendar/js/calendar.js @@ -2,12 +2,12 @@ console.log('calling Ox.UI()') //console.log('Ox =', Ox) //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('Ox =', Ox) - Ox.theme('modern'); + // Ox.theme('modern'); //Ox.print('$$$$', Ox.Calendar) diff --git a/source/js/Ox.AnnotationPanel.js b/source/js/Ox.AnnotationPanel.js index f6d1c90d..281a785b 100644 --- a/source/js/Ox.AnnotationPanel.js +++ b/source/js/Ox.AnnotationPanel.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.App.js b/source/js/Ox.App.js index 3f947fef..4696bca8 100644 --- a/source/js/Ox.App.js +++ b/source/js/Ox.App.js @@ -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 diff --git a/source/js/Ox.Bar.js b/source/js/Ox.Bar.js index 21f37fa8..3f6a00af 100644 --- a/source/js/Ox.Bar.js +++ b/source/js/Ox.Bar.js @@ -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) { diff --git a/source/js/Ox.BlockTimeline.js b/source/js/Ox.BlockTimeline.js index 9bcd3356..b3203ae4 100644 --- a/source/js/Ox.BlockTimeline.js +++ b/source/js/Ox.BlockTimeline.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.Button.js b/source/js/Ox.Button.js index 88955e38..b54923a3 100644 --- a/source/js/Ox.Button.js +++ b/source/js/Ox.Button.js @@ -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) { /** diff --git a/source/js/Ox.ButtonGroup.js b/source/js/Ox.ButtonGroup.js index f09c6fa5..bea7c3f3 100644 --- a/source/js/Ox.ButtonGroup.js +++ b/source/js/Ox.ButtonGroup.js @@ -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) { /** diff --git a/source/js/Ox.Calendar.js b/source/js/Ox.Calendar.js index c85f1176..7ca56d67 100644 --- a/source/js/Ox.Calendar.js +++ b/source/js/Ox.Calendar.js @@ -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) { self = self || {}; diff --git a/source/js/Ox.CalendarDate.js b/source/js/Ox.CalendarDate.js index a888947a..21bcdfd0 100644 --- a/source/js/Ox.CalendarDate.js +++ b/source/js/Ox.CalendarDate.js @@ -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) { var self = {}, diff --git a/source/js/Ox.Checkbox.js b/source/js/Ox.Checkbox.js index d597b120..88b9becd 100644 --- a/source/js/Ox.Checkbox.js +++ b/source/js/Ox.Checkbox.js @@ -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) { /** diff --git a/source/js/Ox.CheckboxGroup.js b/source/js/Ox.CheckboxGroup.js index 11257a07..95ba14e1 100644 --- a/source/js/Ox.CheckboxGroup.js +++ b/source/js/Ox.CheckboxGroup.js @@ -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) { /** diff --git a/source/js/Ox.Clipboard.js b/source/js/Ox.Clipboard.js index a44bc99d..5f41aff5 100644 --- a/source/js/Ox.Clipboard.js +++ b/source/js/Ox.Clipboard.js @@ -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 diff --git a/source/js/Ox.CollapsePanel.js b/source/js/Ox.CollapsePanel.js index 02f6e229..a2d6dfbf 100644 --- a/source/js/Ox.CollapsePanel.js +++ b/source/js/Ox.CollapsePanel.js @@ -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) { diff --git a/source/js/Ox.ColorInput.js b/source/js/Ox.ColorInput.js index a52c5797..5fca378d 100644 --- a/source/js/Ox.ColorInput.js +++ b/source/js/Ox.ColorInput.js @@ -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) { var self = $.extend(self || {}, { diff --git a/source/js/Ox.ColorPicker.js b/source/js/Ox.ColorPicker.js index 356189ca..1f1db6eb 100644 --- a/source/js/Ox.ColorPicker.js +++ b/source/js/Ox.ColorPicker.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.Container.js b/source/js/Ox.Container.js index 6280f8e2..1c52f7f4 100644 --- a/source/js/Ox.Container.js +++ b/source/js/Ox.Container.js @@ -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, // rather then $element, $content, and potentially others, // 0, 1, 2, etc, so that append would append 0, and appendTo diff --git a/source/js/Ox.DateInput.js b/source/js/Ox.DateInput.js index aebeb8d4..cc8c23cf 100644 --- a/source/js/Ox.DateInput.js +++ b/source/js/Ox.DateInput.js @@ -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) { /** diff --git a/source/js/Ox.DateTimeInput.js b/source/js/Ox.DateTimeInput.js index cef8c548..a59ceecd 100644 --- a/source/js/Ox.DateTimeInput.js +++ b/source/js/Ox.DateTimeInput.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.Dialog.js b/source/js/Ox.Dialog.js index 0a4657b2..e222a0c6 100644 --- a/source/js/Ox.Dialog.js +++ b/source/js/Ox.Dialog.js @@ -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) { // fixme: dialog should be derived from a generic draggable diff --git a/source/js/Ox.Element.js b/source/js/Ox.Element.js index f72e9708..e018f279 100644 --- a/source/js/Ox.Element.js +++ b/source/js/Ox.Element.js @@ -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) Ox.Element = function() { diff --git a/source/js/Ox.FilesView.js b/source/js/Ox.FilesView.js index 8a06fd32..df01ddbe 100644 --- a/source/js/Ox.FilesView.js +++ b/source/js/Ox.FilesView.js @@ -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 /* diff --git a/source/js/Ox.Filter.js b/source/js/Ox.Filter.js index 17d414a9..33f80cdb 100644 --- a/source/js/Ox.Filter.js +++ b/source/js/Ox.Filter.js @@ -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) { /*** diff --git a/source/js/Ox.Flipbook.js b/source/js/Ox.Flipbook.js index aa3d0f34..8b518f88 100644 --- a/source/js/Ox.Flipbook.js +++ b/source/js/Ox.Flipbook.js @@ -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! Ox.Flipbook = function(options, self) { diff --git a/source/js/Ox.Focus.js b/source/js/Ox.Focus.js index 1b080ccb..5f5e0e39 100644 --- a/source/js/Ox.Focus.js +++ b/source/js/Ox.Focus.js @@ -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 diff --git a/source/js/Ox.Form.js b/source/js/Ox.Form.js index 233930c8..107064c4 100644 --- a/source/js/Ox.Form.js +++ b/source/js/Ox.Form.js @@ -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) { /** diff --git a/source/js/Ox.FormElementGroup.js b/source/js/Ox.FormElementGroup.js index b49c82e7..35e06584 100644 --- a/source/js/Ox.FormElementGroup.js +++ b/source/js/Ox.FormElementGroup.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.FormItem.js b/source/js/Ox.FormItem.js index 52dffa18..3801bef7 100644 --- a/source/js/Ox.FormItem.js +++ b/source/js/Ox.FormItem.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.History.js b/source/js/Ox.History.js index 04bd96d2..7f92d178 100644 --- a/source/js/Ox.History.js +++ b/source/js/Ox.History.js @@ -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 ***/ diff --git a/source/js/Ox.IconItem.js b/source/js/Ox.IconItem.js index 6c28a0b7..0ed31020 100644 --- a/source/js/Ox.IconItem.js +++ b/source/js/Ox.IconItem.js @@ -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.print('IconItem', options, self) diff --git a/source/js/Ox.IconList.js b/source/js/Ox.IconList.js index 7d4ff2bd..051520e8 100644 --- a/source/js/Ox.IconList.js +++ b/source/js/Ox.IconList.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.Input.js b/source/js/Ox.Input.js index 838b6792..1a0a0828 100644 --- a/source/js/Ox.Input.js +++ b/source/js/Ox.Input.js @@ -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) { /** diff --git a/source/js/Ox.InputGroup.js b/source/js/Ox.InputGroup.js index 6eaf24a6..ebda133c 100644 --- a/source/js/Ox.InputGroup.js +++ b/source/js/Ox.InputGroup.js @@ -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) { /*** diff --git a/source/js/Ox.ItemInput.js b/source/js/Ox.ItemInput.js index 99974ae0..c6129b16 100644 --- a/source/js/Ox.ItemInput.js +++ b/source/js/Ox.ItemInput.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.JQueryElement.js b/source/js/Ox.JQueryElement.js index 9eeb1f78..74fabeeb 100644 --- a/source/js/Ox.JQueryElement.js +++ b/source/js/Ox.JQueryElement.js @@ -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 Ox.JQueryElement = function($element) { var that = this; diff --git a/source/js/Ox.Keyboard.js b/source/js/Ox.Keyboard.js index 29d8da4d..dfed8b2f 100644 --- a/source/js/Ox.Keyboard.js +++ b/source/js/Ox.Keyboard.js @@ -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 ***/ diff --git a/source/js/Ox.Label.js b/source/js/Ox.Label.js index 2a22be8a..dbb464e7 100644 --- a/source/js/Ox.Label.js +++ b/source/js/Ox.Label.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.LargeTimeline.js b/source/js/Ox.LargeTimeline.js index 0508a15b..4fa872da 100644 --- a/source/js/Ox.LargeTimeline.js +++ b/source/js/Ox.LargeTimeline.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.List.js b/source/js/Ox.List.js index ea2a7972..496de10e 100644 --- a/source/js/Ox.List.js +++ b/source/js/Ox.List.js @@ -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) { /*** diff --git a/source/js/Ox.ListItem.js b/source/js/Ox.ListItem.js index 1ade0ef6..c5343da9 100644 --- a/source/js/Ox.ListItem.js +++ b/source/js/Ox.ListItem.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.ListMap.js b/source/js/Ox.ListMap.js index bf2ba6b4..47067be5 100644 --- a/source/js/Ox.ListMap.js +++ b/source/js/Ox.ListMap.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.ListPage.js b/source/js/Ox.ListPage.js index b865ae4c..d19ec59a 100644 --- a/source/js/Ox.ListPage.js +++ b/source/js/Ox.ListPage.js @@ -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) { var self = self || {}, that = new Ox.Element({}, self) diff --git a/source/js/Ox.LoadingIcon.js b/source/js/Ox.LoadingIcon.js index c7320c2a..1641ba0b 100644 --- a/source/js/Ox.LoadingIcon.js +++ b/source/js/Ox.LoadingIcon.js @@ -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) { var self = self || {}, that = new Ox.Element('img', self) diff --git a/source/js/Ox.MainMenu.js b/source/js/Ox.MainMenu.js index f091d18f..2ab4cbe2 100644 --- a/source/js/Ox.MainMenu.js +++ b/source/js/Ox.MainMenu.js @@ -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) { diff --git a/source/js/Ox.Map.js b/source/js/Ox.Map.js index 0c4b1b0e..dd573943 100644 --- a/source/js/Ox.Map.js +++ b/source/js/Ox.Map.js @@ -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) { var self = self || {} diff --git a/source/js/Ox.MapImage.js b/source/js/Ox.MapImage.js index 527c473a..4e94a3a1 100644 --- a/source/js/Ox.MapImage.js +++ b/source/js/Ox.MapImage.js @@ -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) { /** diff --git a/source/js/Ox.MapMarker.js b/source/js/Ox.MapMarker.js index f23fdf3d..c538e12a 100644 --- a/source/js/Ox.MapMarker.js +++ b/source/js/Ox.MapMarker.js @@ -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) { var options = Ox.extend({ diff --git a/source/js/Ox.MapPlace.js b/source/js/Ox.MapPlace.js index 721104f7..ea4490d4 100644 --- a/source/js/Ox.MapPlace.js +++ b/source/js/Ox.MapPlace.js @@ -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) { options = Ox.extend({ diff --git a/source/js/Ox.MapRectangle.js b/source/js/Ox.MapRectangle.js index 9e9c2f74..e899a7d1 100644 --- a/source/js/Ox.MapRectangle.js +++ b/source/js/Ox.MapRectangle.js @@ -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) { var options = Ox.extend({ diff --git a/source/js/Ox.MapRectangleMarker.js b/source/js/Ox.MapRectangleMarker.js index 15d1380c..c6c08d7f 100644 --- a/source/js/Ox.MapRectangleMarker.js +++ b/source/js/Ox.MapRectangleMarker.js @@ -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) { var options = Ox.extend({ diff --git a/source/js/Ox.Menu.js b/source/js/Ox.Menu.js index 914e83af..da80b675 100644 --- a/source/js/Ox.Menu.js +++ b/source/js/Ox.Menu.js @@ -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 element the element the menu is attached to diff --git a/source/js/Ox.MenuItem.js b/source/js/Ox.MenuItem.js index bbb3fb3c..a87d0009 100644 --- a/source/js/Ox.MenuItem.js +++ b/source/js/Ox.MenuItem.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.OptionGroup.js b/source/js/Ox.OptionGroup.js index 642c893d..1ba41887 100644 --- a/source/js/Ox.OptionGroup.js +++ b/source/js/Ox.OptionGroup.js @@ -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) { /* diff --git a/source/js/Ox.Panel.js b/source/js/Ox.Panel.js index 649c2a1b..a28a5c38 100644 --- a/source/js/Ox.Panel.js +++ b/source/js/Ox.Panel.js @@ -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) { diff --git a/source/js/Ox.Picker.js b/source/js/Ox.Picker.js index e5c809c2..d722d4d7 100644 --- a/source/js/Ox.Picker.js +++ b/source/js/Ox.Picker.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.PlaceInput.js b/source/js/Ox.PlaceInput.js index d3709910..fd178b87 100644 --- a/source/js/Ox.PlaceInput.js +++ b/source/js/Ox.PlaceInput.js @@ -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) { var self = $.extend(self || {}, { diff --git a/source/js/Ox.PlacePicker.js b/source/js/Ox.PlacePicker.js index 26b3f9cb..edf6105c 100644 --- a/source/js/Ox.PlacePicker.js +++ b/source/js/Ox.PlacePicker.js @@ -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) { var self = $.extend(self || {}, { diff --git a/source/js/Ox.Progressbar.js b/source/js/Ox.Progressbar.js index 99a64f79..1ba60719 100644 --- a/source/js/Ox.Progressbar.js +++ b/source/js/Ox.Progressbar.js @@ -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 */ diff --git a/source/js/Ox.Range.js b/source/js/Ox.Range.js index 3cb8b95d..23e4b117 100644 --- a/source/js/Ox.Range.js +++ b/source/js/Ox.Range.js @@ -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) { /** diff --git a/source/js/Ox.Request.js b/source/js/Ox.Request.js index 3486486b..aeeed4c2 100644 --- a/source/js/Ox.Request.js +++ b/source/js/Ox.Request.js @@ -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) { /*** diff --git a/source/js/Ox.Resizebar.js b/source/js/Ox.Resizebar.js index e7bdf906..08ffc3bf 100644 --- a/source/js/Ox.Resizebar.js +++ b/source/js/Ox.Resizebar.js @@ -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) { diff --git a/source/js/Ox.Select.js b/source/js/Ox.Select.js index 9d4afb71..c9fd077e 100644 --- a/source/js/Ox.Select.js +++ b/source/js/Ox.Select.js @@ -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) { // fixme: selected item needs attribute "checked", not "selected" ... that's strange diff --git a/source/js/Ox.SmallTimeline.js b/source/js/Ox.SmallTimeline.js index c0eec761..a6783e6f 100644 --- a/source/js/Ox.SmallTimeline.js +++ b/source/js/Ox.SmallTimeline.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.SplitPanel.js b/source/js/Ox.SplitPanel.js index 43438391..3e45e88b 100644 --- a/source/js/Ox.SplitPanel.js +++ b/source/js/Ox.SplitPanel.js @@ -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: elements: [{ array of one, two or three elements diff --git a/source/js/Ox.TabPanel.js b/source/js/Ox.TabPanel.js index 63fbaaae..cc7fbea7 100644 --- a/source/js/Ox.TabPanel.js +++ b/source/js/Ox.TabPanel.js @@ -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) { }; diff --git a/source/js/Ox.Tabbar.js b/source/js/Ox.Tabbar.js index 1131c7e4..a801a05d 100644 --- a/source/js/Ox.Tabbar.js +++ b/source/js/Ox.Tabbar.js @@ -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) { diff --git a/source/js/Ox.TextList.js b/source/js/Ox.TextList.js index a354b9ae..622a62a7 100644 --- a/source/js/Ox.TextList.js +++ b/source/js/Ox.TextList.js @@ -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) { // fixme: rename to TableList diff --git a/source/js/Ox.Theme.js b/source/js/Ox.Theme.js index d27bd8ee..276ac806 100644 --- a/source/js/Ox.Theme.js +++ b/source/js/Ox.Theme.js @@ -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. /** if name is given as argument, switch to this theme. @@ -10,6 +10,39 @@ 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.theme = function() { @@ -63,4 +96,4 @@ Ox.UI.ready(function() { }); - +*/ diff --git a/source/js/Ox.TimeInput.js b/source/js/Ox.TimeInput.js index f9ff00b7..e4fbe7ed 100644 --- a/source/js/Ox.TimeInput.js +++ b/source/js/Ox.TimeInput.js @@ -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) { // fixme: seconds get set even if options.seconds is false diff --git a/source/js/Ox.Toolbar.js b/source/js/Ox.Toolbar.js index 54d4e884..41d73686 100644 --- a/source/js/Ox.Toolbar.js +++ b/source/js/Ox.Toolbar.js @@ -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 */ diff --git a/source/js/Ox.Tooltip.js b/source/js/Ox.Tooltip.js index ff3c6d47..3af35855 100644 --- a/source/js/Ox.Tooltip.js +++ b/source/js/Ox.Tooltip.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.TreeList.js b/source/js/Ox.TreeList.js index d132fe33..e9b4b819 100644 --- a/source/js/Ox.TreeList.js +++ b/source/js/Ox.TreeList.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.URL.js b/source/js/Ox.URL.js index fabeb8e6..db41c5a2 100644 --- a/source/js/Ox.URL.js +++ b/source/js/Ox.URL.js @@ -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 ***/ diff --git a/source/js/Ox.VideoEditorPlayer.js b/source/js/Ox.VideoEditorPlayer.js index d2d8c23d..cb131be2 100644 --- a/source/js/Ox.VideoEditorPlayer.js +++ b/source/js/Ox.VideoEditorPlayer.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.VideoElement.js b/source/js/Ox.VideoElement.js index f328e723..a6649125 100644 --- a/source/js/Ox.VideoElement.js +++ b/source/js/Ox.VideoElement.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.VideoPanelPlayer.js b/source/js/Ox.VideoPanelPlayer.js index d6249815..bd322b17 100644 --- a/source/js/Ox.VideoPanelPlayer.js +++ b/source/js/Ox.VideoPanelPlayer.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.VideoPlayer.js b/source/js/Ox.VideoPlayer.js index b0c97f65..49fe08b9 100644 --- a/source/js/Ox.VideoPlayer.js +++ b/source/js/Ox.VideoPlayer.js @@ -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) { var self = self || {}, diff --git a/source/js/Ox.Window.js b/source/js/Ox.Window.js index 0350252f..90f378e4 100644 --- a/source/js/Ox.Window.js +++ b/source/js/Ox.Window.js @@ -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) { self = self || {}, diff --git a/source/js/Ox.js b/source/js/Ox.js index 5a3ed2d3..75b0f764 100644 --- a/source/js/Ox.js +++ b/source/js/Ox.js @@ -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/ Ox = function(val) { diff --git a/source/js/OxUI.js b/source/js/OxUI.js index 60c8d174..0d3571c1 100644 --- a/source/js/OxUI.js +++ b/source/js/OxUI.js @@ -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 @@ -22,13 +22,19 @@ Provides function Ox.UI([options], callback) that fires when head = document.getElementsByTagName('head')[0], logs = [], oxUICallback = function() {}, - oxUIDefaults = { - // 'classic', 'modern', 'console' or 'none' - display: 'classic' - }, oxUIFunction = function(options, callback) { + var key; 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) { @@ -200,10 +206,9 @@ Provides function Ox.UI([options], callback) that fires when {name: 'Chrome', url: 'http://www.google.com/chrome/', version: 10}, {name: 'Firefox', url: 'http://www.mozilla.org/firefox/', version: 4}, {name: 'Safari', url: 'http://www.apple.com/safari/', version: 5} - ], - options = oxUIOptions || oxUIDefaults; + ] - if (options.display != 'none') { + if (oxUIOptions.display != 'none') { body = getElement('body'); css = { position: 'absolute', @@ -216,7 +221,7 @@ Provides function Ox.UI([options], callback) that fires when WebkitUserSelect: 'none' }; div = getElement('
') - .addClass(options.display == 'console' ? 'console' : '') + .addClass(oxUIOptions.display == 'console' ? 'console' : '') .css({ position: 'absolute', left: 0, @@ -225,10 +230,10 @@ Provides function Ox.UI([options], callback) that fires when bottom: 0, padding: '4px', background: 'rgb(' + ( - options.display == 'classic' ? '240, 240, 240' : '16, 16, 16') + oxUIOptions.theme == 'classic' ? '240, 240, 240' : '16, 16, 16') + ')', opacity: 1, - overflow: options.display == 'console' ? 'auto' : 'hidden', + overflow: oxUIOptions.display == 'console' ? 'auto' : 'hidden', zIndex: 1000 }) .appendTo(body); @@ -255,11 +260,11 @@ Provides function Ox.UI([options], callback) that fires when function start() { var image, src; - if (options.display == 'console') { + if (oxUIOptions.display == 'console') { log('Loading additional scripts and images...') - } else { + } else if (oxUIOptions.display == 'icon') { image = new Image(), - src = path + 'svg/ox.ui.' + options.display + '/symbolLoading.svg'; + src = path + 'svg/ox.ui.' + oxUIOptions.theme + '/symbolLoading.svg'; image.onload = function() { getElement('') .attr({ @@ -287,11 +292,11 @@ Provides function Ox.UI([options], callback) that fires when i == userAgents.length - 2 ? ' or' : ',' ); }).join(' '); - if (options.display == 'none') { + if (oxUIOptions.display == 'none') { throw new Error(message); } else { div.addClass('error'); - if (options.display == 'console') { + if (oxUIOptions.display == 'console') { log(message); log = function() {}; } else { @@ -421,6 +426,7 @@ Provides function Ox.UI([options], callback) that fires when Ox.UI.$document = $(document); Ox.UI.$head = $('head'); Ox.UI.$window = $(window); + Ox.UI.$body.addClass('OxTheme' + Ox.toTitleCase(oxUIOptions.theme)); documentReadyCallbacks.forEach(function(callback) { callback(); });