diff --git a/examples/forms/editable_elements/index.html b/examples/forms/editable_elements/index.html index 6dd8ae09..6d9f6bec 100644 --- a/examples/forms/editable_elements/index.html +++ b/examples/forms/editable_elements/index.html @@ -6,7 +6,7 @@ - + diff --git a/examples/images/image_manipulation/index.html b/examples/images/image_manipulation/index.html index da1ed3a9..1a67a201 100644 --- a/examples/images/image_manipulation/index.html +++ b/examples/images/image_manipulation/index.html @@ -11,4 +11,4 @@ - + \ No newline at end of file diff --git a/examples/ui/symbols/index.html b/examples/ui/symbols/index.html index f9cbd035..ecc5e32c 100644 --- a/examples/ui/symbols/index.html +++ b/examples/ui/symbols/index.html @@ -11,4 +11,4 @@ - + \ No newline at end of file diff --git a/index.html b/index.html index d9c9d3dc..7fea7595 100644 --- a/index.html +++ b/index.html @@ -8,4 +8,4 @@ - + \ No newline at end of file diff --git a/index.js b/index.js index f390037f..9625bf32 100644 --- a/index.js +++ b/index.js @@ -251,13 +251,10 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test( Ox.get('readme/index/' + id + '.html' + q, function(html) { app.data.html[id] = html; if (Ox.len(app.data.html) == app.data.pages.length) { - /* navigator.onLine ? Ox.getJSON(url, function(data) { app.data.downloads = data; callback(); }) : callback(); - */ - callback() } }); }); diff --git a/package.json b/package.json deleted file mode 100644 index 0b8332b1..00000000 --- a/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@0x2620/oxjs", - "version": "1.0.0", - "main": "min/Ox/Ox.js", - "module": "min/Ox/Ox.js", - "browser": "min/Ox.js", - "type": "module", - "devDependencies": { - "@rollup/plugin-node-resolve": "^16.0.3", - "@rollup/plugin-terser": "^0.4.4", - "rollup": "^2.79.2", - "rollup-plugin-copy": "^3.5.0" - }, - "scripts": { - "build": "rollup -c", - "dev": "rollup -c -w" - }, - "files": [ - "min" - ] -} diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index 9204cc9f..00000000 --- a/rollup.config.js +++ /dev/null @@ -1,261 +0,0 @@ -import resolve from '@rollup/plugin-node-resolve'; -import terser from '@rollup/plugin-terser'; -import copy from 'rollup-plugin-copy'; -import fs from 'fs'; -import path from 'path'; - -import { version } from './package.json'; - -function install(options = {}) { - const sourcePath = options.sourcePath || 'source/'; - const devPath = options.devPath || 'dev/'; - const minPath = options.minPath || 'min/'; - - // Helper: parse CSS with variable substitutions - function parseCss(css, values) { - return css.replace(/\$(\w+)(\[\d+\])?/g, (match, key, index) => { - let value = values[key]; - if (index) { - const idx = parseInt(index.slice(1, -1)); - value = value[idx]; - } - - if (typeof value === 'string') { - return value; - } - - // Handle numeric arrays (e.g., RGB or RGBA) - if (Array.isArray(value[0])) { - // Already nested arrays - return value - .map(vals => `rgb${vals.length === 4 ? 'a' : ''}(${vals.join(', ')})`) - .join(', '); - } else { - // Single array - return `rgb${value.length === 4 ? 'a' : ''}(${value.join(', ')})`; - } - }); - } - - function readJsonc(filePath) { - const jsoncText = fs.readFileSync(filePath, 'utf-8'); - let text = jsoncText.replace(/\/\/.*$/gm, ''); // Remove single-line comments - text = text.replace(/\/\*[\s\S]*?\*\//g, ''); // Remove multi-line comments - text = text.replace(/,\s*(?=[}\]])/g, ''); // Remove trailing commas in objects and arrays - - return JSON.parse(text); - } - - function writeFile(filePath, data) { - fs.mkdirSync(path.dirname(filePath), { recursive: true }); - fs.writeFileSync(filePath, typeof data === 'string' ? data : data.toString('utf-8')); - return data.length; - } - - function formatColor(rgb) { - return '#' + rgb.map(c => c.toString(16).padStart(2, '0').toUpperCase()).join(''); - } - - function writeBundle() { - const themesDir = path.join(sourcePath, 'UI', 'themes'); - const themes = fs.readdirSync(themesDir).filter(name => !['.', '_'].includes(name[0])); - - const themeData = {}; - for (const theme of themes) { - const themeJsonPath = path.join(themesDir, theme, 'json', 'theme.jsonc'); - themeData[theme] = readJsonc(themeJsonPath); - themeData[theme].themeClass = 'OxTheme' + theme[0].toUpperCase() + theme.slice(1); - } - - const cssPath = path.join(sourcePath, 'UI', 'css', 'theme.css'); - const css = fs.readFileSync(cssPath, 'utf-8') - - for (const theme of themes) { - let themeCss = parseCss(css, themeData[theme]); - themeCss = themeCss.replace(/\.png\)/g, `.png?${version})`); - - writeFile(path.join(devPath, 'UI', 'themes', theme, 'css', 'theme.css'), themeCss); - writeFile(path.join(minPath, 'UI', 'themes', theme, 'css', 'theme.css'), themeCss); - } - - const uiImages = {} - const svgDir = path.join(sourcePath, 'UI', 'svg'); - const svgs = fs.readdirSync(svgDir).filter(name => !['.', '_'].includes(name[0])); - for (const filename of svgs) { - const svgPath = path.join(svgDir, filename); - let svg = fs.readFileSync(svgPath, 'utf-8') - svg = svg.replace(/\n\s*/g, ''); - svg = svg.replace(//g, ''); - uiImages[filename.slice(0, -4)] = svg - if (filename.startsWith('symbolLoading')) { - for (const theme of themes) { - let themeSVG = svg.replace(/#808080/g, formatColor(themeData[theme]['symbolDefaultColor'])) - writeFile(path.join(devPath, 'UI', 'themes', theme, 'svg', filename), themeSVG); - writeFile(path.join(minPath, 'UI', 'themes', theme, 'svg', filename), themeSVG); - } - } - } - } - - return { - name: 'install-plugin', - writeBundle - }; -} - -function symlinkDevPlugin(options = {}) { - const sourcePath = options.source || 'source'; - const devPath = options.dev || 'dev'; - - function shouldInclude(filePath, filename) { - if (filePath.includes('_')) return false; - if (filename.startsWith('.') || filename.startsWith('_')) return false; - if (filename.endsWith('~')) return false; - if (filePath.includes(`${path.sep}UI${path.sep}svg`)) return false; - return true; - } - - function ensureDir(dir) { - fs.mkdirSync(dir, { recursive: true }); - } - - function removeIfExists(target) { - if (fs.existsSync(target) || fs.lstatSync(target, { throwIfNoEntry: false })) { - try { - const stat = fs.lstatSync(target); - if (stat.isSymbolicLink()) { - fs.unlinkSync(target); - } else if (stat.isDirectory()) { - fs.rmdirSync(target); - } else { - console.log("not symlink, what to do?", target) - } - } catch (err) { - // ignore if it doesn't exist anymore - } - } - } - - function walk(dir) { - const entries = fs.readdirSync(dir, { withFileTypes: true }); - - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - - if (entry.isDirectory()) { - walk(fullPath); - } else if (entry.isFile()) { - if (!shouldInclude(dir, entry.name)) continue; - - const relativePath = path.relative(sourcePath, dir); - const targetDir = path.join(devPath, relativePath); - const targetPath = path.join(targetDir, entry.name); - const relativeSource = path.relative(targetDir, fullPath); - ensureDir(targetDir); - removeIfExists(targetPath); - if (!fs.existsSync(targetPath)) { - fs.symlinkSync(relativeSource, targetPath); - } - } - } - } - - return { - name: 'symlink-dev-plugin', - - writeBundle() { - if (!fs.existsSync(sourcePath)) { - this.warn(`Source path "${sourcePath}" does not exist.`); - return; - } - - walk(sourcePath); - } - }; -} - - -// TBD: get version -// TBD: add ' OxJS %s (c) %s 0x2620, dual-licensed GPL/MIT, see https://oxjs.org for details ' % (version, year) -// -/* - - // kind of inline now, but missing cache busting! - # Ox.UI CSS - css = read_text(source_path + 'UI/css/UI.css') - css = css.replace('$import', '\n'.join([ - '@import url("../themes/%s/css/theme.css?%s");' % (theme, version) for theme in themes - ])) - write_file('%sUI/css/UI.css' % dev_path, css) - write_file('%sUI/css/UI.css' % min_path, css) - - # Ox.UI SVGs - ui_images = {} - path = source_path + 'UI/svg/' - for filename in [filename for filename in os.listdir(path) if not filename[0] in '._']: - svg = read_text(path + filename) - svg = re.sub(r'\n\s*', '', svg) - svg = re.sub(r'', '', svg) - # end fix - ui_images[filename[:-4]] = svg - if filename.startswith('symbolLoading'): - for theme in themes: - theme_svg = re.sub(r'#808080', format_hex(theme_data[theme]['symbolDefaultColor']), svg) - write_file('%sUI/themes/%s/svg/%s' % (dev_path, theme, filename), theme_svg) - write_file('%sUI/themes/%s/svg/%s' % (min_path, theme, filename), theme_svg) - - write_file(min_path + 'UI/json/UI.json', json.dumps({ - 'files': sorted(ui_files['min']), - 'images': ui_images - }, sort_keys=True)) - - js = re.sub( - r'Ox.LOCALES = \{\}', - 'Ox.LOCALES = ' + json.dumps(locales, indent=4, sort_keys=True), - js - ) - js = re.sub( - r"Ox.VERSION = '([\d\.]+)'", - "Ox.VERSION = '%s'" % version, - js - ) -*/ - - -export default { - input: { - 'Ox': 'source/Ox/Ox.js', - 'UI': 'source/UI/UI.js', - 'Unicode': 'source/Unicode/Unicode.js', - 'Geo': 'source/Geo/Geo.js', - 'Image': 'source/Image/Image.js', - }, - output: { - dir: 'min', - format: 'es', - entryFileNames: '[name]/[name].js', - chunkFileNames: '[name]/[name].js', - }, - plugins: [ - resolve(), - terser(), - copy({ - targets: [ - { src: "source/Ox.js", dest: 'min/' }, - { src: "source/Ox/json/locale.*.json", dest: 'min/Ox/json' }, - { src: "source/UI/css/*.css", dest: 'min/UI/css' }, - { src: "source/UI/json/locale.*.json", dest: 'min/UI/json' }, - { src: "source/UI/json/UI.json", dest: 'min/UI/json/' }, // FIXME: this one should be genreated first - { src: "source/UI/png", dest: 'min/UI/' }, - { src: "source/UI/jquery/*.js", dest: 'min/UI/jquery' }, - { src: "source/UI/themes", dest: 'min/UI' }, - { src: "source/Unicode/json/*.json", dest: 'min/Unicode/json' }, - { src: "source/Geo/json/*.json", dest: 'min/Geo/json' }, - { src: "source/Geo/png/flags", dest: 'min/Geo/png/'} - ], - hook: 'writeBundle' - }), - install(), - symlinkDevPlugin() - ] -}; diff --git a/source/Geo/Geo.js b/source/Geo/Geo.js index 5e3c59af..5cf54ce3 100644 --- a/source/Geo/Geo.js +++ b/source/Geo/Geo.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../Ox/js/Ox.Global.js'; Ox.load.Geo = function(options, callback) { diff --git a/source/Image/Image.js b/source/Image/Image.js index 7026e2c3..9b905fa8 100644 --- a/source/Image/Image.js +++ b/source/Image/Image.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../Ox/js/Ox.Global.js'; Ox.load.Image = function(options, callback) { diff --git a/source/Ox.js b/source/Ox.js index f6632517..675fbed3 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -1,28 +1,106 @@ 'use strict'; -(async function(global) { - const initLoad = []; +(function(global) { + global.Ox = { - load: function(...args) { - initLoad.push(args) + + load: function() { + + var args = arguments, + callback = args[args.length - 1], + path = getPath(), + regexp = /dev\/$/, + version = +new Date(); + + if (args[0] === true && regexp.test(path)) { + path = path.replace(regexp, 'min/'); + loadScript('Ox.js', function() { + Ox.MODE = 'min'; + Ox.PATH = path; + Ox.load.apply(null, Ox.slice(args, 1)); + }); + } else { + loadJSON(function(data) { + var previousOx = global.Ox; + version = data.version; + loadScriptsSerial(data.files, function() { + Ox.LOCALES = data.locales; + Ox.VERSION = data.version; + Ox.forEach(previousOx, function(value, key) { + if (Ox.isUndefined(Ox[key])) { + Ox[key] = value; + } + }); + Ox.load.apply(null, args); + }); + }); + } + + function getPath() { + var index, regexp = /Ox\.js(\?[\d\.]+|)$/, + scripts = document.getElementsByTagName('script'), src; + for (index = scripts.length - 1; index >= 0; index--) { + src = scripts[index].src; + if (regexp.test(src)) { + return src.replace(regexp, ''); + } + } + } + + function loadJSON(callback) { + var request = new XMLHttpRequest(), + time = +new Date(); + request.open('GET', path + 'Ox/json/Ox.json?' + time, true); + request.onreadystatechange = function() { + if (request.readyState == 4) { + if (request.status == 200) { + callback(JSON.parse(request.responseText)); + } + } + }; + request.send(); + } + + function loadScript(script, callback) { + var element = document.createElement('script'), + head = document.head + || document.getElementsByTagName('head')[0] + || document.documentElement; + element.onload = element.onreadystatechange = function() { + if ( + !this.readyState + || this.readyState == 'loaded' + || this.readyState == 'complete' + ) { + callback(); + } + } + element.src = path + script + '?' + version; + element.type = 'text/javascript'; + head.appendChild(element); + } + + function loadScriptsParallel(scripts, callback) { + var i = 0, n = scripts.length; + while (scripts.length) { + loadScript(scripts.shift(), function() { + ++i == n && callback(); + }); + } + } + + function loadScriptsSerial(scripts, callback) { + loadScriptsParallel(scripts.shift(), function() { + if (scripts.length) { + loadScriptsSerial(scripts, callback); + } else { + callback(); + } + }); + } + } + }; - function getPath() { - var index, regexp = /Ox\.js(\?[\d\.]+|)$/, - scripts = document.getElementsByTagName('script'), src; - for (index = scripts.length - 1; index >= 0; index--) { - src = scripts[index].src; - if (regexp.test(src)) { - return src.replace(regexp, ''); - } - } - } - - const module = await import('./Ox/Ox.js'); - if (Ox.MODE == 'source') { - Ox.MODE = 'dev'; - } - console.log("Ox was loaded", Ox.MODE, Ox.PATH); - initLoad.forEach((args) => global.Ox.load.apply(null, args)) -}(globalThis)); +}(this)); diff --git a/source/Ox/Ox.js b/source/Ox/Ox.js deleted file mode 100644 index 0e3eeaaf..00000000 --- a/source/Ox/Ox.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -import Ox from './js/Ox.Global.js'; - -import './js/Core.js'; -import './js/Function.js'; -import './js/Polyfill.js'; -import './js/Array.js'; -import './js/String.js'; -import './js/Collection.js'; -import './js/Math.js'; - -import './js/Async.js'; -import './js/Color.js'; -import './js/Constants.js'; -import './js/Date.js'; -import './js/DOM.js'; -import './js/Encoding.js'; -import './js/Format.js'; -import './js/Geo.js'; -import './js/Hash.js'; -import './js/HTML.js'; -import './js/JavaScript.js'; -import './js/Locale.js'; -import './js/Object.js'; -import './js/RegExp.js'; -import './js/Request.js'; -import './js/Type.js'; -import './js/Video.js'; - -export default Ox; -export { Ox }; - -// For backward compatibility with global usage -if (typeof globalThis !== 'undefined') { - // FIXME: examples/ui/widget_design_patterns writes to Ox before load - if (typeof globalThis.Ox != 'undefined') { - Object.keys(globalThis.Ox).forEach(key => { - if (typeof Ox[key] == 'undefined') { - Ox[key] = globalThis.Ox[key] - } - }) - } - globalThis.Ox = Ox; -} diff --git a/source/Ox/js/Array.js b/source/Ox/js/Array.js index c4c0bbe2..6beae511 100644 --- a/source/Ox/js/Array.js +++ b/source/Ox/js/Array.js @@ -1,7 +1,5 @@ 'use strict'; -import Ox from './Ox.Global.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 c818e819..7607d841 100644 --- a/source/Ox/js/Async.js +++ b/source/Ox/js/Async.js @@ -1,7 +1,5 @@ 'use strict'; -import Ox from './Ox.Global.js'; - (function() { function asyncMap(forEach, collection, iterator, that, callback) { diff --git a/source/Ox/js/Collection.js b/source/Ox/js/Collection.js index 1b695fe0..efcb41ac 100644 --- a/source/Ox/js/Collection.js +++ b/source/Ox/js/Collection.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.avg Returns the average of an array's values, or an object's properties @@ -466,7 +465,6 @@ Ox.slice = Ox.toArray = function(collection, start, stop) { // value. Firefox 3.6 returns an array of undefined values if a string is passed // as value. if ( - typeof document !== 'undefined' && ( Ox.slice([0]).length == 0 || Ox.slice('0')[0] === null || Ox.slice('0')[0] === void 0 @@ -475,7 +473,7 @@ if ( return Ox.slice(document.getElementsByTagName('a')); } catch (error) {} }()) -)) { +) { // FIXME: remove toArray alias Ox.slice = Ox.toArray = function(collection, start, stop) { var args = stop === void 0 ? [start] : [start, stop], diff --git a/source/Ox/js/Color.js b/source/Ox/js/Color.js index ba68ad40..ce01d81d 100644 --- a/source/Ox/js/Color.js +++ b/source/Ox/js/Color.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.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 22c04459..1fe2d45b 100644 --- a/source/Ox/js/Constants.js +++ b/source/Ox/js/Constants.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; //@ Ox.AMPM <[s]> ['AM', 'PM'] Ox.AMPM = ['AM', 'PM']; @@ -93,19 +92,15 @@ Ox.SHORT_MONTHS = Ox.MONTHS.map(function(val) { }); //@ Ox.PATH Path of Ox.js Ox.PATH = (function() { - if (typeof document !== 'undefined') { - // IE8 can't apply slice to NodeLists, see Ox.slice - var index, regexp = /Ox\.js(\?.+|)$/, - scripts = document.getElementsByTagName('script'), src; - for (index = scripts.length - 1; index >= 0; index--) { - src = scripts[index].src; - if (regexp.test(src)) { - return src.replace(regexp, ''); - } + // IE8 can't apply slice to NodeLists, see Ox.slice + var index, regexp = /Ox\.js(\?.+|)$/, + scripts = document.getElementsByTagName('script'), src; + for (index = scripts.length - 1; index >= 0; index--) { + src = scripts[index].src; + if (regexp.test(src)) { + 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 6ce6ed9a..8a8e402c 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -2,7 +2,15 @@ 'use strict'; -import Ox from './Ox.Global.js'; +/*@ +Ox The `Ox` object + See `Ox.wrap` for details. + (value) -> wrapped value + value <*> Any value +@*/ +this.Ox = function(value) { + return Ox.wrap(value); +}; /*@ Ox.load Loads OxJS and, optionally, one or more modules @@ -68,27 +76,21 @@ Ox.load = function() { if (!length) { callback(true); } else { - let fn = Ox.noop - if ('UI' in modules) { - fn = function(callback) { - var path = Ox.PATH + 'UI/jquery/jquery-1.7.1.min.js?' + Ox.VERSION; - Ox.getFile(path, callback) - } - } - fn(function() { - Ox.forEach(modules, async function(options, module) { - console.log("load module!", module, options) - const obj = await import(Ox.PATH + module + '/' + module + '.js?' + Ox.VERSION); - Ox.load[module](options, function(success) { - succeeded += success; - if (++loaded == length) { - Ox.setLocale(Ox.LOCALE, function() { - callback(succeeded == length); - }); - } - }); - }); - }) + 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); + }); + } + }); + } + ); + }); } }); }; @@ -112,7 +114,7 @@ Ox.localStorage = function(namespace) { var localStorage; try { // this will fail if third party cookies/storage is not allowed - localStorage = globalThis.localStorage || {}; + localStorage = window.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, @@ -204,7 +206,7 @@ Ox.Log = (function() { args.unshift( Ox.formatDate(date, '%H:%M:%S.') + (+date).toString().slice(-3) ); - globalThis.console && globalThis.console.log && globalThis.console.log.apply(globalThis.console, args); + window.console && window.console.log && window.console.log.apply(window.console, args); ret = args.join(' '); } return ret; @@ -266,7 +268,7 @@ Ox.print = function() { args.unshift( date.toString().split(' ')[4] + '.' + (+date).toString().slice(-3) ); - globalThis.console && globalThis.console.log.apply(globalThis.console, args); + window.console && window.console.log.apply(window.console, args); return args.join(' '); }; diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index 2b3cc251..71ef21cc 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.$ Generic HTML element, mimics jQuery @@ -829,19 +828,12 @@ Ox.documentReady Calls a callback function once the DOM is ready @*/ Ox.documentReady = (function() { var callbacks = []; - if (typeof document === 'undefined') { - return function(callback) { - callback(); - return true; - } - } - - document.onreadystatechange = globalThis.onload = function() { + document.onreadystatechange = window.onload = function() { if (document.readyState == 'complete') { callbacks.forEach(function(callback) { callback(); }); - document.onreadystatechange = globalThis.onload = null; + document.onreadystatechange = window.onload = null; } }; return function(callback) { diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js index e0117861..74668b2e 100644 --- a/source/Ox/js/Date.js +++ b/source/Ox/js/Date.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.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 8ee85553..974108ac 100644 --- a/source/Ox/js/Encoding.js +++ b/source/Ox/js/Encoding.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.encodeBase26 Encode a number as bijective base26 diff --git a/source/Ox/js/Format.js b/source/Ox/js/Format.js index 558732f6..6870c75b 100644 --- a/source/Ox/js/Format.js +++ b/source/Ox/js/Format.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.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 37d107e0..5d2a41d1 100644 --- a/source/Ox/js/Function.js +++ b/source/Ox/js/Function.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.cache Memoize a function diff --git a/source/Ox/js/Geo.js b/source/Ox/js/Geo.js index 5d974bee..aa341cf1 100644 --- a/source/Ox/js/Geo.js +++ b/source/Ox/js/Geo.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; (function() { diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index 21772625..b5cf839b 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; (function() { diff --git a/source/Ox/js/Hash.js b/source/Ox/js/Hash.js index 3f3dd296..7471604d 100644 --- a/source/Ox/js/Hash.js +++ b/source/Ox/js/Hash.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.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 09adb245..56514b14 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -1,7 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; - -var globalEval = eval; /*@ Ox.doc Generates documentation for annotated JavaScript @@ -830,7 +827,7 @@ Ox.test = function(argument, callback) { ); } Ox.Log('TEST', statement); - actual = globalEval(statement); + actual = eval(statement); if (!isAsync && test.expected) { Ox.test.data[id].results.push({ actual: stringifyResult(actual), @@ -839,7 +836,7 @@ Ox.test = function(argument, callback) { section: item.section, statement: statement, passed: Ox.isEqual( - actual, globalEval('(' + test.expected + ')') + actual, eval('(' + test.expected + ')') ) }); } diff --git a/source/Ox/js/Locale.js b/source/Ox/js/Locale.js index 74862155..324f8646 100644 --- a/source/Ox/js/Locale.js +++ b/source/Ox/js/Locale.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; (function() { diff --git a/source/Ox/js/Math.js b/source/Ox/js/Math.js index 58690c12..9e933c04 100644 --- a/source/Ox/js/Math.js +++ b/source/Ox/js/Math.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.acosh Inverse hyperbolic cosine diff --git a/source/Ox/js/Object.js b/source/Ox/js/Object.js index 15d41a61..0534d820 100644 --- a/source/Ox/js/Object.js +++ b/source/Ox/js/Object.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.extend Extends an object with one or more other objects diff --git a/source/Ox/js/Ox.Global.js b/source/Ox/js/Ox.Global.js deleted file mode 100644 index 6efd1a65..00000000 --- a/source/Ox/js/Ox.Global.js +++ /dev/null @@ -1,14 +0,0 @@ -'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/Polyfill.js b/source/Ox/js/Polyfill.js index f2213afc..98cd94d3 100644 --- a/source/Ox/js/Polyfill.js +++ b/source/Ox/js/Polyfill.js @@ -1,7 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; - -var globalEval = eval; (function(window) { @@ -212,7 +209,7 @@ var globalEval = eval; } return { parse: function parse(string) { - return globalEval('(' + string + ')'); + return eval('(' + string + ')'); }, stringify: function stringify(value) { var ret = 'null', type = Ox.typeOf(value); @@ -399,7 +396,7 @@ var globalEval = eval; ].forEach(function(item) { var object = item[0], keys = item[1]; keys.forEach(function(key) { - if (!(key in object)) { + if (!key in object) { if (canDefineProperty) { Object.defineProperty(object, key, { configurable: true, @@ -430,4 +427,4 @@ var globalEval = eval; } } -}(globalThis)); +}(this)); diff --git a/source/Ox/js/RegExp.js b/source/Ox/js/RegExp.js index 641f9813..ac636e2f 100644 --- a/source/Ox/js/RegExp.js +++ b/source/Ox/js/RegExp.js @@ -1,5 +1,3 @@ -import Ox from './Ox.Global.js'; - /*@ Ox.escapeRegExp Escapes a string for use in a regular expression (str) -> Escaped string @@ -12,4 +10,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 c8355e16..6ea7f530 100644 --- a/source/Ox/js/Request.js +++ b/source/Ox/js/Request.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.get Get a remote resource @@ -88,10 +87,6 @@ Ox.getAsync = function(urls, get, callback) { (function() { - if (typeof document == 'undefined') { - console.log("running in node, disable some things in Requets.js") - return - } var cache = {}, head = document.head || document.getElementsByTagName('head')[0] diff --git a/source/Ox/js/String.js b/source/Ox/js/String.js index 55016c91..3f89e93d 100644 --- a/source/Ox/js/String.js +++ b/source/Ox/js/String.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.char Alias for String.fromCharCode @@ -266,30 +265,17 @@ Ox.parseURL Takes a URL, returns its components '?a=0&b=1' @*/ Ox.parseURL = (function() { - 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; - }; - } + 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; + }; }()); // FIXME: can we get rid of this? diff --git a/source/Ox/js/Type.js b/source/Ox/js/Type.js index 251063d5..a3f7843b 100644 --- a/source/Ox/js/Type.js +++ b/source/Ox/js/Type.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.checkType Throws a TypeError if a value is not of a given type @@ -443,13 +442,11 @@ Ox.typeOf = function(value) { // Mobile Safari returns 'DOMWindow' for null and undefined // Firefox 30+ returns 'window' for window if ( - (typeof document != 'undefined') && ( - Ox.typeOf((function() { return arguments; }())) != 'arguments' - || Ox.typeOf(document.getElementsByTagName('a')) != 'nodelist' - || Ox.typeOf(null) != 'null' - || Ox.typeOf(window) != 'global' - || Ox.typeOf() != 'undefined' - ) + Ox.typeOf((function() { return arguments; }())) != 'arguments' + || Ox.typeOf(document.getElementsByTagName('a')) != 'nodelist' + || Ox.typeOf(null) != 'null' + || Ox.typeOf(window) != 'global' + || Ox.typeOf() != 'undefined' ) { Ox.typeOf = function(value) { var type = Object.prototype.toString.call( diff --git a/source/Ox/js/Video.js b/source/Ox/js/Video.js index f43a50c0..a8f2252a 100644 --- a/source/Ox/js/Video.js +++ b/source/Ox/js/Video.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './Ox.Global.js'; /*@ Ox.getVideoFormat Get supported video format diff --git a/source/UI/UI.js b/source/UI/UI.js index 6bf41e47..2b3620a5 100644 --- a/source/UI/UI.js +++ b/source/UI/UI.js @@ -1,375 +1,258 @@ 'use strict'; -import Ox from './../Ox/js/Ox.Global.js'; -Ox.UI = Ox.UI || {}; +Ox.load.UI = function(options, callback) { -import './js/Audio/AudioElement.js'; -import './js/Audio/AudioPlayer.js'; -import './js/Bar/Bar.js'; -import './js/Bar/Progressbar.js'; -import './js/Bar/Resizebar.js'; -import './js/Bar/Tabbar.js'; -import './js/Calendar/CalendarEditor.js'; -import './js/Calendar/Calendar.js'; -import './js/Code/DocPage.js'; -import './js/Code/DocPanel.js'; -import './js/Code/ExamplePage.js'; -import './js/Code/ExamplePanel.js'; -import './js/Code/SourceViewer.js'; -import './js/Code/SyntaxHighlighter.js'; -import './js/Core/API.js'; -import './js/Core/App.js'; -import './js/Core/Clipboard.js'; -import './js/Core/Container.js'; -import './js/Core/Cookies.js'; -import './js/Core/Element.js'; -import './js/Core/Event.js'; -import './js/Core/Focus.js'; -import './js/Core/Fullscreen.js'; -import './js/Core/GarbageCollection.js'; -import './js/Core/History.js'; -import './js/Core/LoadingIcon.js'; -import './js/Core/LoadingScreen.js'; -import './js/Core/Request.js'; -import './js/Core/Theme.js'; -import './js/Core/UI.js'; -import './js/Core/URL.js'; -import './js/Form/ArrayEditable.js'; -import './js/Form/ArrayInput.js'; -import './js/Form/ButtonGroup.js'; -import './js/Form/Button.js'; -import './js/Form/CheckboxGroup.js'; -import './js/Form/Checkbox.js'; -import './js/Form/ColorInput.js'; -import './js/Form/ColorPicker.js'; -import './js/Form/DateInput.js'; -import './js/Form/DateTimeInput.js'; -import './js/Form/EditableContent.js'; -import './js/Form/Editable.js'; -import './js/Form/FileButton.js'; -import './js/Form/FileInput.js'; -import './js/Form/Filter.js'; -import './js/Form/FormElementGroup.js'; -import './js/Form/FormItem.js'; -import './js/Form/Form.js'; -import './js/Form/FormPanel.js'; -import './js/Form/InputGroup.js'; -import './js/Form/Input.js'; -import './js/Form/InsertHTMLDialog.js'; -import './js/Form/Label.js'; -import './js/Form/ObjectArrayInput.js'; -import './js/Form/ObjectInput.js'; -import './js/Form/OptionGroup.js'; -import './js/Form/Picker.js'; -import './js/Form/PlaceInput.js'; -import './js/Form/PlacePicker.js'; -import './js/Form/Range.js'; -import './js/Form/SelectInput.js'; -import './js/Form/Select.js'; -import './js/Form/Spreadsheet.js'; -import './js/Form/TimeInput.js'; -import './js/Image/ImageElement.js'; -import './js/Image/ImageViewer.js'; -import './js/List/Chart.js'; -import './js/List/ColumnList.js'; -import './js/List/CustomList.js'; -import './js/List/IconItem.js'; -import './js/List/IconList.js'; -import './js/List/InfoList.js'; -import './js/List/ListItem.js'; -import './js/List/List.js'; -import './js/List/SortList.js'; -import './js/List/TableList.js'; -import './js/List/TreeList.js'; -import './js/Map/MapEditor.js'; -import './js/Map/MapImage.js'; -import './js/Map/Map.js'; -import './js/Map/MapMarkerImage.js'; -import './js/Map/MapMarker.js'; -import './js/Map/MapPlace.js'; -import './js/Map/MapRectangle.js'; -import './js/Map/MapRectangleMarker.js'; -import './js/Menu/MainMenu.js'; -import './js/Menu/MenuButton.js'; -import './js/Menu/MenuItem.js'; -import './js/Menu/Menu.js'; -import './js/Panel/CollapsePanel.js'; -import './js/Panel/SlidePanel.js'; -import './js/Panel/SplitPanel.js'; -import './js/Panel/TabPanel.js'; -import './js/Video/AnnotationFolder.js'; -import './js/Video/AnnotationPanel.js'; -import './js/Video/BlockVideoTimeline.js'; -import './js/Video/ClipPanel.js'; -import './js/Video/LargeVideoTimeline.js'; -import './js/Video/SmallVideoTimelineImage.js'; -import './js/Video/SmallVideoTimeline.js'; -import './js/Video/VideoAnnotationPanel.js'; -import './js/Video/VideoEditPanel.js'; -import './js/Video/VideoElement.js'; -import './js/Video/VideoPlayer.js'; -import './js/Video/VideoPlayerMenu.js'; -import './js/Video/VideoPlayerPanel.js'; -import './js/Video/VideoPreview.js'; -import './js/Video/VideoTimelinePanel.js'; -import './js/Video/VideoTimelinePlayer.js'; -import './js/Window/Dialog.js'; -import './js/Window/Layer.js'; -import './js/Window/SortDialog.js'; -import './js/Window/Tooltip.js'; + options = Ox.extend({ + hideScreen: true, + loadCSS: true, + loadThemes: true, + showScreen: false, + theme: 'oxlight' + }, options); -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; + 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); - Ox.UI.LoadingScreen = (function() { + browsers.forEach(function(browser) { + var match = browser.regexp && browser.regexp.exec(navigator.userAgent); + if (match && match[1] >= browser.version) { + browserSupported = true; + } + }); - 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 = { + Ox.UI = {}; + + Ox.UI.LoadingScreen = (function() { + + var $body = Ox.$('body'), + $screen = Ox.$('
') + .addClass('OxLoadingScreen') + .css({ position: 'absolute', left: 0, top: 0, right: 0, bottom: 0, - margin: 'auto', - MozUserSelect: 'none', - WebkitUserSelect: 'none' - }, - loadingInterval, - $icon, - deg = 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(); + 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.$('') + 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({ - src: src + href: browser.url, + title: ( + browser.name == 'Chrome Frame' + ? Ox._('Install') : Ox._('Download') + ) + ' ' + browser.name }) - .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' - var src = Ox.PATH + '../dev/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', + .css({ + position: 'absolute', + left: (i * 72) + 'px', + width: '72px', 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); - }); - } + }) + .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(); - } + 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)' }); } - }); - }, - 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); + }, 83); } - }; + $screen.appendTo($body); + } + }; - }()); + }()); - Ox.documentReady(function() { - Ox.$('body').addClass('OxTheme' + Ox.toTitleCase(options.theme)); - options.showScreen && Ox.UI.LoadingScreen.show(); - }); + Ox.documentReady(function() { + Ox.$('body').addClass('OxTheme' + Ox.toTitleCase(options.theme)); + options.showScreen && Ox.UI.LoadingScreen.show(); + }); - loadUI(); + loadUI(); - function loadUI() { - let path = Ox.PATH + 'UI/json/UI.json?' + Ox.VERSION; + 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) { @@ -400,22 +283,23 @@ if (typeof globalThis !== 'undefined') { } }); }); - } + }); - 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); + 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/css/UI.css b/source/UI/css/UI.css index 902a1ca4..2b29ba4e 100644 --- a/source/UI/css/UI.css +++ b/source/UI/css/UI.css @@ -1,7 +1,4 @@ -@import url("../themes/aqua/css/theme.css"); -@import url("../themes/oxdark/css/theme.css"); -@import url("../themes/oxlight/css/theme.css"); -@import url("../themes/oxmedium/css/theme.css"); +$import /* ================================================================================ diff --git a/source/UI/js/Audio/AudioElement.js b/source/UI/js/Audio/AudioElement.js index 07608853..8e895864 100644 --- a/source/UI/js/Audio/AudioElement.js +++ b/source/UI/js/Audio/AudioElement.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.AudioElement AudioElement Object @@ -116,4 +115,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 51bf9f9f..b6ea1de1 100644 --- a/source/UI/js/Audio/AudioPlayer.js +++ b/source/UI/js/Audio/AudioPlayer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.AudioPlayer Generic Audio Player diff --git a/source/UI/js/Bar/Bar.js b/source/UI/js/Bar/Bar.js index fc62f9b7..1af93baf 100644 --- a/source/UI/js/Bar/Bar.js +++ b/source/UI/js/Bar/Bar.js @@ -1,6 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; - /*@ Ox.Bar Bar options Options object diff --git a/source/UI/js/Bar/Progressbar.js b/source/UI/js/Bar/Progressbar.js index 7f8eb8ff..e8e240f8 100644 --- a/source/UI/js/Bar/Progressbar.js +++ b/source/UI/js/Bar/Progressbar.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Progressbar Progress Bar diff --git a/source/UI/js/Bar/Resizebar.js b/source/UI/js/Bar/Resizebar.js index c65c5a50..6613b9d0 100644 --- a/source/UI/js/Bar/Resizebar.js +++ b/source/UI/js/Bar/Resizebar.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Resizebar Resizebar options Options object diff --git a/source/UI/js/Bar/Tabbar.js b/source/UI/js/Bar/Tabbar.js index 04b22f90..c0436819 100644 --- a/source/UI/js/Bar/Tabbar.js +++ b/source/UI/js/Bar/Tabbar.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Tabbar Tabbar options Options object diff --git a/source/UI/js/Calendar/Calendar.js b/source/UI/js/Calendar/Calendar.js index 3d3961e5..d8f21d2b 100644 --- a/source/UI/js/Calendar/Calendar.js +++ b/source/UI/js/Calendar/Calendar.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Calendar Basic calendar object diff --git a/source/UI/js/Calendar/CalendarEditor.js b/source/UI/js/Calendar/CalendarEditor.js index 7fa9dece..beda628b 100644 --- a/source/UI/js/Calendar/CalendarEditor.js +++ b/source/UI/js/Calendar/CalendarEditor.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.CalendarEditor Calendar Editor diff --git a/source/UI/js/Code/DocPage.js b/source/UI/js/Code/DocPage.js index 2d27631c..43714825 100644 --- a/source/UI/js/Code/DocPage.js +++ b/source/UI/js/Code/DocPage.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.DocPage DocPage diff --git a/source/UI/js/Code/DocPanel.js b/source/UI/js/Code/DocPanel.js index 95fc1f5b..adab5131 100644 --- a/source/UI/js/Code/DocPanel.js +++ b/source/UI/js/Code/DocPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.DocPanel Documentation Panel diff --git a/source/UI/js/Code/ExamplePage.js b/source/UI/js/Code/ExamplePage.js index ac0dc84a..e731bf98 100644 --- a/source/UI/js/Code/ExamplePage.js +++ b/source/UI/js/Code/ExamplePage.js @@ -1,5 +1,4 @@ 'use strict' -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ExamplePage Example Page diff --git a/source/UI/js/Code/ExamplePanel.js b/source/UI/js/Code/ExamplePanel.js index 0ecceee6..1b8bd859 100644 --- a/source/UI/js/Code/ExamplePanel.js +++ b/source/UI/js/Code/ExamplePanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ExamplePanel Example Panel diff --git a/source/UI/js/Code/SourceViewer.js b/source/UI/js/Code/SourceViewer.js index d7043edc..bfadabc9 100644 --- a/source/UI/js/Code/SourceViewer.js +++ b/source/UI/js/Code/SourceViewer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SourceViewer Source Viewer diff --git a/source/UI/js/Code/SyntaxHighlighter.js b/source/UI/js/Code/SyntaxHighlighter.js index c463e56c..787ecb18 100644 --- a/source/UI/js/Code/SyntaxHighlighter.js +++ b/source/UI/js/Code/SyntaxHighlighter.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SyntaxHighlighter Syntax Highlighter diff --git a/source/UI/js/Core/API.js b/source/UI/js/Core/API.js index 39fd7089..b9c06457 100644 --- a/source/UI/js/Core/API.js +++ b/source/UI/js/Core/API.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.API Remote API controller diff --git a/source/UI/js/Core/App.js b/source/UI/js/Core/App.js index 9814cadf..da3c5220 100644 --- a/source/UI/js/Core/App.js +++ b/source/UI/js/Core/App.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.App Basic application instance that communicates with a JSON API @@ -76,12 +75,12 @@ Ox.App = function(options) { screen: screen, time: (+new Date() - self.time) / 1000, window: { - innerHeight: globalThis.innerHeight, - innerWidth: globalThis.innerWidth, - outerHeight: globalThis.outerHeight, - outerWidth: globalThis.outerWidth, - screenLeft: globalThis.screenLeft, - screenTop: globalThis.screenTop + innerHeight: window.innerHeight, + innerWidth: window.innerWidth, + outerHeight: window.outerHeight, + outerWidth: window.outerWidth, + screenLeft: window.screenLeft, + screenTop: window.screenTop } }; } diff --git a/source/UI/js/Core/Clipboard.js b/source/UI/js/Core/Clipboard.js index 16771a1b..99f26706 100644 --- a/source/UI/js/Core/Clipboard.js +++ b/source/UI/js/Core/Clipboard.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Clipboard Basic clipboard handler diff --git a/source/UI/js/Core/Container.js b/source/UI/js/Core/Container.js index 8cdaf071..590646b4 100644 --- a/source/UI/js/Core/Container.js +++ b/source/UI/js/Core/Container.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.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 a212b41a..4da89ae7 100644 --- a/source/UI/js/Core/Cookies.js +++ b/source/UI/js/Core/Cookies.js @@ -1,5 +1,3 @@ -import Ox from './../../../Ox/js/Ox.Global.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 74038f50..df17ea0b 100644 --- a/source/UI/js/Core/Element.js +++ b/source/UI/js/Core/Element.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; (function(_) { var noTooltipEvents = {}; diff --git a/source/UI/js/Core/Event.js b/source/UI/js/Core/Event.js index 73238075..31c1fee8 100644 --- a/source/UI/js/Core/Event.js +++ b/source/UI/js/Core/Event.js @@ -1,5 +1,3 @@ -import Ox from './../../../Ox/js/Ox.Global.js'; - (function() { var chars = { diff --git a/source/UI/js/Core/Focus.js b/source/UI/js/Core/Focus.js index 82f3925e..6753c640 100644 --- a/source/UI/js/Core/Focus.js +++ b/source/UI/js/Core/Focus.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Focus Basic focus controller diff --git a/source/UI/js/Core/Fullscreen.js b/source/UI/js/Core/Fullscreen.js index a41645e9..5b414a1b 100644 --- a/source/UI/js/Core/Fullscreen.js +++ b/source/UI/js/Core/Fullscreen.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Fullscreen Fullscreen controller diff --git a/source/UI/js/Core/GarbageCollection.js b/source/UI/js/Core/GarbageCollection.js index e0a0689d..f3ebe46d 100644 --- a/source/UI/js/Core/GarbageCollection.js +++ b/source/UI/js/Core/GarbageCollection.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.GarbageCollection GarbageCollection diff --git a/source/UI/js/Core/History.js b/source/UI/js/Core/History.js index 6efd06ac..423d467d 100644 --- a/source/UI/js/Core/History.js +++ b/source/UI/js/Core/History.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; Ox.History = function(options) { diff --git a/source/UI/js/Core/LoadingIcon.js b/source/UI/js/Core/LoadingIcon.js index cf575057..c3f39da4 100644 --- a/source/UI/js/Core/LoadingIcon.js +++ b/source/UI/js/Core/LoadingIcon.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.LoadingIcon Loading Icon Element diff --git a/source/UI/js/Core/LoadingScreen.js b/source/UI/js/Core/LoadingScreen.js index 30184a55..025393f7 100644 --- a/source/UI/js/Core/LoadingScreen.js +++ b/source/UI/js/Core/LoadingScreen.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.LoadingScreen Simple loading screen @@ -80,4 +79,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 fe002248..b5980252 100644 --- a/source/UI/js/Core/Request.js +++ b/source/UI/js/Core/Request.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Request Basic request controller diff --git a/source/UI/js/Core/Theme.js b/source/UI/js/Core/Theme.js index efcd092e..ccadb999 100644 --- a/source/UI/js/Core/Theme.js +++ b/source/UI/js/Core/Theme.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Theme get/set theme diff --git a/source/UI/js/Core/UI.js b/source/UI/js/Core/UI.js index 26aa0c36..00155a51 100644 --- a/source/UI/js/Core/UI.js +++ b/source/UI/js/Core/UI.js @@ -1,8 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; - -Ox.UI = Ox.UI || {}; -console.log("Ox", Ox, Ox.UI) Ox.documentReady(function() { // FIXME: use Ox.$foo everywhere! @@ -20,11 +16,10 @@ Ox.documentReady(function() { Ox.$elements = {}; //@ Ox.UI.DIMENSIONS Names of horizontal and vertical dimensions -Ox.UI.DIMENSIONS = { +Ox.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 0da430aa..14890354 100644 --- a/source/UI/js/Core/URL.js +++ b/source/UI/js/Core/URL.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.URL URL controller diff --git a/source/UI/js/Form/ArrayEditable.js b/source/UI/js/Form/ArrayEditable.js index 75428e65..c0ae9fbf 100644 --- a/source/UI/js/Form/ArrayEditable.js +++ b/source/UI/js/Form/ArrayEditable.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ArrayEditable Array Editable diff --git a/source/UI/js/Form/ArrayInput.js b/source/UI/js/Form/ArrayInput.js index b367d933..96e25f1b 100644 --- a/source/UI/js/Form/ArrayInput.js +++ b/source/UI/js/Form/ArrayInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ArrayInput Array input diff --git a/source/UI/js/Form/Button.js b/source/UI/js/Form/Button.js index 2fbe894f..f0d287e7 100644 --- a/source/UI/js/Form/Button.js +++ b/source/UI/js/Form/Button.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Button Button Object diff --git a/source/UI/js/Form/ButtonGroup.js b/source/UI/js/Form/ButtonGroup.js index acbcfaec..d8eb06ab 100644 --- a/source/UI/js/Form/ButtonGroup.js +++ b/source/UI/js/Form/ButtonGroup.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ButtonGroup ButtonGroup Object diff --git a/source/UI/js/Form/Checkbox.js b/source/UI/js/Form/Checkbox.js index d502972f..25889585 100644 --- a/source/UI/js/Form/Checkbox.js +++ b/source/UI/js/Form/Checkbox.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Checkbox Checkbox Element diff --git a/source/UI/js/Form/CheckboxGroup.js b/source/UI/js/Form/CheckboxGroup.js index 9763eb0d..140751a9 100644 --- a/source/UI/js/Form/CheckboxGroup.js +++ b/source/UI/js/Form/CheckboxGroup.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.CheckboxGroup CheckboxGroup Object diff --git a/source/UI/js/Form/ColorInput.js b/source/UI/js/Form/ColorInput.js index dd78e7ab..bda1f443 100644 --- a/source/UI/js/Form/ColorInput.js +++ b/source/UI/js/Form/ColorInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ColorInput ColorInput Element diff --git a/source/UI/js/Form/ColorPicker.js b/source/UI/js/Form/ColorPicker.js index 3bc594bb..aa92d646 100644 --- a/source/UI/js/Form/ColorPicker.js +++ b/source/UI/js/Form/ColorPicker.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ColorPicker ColorPicker Element diff --git a/source/UI/js/Form/DateInput.js b/source/UI/js/Form/DateInput.js index ee320b1b..3ce5f4da 100644 --- a/source/UI/js/Form/DateInput.js +++ b/source/UI/js/Form/DateInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.DateInput DateInput Element diff --git a/source/UI/js/Form/DateTimeInput.js b/source/UI/js/Form/DateTimeInput.js index 4b196bc6..cd460bb0 100644 --- a/source/UI/js/Form/DateTimeInput.js +++ b/source/UI/js/Form/DateTimeInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.DateTimeInput DateTimeInput Element diff --git a/source/UI/js/Form/Editable.js b/source/UI/js/Form/Editable.js index eed5c4e2..5ea5076e 100644 --- a/source/UI/js/Form/Editable.js +++ b/source/UI/js/Form/Editable.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Editable Editable element diff --git a/source/UI/js/Form/EditableContent.js b/source/UI/js/Form/EditableContent.js index 89a0d8e8..a840909c 100644 --- a/source/UI/js/Form/EditableContent.js +++ b/source/UI/js/Form/EditableContent.js @@ -1,5 +1,3 @@ -import Ox from './../../../Ox/js/Ox.Global.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 ad9bebdc..fc15de73 100644 --- a/source/UI/js/Form/FileButton.js +++ b/source/UI/js/Form/FileButton.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.FileButton File Button diff --git a/source/UI/js/Form/FileInput.js b/source/UI/js/Form/FileInput.js index c4e627de..02cbd940 100644 --- a/source/UI/js/Form/FileInput.js +++ b/source/UI/js/Form/FileInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.FileInput File Input diff --git a/source/UI/js/Form/Filter.js b/source/UI/js/Form/Filter.js index 60d15a3b..f3215ffe 100644 --- a/source/UI/js/Form/Filter.js +++ b/source/UI/js/Form/Filter.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Filter Filter Object diff --git a/source/UI/js/Form/Form.js b/source/UI/js/Form/Form.js index 2e565ba8..3aeea712 100644 --- a/source/UI/js/Form/Form.js +++ b/source/UI/js/Form/Form.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Form Form Object diff --git a/source/UI/js/Form/FormElementGroup.js b/source/UI/js/Form/FormElementGroup.js index f03199da..5f9c0eaf 100644 --- a/source/UI/js/Form/FormElementGroup.js +++ b/source/UI/js/Form/FormElementGroup.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.FormElementGroup FormElementGroup Element diff --git a/source/UI/js/Form/FormItem.js b/source/UI/js/Form/FormItem.js index c687599b..baff0de3 100644 --- a/source/UI/js/Form/FormItem.js +++ b/source/UI/js/Form/FormItem.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.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 e5102127..9eb7efe9 100644 --- a/source/UI/js/Form/FormPanel.js +++ b/source/UI/js/Form/FormPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.FormPanel Form Panel diff --git a/source/UI/js/Form/Input.js b/source/UI/js/Form/Input.js index da38b445..488f042b 100644 --- a/source/UI/js/Form/Input.js +++ b/source/UI/js/Form/Input.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Input Input Element diff --git a/source/UI/js/Form/InputGroup.js b/source/UI/js/Form/InputGroup.js index ac8e7d34..b454cb91 100644 --- a/source/UI/js/Form/InputGroup.js +++ b/source/UI/js/Form/InputGroup.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.InputGroup InputGroup Object diff --git a/source/UI/js/Form/InsertHTMLDialog.js b/source/UI/js/Form/InsertHTMLDialog.js index 32592136..c637ec8d 100644 --- a/source/UI/js/Form/InsertHTMLDialog.js +++ b/source/UI/js/Form/InsertHTMLDialog.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.InsertHTMLDialog Insert HTML Dialog diff --git a/source/UI/js/Form/Label.js b/source/UI/js/Form/Label.js index 169b724f..f8e836ad 100644 --- a/source/UI/js/Form/Label.js +++ b/source/UI/js/Form/Label.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Label Label element diff --git a/source/UI/js/Form/ObjectArrayInput.js b/source/UI/js/Form/ObjectArrayInput.js index 9d4068b6..423c478d 100644 --- a/source/UI/js/Form/ObjectArrayInput.js +++ b/source/UI/js/Form/ObjectArrayInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ObjectArrayInput Object Array Input diff --git a/source/UI/js/Form/ObjectInput.js b/source/UI/js/Form/ObjectInput.js index 75601c12..9d223f30 100644 --- a/source/UI/js/Form/ObjectInput.js +++ b/source/UI/js/Form/ObjectInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ObjectInput Object Input diff --git a/source/UI/js/Form/OptionGroup.js b/source/UI/js/Form/OptionGroup.js index 4184375b..184f349e 100644 --- a/source/UI/js/Form/OptionGroup.js +++ b/source/UI/js/Form/OptionGroup.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.OptionGroup OptionGroup diff --git a/source/UI/js/Form/Picker.js b/source/UI/js/Form/Picker.js index ce1edd16..f47a38c8 100644 --- a/source/UI/js/Form/Picker.js +++ b/source/UI/js/Form/Picker.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Picker Picker Object diff --git a/source/UI/js/Form/PlaceInput.js b/source/UI/js/Form/PlaceInput.js index a0b19284..8d26649a 100644 --- a/source/UI/js/Form/PlaceInput.js +++ b/source/UI/js/Form/PlaceInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.PlaceInput PlaceInput Object diff --git a/source/UI/js/Form/PlacePicker.js b/source/UI/js/Form/PlacePicker.js index 13e9b5bf..4c906d1d 100644 --- a/source/UI/js/Form/PlacePicker.js +++ b/source/UI/js/Form/PlacePicker.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.PlacePicker PlacePicker Object diff --git a/source/UI/js/Form/Range.js b/source/UI/js/Form/Range.js index a2fda071..97bb7a46 100644 --- a/source/UI/js/Form/Range.js +++ b/source/UI/js/Form/Range.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Range Range Object diff --git a/source/UI/js/Form/Select.js b/source/UI/js/Form/Select.js index 51c52cb8..6e2f98b9 100644 --- a/source/UI/js/Form/Select.js +++ b/source/UI/js/Form/Select.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Select Select Object diff --git a/source/UI/js/Form/SelectInput.js b/source/UI/js/Form/SelectInput.js index b32f13b2..6e4a1ce2 100644 --- a/source/UI/js/Form/SelectInput.js +++ b/source/UI/js/Form/SelectInput.js @@ -1,6 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.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 3ce07f26..45e2baf6 100644 --- a/source/UI/js/Form/Spreadsheet.js +++ b/source/UI/js/Form/Spreadsheet.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Spreadsheet Spreadsheet diff --git a/source/UI/js/Form/TimeInput.js b/source/UI/js/Form/TimeInput.js index e507c6ab..4faed77e 100644 --- a/source/UI/js/Form/TimeInput.js +++ b/source/UI/js/Form/TimeInput.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.TimeInput TimeInput Object diff --git a/source/UI/js/Image/ImageElement.js b/source/UI/js/Image/ImageElement.js index b881762d..66cb9719 100644 --- a/source/UI/js/Image/ImageElement.js +++ b/source/UI/js/Image/ImageElement.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ImageElement Simple image element with loading indication @@ -83,4 +82,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 74528ea0..5e895127 100644 --- a/source/UI/js/Image/ImageViewer.js +++ b/source/UI/js/Image/ImageViewer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ImageViewer Image Viewer diff --git a/source/UI/js/List/Chart.js b/source/UI/js/List/Chart.js index 7f17ab0b..11933abf 100644 --- a/source/UI/js/List/Chart.js +++ b/source/UI/js/List/Chart.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Chart Bar Chart diff --git a/source/UI/js/List/ColumnList.js b/source/UI/js/List/ColumnList.js index 91a51d7f..5222028f 100644 --- a/source/UI/js/List/ColumnList.js +++ b/source/UI/js/List/ColumnList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ColumnList Column List Widget @@ -210,4 +209,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 09c6fc56..93d06324 100644 --- a/source/UI/js/List/CustomList.js +++ b/source/UI/js/List/CustomList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.CustomList Custom List Widget diff --git a/source/UI/js/List/IconItem.js b/source/UI/js/List/IconItem.js index 0534b557..94bc6538 100644 --- a/source/UI/js/List/IconItem.js +++ b/source/UI/js/List/IconItem.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.IconItem IconItem Object diff --git a/source/UI/js/List/IconList.js b/source/UI/js/List/IconList.js index 9860f046..ebed732e 100644 --- a/source/UI/js/List/IconList.js +++ b/source/UI/js/List/IconList.js @@ -1,6 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.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 a09dc6af..b3f5bf27 100644 --- a/source/UI/js/List/InfoList.js +++ b/source/UI/js/List/InfoList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.InfoList Info List diff --git a/source/UI/js/List/List.js b/source/UI/js/List/List.js index fc612262..0c0f9bb1 100644 --- a/source/UI/js/List/List.js +++ b/source/UI/js/List/List.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.List List constructor diff --git a/source/UI/js/List/ListItem.js b/source/UI/js/List/ListItem.js index 908457af..5b5ff598 100644 --- a/source/UI/js/List/ListItem.js +++ b/source/UI/js/List/ListItem.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.ListItem ListItem Object diff --git a/source/UI/js/List/SortList.js b/source/UI/js/List/SortList.js index 7f2737f0..c5b70daa 100644 --- a/source/UI/js/List/SortList.js +++ b/source/UI/js/List/SortList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SortList Sortable List @@ -62,4 +61,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 4430c35d..d72a7f06 100644 --- a/source/UI/js/List/TableList.js +++ b/source/UI/js/List/TableList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.TableList TableList Widget diff --git a/source/UI/js/List/TreeList.js b/source/UI/js/List/TreeList.js index fb9111db..8ab9eb40 100644 --- a/source/UI/js/List/TreeList.js +++ b/source/UI/js/List/TreeList.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.TreeList Tree List diff --git a/source/UI/js/Map/Map.js b/source/UI/js/Map/Map.js index e4e779e5..9f5c4392 100644 --- a/source/UI/js/Map/Map.js +++ b/source/UI/js/Map/Map.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Map Basic map object diff --git a/source/UI/js/Map/MapEditor.js b/source/UI/js/Map/MapEditor.js index fd69533f..64b36988 100644 --- a/source/UI/js/Map/MapEditor.js +++ b/source/UI/js/Map/MapEditor.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapEditor Map Editor diff --git a/source/UI/js/Map/MapImage.js b/source/UI/js/Map/MapImage.js index 9ee59ec3..91edc02f 100644 --- a/source/UI/js/Map/MapImage.js +++ b/source/UI/js/Map/MapImage.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapImage MapImage Object diff --git a/source/UI/js/Map/MapMarker.js b/source/UI/js/Map/MapMarker.js index 7ef7d8ec..10eb69eb 100644 --- a/source/UI/js/Map/MapMarker.js +++ b/source/UI/js/Map/MapMarker.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapMarker MapMarker diff --git a/source/UI/js/Map/MapMarkerImage.js b/source/UI/js/Map/MapMarkerImage.js index bb27e555..51063aec 100644 --- a/source/UI/js/Map/MapMarkerImage.js +++ b/source/UI/js/Map/MapMarkerImage.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapMarkerImage MapMarkerImage Object diff --git a/source/UI/js/Map/MapPlace.js b/source/UI/js/Map/MapPlace.js index 6e9b6f97..58c3e254 100644 --- a/source/UI/js/Map/MapPlace.js +++ b/source/UI/js/Map/MapPlace.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapPlace MapPlace Object diff --git a/source/UI/js/Map/MapRectangle.js b/source/UI/js/Map/MapRectangle.js index 74b4ba13..ac43c923 100644 --- a/source/UI/js/Map/MapRectangle.js +++ b/source/UI/js/Map/MapRectangle.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapRectangle MapRectangle Object diff --git a/source/UI/js/Map/MapRectangleMarker.js b/source/UI/js/Map/MapRectangleMarker.js index 4115a17b..7b7f252d 100644 --- a/source/UI/js/Map/MapRectangleMarker.js +++ b/source/UI/js/Map/MapRectangleMarker.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MapRectangleMarker MapRectangleMarker Object diff --git a/source/UI/js/Menu/MainMenu.js b/source/UI/js/Menu/MainMenu.js index 60f14940..aa17772b 100644 --- a/source/UI/js/Menu/MainMenu.js +++ b/source/UI/js/Menu/MainMenu.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MainMenu MainMenu Object diff --git a/source/UI/js/Menu/Menu.js b/source/UI/js/Menu/Menu.js index 06628761..dafa3aab 100644 --- a/source/UI/js/Menu/Menu.js +++ b/source/UI/js/Menu/Menu.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Menu Menu Object diff --git a/source/UI/js/Menu/MenuButton.js b/source/UI/js/Menu/MenuButton.js index b722acb0..c40ba7a1 100644 --- a/source/UI/js/Menu/MenuButton.js +++ b/source/UI/js/Menu/MenuButton.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MenuButton Menu Button diff --git a/source/UI/js/Menu/MenuItem.js b/source/UI/js/Menu/MenuItem.js index 832389bf..8d8479e1 100644 --- a/source/UI/js/Menu/MenuItem.js +++ b/source/UI/js/Menu/MenuItem.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.MenuItem MenuItem Object diff --git a/source/UI/js/Panel/CollapsePanel.js b/source/UI/js/Panel/CollapsePanel.js index 5d703bfc..41e184aa 100644 --- a/source/UI/js/Panel/CollapsePanel.js +++ b/source/UI/js/Panel/CollapsePanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.CollapsePanel CollapsePanel Object diff --git a/source/UI/js/Panel/SlidePanel.js b/source/UI/js/Panel/SlidePanel.js index 90b297d0..0d622393 100644 --- a/source/UI/js/Panel/SlidePanel.js +++ b/source/UI/js/Panel/SlidePanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; Ox.SlidePanel = function(options, self) { @@ -71,4 +70,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 1dfc755c..ae85ed4a 100644 --- a/source/UI/js/Panel/SplitPanel.js +++ b/source/UI/js/Panel/SplitPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SplitPanel SpliPanel Object diff --git a/source/UI/js/Panel/TabPanel.js b/source/UI/js/Panel/TabPanel.js index 6e90aa3d..346d44e8 100644 --- a/source/UI/js/Panel/TabPanel.js +++ b/source/UI/js/Panel/TabPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.TabPanel Tabbed panel diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index fc74249c..4a5c4243 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.AnnotationFolder AnnotationFolder Object diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index 65b0eb30..f80121bd 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; // FIXME: should be Ox.AnnotationFolders diff --git a/source/UI/js/Video/BlockVideoTimeline.js b/source/UI/js/Video/BlockVideoTimeline.js index 54908a96..1f0945ce 100644 --- a/source/UI/js/Video/BlockVideoTimeline.js +++ b/source/UI/js/Video/BlockVideoTimeline.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.BlockVideoTimeline Block Video Timeline diff --git a/source/UI/js/Video/ClipPanel.js b/source/UI/js/Video/ClipPanel.js index 7237a11a..ea9eb562 100644 --- a/source/UI/js/Video/ClipPanel.js +++ b/source/UI/js/Video/ClipPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; Ox.ClipPanel = function(options, self) { diff --git a/source/UI/js/Video/LargeVideoTimeline.js b/source/UI/js/Video/LargeVideoTimeline.js index c4920b9b..2c9532f9 100644 --- a/source/UI/js/Video/LargeVideoTimeline.js +++ b/source/UI/js/Video/LargeVideoTimeline.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.LargeVideoTimeline LargeTimeline Object diff --git a/source/UI/js/Video/SmallVideoTimeline.js b/source/UI/js/Video/SmallVideoTimeline.js index 35ab5e5c..c6756dc5 100644 --- a/source/UI/js/Video/SmallVideoTimeline.js +++ b/source/UI/js/Video/SmallVideoTimeline.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SmallVideoTimeline Small video timeline diff --git a/source/UI/js/Video/SmallVideoTimelineImage.js b/source/UI/js/Video/SmallVideoTimelineImage.js index 0c6ce26f..6e303b64 100644 --- a/source/UI/js/Video/SmallVideoTimelineImage.js +++ b/source/UI/js/Video/SmallVideoTimelineImage.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SmallVideoTimelineImage Small Video Timeline Image diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 1d64e3a5..fd0bdd73 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoAnnotationPanel VideoAnnotationPanel Object diff --git a/source/UI/js/Video/VideoEditPanel.js b/source/UI/js/Video/VideoEditPanel.js index a2d02f6e..cc40507e 100644 --- a/source/UI/js/Video/VideoEditPanel.js +++ b/source/UI/js/Video/VideoEditPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; Ox.VideoEditPanel = function(options, self) { diff --git a/source/UI/js/Video/VideoElement.js b/source/UI/js/Video/VideoElement.js index bf3c249c..c6e279b8 100644 --- a/source/UI/js/Video/VideoElement.js +++ b/source/UI/js/Video/VideoElement.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoElement VideoElement Object diff --git a/source/UI/js/Video/VideoPlayer.js b/source/UI/js/Video/VideoPlayer.js index 30befb30..7d767813 100644 --- a/source/UI/js/Video/VideoPlayer.js +++ b/source/UI/js/Video/VideoPlayer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoPlayer Generic Video Player diff --git a/source/UI/js/Video/VideoPlayerMenu.js b/source/UI/js/Video/VideoPlayerMenu.js index 08026ffe..783eb363 100644 --- a/source/UI/js/Video/VideoPlayerMenu.js +++ b/source/UI/js/Video/VideoPlayerMenu.js @@ -1,5 +1,3 @@ -import Ox from './../../../Ox/js/Ox.Global.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 6f6e8dea..336277e4 100644 --- a/source/UI/js/Video/VideoPlayerPanel.js +++ b/source/UI/js/Video/VideoPlayerPanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoPlayerPanel VideoPlayerPanel Object diff --git a/source/UI/js/Video/VideoPreview.js b/source/UI/js/Video/VideoPreview.js index 2672ecc4..63db6259 100644 --- a/source/UI/js/Video/VideoPreview.js +++ b/source/UI/js/Video/VideoPreview.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoPreview Video Preview diff --git a/source/UI/js/Video/VideoTimelinePanel.js b/source/UI/js/Video/VideoTimelinePanel.js index 32006e1a..917b32c3 100644 --- a/source/UI/js/Video/VideoTimelinePanel.js +++ b/source/UI/js/Video/VideoTimelinePanel.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoTimelinePanel Video timeline panel diff --git a/source/UI/js/Video/VideoTimelinePlayer.js b/source/UI/js/Video/VideoTimelinePlayer.js index e37e3e45..dacf864d 100644 --- a/source/UI/js/Video/VideoTimelinePlayer.js +++ b/source/UI/js/Video/VideoTimelinePlayer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.VideoTimelinePlayer Video Timeline Player diff --git a/source/UI/js/Window/Dialog.js b/source/UI/js/Window/Dialog.js index d96b2088..c027db68 100644 --- a/source/UI/js/Window/Dialog.js +++ b/source/UI/js/Window/Dialog.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Dialog Dialog object diff --git a/source/UI/js/Window/Layer.js b/source/UI/js/Window/Layer.js index 07fc1054..bf47735f 100644 --- a/source/UI/js/Window/Layer.js +++ b/source/UI/js/Window/Layer.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.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 676bd750..b1c8bd24 100644 --- a/source/UI/js/Window/SortDialog.js +++ b/source/UI/js/Window/SortDialog.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.SortDialog Dialog with Sortable List diff --git a/source/UI/js/Window/Tooltip.js b/source/UI/js/Window/Tooltip.js index 45ddd893..01e8ecba 100644 --- a/source/UI/js/Window/Tooltip.js +++ b/source/UI/js/Window/Tooltip.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../../../Ox/js/Ox.Global.js'; /*@ Ox.Tooltip Tooltip Object @@ -84,9 +83,9 @@ Ox.Tooltip = function(options, self) { width = that.width(); height = that.height(); left = Ox.limit( - self.x - Math.round(width / 2), 0, globalThis.innerWidth - width - 8 + self.x - Math.round(width / 2), 0, window.innerWidth - width - 8 ); - top = self.y > globalThis.innerHeight - height - 16 + top = self.y > window.innerHeight - height - 16 ? self.y - 16 - height : self.y + 16; that.css({ diff --git a/source/Unicode/Unicode.js b/source/Unicode/Unicode.js index ab2937f9..dfb001ec 100644 --- a/source/Unicode/Unicode.js +++ b/source/Unicode/Unicode.js @@ -1,5 +1,4 @@ 'use strict'; -import Ox from './../Ox/js/Ox.Global.js'; Ox.load.Unicode = function(options, callback) {