diff --git a/index.html b/index.html index 7fea7595..174ef82f 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,9 @@ OxJS - A JavaScript Library for Web Applications - + + - \ No newline at end of file + diff --git a/source/Ox.compat.js b/source/Ox.compat.js new file mode 100644 index 00000000..7e809841 --- /dev/null +++ b/source/Ox.compat.js @@ -0,0 +1,18 @@ +const init = [], initLoad = []; +window.Ox = function(value) { + console.log("delay stuff until we are done") + init.push(value) +}; +window.Ox.load = function() { + initLoad.push(arguments) +}; + +(async () => { + const module = await import('./Ox/index.js'); + console.log("Ox was loaded", init); + init.forEach(value => Ox(value)) + delete init + initLoad.forEach(arguments => Ox.load.apply(null, arguments)) + delete initLoad +})(); + diff --git a/source/Ox/index.js b/source/Ox/index.js new file mode 100644 index 00000000..0b48aa3e --- /dev/null +++ b/source/Ox/index.js @@ -0,0 +1,65 @@ +'use strict'; + +import Ox from './js/Namespace.js'; + +import * as OxCore from './js/Core.js'; +import * as OxFunction from './js/Function.js'; +import * as OxPolyfill from './js/Polyfill.js'; +import * as OxArray from './js/Array.js'; +import * as OxString from './js/String.js'; +import * as OxCollection from './js/Collection.js'; +import * as OxMath from './js/Math.js'; + + +import * as OxAsync from './js/Async.js'; +import * as OxColor from './js/Color.js'; +import * as OxConstants from './js/Constants.js'; +import * as OxDate from './js/Date.js'; +import * as OxDOM from './js/DOM.js'; +import * as OxEncoding from './js/Encoding.js'; +import * as OxFormat from './js/Format.js'; +import * as OxGeo from './js/Geo.js'; +import * as OxHash from './js/Hash.js'; +import * as OxHTML from './js/HTML.js'; +import * as OxJavaScript from './js/JavaScript.js'; +import * as OxLocale from './js/Locale.js'; +import * as OxObject from './js/Object.js'; +import * as OxRegExp from './js/RegExp.js'; +import * as OxRequest from './js/Request.js'; +import * as OxType from './js/Type.js'; +import * as OxVideo from './js/Video.js'; + + +export default Ox; +export { Ox }; + +// For backward compatibility with global usage +if (typeof globalThis !== 'undefined') { + globalThis.Ox = Ox; + + /*@ + Ox.documentReady Calls a callback function once the DOM is ready + (callback) -> If true, the document was ready + callback Callback function + @*/ + Ox.documentReady = (function() { + var callbacks = []; + document.onreadystatechange = globalThis.onload = function() { + if (document.readyState == 'complete') { + callbacks.forEach(function(callback) { + callback(); + }); + document.onreadystatechange = globalThis.onload = null; + } + }; + return function(callback) { + if (document.readyState == 'complete') { + callback(); + return true; + } else { + callbacks.push(callback); + return false; + } + }; + }()); +} diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index 6beae511..9610aded 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -1,5 +1,7 @@ 'use strict'; +import Ox from './Namespace.js'; + /*@ Ox.api Turns an array into a list API `Ox.api` takes an array and returns a function that allows you to run diff --git a/source/Ox/js/Async.js b/source/Ox/js/Async.js index 7607d841..c5d5fff1 100644 --- a/source/Ox/js/Async.js +++ b/source/Ox/js/Async.js @@ -1,5 +1,7 @@ 'use strict'; +import Ox from './Namespace.js'; + (function() { function asyncMap(forEach, collection, iterator, that, callback) { diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index efcb41ac..975ef6c6 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.avg Returns the average of an array's values, or an object's properties diff --git a/source/Ox/js/Color.js b/source/Ox/js/Color.js index ce01d81d..71a408c2 100644 --- a/source/Ox/js/Color.js +++ b/source/Ox/js/Color.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.hsl Takes RGB values and returns HSL values diff --git a/source/Ox/js/Constants.js b/source/Ox/js/Constants.js index 1fe2d45b..64675378 100644 --- a/source/Ox/js/Constants.js +++ b/source/Ox/js/Constants.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; //@ Ox.AMPM <[s]> ['AM', 'PM'] Ox.AMPM = ['AM', 'PM']; @@ -101,6 +102,8 @@ Ox.PATH = (function() { return src.replace(regexp, ''); } } + // FIXME: fix path detection + return './source/'; }()); //@ Ox.MODE Mode ('dev' or 'min') Ox.MODE = Ox.PATH.slice(0, -1).split('/').pop(); diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index 8a8e402c..1575014f 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -2,15 +2,7 @@ 'use strict'; -/*@ -Ox The `Ox` object - See `Ox.wrap` for details. - (value) -> wrapped value - value <*> Any value -@*/ -this.Ox = function(value) { - return Ox.wrap(value); -}; +import Ox from './Namespace.js'; /*@ Ox.load Loads OxJS and, optionally, one or more modules @@ -76,20 +68,17 @@ Ox.load = function() { if (!length) { callback(true); } else { - Ox.forEach(modules, function(options, module) { - Ox.getFile( - Ox.PATH + module + '/' + module + '.js?' + Ox.VERSION, - function() { - Ox.load[module](options, function(success) { - succeeded += success; - if (++loaded == length) { - Ox.setLocale(Ox.LOCALE, function() { - callback(succeeded == length); - }); - } + Ox.forEach(modules, async function(options, module) { + console.log("load module!", module, options) + const obj = await import('../../' + module + '/index.js?' + Ox.VERSION); + Ox.load[module](options, function(success) { + succeeded += success; + if (++loaded == length) { + Ox.setLocale(Ox.LOCALE, function() { + callback(succeeded == length); }); } - ); + }); }); } }); @@ -114,7 +103,7 @@ Ox.localStorage = function(namespace) { var localStorage; try { // this will fail if third party cookies/storage is not allowed - localStorage = window.localStorage || {}; + localStorage = globalThis.localStorage || {}; // FF 3.6 can't assign to or iterate over localStorage for (var key in localStorage) {} // In Safari (OS X or iOS) is in private browsing mode, @@ -206,7 +195,7 @@ Ox.Log = (function() { args.unshift( Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().slice(-3) ); - window.console && window.console.log && window.console.log.apply(window.console, args); + globalThis.console && globalThis.console.log && globalThis.console.log.apply(globalThis.console, args); ret = args.join(' '); } return ret; @@ -268,7 +257,7 @@ Ox.print = function() { args.unshift( date.toString().split(' ')[4] + '.' + (+date).toString().slice(-3) ); - window.console && window.console.log.apply(window.console, args); + globalThis.console && globalThis.console.log.apply(globalThis.console, args); return args.join(' '); }; diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index 71ef21cc..3471ce0b 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.$ Generic HTML element, mimics jQuery @@ -828,12 +829,12 @@ Ox.documentReady Calls a callback function once the DOM is ready @*/ Ox.documentReady = (function() { var callbacks = []; - document.onreadystatechange = window.onload = function() { + document.onreadystatechange = globalThis.onload = function() { if (document.readyState == 'complete') { callbacks.forEach(function(callback) { callback(); }); - document.onreadystatechange = window.onload = null; + document.onreadystatechange = globalThis.onload = null; } }; return function(callback) { diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js index 74668b2e..fb613481 100644 --- a/source/Ox/js/Date.js +++ b/source/Ox/js/Date.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; //@ Ox.getDate Get the day of a date, optionally UTC // see Ox.setSeconds for source code diff --git a/source/Ox/js/Encoding.js b/source/Ox/js/Encoding.js index 974108ac..e2641f29 100644 --- a/source/Ox/js/Encoding.js +++ b/source/Ox/js/Encoding.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.encodeBase26 Encode a number as bijective base26 diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index 6870c75b..7bc2105b 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.formatArea Formats a number of meters as square meters or kilometers diff --git a/source/Ox/js/Function.js b/source/Ox/js/Function.js index 5d2a41d1..3cdf865a 100644 --- a/source/Ox/js/Function.js +++ b/source/Ox/js/Function.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.cache Memoize a function diff --git a/source/Ox/js/Geo.js b/source/Ox/js/Geo.js index aa341cf1..4965d1aa 100644 --- a/source/Ox/js/Geo.js +++ b/source/Ox/js/Geo.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; (function() { diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index b5cf839b..bf2793cd 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; (function() { diff --git a/source/Ox/js/Hash.js b/source/Ox/js/Hash.js index 7471604d..c396c4e1 100644 --- a/source/Ox/js/Hash.js +++ b/source/Ox/js/Hash.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.oshash Calculates oshash for a given file or blob object. Async. diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index 56514b14..01ae582c 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.doc Generates documentation for annotated JavaScript diff --git a/source/Ox/js/Locale.js b/source/Ox/js/Locale.js index 324f8646..ac87e9dc 100644 --- a/source/Ox/js/Locale.js +++ b/source/Ox/js/Locale.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; (function() { diff --git a/source/Ox/js/Math.js b/source/Ox/js/Math.js index 9e933c04..ef347dfd 100644 --- a/source/Ox/js/Math.js +++ b/source/Ox/js/Math.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.acosh Inverse hyperbolic cosine diff --git a/source/Ox/js/Namespace.js b/source/Ox/js/Namespace.js new file mode 100644 index 00000000..6efd1a65 --- /dev/null +++ b/source/Ox/js/Namespace.js @@ -0,0 +1,14 @@ +'use strict'; + + +/*@ +Ox The `Ox` object + See `Ox.wrap` for details. + (value) -> wrapped value + value <*> Any value +@*/ +export const Ox = function(value) { + return Ox.wrap(value) +}; + +export default Ox; diff --git a/source/Ox/js/Object.js b/source/Ox/js/Object.js index 0534d820..3ad8c3e4 100644 --- a/source/Ox/js/Object.js +++ b/source/Ox/js/Object.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.extend Extends an object with one or more other objects diff --git a/source/Ox/js/Polyfill.js b/source/Ox/js/Polyfill.js index 98cd94d3..4eed90a9 100644 --- a/source/Ox/js/Polyfill.js +++ b/source/Ox/js/Polyfill.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; (function(window) { @@ -427,4 +428,4 @@ } } -}(this)); +}(globalThis)); diff --git a/source/Ox/js/RegExp.js b/source/Ox/js/RegExp.js index ac636e2f..24239cb1 100644 --- a/source/Ox/js/RegExp.js +++ b/source/Ox/js/RegExp.js @@ -1,3 +1,5 @@ +import Ox from './Namespace.js'; + /*@ Ox.escapeRegExp Escapes a string for use in a regular expression (str) -> Escaped string @@ -10,4 +12,4 @@ Ox.escapeRegExp Escapes a string for use in a regular expression // see https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions Ox.escapeRegExp = function(string) { return (string + '').replace(/([\/\\^$*+?.\-|(){}[\]])/g, '\\$1'); -}; \ No newline at end of file +}; diff --git a/source/Ox/js/Request.js b/source/Ox/js/Request.js index 6ea7f530..e612bc86 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.get Get a remote resource diff --git a/source/Ox/js/String.js b/source/Ox/js/String.js index 3f89e93d..b5b145e8 100644 --- a/source/Ox/js/String.js +++ b/source/Ox/js/String.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.char Alias for String.fromCharCode @@ -265,17 +266,30 @@ Ox.parseURL Takes a URL, returns its components '?a=0&b=1' @*/ Ox.parseURL = (function() { - var a = document.createElement('a'), - keys = ['hash', 'host', 'hostname', 'origin', - 'pathname', 'port', 'protocol', 'search']; - return function(string) { - var ret = {}; - a.href = string; - keys.forEach(function(key) { - ret[key] = a[key]; - }); - return ret; - }; + const keys = [ + 'hash', 'host', 'hostname', 'origin', + 'pathname', 'port', 'protocol', 'search' + ]; + if (typeof document == 'undefined') { + return function(string) { + const a = new URL(string); + var ret = {}; + keys.forEach(function(key) { + ret[key] = a[key]; + }); + return ret; + } + } else { + var a = document.createElement('a'); + return function(string) { + var ret = {}; + a.href = string; + keys.forEach(function(key) { + ret[key] = a[key]; + }); + return ret; + }; + } }()); // FIXME: can we get rid of this? diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index a3f7843b..2e99757b 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.checkType Throws a TypeError if a value is not of a given type diff --git a/source/Ox/js/Video.js b/source/Ox/js/Video.js index a8f2252a..fc210663 100644 --- a/source/Ox/js/Video.js +++ b/source/Ox/js/Video.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './Namespace.js'; /*@ Ox.getVideoFormat Get supported video format diff --git a/source/UI/UI.js b/source/UI/UI.js index 2b3620a5..bb1523de 100644 --- a/source/UI/UI.js +++ b/source/UI/UI.js @@ -69,7 +69,9 @@ Ox.load.UI = function(options, callback) { } }); - Ox.UI = {}; + console.log("this happens?") + + //Ox.UI = Ox.UI || {}; Ox.UI.LoadingScreen = (function() { diff --git a/source/UI/index.js b/source/UI/index.js new file mode 100644 index 00000000..93f54a20 --- /dev/null +++ b/source/UI/index.js @@ -0,0 +1,429 @@ +'use strict'; + +import Ox from './../Ox/js/Namespace.js'; +Ox.UI = Ox.UI || {}; + +import * as AudioAudioElement from './js/Audio/AudioElement.js'; +import * as AudioAudioPlayer from './js/Audio/AudioPlayer.js'; +import * as BarBar from './js/Bar/Bar.js'; +import * as BarProgressbar from './js/Bar/Progressbar.js'; +import * as BarResizebar from './js/Bar/Resizebar.js'; +import * as BarTabbar from './js/Bar/Tabbar.js'; +import * as CalendarCalendarEditor from './js/Calendar/CalendarEditor.js'; +import * as CalendarCalendar from './js/Calendar/Calendar.js'; +import * as CodeDocPage from './js/Code/DocPage.js'; +import * as CodeDocPanel from './js/Code/DocPanel.js'; +import * as CodeExamplePage from './js/Code/ExamplePage.js'; +import * as CodeExamplePanel from './js/Code/ExamplePanel.js'; +import * as CodeSourceViewer from './js/Code/SourceViewer.js'; +import * as CodeSyntaxHighlighter from './js/Code/SyntaxHighlighter.js'; +import * as CoreAPI from './js/Core/API.js'; +import * as CoreApp from './js/Core/App.js'; +import * as CoreClipboard from './js/Core/Clipboard.js'; +import * as CoreContainer from './js/Core/Container.js'; +import * as CoreCookies from './js/Core/Cookies.js'; +import * as CoreElement from './js/Core/Element.js'; +import * as CoreEvent from './js/Core/Event.js'; +import * as CoreFocus from './js/Core/Focus.js'; +import * as CoreFullscreen from './js/Core/Fullscreen.js'; +import * as CoreGarbageCollection from './js/Core/GarbageCollection.js'; +import * as CoreHistory from './js/Core/History.js'; +import * as CoreLoadingIcon from './js/Core/LoadingIcon.js'; +import * as CoreLoadingScreen from './js/Core/LoadingScreen.js'; +import * as CoreRequest from './js/Core/Request.js'; +import * as CoreTheme from './js/Core/Theme.js'; +import * as CoreUI from './js/Core/UI.js'; +import * as CoreURL from './js/Core/URL.js'; +import * as FormArrayEditable from './js/Form/ArrayEditable.js'; +import * as FormArrayInput from './js/Form/ArrayInput.js'; +import * as FormButtonGroup from './js/Form/ButtonGroup.js'; +import * as FormButton from './js/Form/Button.js'; +import * as FormCheckboxGroup from './js/Form/CheckboxGroup.js'; +import * as FormCheckbox from './js/Form/Checkbox.js'; +import * as FormColorInput from './js/Form/ColorInput.js'; +import * as FormColorPicker from './js/Form/ColorPicker.js'; +import * as FormDateInput from './js/Form/DateInput.js'; +import * as FormDateTimeInput from './js/Form/DateTimeInput.js'; +import * as FormEditableContent from './js/Form/EditableContent.js'; +import * as FormEditable from './js/Form/Editable.js'; +import * as FormFileButton from './js/Form/FileButton.js'; +import * as FormFileInput from './js/Form/FileInput.js'; +import * as FormFilter from './js/Form/Filter.js'; +import * as FormFormElementGroup from './js/Form/FormElementGroup.js'; +import * as FormFormItem from './js/Form/FormItem.js'; +import * as FormForm from './js/Form/Form.js'; +import * as FormFormPanel from './js/Form/FormPanel.js'; +import * as FormInputGroup from './js/Form/InputGroup.js'; +import * as FormInput from './js/Form/Input.js'; +import * as FormInsertHTMLDialog from './js/Form/InsertHTMLDialog.js'; +import * as FormLabel from './js/Form/Label.js'; +import * as FormObjectArrayInput from './js/Form/ObjectArrayInput.js'; +import * as FormObjectInput from './js/Form/ObjectInput.js'; +import * as FormOptionGroup from './js/Form/OptionGroup.js'; +import * as FormPicker from './js/Form/Picker.js'; +import * as FormPlaceInput from './js/Form/PlaceInput.js'; +import * as FormPlacePicker from './js/Form/PlacePicker.js'; +import * as FormRange from './js/Form/Range.js'; +import * as FormSelectInput from './js/Form/SelectInput.js'; +import * as FormSelect from './js/Form/Select.js'; +import * as FormSpreadsheet from './js/Form/Spreadsheet.js'; +import * as FormTimeInput from './js/Form/TimeInput.js'; +import * as ImageImageElement from './js/Image/ImageElement.js'; +import * as ImageImageViewer from './js/Image/ImageViewer.js'; +import * as ListChart from './js/List/Chart.js'; +import * as ListColumnList from './js/List/ColumnList.js'; +import * as ListCustomList from './js/List/CustomList.js'; +import * as ListIconItem from './js/List/IconItem.js'; +import * as ListIconList from './js/List/IconList.js'; +import * as ListInfoList from './js/List/InfoList.js'; +import * as ListListItem from './js/List/ListItem.js'; +import * as ListList from './js/List/List.js'; +import * as ListSortList from './js/List/SortList.js'; +import * as ListTableList from './js/List/TableList.js'; +import * as ListTreeList from './js/List/TreeList.js'; +import * as MapMapEditor from './js/Map/MapEditor.js'; +import * as MapMapImage from './js/Map/MapImage.js'; +import * as MapMap from './js/Map/Map.js'; +import * as MapMapMarkerImage from './js/Map/MapMarkerImage.js'; +import * as MapMapMarker from './js/Map/MapMarker.js'; +import * as MapMapPlace from './js/Map/MapPlace.js'; +import * as MapMapRectangle from './js/Map/MapRectangle.js'; +import * as MapMapRectangleMarker from './js/Map/MapRectangleMarker.js'; +import * as MenuMainMenu from './js/Menu/MainMenu.js'; +import * as MenuMenuButton from './js/Menu/MenuButton.js'; +import * as MenuMenuItem from './js/Menu/MenuItem.js'; +import * as MenuMenu from './js/Menu/Menu.js'; +import * as PanelCollapsePanel from './js/Panel/CollapsePanel.js'; +import * as PanelSlidePanel from './js/Panel/SlidePanel.js'; +import * as PanelSplitPanel from './js/Panel/SplitPanel.js'; +import * as PanelTabPanel from './js/Panel/TabPanel.js'; +import * as VideoAnnotationFolder from './js/Video/AnnotationFolder.js'; +import * as VideoAnnotationPanel from './js/Video/AnnotationPanel.js'; +import * as VideoBlockVideoTimeline from './js/Video/BlockVideoTimeline.js'; +import * as VideoClipPanel from './js/Video/ClipPanel.js'; +import * as VideoLargeVideoTimeline from './js/Video/LargeVideoTimeline.js'; +import * as VideoSmallVideoTimelineImage from './js/Video/SmallVideoTimelineImage.js'; +import * as VideoSmallVideoTimeline from './js/Video/SmallVideoTimeline.js'; +import * as VideoVideoAnnotationPanel from './js/Video/VideoAnnotationPanel.js'; +import * as VideoVideoEditPanel from './js/Video/VideoEditPanel.js'; +import * as VideoVideoElement from './js/Video/VideoElement.js'; +import * as VideoVideoPlayer from './js/Video/VideoPlayer.js'; +import * as VideoVideoPlayerMenu from './js/Video/VideoPlayerMenu.js'; +import * as VideoVideoPlayerPanel from './js/Video/VideoPlayerPanel.js'; +import * as VideoVideoPreview from './js/Video/VideoPreview.js'; +import * as VideoVideoTimelinePanel from './js/Video/VideoTimelinePanel.js'; +import * as VideoVideoTimelinePlayer from './js/Video/VideoTimelinePlayer.js'; +import * as VideoYouTubeElement from './js/Video/YouTubeElement.js'; +import * as WindowDialog from './js/Window/Dialog.js'; +import * as WindowLayer from './js/Window/Layer.js'; +import * as WindowSortDialog from './js/Window/SortDialog.js'; +import * as WindowTooltip from './js/Window/Tooltip.js'; + + + +export const UI = Ox.UI; +export default UI; + +if (typeof globalThis !== 'undefined') { + Ox.load.UI = function(options, callback) { + + options = Ox.extend({ + hideScreen: true, + loadCSS: true, + loadThemes: true, + showScreen: false, + theme: 'oxlight' + }, options); + + var browsers = [ + { + name: 'Chrome Frame', + url: 'http://www.google.com/chromeframe/' + }, + { + name: 'Chrome', + regexp: /Chrome\/(\d+)\./, + url: 'http://www.google.com/chrome/', + version: 10 + }, + { + name: 'Firefox', + regexp: /Firefox\/(\d+)\./, + url: 'http://www.mozilla.org/firefox/', + version: 4 + }, + { + name: 'Safari', + regexp: /Version\/(\d+).*? Safari/, + url: 'http://www.apple.com/safari/', + version: 5 + }, + { + name: 'WebKit', + regexp: /AppleWebKit\/(\d+)\./, + version: 534 + }, + { + name: 'Googlebot', + regexp: /Googlebot\/(\d+)\./, + version: 2 + }, + { + name: 'YandexBot', + regexp: /YandexBot\/(\d+)\./, + version: 3 + }, + { + name: 'YandexMobileBot', + regexp: /YandexMobileBot\/(\d+)\./, + version: 3 + }, + { + name: 'Internet Explorer', + url: 'http://windows.microsoft.com/en-US/internet-explorer/products/ie/home', + version: 9 + } + ], + browserSupported = false, + isInternetExplorer = /MSIE/.test(navigator.userAgent); + + browsers.forEach(function(browser) { + var match = browser.regexp && browser.regexp.exec(navigator.userAgent); + if (match && match[1] >= browser.version) { + browserSupported = true; + } + }); + + Ox.UI.LoadingScreen = (function() { + + var $body = Ox.$('body'), + $screen = Ox.$('
') + .addClass('OxLoadingScreen') + .css({ + position: 'absolute', + left: 0, + top: 0, + right: 0, + bottom: 0, + padding: '4px', + background: 'rgb(' + ( + options.theme == 'oxlight' ? '240, 240, 240' + : options.theme == 'oxmedium' ? '144, 144, 144' + : '16, 16, 16' + ) + ')', + opacity: 1, + zIndex: 1000 + }), + css = { + position: 'absolute', + left: 0, + top: 0, + right: 0, + bottom: 0, + margin: 'auto', + MozUserSelect: 'none', + WebkitUserSelect: 'none' + }, + loadingInterval, + $icon, + deg = 0; + + browserSupported ? showIcon() : showWarning(); + + function showIcon() { + /* + // SVG transform performs worse than CSS transform + var src = Ox.PATH + 'UI/themes/' + options.theme + '/svg/symbolLoadingAnimated.svg' + Ox.getFile(src, function() { + Ox.$('') + .attr({ + src: src + }) + .css(Ox.extend({ + width: '32px', + height: '32px' + }, css)) + .on({ + mousedown: function(e) { + e.preventDefault(); + } + }) + .appendTo(div); + }); + */ + var src = Ox.PATH + 'UI/themes/' + options.theme + '/svg/symbolLoading.svg' + Ox.getFile(src, function() { + $icon = Ox.$('') + .attr({ + src: src + }) + .css(Ox.extend({ + width: '32px', + height: '32px' + }, css)) + .on({ + mousedown: function(e) { + e.preventDefault() + } + }) + .appendTo($screen); + }); + } + + function showWarning() { + var counter = 0; + browsers = browsers.filter(function(browser) { + return browser.url; + }); + isInternetExplorer ? browsers.pop() : browsers.shift(); + browsers.forEach(function(browser) { + browser.src = Ox.PATH + 'UI/png/browser' + browser.name.replace(' ', '') + '128.png'; + Ox.getFile(browser.src, function() { + ++counter == browsers.length && showIcons(); + }); + }); + function showIcons() { + var $box = Ox.$('
') + .css(Ox.extend({ + width: (browsers.length * 72) + 'px', + height: '72px' + }, css)) + .appendTo($screen); + browsers.forEach(function(browser, i) { + Ox.$('') + .attr({ + href: browser.url, + title: ( + browser.name == 'Chrome Frame' + ? Ox._('Install') : Ox._('Download') + ) + ' ' + browser.name + }) + .css({ + position: 'absolute', + left: (i * 72) + 'px', + width: '72px', + height: '72px' + }) + .append( + Ox.$('') + .attr({ + src: browser.src + }) + .css(Ox.extend({ + width: '64px', + height: '64px', + border: 0, + cursor: 'pointer' + }, css)) + .on({ + mousedown: function(e) { + e.preventDefault(); + } + }) + ) + .appendTo($box); + }); + } + } + + return { + hide: function() { + $('.OxLoadingScreen').animate({ + opacity: browserSupported ? 0 : 0.9 + }, 1000, function() { + if (browserSupported) { + clearInterval(loadingInterval); + loadingInterval = null; + $screen.remove(); + } else { + $screen.on({ + click: function() { + $screen.remove(); + } + }); + } + }); + }, + show: function() { + if (!loadingInterval) { + loadingInterval = setInterval(function() { + if ($icon) { + deg = (deg + 30) % 360; + $icon.css({ + MozTransform: 'rotate(' + deg + 'deg)', + OTransform: 'rotate(' + deg + 'deg)', + WebkitTransform: 'rotate(' + deg + 'deg)', + transform: 'rotate(' + deg + 'deg)' + }); + } + }, 83); + } + $screen.appendTo($body); + } + }; + + }()); + + Ox.documentReady(function() { + Ox.$('body').addClass('OxTheme' + Ox.toTitleCase(options.theme)); + options.showScreen && Ox.UI.LoadingScreen.show(); + }); + + loadUI(); + + function loadUI() { + + var path = Ox.PATH + 'UI/jquery/jquery.js?' + Ox.VERSION; + Ox.getFile(path, function() { + path = Ox.PATH + 'UI/json/UI.json?' + Ox.VERSION; + Ox.getJSON(path, function(data) { + var counter = 0, length; + if (!options.loadCSS) { + data.files = data.files.filter(function(file) { + return !Ox.endsWith(file, '.css'); + }); + } + if (!options.loadThemes) { + data.files = data.files.filter(function(file) { + return !Ox.contains(file, '/themes/'); + }); + } + length = data.files.length; + Ox.UI.IMAGES = data.images; + Ox.UI.THEMES = {}; + data.files.forEach(function(file) { + path = Ox.PATH + file + '?' + Ox.VERSION; + if (/\.jsonc$/.test(file)) { + Ox.getJSONC(path, function(data) { + var theme = /\/themes\/(\w+)\/json\//.exec(file)[1]; + Ox.UI.THEMES[theme] = data; + ++counter == length && initUI(); + }); + } else { + Ox.getFile(path, function() { + ++counter == length && initUI(); + }); + } + }); + }); + }); + + } + + function initUI() { + + Ox.documentReady(function() { + // fixme: is this the right place to do this? + $.browser.mozilla && Ox.$document.on('dragstart', function() { + return false; + }); + if (options.showScreen && options.hideScreen) { + Ox.UI.LoadingScreen.hide(); + } + callback(browserSupported); + }); + + } + + }; +} diff --git a/source/UI/js/Audio/AudioElement.js b/source/UI/js/Audio/AudioElement.js index 8e895864..02fce00d 100644 --- a/source/UI/js/Audio/AudioElement.js +++ b/source/UI/js/Audio/AudioElement.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.AudioElement AudioElement Object @@ -115,4 +116,4 @@ Ox.AudioElement = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/Audio/AudioPlayer.js b/source/UI/js/Audio/AudioPlayer.js index b6ea1de1..c6aa9097 100644 --- a/source/UI/js/Audio/AudioPlayer.js +++ b/source/UI/js/Audio/AudioPlayer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.AudioPlayer Generic Audio Player diff --git a/source/UI/js/Bar/Bar.js b/source/UI/js/Bar/Bar.js index 1af93baf..cba9c9e7 100644 --- a/source/UI/js/Bar/Bar.js +++ b/source/UI/js/Bar/Bar.js @@ -1,4 +1,6 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; + /*@ Ox.Bar Bar options Options object diff --git a/source/UI/js/Bar/Progressbar.js b/source/UI/js/Bar/Progressbar.js index e8e240f8..6cfc1013 100644 --- a/source/UI/js/Bar/Progressbar.js +++ b/source/UI/js/Bar/Progressbar.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Progressbar Progress Bar diff --git a/source/UI/js/Bar/Resizebar.js b/source/UI/js/Bar/Resizebar.js index 6613b9d0..71ca6a37 100644 --- a/source/UI/js/Bar/Resizebar.js +++ b/source/UI/js/Bar/Resizebar.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Resizebar Resizebar options Options object diff --git a/source/UI/js/Bar/Tabbar.js b/source/UI/js/Bar/Tabbar.js index c0436819..854e9689 100644 --- a/source/UI/js/Bar/Tabbar.js +++ b/source/UI/js/Bar/Tabbar.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Tabbar Tabbar options Options object diff --git a/source/UI/js/Calendar/Calendar.js b/source/UI/js/Calendar/Calendar.js index d8f21d2b..862a4178 100644 --- a/source/UI/js/Calendar/Calendar.js +++ b/source/UI/js/Calendar/Calendar.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Calendar Basic calendar object diff --git a/source/UI/js/Calendar/CalendarEditor.js b/source/UI/js/Calendar/CalendarEditor.js index beda628b..1502263a 100644 --- a/source/UI/js/Calendar/CalendarEditor.js +++ b/source/UI/js/Calendar/CalendarEditor.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.CalendarEditor Calendar Editor diff --git a/source/UI/js/Code/DocPage.js b/source/UI/js/Code/DocPage.js index 43714825..74740028 100644 --- a/source/UI/js/Code/DocPage.js +++ b/source/UI/js/Code/DocPage.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.DocPage DocPage diff --git a/source/UI/js/Code/DocPanel.js b/source/UI/js/Code/DocPanel.js index adab5131..fcf94313 100644 --- a/source/UI/js/Code/DocPanel.js +++ b/source/UI/js/Code/DocPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.DocPanel Documentation Panel diff --git a/source/UI/js/Code/ExamplePage.js b/source/UI/js/Code/ExamplePage.js index e731bf98..6e2c1946 100644 --- a/source/UI/js/Code/ExamplePage.js +++ b/source/UI/js/Code/ExamplePage.js @@ -1,4 +1,5 @@ 'use strict' +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ExamplePage Example Page diff --git a/source/UI/js/Code/ExamplePanel.js b/source/UI/js/Code/ExamplePanel.js index 1b8bd859..dd7cb80c 100644 --- a/source/UI/js/Code/ExamplePanel.js +++ b/source/UI/js/Code/ExamplePanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ExamplePanel Example Panel diff --git a/source/UI/js/Code/SourceViewer.js b/source/UI/js/Code/SourceViewer.js index bfadabc9..987f7ac7 100644 --- a/source/UI/js/Code/SourceViewer.js +++ b/source/UI/js/Code/SourceViewer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SourceViewer Source Viewer diff --git a/source/UI/js/Code/SyntaxHighlighter.js b/source/UI/js/Code/SyntaxHighlighter.js index 787ecb18..80fa707a 100644 --- a/source/UI/js/Code/SyntaxHighlighter.js +++ b/source/UI/js/Code/SyntaxHighlighter.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SyntaxHighlighter Syntax Highlighter diff --git a/source/UI/js/Core/API.js b/source/UI/js/Core/API.js index b9c06457..520c5d32 100644 --- a/source/UI/js/Core/API.js +++ b/source/UI/js/Core/API.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.API Remote API controller diff --git a/source/UI/js/Core/App.js b/source/UI/js/Core/App.js index da3c5220..c5ab0255 100644 --- a/source/UI/js/Core/App.js +++ b/source/UI/js/Core/App.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.App Basic application instance that communicates with a JSON API @@ -75,12 +76,12 @@ Ox.App = function(options) { screen: screen, time: (+new Date() - self.time) / 1000, window: { - innerHeight: window.innerHeight, - innerWidth: window.innerWidth, - outerHeight: window.outerHeight, - outerWidth: window.outerWidth, - screenLeft: window.screenLeft, - screenTop: window.screenTop + innerHeight: globalThis.innerHeight, + innerWidth: globalThis.innerWidth, + outerHeight: globalThis.outerHeight, + outerWidth: globalThis.outerWidth, + screenLeft: globalThis.screenLeft, + screenTop: globalThis.screenTop } }; } diff --git a/source/UI/js/Core/Clipboard.js b/source/UI/js/Core/Clipboard.js index 99f26706..ae460cd8 100644 --- a/source/UI/js/Core/Clipboard.js +++ b/source/UI/js/Core/Clipboard.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Clipboard Basic clipboard handler diff --git a/source/UI/js/Core/Container.js b/source/UI/js/Core/Container.js index 590646b4..29654fc2 100644 --- a/source/UI/js/Core/Container.js +++ b/source/UI/js/Core/Container.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; // fixme: wouldn't it be better to let the elements be, // rather then $element, $content, and potentially others, diff --git a/source/UI/js/Core/Cookies.js b/source/UI/js/Core/Cookies.js index 4da89ae7..faad4199 100644 --- a/source/UI/js/Core/Cookies.js +++ b/source/UI/js/Core/Cookies.js @@ -1,3 +1,5 @@ +import Ox from './../../../Ox/js/Namespace.js'; + Ox.Cookies = function() { var name, value, cookies; if (arguments.length == 1) { diff --git a/source/UI/js/Core/Element.js b/source/UI/js/Core/Element.js index df17ea0b..ef536858 100644 --- a/source/UI/js/Core/Element.js +++ b/source/UI/js/Core/Element.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; (function(_) { var noTooltipEvents = {}; diff --git a/source/UI/js/Core/Event.js b/source/UI/js/Core/Event.js index 31c1fee8..35c63ed9 100644 --- a/source/UI/js/Core/Event.js +++ b/source/UI/js/Core/Event.js @@ -1,3 +1,5 @@ +import Ox from './../../../Ox/js/Namespace.js'; + (function() { var chars = { diff --git a/source/UI/js/Core/Focus.js b/source/UI/js/Core/Focus.js index 6753c640..c213eba5 100644 --- a/source/UI/js/Core/Focus.js +++ b/source/UI/js/Core/Focus.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Focus Basic focus controller diff --git a/source/UI/js/Core/Fullscreen.js b/source/UI/js/Core/Fullscreen.js index 5b414a1b..527e6f60 100644 --- a/source/UI/js/Core/Fullscreen.js +++ b/source/UI/js/Core/Fullscreen.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Fullscreen Fullscreen controller diff --git a/source/UI/js/Core/GarbageCollection.js b/source/UI/js/Core/GarbageCollection.js index f3ebe46d..c8320afe 100644 --- a/source/UI/js/Core/GarbageCollection.js +++ b/source/UI/js/Core/GarbageCollection.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.GarbageCollection GarbageCollection diff --git a/source/UI/js/Core/History.js b/source/UI/js/Core/History.js index 423d467d..5c388c97 100644 --- a/source/UI/js/Core/History.js +++ b/source/UI/js/Core/History.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; Ox.History = function(options) { diff --git a/source/UI/js/Core/LoadingIcon.js b/source/UI/js/Core/LoadingIcon.js index c3f39da4..d1b44da4 100644 --- a/source/UI/js/Core/LoadingIcon.js +++ b/source/UI/js/Core/LoadingIcon.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.LoadingIcon Loading Icon Element diff --git a/source/UI/js/Core/LoadingScreen.js b/source/UI/js/Core/LoadingScreen.js index 025393f7..1b30f9ea 100644 --- a/source/UI/js/Core/LoadingScreen.js +++ b/source/UI/js/Core/LoadingScreen.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.LoadingScreen Simple loading screen @@ -79,4 +80,4 @@ Ox.LoadingScreen = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/Core/Request.js b/source/UI/js/Core/Request.js index b5980252..b2a43fba 100644 --- a/source/UI/js/Core/Request.js +++ b/source/UI/js/Core/Request.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Request Basic request controller diff --git a/source/UI/js/Core/Theme.js b/source/UI/js/Core/Theme.js index ccadb999..0a5593ea 100644 --- a/source/UI/js/Core/Theme.js +++ b/source/UI/js/Core/Theme.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Theme get/set theme diff --git a/source/UI/js/Core/UI.js b/source/UI/js/Core/UI.js index 00155a51..932ed3d7 100644 --- a/source/UI/js/Core/UI.js +++ b/source/UI/js/Core/UI.js @@ -1,4 +1,8 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; + +Ox.UI = Ox.UI || {}; +console.log("Ox", Ox, Ox.UI) Ox.documentReady(function() { // FIXME: use Ox.$foo everywhere! @@ -16,10 +20,11 @@ Ox.documentReady(function() { Ox.$elements = {}; //@ Ox.UI.DIMENSIONS Names of horizontal and vertical dimensions -Ox.DIMENSIONS = Ox.UI.DIMENSIONS = { +Ox.UI.DIMENSIONS = { horizontal: ['width', 'height'], vertical: ['height', 'width'] }; +Ox.DIMENSIONS = Ox.UI.DIMENSIONS; //@ Ox.UI.EDGES Names of horizontal and vertical edges Ox.EDGES = Ox.UI.EDGES = { diff --git a/source/UI/js/Core/URL.js b/source/UI/js/Core/URL.js index 14890354..2bc59465 100644 --- a/source/UI/js/Core/URL.js +++ b/source/UI/js/Core/URL.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.URL URL controller diff --git a/source/UI/js/Form/ArrayEditable.js b/source/UI/js/Form/ArrayEditable.js index c0ae9fbf..ec81fe58 100644 --- a/source/UI/js/Form/ArrayEditable.js +++ b/source/UI/js/Form/ArrayEditable.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ArrayEditable Array Editable diff --git a/source/UI/js/Form/ArrayInput.js b/source/UI/js/Form/ArrayInput.js index 96e25f1b..3faf52ea 100644 --- a/source/UI/js/Form/ArrayInput.js +++ b/source/UI/js/Form/ArrayInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ArrayInput Array input diff --git a/source/UI/js/Form/Button.js b/source/UI/js/Form/Button.js index f0d287e7..fd3eb264 100644 --- a/source/UI/js/Form/Button.js +++ b/source/UI/js/Form/Button.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Button Button Object diff --git a/source/UI/js/Form/ButtonGroup.js b/source/UI/js/Form/ButtonGroup.js index d8eb06ab..0fc00761 100644 --- a/source/UI/js/Form/ButtonGroup.js +++ b/source/UI/js/Form/ButtonGroup.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ButtonGroup ButtonGroup Object diff --git a/source/UI/js/Form/Checkbox.js b/source/UI/js/Form/Checkbox.js index 25889585..a9fe522e 100644 --- a/source/UI/js/Form/Checkbox.js +++ b/source/UI/js/Form/Checkbox.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Checkbox Checkbox Element diff --git a/source/UI/js/Form/CheckboxGroup.js b/source/UI/js/Form/CheckboxGroup.js index 140751a9..c9ec4c4c 100644 --- a/source/UI/js/Form/CheckboxGroup.js +++ b/source/UI/js/Form/CheckboxGroup.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.CheckboxGroup CheckboxGroup Object diff --git a/source/UI/js/Form/ColorInput.js b/source/UI/js/Form/ColorInput.js index bda1f443..06022110 100644 --- a/source/UI/js/Form/ColorInput.js +++ b/source/UI/js/Form/ColorInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ColorInput ColorInput Element diff --git a/source/UI/js/Form/ColorPicker.js b/source/UI/js/Form/ColorPicker.js index aa92d646..d646419c 100644 --- a/source/UI/js/Form/ColorPicker.js +++ b/source/UI/js/Form/ColorPicker.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ColorPicker ColorPicker Element diff --git a/source/UI/js/Form/DateInput.js b/source/UI/js/Form/DateInput.js index 3ce5f4da..8e6534e7 100644 --- a/source/UI/js/Form/DateInput.js +++ b/source/UI/js/Form/DateInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.DateInput DateInput Element diff --git a/source/UI/js/Form/DateTimeInput.js b/source/UI/js/Form/DateTimeInput.js index cd460bb0..117a5fa5 100644 --- a/source/UI/js/Form/DateTimeInput.js +++ b/source/UI/js/Form/DateTimeInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.DateTimeInput DateTimeInput Element diff --git a/source/UI/js/Form/Editable.js b/source/UI/js/Form/Editable.js index 5ea5076e..3b1937bc 100644 --- a/source/UI/js/Form/Editable.js +++ b/source/UI/js/Form/Editable.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Editable Editable element diff --git a/source/UI/js/Form/EditableContent.js b/source/UI/js/Form/EditableContent.js index a840909c..c6568f53 100644 --- a/source/UI/js/Form/EditableContent.js +++ b/source/UI/js/Form/EditableContent.js @@ -1,3 +1,5 @@ +import Ox from './../../../Ox/js/Namespace.js'; + Ox.EditableContent = function(options, self) { self = self || {}; diff --git a/source/UI/js/Form/FileButton.js b/source/UI/js/Form/FileButton.js index fc15de73..858e9bb0 100644 --- a/source/UI/js/Form/FileButton.js +++ b/source/UI/js/Form/FileButton.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.FileButton File Button diff --git a/source/UI/js/Form/FileInput.js b/source/UI/js/Form/FileInput.js index 02cbd940..fa0a5586 100644 --- a/source/UI/js/Form/FileInput.js +++ b/source/UI/js/Form/FileInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.FileInput File Input diff --git a/source/UI/js/Form/Filter.js b/source/UI/js/Form/Filter.js index f3215ffe..a9c655ee 100644 --- a/source/UI/js/Form/Filter.js +++ b/source/UI/js/Form/Filter.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Filter Filter Object diff --git a/source/UI/js/Form/Form.js b/source/UI/js/Form/Form.js index 3aeea712..ced5a060 100644 --- a/source/UI/js/Form/Form.js +++ b/source/UI/js/Form/Form.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Form Form Object diff --git a/source/UI/js/Form/FormElementGroup.js b/source/UI/js/Form/FormElementGroup.js index 5f9c0eaf..78d8146a 100644 --- a/source/UI/js/Form/FormElementGroup.js +++ b/source/UI/js/Form/FormElementGroup.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.FormElementGroup FormElementGroup Element diff --git a/source/UI/js/Form/FormItem.js b/source/UI/js/Form/FormItem.js index baff0de3..f152dacb 100644 --- a/source/UI/js/Form/FormItem.js +++ b/source/UI/js/Form/FormItem.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.FormItem FormItem Element, wraps form element with an error message diff --git a/source/UI/js/Form/FormPanel.js b/source/UI/js/Form/FormPanel.js index 9eb7efe9..55b75021 100644 --- a/source/UI/js/Form/FormPanel.js +++ b/source/UI/js/Form/FormPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.FormPanel Form Panel diff --git a/source/UI/js/Form/Input.js b/source/UI/js/Form/Input.js index 488f042b..f84d5cee 100644 --- a/source/UI/js/Form/Input.js +++ b/source/UI/js/Form/Input.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Input Input Element diff --git a/source/UI/js/Form/InputGroup.js b/source/UI/js/Form/InputGroup.js index b454cb91..30100068 100644 --- a/source/UI/js/Form/InputGroup.js +++ b/source/UI/js/Form/InputGroup.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.InputGroup InputGroup Object diff --git a/source/UI/js/Form/InsertHTMLDialog.js b/source/UI/js/Form/InsertHTMLDialog.js index c637ec8d..2a87c085 100644 --- a/source/UI/js/Form/InsertHTMLDialog.js +++ b/source/UI/js/Form/InsertHTMLDialog.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.InsertHTMLDialog Insert HTML Dialog diff --git a/source/UI/js/Form/Label.js b/source/UI/js/Form/Label.js index f8e836ad..8c74ba52 100644 --- a/source/UI/js/Form/Label.js +++ b/source/UI/js/Form/Label.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Label Label element diff --git a/source/UI/js/Form/ObjectArrayInput.js b/source/UI/js/Form/ObjectArrayInput.js index 423c478d..14b68ba3 100644 --- a/source/UI/js/Form/ObjectArrayInput.js +++ b/source/UI/js/Form/ObjectArrayInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ObjectArrayInput Object Array Input diff --git a/source/UI/js/Form/ObjectInput.js b/source/UI/js/Form/ObjectInput.js index 9d223f30..3f271d86 100644 --- a/source/UI/js/Form/ObjectInput.js +++ b/source/UI/js/Form/ObjectInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ObjectInput Object Input diff --git a/source/UI/js/Form/OptionGroup.js b/source/UI/js/Form/OptionGroup.js index 184f349e..53ede7f0 100644 --- a/source/UI/js/Form/OptionGroup.js +++ b/source/UI/js/Form/OptionGroup.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.OptionGroup OptionGroup diff --git a/source/UI/js/Form/Picker.js b/source/UI/js/Form/Picker.js index f47a38c8..584c0ff3 100644 --- a/source/UI/js/Form/Picker.js +++ b/source/UI/js/Form/Picker.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Picker Picker Object diff --git a/source/UI/js/Form/PlaceInput.js b/source/UI/js/Form/PlaceInput.js index 8d26649a..0443143d 100644 --- a/source/UI/js/Form/PlaceInput.js +++ b/source/UI/js/Form/PlaceInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.PlaceInput PlaceInput Object diff --git a/source/UI/js/Form/PlacePicker.js b/source/UI/js/Form/PlacePicker.js index 4c906d1d..5e37060b 100644 --- a/source/UI/js/Form/PlacePicker.js +++ b/source/UI/js/Form/PlacePicker.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.PlacePicker PlacePicker Object diff --git a/source/UI/js/Form/Range.js b/source/UI/js/Form/Range.js index 97bb7a46..47fcf0e7 100644 --- a/source/UI/js/Form/Range.js +++ b/source/UI/js/Form/Range.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Range Range Object diff --git a/source/UI/js/Form/Select.js b/source/UI/js/Form/Select.js index 6e2f98b9..eb1f620a 100644 --- a/source/UI/js/Form/Select.js +++ b/source/UI/js/Form/Select.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Select Select Object diff --git a/source/UI/js/Form/SelectInput.js b/source/UI/js/Form/SelectInput.js index 6e4a1ce2..c80a3709 100644 --- a/source/UI/js/Form/SelectInput.js +++ b/source/UI/js/Form/SelectInput.js @@ -1,4 +1,6 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; + //FIXME: does not work without options /*@ Ox.SelectInput Select Input diff --git a/source/UI/js/Form/Spreadsheet.js b/source/UI/js/Form/Spreadsheet.js index 45e2baf6..9b313cd7 100644 --- a/source/UI/js/Form/Spreadsheet.js +++ b/source/UI/js/Form/Spreadsheet.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Spreadsheet Spreadsheet diff --git a/source/UI/js/Form/TimeInput.js b/source/UI/js/Form/TimeInput.js index 4faed77e..cfc50acd 100644 --- a/source/UI/js/Form/TimeInput.js +++ b/source/UI/js/Form/TimeInput.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.TimeInput TimeInput Object diff --git a/source/UI/js/Image/ImageElement.js b/source/UI/js/Image/ImageElement.js index 66cb9719..20fabcc6 100644 --- a/source/UI/js/Image/ImageElement.js +++ b/source/UI/js/Image/ImageElement.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ImageElement Simple image element with loading indication @@ -82,4 +83,4 @@ Ox.ImageElement = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/Image/ImageViewer.js b/source/UI/js/Image/ImageViewer.js index 5e895127..ed485f03 100644 --- a/source/UI/js/Image/ImageViewer.js +++ b/source/UI/js/Image/ImageViewer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ImageViewer Image Viewer diff --git a/source/UI/js/List/Chart.js b/source/UI/js/List/Chart.js index 11933abf..6b198209 100644 --- a/source/UI/js/List/Chart.js +++ b/source/UI/js/List/Chart.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Chart Bar Chart diff --git a/source/UI/js/List/ColumnList.js b/source/UI/js/List/ColumnList.js index 5222028f..c1c8421e 100644 --- a/source/UI/js/List/ColumnList.js +++ b/source/UI/js/List/ColumnList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ColumnList Column List Widget @@ -209,4 +210,4 @@ Ox.ColumnList = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/List/CustomList.js b/source/UI/js/List/CustomList.js index 93d06324..363cd2f4 100644 --- a/source/UI/js/List/CustomList.js +++ b/source/UI/js/List/CustomList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.CustomList Custom List Widget diff --git a/source/UI/js/List/IconItem.js b/source/UI/js/List/IconItem.js index 94bc6538..a0686dd7 100644 --- a/source/UI/js/List/IconItem.js +++ b/source/UI/js/List/IconItem.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.IconItem IconItem Object diff --git a/source/UI/js/List/IconList.js b/source/UI/js/List/IconList.js index ebed732e..a95eab7a 100644 --- a/source/UI/js/List/IconList.js +++ b/source/UI/js/List/IconList.js @@ -1,4 +1,6 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; + /*@ Ox.IconList IconList Object options Options object diff --git a/source/UI/js/List/InfoList.js b/source/UI/js/List/InfoList.js index b3f5bf27..2ebdd219 100644 --- a/source/UI/js/List/InfoList.js +++ b/source/UI/js/List/InfoList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.InfoList Info List diff --git a/source/UI/js/List/List.js b/source/UI/js/List/List.js index 0c0f9bb1..f38af749 100644 --- a/source/UI/js/List/List.js +++ b/source/UI/js/List/List.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.List List constructor diff --git a/source/UI/js/List/ListItem.js b/source/UI/js/List/ListItem.js index 5b5ff598..bacbb0fe 100644 --- a/source/UI/js/List/ListItem.js +++ b/source/UI/js/List/ListItem.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.ListItem ListItem Object diff --git a/source/UI/js/List/SortList.js b/source/UI/js/List/SortList.js index c5b70daa..8ada0107 100644 --- a/source/UI/js/List/SortList.js +++ b/source/UI/js/List/SortList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SortList Sortable List @@ -61,4 +62,4 @@ Ox.SortList = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/List/TableList.js b/source/UI/js/List/TableList.js index d72a7f06..7061d9a8 100644 --- a/source/UI/js/List/TableList.js +++ b/source/UI/js/List/TableList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.TableList TableList Widget diff --git a/source/UI/js/List/TreeList.js b/source/UI/js/List/TreeList.js index 8ab9eb40..f37c13f9 100644 --- a/source/UI/js/List/TreeList.js +++ b/source/UI/js/List/TreeList.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.TreeList Tree List diff --git a/source/UI/js/Map/Map.js b/source/UI/js/Map/Map.js index 9f5c4392..e57b1ff8 100644 --- a/source/UI/js/Map/Map.js +++ b/source/UI/js/Map/Map.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Map Basic map object diff --git a/source/UI/js/Map/MapEditor.js b/source/UI/js/Map/MapEditor.js index 64b36988..52d096fb 100644 --- a/source/UI/js/Map/MapEditor.js +++ b/source/UI/js/Map/MapEditor.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapEditor Map Editor diff --git a/source/UI/js/Map/MapImage.js b/source/UI/js/Map/MapImage.js index 91edc02f..c340f8f6 100644 --- a/source/UI/js/Map/MapImage.js +++ b/source/UI/js/Map/MapImage.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapImage MapImage Object diff --git a/source/UI/js/Map/MapMarker.js b/source/UI/js/Map/MapMarker.js index 10eb69eb..7b45681f 100644 --- a/source/UI/js/Map/MapMarker.js +++ b/source/UI/js/Map/MapMarker.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapMarker MapMarker diff --git a/source/UI/js/Map/MapMarkerImage.js b/source/UI/js/Map/MapMarkerImage.js index 51063aec..fc94554b 100644 --- a/source/UI/js/Map/MapMarkerImage.js +++ b/source/UI/js/Map/MapMarkerImage.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapMarkerImage MapMarkerImage Object diff --git a/source/UI/js/Map/MapPlace.js b/source/UI/js/Map/MapPlace.js index 58c3e254..48f66c45 100644 --- a/source/UI/js/Map/MapPlace.js +++ b/source/UI/js/Map/MapPlace.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapPlace MapPlace Object diff --git a/source/UI/js/Map/MapRectangle.js b/source/UI/js/Map/MapRectangle.js index ac43c923..2f53bb2b 100644 --- a/source/UI/js/Map/MapRectangle.js +++ b/source/UI/js/Map/MapRectangle.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapRectangle MapRectangle Object diff --git a/source/UI/js/Map/MapRectangleMarker.js b/source/UI/js/Map/MapRectangleMarker.js index 7b7f252d..0de1478c 100644 --- a/source/UI/js/Map/MapRectangleMarker.js +++ b/source/UI/js/Map/MapRectangleMarker.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MapRectangleMarker MapRectangleMarker Object diff --git a/source/UI/js/Menu/MainMenu.js b/source/UI/js/Menu/MainMenu.js index aa17772b..17a69f53 100644 --- a/source/UI/js/Menu/MainMenu.js +++ b/source/UI/js/Menu/MainMenu.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MainMenu MainMenu Object diff --git a/source/UI/js/Menu/Menu.js b/source/UI/js/Menu/Menu.js index dafa3aab..7044ead4 100644 --- a/source/UI/js/Menu/Menu.js +++ b/source/UI/js/Menu/Menu.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Menu Menu Object diff --git a/source/UI/js/Menu/MenuButton.js b/source/UI/js/Menu/MenuButton.js index c40ba7a1..c2c1cc4c 100644 --- a/source/UI/js/Menu/MenuButton.js +++ b/source/UI/js/Menu/MenuButton.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MenuButton Menu Button diff --git a/source/UI/js/Menu/MenuItem.js b/source/UI/js/Menu/MenuItem.js index 8d8479e1..48f7d8dc 100644 --- a/source/UI/js/Menu/MenuItem.js +++ b/source/UI/js/Menu/MenuItem.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.MenuItem MenuItem Object diff --git a/source/UI/js/Panel/CollapsePanel.js b/source/UI/js/Panel/CollapsePanel.js index 41e184aa..7b0fb677 100644 --- a/source/UI/js/Panel/CollapsePanel.js +++ b/source/UI/js/Panel/CollapsePanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.CollapsePanel CollapsePanel Object diff --git a/source/UI/js/Panel/SlidePanel.js b/source/UI/js/Panel/SlidePanel.js index 0d622393..121da126 100644 --- a/source/UI/js/Panel/SlidePanel.js +++ b/source/UI/js/Panel/SlidePanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; Ox.SlidePanel = function(options, self) { @@ -70,4 +71,4 @@ Ox.SlidePanel = function(options, self) { return that; -}; \ No newline at end of file +}; diff --git a/source/UI/js/Panel/SplitPanel.js b/source/UI/js/Panel/SplitPanel.js index ae85ed4a..c4c4ea0d 100644 --- a/source/UI/js/Panel/SplitPanel.js +++ b/source/UI/js/Panel/SplitPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SplitPanel SpliPanel Object diff --git a/source/UI/js/Panel/TabPanel.js b/source/UI/js/Panel/TabPanel.js index 346d44e8..5582437a 100644 --- a/source/UI/js/Panel/TabPanel.js +++ b/source/UI/js/Panel/TabPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.TabPanel Tabbed panel diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 4a5c4243..44c6f720 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.AnnotationFolder AnnotationFolder Object diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index f80121bd..ee1acf84 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; // FIXME: should be Ox.AnnotationFolders diff --git a/source/UI/js/Video/BlockVideoTimeline.js b/source/UI/js/Video/BlockVideoTimeline.js index 1f0945ce..720a6ac3 100644 --- a/source/UI/js/Video/BlockVideoTimeline.js +++ b/source/UI/js/Video/BlockVideoTimeline.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.BlockVideoTimeline Block Video Timeline diff --git a/source/UI/js/Video/ClipPanel.js b/source/UI/js/Video/ClipPanel.js index ea9eb562..cf96f619 100644 --- a/source/UI/js/Video/ClipPanel.js +++ b/source/UI/js/Video/ClipPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; Ox.ClipPanel = function(options, self) { diff --git a/source/UI/js/Video/LargeVideoTimeline.js b/source/UI/js/Video/LargeVideoTimeline.js index 2c9532f9..7bfad09e 100644 --- a/source/UI/js/Video/LargeVideoTimeline.js +++ b/source/UI/js/Video/LargeVideoTimeline.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.LargeVideoTimeline LargeTimeline Object diff --git a/source/UI/js/Video/SmallVideoTimeline.js b/source/UI/js/Video/SmallVideoTimeline.js index c6756dc5..7f7152be 100644 --- a/source/UI/js/Video/SmallVideoTimeline.js +++ b/source/UI/js/Video/SmallVideoTimeline.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SmallVideoTimeline Small video timeline diff --git a/source/UI/js/Video/SmallVideoTimelineImage.js b/source/UI/js/Video/SmallVideoTimelineImage.js index 6e303b64..1f174e8c 100644 --- a/source/UI/js/Video/SmallVideoTimelineImage.js +++ b/source/UI/js/Video/SmallVideoTimelineImage.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SmallVideoTimelineImage Small Video Timeline Image diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index fd0bdd73..14f3853f 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoAnnotationPanel VideoAnnotationPanel Object diff --git a/source/UI/js/Video/VideoEditPanel.js b/source/UI/js/Video/VideoEditPanel.js index cc40507e..0438092b 100644 --- a/source/UI/js/Video/VideoEditPanel.js +++ b/source/UI/js/Video/VideoEditPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; Ox.VideoEditPanel = function(options, self) { diff --git a/source/UI/js/Video/VideoElement.js b/source/UI/js/Video/VideoElement.js index c6e279b8..3dbe0441 100644 --- a/source/UI/js/Video/VideoElement.js +++ b/source/UI/js/Video/VideoElement.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoElement VideoElement Object diff --git a/source/UI/js/Video/VideoPlayer.js b/source/UI/js/Video/VideoPlayer.js index 7d767813..1186fdca 100644 --- a/source/UI/js/Video/VideoPlayer.js +++ b/source/UI/js/Video/VideoPlayer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoPlayer Generic Video Player diff --git a/source/UI/js/Video/VideoPlayerMenu.js b/source/UI/js/Video/VideoPlayerMenu.js index 783eb363..d45e68ae 100644 --- a/source/UI/js/Video/VideoPlayerMenu.js +++ b/source/UI/js/Video/VideoPlayerMenu.js @@ -1,3 +1,5 @@ +import Ox from './../../../Ox/js/Namespace.js'; + Ox.VideoPlayerMenu = function(options, self) { self = self || {}; diff --git a/source/UI/js/Video/VideoPlayerPanel.js b/source/UI/js/Video/VideoPlayerPanel.js index 336277e4..ef4ba74f 100644 --- a/source/UI/js/Video/VideoPlayerPanel.js +++ b/source/UI/js/Video/VideoPlayerPanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoPlayerPanel VideoPlayerPanel Object diff --git a/source/UI/js/Video/VideoPreview.js b/source/UI/js/Video/VideoPreview.js index 63db6259..5e401b0d 100644 --- a/source/UI/js/Video/VideoPreview.js +++ b/source/UI/js/Video/VideoPreview.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoPreview Video Preview diff --git a/source/UI/js/Video/VideoTimelinePanel.js b/source/UI/js/Video/VideoTimelinePanel.js index 917b32c3..fc046b14 100644 --- a/source/UI/js/Video/VideoTimelinePanel.js +++ b/source/UI/js/Video/VideoTimelinePanel.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoTimelinePanel Video timeline panel diff --git a/source/UI/js/Video/VideoTimelinePlayer.js b/source/UI/js/Video/VideoTimelinePlayer.js index dacf864d..85d9de19 100644 --- a/source/UI/js/Video/VideoTimelinePlayer.js +++ b/source/UI/js/Video/VideoTimelinePlayer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.VideoTimelinePlayer Video Timeline Player diff --git a/source/UI/js/Window/Dialog.js b/source/UI/js/Window/Dialog.js index c027db68..32158c56 100644 --- a/source/UI/js/Window/Dialog.js +++ b/source/UI/js/Window/Dialog.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Dialog Dialog object diff --git a/source/UI/js/Window/Layer.js b/source/UI/js/Window/Layer.js index bf47735f..91cca8e5 100644 --- a/source/UI/js/Window/Layer.js +++ b/source/UI/js/Window/Layer.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Layer Background layer for dialogs and menus diff --git a/source/UI/js/Window/SortDialog.js b/source/UI/js/Window/SortDialog.js index b1c8bd24..896762a9 100644 --- a/source/UI/js/Window/SortDialog.js +++ b/source/UI/js/Window/SortDialog.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.SortDialog Dialog with Sortable List diff --git a/source/UI/js/Window/Tooltip.js b/source/UI/js/Window/Tooltip.js index 01e8ecba..de9976ca 100644 --- a/source/UI/js/Window/Tooltip.js +++ b/source/UI/js/Window/Tooltip.js @@ -1,4 +1,5 @@ 'use strict'; +import Ox from './../../../Ox/js/Namespace.js'; /*@ Ox.Tooltip Tooltip Object @@ -83,9 +84,9 @@ Ox.Tooltip = function(options, self) { width = that.width(); height = that.height(); left = Ox.limit( - self.x - Math.round(width / 2), 0, window.innerWidth - width - 8 + self.x - Math.round(width / 2), 0, globalThis.innerWidth - width - 8 ); - top = self.y > window.innerHeight - height - 16 + top = self.y > globalThis.innerHeight - height - 16 ? self.y - 16 - height : self.y + 16; that.css({