fix loading, minify with rollup

This commit is contained in:
j 2026-02-18 17:02:08 +01:00
commit dd5237e4ed
156 changed files with 794 additions and 971 deletions

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="../../../source/UI/themes/oxlight/png/icon16.png"/> <link rel="shortcut icon" type="image/png" href="../../../source/UI/themes/oxlight/png/icon16.png"/>
<link rel="stylesheet" type="text/css" href="css/example.css"/> <link rel="stylesheet" type="text/css" href="css/example.css"/>
<script type="text/javascript" src="../../../dev/Ox.js"></script> <script type="text/javascript" src="../../../min/Ox.js"></script>
<script type="text/javascript" src="js/example.js"></script> <script type="text/javascript" src="js/example.js"></script>
<script>window.addEventListener('message', function(e) { e.origin == window.location.origin && eval('(' + e.data + ')'); });</script> <script>window.addEventListener('message', function(e) { e.origin == window.location.origin && eval('(' + e.data + ')'); });</script>
</head> </head>

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="../../../source/UI/themes/oxlight/png/icon16.png"/> <link rel="shortcut icon" type="image/png" href="../../../source/UI/themes/oxlight/png/icon16.png"/>
<link rel="stylesheet" type="text/css" href="css/example.css"/> <link rel="stylesheet" type="text/css" href="css/example.css"/>
<script type="text/javascript" src="../../../source/Ox.compat.js"></script> <script type="text/javascript" src="../../../min/Ox.js"></script>
<script type="text/javascript" src="js/example.js"></script> <script type="text/javascript" src="js/example.js"></script>
<script>window.addEventListener('message', function(e) { e.origin == window.location.origin && eval('(' + e.data + ')'); });</script> <script>window.addEventListener('message', function(e) { e.origin == window.location.origin && eval('(' + e.data + ')'); });</script>
</head> </head>

View file

@ -4,7 +4,7 @@
<title>OxJS - A JavaScript Library for Web Applications</title> <title>OxJS - A JavaScript Library for Web Applications</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="index.css"/> <link rel="stylesheet" type="text/css" href="index.css"/>
<script type="text/javascript" src="source/Ox.compat.js"></script> <script type="text/javascript" src="source/Ox.js"></script>
<script type="text/javascript" src="index.js"></script> <script type="text/javascript" src="index.js"></script>
</head> </head>
<body></body> <body></body>

View file

@ -251,10 +251,13 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
Ox.get('readme/index/' + id + '.html' + q, function(html) { Ox.get('readme/index/' + id + '.html' + q, function(html) {
app.data.html[id] = html; app.data.html[id] = html;
if (Ox.len(app.data.html) == app.data.pages.length) { if (Ox.len(app.data.html) == app.data.pages.length) {
/*
navigator.onLine ? Ox.getJSON(url, function(data) { navigator.onLine ? Ox.getJSON(url, function(data) {
app.data.downloads = data; app.data.downloads = data;
callback(); callback();
}) : callback(); }) : callback();
*/
callback()
} }
}); });
}); });

19
package.json Normal file
View file

@ -0,0 +1,19 @@
{
"name": "@0x2620/oxjs",
"version": "1.0.0",
"module": "min/Ox.esm.js",
"browser": "min/Ox.js",
"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"
]
}

188
rollup.config.js Normal file
View file

@ -0,0 +1,188 @@
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: 'theme-plugin',
writeBundle
};
}
// 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()
]
};

View file

@ -1,4 +1,5 @@
'use strict'; 'use strict';
import Ox from './../Ox/js/Ox.Global.js';
Ox.load.Geo = function(options, callback) { Ox.load.Geo = function(options, callback) {

View file

@ -1,4 +1,5 @@
'use strict'; 'use strict';
import Ox from './../Ox/js/Ox.Global.js';
Ox.load.Image = function(options, callback) { Ox.load.Image = function(options, callback) {

View file

@ -1,18 +0,0 @@
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
})();

View file

@ -1,40 +1,12 @@
'use strict'; 'use strict';
(function(global) { (async function(global) {
const initLoad = [];
global.Ox = { global.Ox = {
load: function(...args) {
load: function() { initLoad.push(args)
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() { function getPath() {
var index, regexp = /Ox\.js(\?[\d\.]+|)$/, var index, regexp = /Ox\.js(\?[\d\.]+|)$/,
@ -47,60 +19,10 @@
} }
} }
function loadJSON(callback) { const module = await import('./Ox/Ox.js');
var request = new XMLHttpRequest(), if (Ox.MODE == 'source') {
time = +new Date(); Ox.MODE = 'dev';
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));
} }
} console.log("Ox was loaded", Ox.MODE, Ox.PATH);
}; initLoad.forEach((args) => global.Ox.load.apply(null, args))
request.send(); }(globalThis));
}
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();
}
});
}
}
};
}(this));

45
source/Ox/Ox.js Normal file
View file

@ -0,0 +1,45 @@
'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;
}

View file

@ -1,37 +0,0 @@
'use strict';
import Ox from './js/Namespace.js';
import * as Ox_Core from './js/Core.js';
import * as Ox_Function from './js/Function.js';
import * as Ox_Polyfill from './js/Polyfill.js';
import * as Ox_Array from './js/Array.js';
import * as Ox_String from './js/String.js';
import * as Ox_Collection from './js/Collection.js';
import * as Ox_Math from './js/Math.js';
import * as Ox_Async from './js/Async.js';
import * as Ox_Color from './js/Color.js';
import * as Ox_Constants from './js/Constants.js';
import * as Ox_Date from './js/Date.js';
import * as Ox_DOM from './js/DOM.js';
import * as Ox_Encoding from './js/Encoding.js';
import * as Ox_Format from './js/Format.js';
import * as Ox_Geo from './js/Geo.js';
import * as Ox_Hash from './js/Hash.js';
import * as Ox_HTML from './js/HTML.js';
import * as Ox_JavaScript from './js/JavaScript.js';
import * as Ox_Locale from './js/Locale.js';
import * as Ox_Object from './js/Object.js';
import * as Ox_RegExp from './js/RegExp.js';
import * as Ox_Request from './js/Request.js';
import * as Ox_Type from './js/Type.js';
import * as Ox_Video from './js/Video.js';
export default Ox;
export { Ox };
// For backward compatibility with global usage
if (typeof globalThis !== 'undefined') {
globalThis.Ox = Ox;
}

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.api <f> Turns an array into a list API Ox.api <f> Turns an array into a list API

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
(function() { (function() {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.avg <f> Returns the average of an array's values, or an object's properties Ox.avg <f> Returns the average of an array's values, or an object's properties

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.hsl <f> Takes RGB values and returns HSL values Ox.hsl <f> Takes RGB values and returns HSL values

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
//@ Ox.AMPM <[s]> ['AM', 'PM'] //@ Ox.AMPM <[s]> ['AM', 'PM']
Ox.AMPM = ['AM', 'PM']; Ox.AMPM = ['AM', 'PM'];

View file

@ -2,7 +2,7 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.load <f> Loads OxJS and, optionally, one or more modules Ox.load <f> Loads OxJS and, optionally, one or more modules
@ -79,7 +79,7 @@ Ox.load = function() {
fn(function() { fn(function() {
Ox.forEach(modules, async function(options, module) { Ox.forEach(modules, async function(options, module) {
console.log("load module!", module, options) console.log("load module!", module, options)
const obj = await import('../../' + module + '/index.js?' + Ox.VERSION); const obj = await import(Ox.PATH + module + '/' + module + '.js?' + Ox.VERSION);
Ox.load[module](options, function(success) { Ox.load[module](options, function(success) {
succeeded += success; succeeded += success;
if (++loaded == length) { if (++loaded == length) {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.$ <f> Generic HTML element, mimics jQuery Ox.$ <f> Generic HTML element, mimics jQuery

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
//@ Ox.getDate <f> Get the day of a date, optionally UTC //@ Ox.getDate <f> Get the day of a date, optionally UTC
// see Ox.setSeconds for source code // see Ox.setSeconds for source code

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.encodeBase26 <b> Encode a number as bijective base26 Ox.encodeBase26 <b> Encode a number as bijective base26

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.formatArea <f> Formats a number of meters as square meters or kilometers Ox.formatArea <f> Formats a number of meters as square meters or kilometers

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.cache <f> Memoize a function Ox.cache <f> Memoize a function

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
(function() { (function() {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
(function() { (function() {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.oshash <f> Calculates oshash for a given file or blob object. Async. Ox.oshash <f> Calculates oshash for a given file or blob object. Async.

View file

@ -1,5 +1,7 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
var globalEval = eval;
/*@ /*@
Ox.doc <f> Generates documentation for annotated JavaScript Ox.doc <f> Generates documentation for annotated JavaScript
@ -828,7 +830,7 @@ Ox.test = function(argument, callback) {
); );
} }
Ox.Log('TEST', statement); Ox.Log('TEST', statement);
actual = eval(statement); actual = globalEval(statement);
if (!isAsync && test.expected) { if (!isAsync && test.expected) {
Ox.test.data[id].results.push({ Ox.test.data[id].results.push({
actual: stringifyResult(actual), actual: stringifyResult(actual),
@ -837,7 +839,7 @@ Ox.test = function(argument, callback) {
section: item.section, section: item.section,
statement: statement, statement: statement,
passed: Ox.isEqual( passed: Ox.isEqual(
actual, eval('(' + test.expected + ')') actual, globalEval('(' + test.expected + ')')
) )
}); });
} }

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
(function() { (function() {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.acosh <f> Inverse hyperbolic cosine Ox.acosh <f> Inverse hyperbolic cosine

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.extend <function> Extends an object with one or more other objects Ox.extend <function> Extends an object with one or more other objects

View file

@ -1,5 +1,7 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
var globalEval = eval;
(function(window) { (function(window) {
@ -210,7 +212,7 @@ import Ox from './Namespace.js';
} }
return { return {
parse: function parse(string) { parse: function parse(string) {
return eval('(' + string + ')'); return globalEval('(' + string + ')');
}, },
stringify: function stringify(value) { stringify: function stringify(value) {
var ret = 'null', type = Ox.typeOf(value); var ret = 'null', type = Ox.typeOf(value);
@ -397,7 +399,7 @@ import Ox from './Namespace.js';
].forEach(function(item) { ].forEach(function(item) {
var object = item[0], keys = item[1]; var object = item[0], keys = item[1];
keys.forEach(function(key) { keys.forEach(function(key) {
if (!key in object) { if (!(key in object)) {
if (canDefineProperty) { if (canDefineProperty) {
Object.defineProperty(object, key, { Object.defineProperty(object, key, {
configurable: true, configurable: true,

View file

@ -1,4 +1,4 @@
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.escapeRegExp <f> Escapes a string for use in a regular expression Ox.escapeRegExp <f> Escapes a string for use in a regular expression

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.get <f> Get a remote resource Ox.get <f> Get a remote resource

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.char <f> Alias for String.fromCharCode Ox.char <f> Alias for String.fromCharCode

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.checkType <f> Throws a TypeError if a value is not of a given type Ox.checkType <f> Throws a TypeError if a value is not of a given type

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './Namespace.js'; import Ox from './Ox.Global.js';
/*@ /*@
Ox.getVideoFormat <f> Get supported video format Ox.getVideoFormat <f> Get supported video format

View file

@ -1,7 +1,129 @@
'use strict'; 'use strict';
Ox.load.UI = function(options, callback) { import Ox from './../Ox/js/Ox.Global.js';
Ox.UI = Ox.UI || {};
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/Video/YouTubeElement.js';
import './js/Window/Dialog.js';
import './js/Window/Layer.js';
import './js/Window/SortDialog.js';
import './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({ options = Ox.extend({
hideScreen: true, hideScreen: true,
loadCSS: true, loadCSS: true,
@ -69,10 +191,6 @@ Ox.load.UI = function(options, callback) {
} }
}); });
console.log("this happens?")
Ox.UI = Ox.UI || {};
Ox.UI.LoadingScreen = (function() { Ox.UI.LoadingScreen = (function() {
var $body = Ox.$('body'), var $body = Ox.$('body'),
@ -130,7 +248,8 @@ Ox.load.UI = function(options, callback) {
.appendTo(div); .appendTo(div);
}); });
*/ */
var src = Ox.PATH + 'UI/themes/' + options.theme + '/svg/symbolLoading.svg' //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() { Ox.getFile(src, function() {
$icon = Ox.$('<img>') $icon = Ox.$('<img>')
.attr({ .attr({
@ -251,10 +370,7 @@ Ox.load.UI = function(options, callback) {
loadUI(); loadUI();
function loadUI() { function loadUI() {
let path = Ox.PATH + 'UI/json/UI.json?' + Ox.VERSION;
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) { Ox.getJSON(path, function(data) {
var counter = 0, length; var counter = 0, length;
if (!options.loadCSS) { if (!options.loadCSS) {
@ -285,8 +401,6 @@ Ox.load.UI = function(options, callback) {
} }
}); });
}); });
});
} }
function initUI() { function initUI() {
@ -305,3 +419,4 @@ Ox.load.UI = function(options, callback) {
} }
}; };
}

View file

@ -1,4 +1,7 @@
$import @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");
/* /*
================================================================================ ================================================================================

View file

@ -1,423 +0,0 @@
'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.$('<div>')
.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.$('<img>')
.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.$('<img>')
.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.$('<div>')
.css(Ox.extend({
width: (browsers.length * 72) + 'px',
height: '72px'
}, css))
.appendTo($screen);
browsers.forEach(function(browser, i) {
Ox.$('<a>')
.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.$('<img>')
.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() {
let 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);
});
}
};
}

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.AudioElement <f> AudioElement Object Ox.AudioElement <f> AudioElement Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.AudioPlayer <f> Generic Audio Player Ox.AudioPlayer <f> Generic Audio Player

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Bar <f> Bar Ox.Bar <f> Bar

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Progressbar <f> Progress Bar Ox.Progressbar <f> Progress Bar

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Resizebar <f> Resizebar Ox.Resizebar <f> Resizebar
options <o> Options object options <o> Options object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Tabbar <f> Tabbar Ox.Tabbar <f> Tabbar
options <o> Options object options <o> Options object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Calendar <f> Basic calendar object Ox.Calendar <f> Basic calendar object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.CalendarEditor <f> Calendar Editor Ox.CalendarEditor <f> Calendar Editor

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.DocPage <f> DocPage Ox.DocPage <f> DocPage

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.DocPanel <f> Documentation Panel Ox.DocPanel <f> Documentation Panel

View file

@ -1,5 +1,5 @@
'use strict' 'use strict'
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ExamplePage <f> Example Page Ox.ExamplePage <f> Example Page

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ExamplePanel <f> Example Panel Ox.ExamplePanel <f> Example Panel

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.SourceViewer <f> Source Viewer Ox.SourceViewer <f> Source Viewer

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.SyntaxHighlighter <f> Syntax Highlighter Ox.SyntaxHighlighter <f> Syntax Highlighter

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.API <f> Remote API controller Ox.API <f> Remote API controller

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.App <f> Basic application instance that communicates with a JSON API Ox.App <f> Basic application instance that communicates with a JSON API

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Clipboard <o> Basic clipboard handler Ox.Clipboard <o> Basic clipboard handler

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
// fixme: wouldn't it be better to let the elements be, // fixme: wouldn't it be better to let the elements be,
// rather then $element, $content, and potentially others, // rather then $element, $content, and potentially others,

View file

@ -1,4 +1,4 @@
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
Ox.Cookies = function() { Ox.Cookies = function() {
var name, value, cookies; var name, value, cookies;

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
(function(_) { (function(_) {
var noTooltipEvents = {}; var noTooltipEvents = {};

View file

@ -1,4 +1,4 @@
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
(function() { (function() {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Focus <o> Basic focus controller Ox.Focus <o> Basic focus controller

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Fullscreen <o> Fullscreen controller Ox.Fullscreen <o> Fullscreen controller

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.GarbageCollection <f> GarbageCollection Ox.GarbageCollection <f> GarbageCollection

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
Ox.History = function(options) { Ox.History = function(options) {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.LoadingIcon <f> Loading Icon Element Ox.LoadingIcon <f> Loading Icon Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.LoadingScreen <f> Simple loading screen Ox.LoadingScreen <f> Simple loading screen

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Request <o> Basic request controller Ox.Request <o> Basic request controller

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Theme <f> get/set theme Ox.Theme <f> get/set theme

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
Ox.UI = Ox.UI || {}; Ox.UI = Ox.UI || {};
console.log("Ox", Ox, Ox.UI) console.log("Ox", Ox, Ox.UI)

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.URL <f> URL controller Ox.URL <f> URL controller

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ArrayEditable <f> Array Editable Ox.ArrayEditable <f> Array Editable

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ArrayInput <f> Array input Ox.ArrayInput <f> Array input

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Button <f> Button Object Ox.Button <f> Button Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ButtonGroup <f> ButtonGroup Object Ox.ButtonGroup <f> ButtonGroup Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Checkbox <f> Checkbox Element Ox.Checkbox <f> Checkbox Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.CheckboxGroup <f> CheckboxGroup Object Ox.CheckboxGroup <f> CheckboxGroup Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ColorInput <f> ColorInput Element Ox.ColorInput <f> ColorInput Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ColorPicker <f> ColorPicker Element Ox.ColorPicker <f> ColorPicker Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.DateInput <f> DateInput Element Ox.DateInput <f> DateInput Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.DateTimeInput <f> DateTimeInput Element Ox.DateTimeInput <f> DateTimeInput Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Editable <f> Editable element Ox.Editable <f> Editable element

View file

@ -1,4 +1,4 @@
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
Ox.EditableContent = function(options, self) { Ox.EditableContent = function(options, self) {

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.FileButton <f> File Button Ox.FileButton <f> File Button

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.FileInput <f> File Input Ox.FileInput <f> File Input

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Filter <f> Filter Object Ox.Filter <f> Filter Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Form <f> Form Object Ox.Form <f> Form Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.FormElementGroup <f> FormElementGroup Element Ox.FormElementGroup <f> FormElementGroup Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.FormItem <f> FormItem Element, wraps form element with an error message Ox.FormItem <f> FormItem Element, wraps form element with an error message

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.FormPanel <f> Form Panel Ox.FormPanel <f> Form Panel

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Input <f> Input Element Ox.Input <f> Input Element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.InputGroup <f> InputGroup Object Ox.InputGroup <f> InputGroup Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.InsertHTMLDialog <f> Insert HTML Dialog Ox.InsertHTMLDialog <f> Insert HTML Dialog

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Label <f> Label element Ox.Label <f> Label element

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ObjectArrayInput <f> Object Array Input Ox.ObjectArrayInput <f> Object Array Input

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.ObjectInput <f> Object Input Ox.ObjectInput <f> Object Input

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.OptionGroup <f> OptionGroup Ox.OptionGroup <f> OptionGroup

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.Picker <f> Picker Object Ox.Picker <f> Picker Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.PlaceInput <f> PlaceInput Object Ox.PlaceInput <f> PlaceInput Object

View file

@ -1,5 +1,5 @@
'use strict'; 'use strict';
import Ox from './../../../Ox/js/Namespace.js'; import Ox from './../../../Ox/js/Ox.Global.js';
/*@ /*@
Ox.PlacePicker <f> PlacePicker Object Ox.PlacePicker <f> PlacePicker Object

Some files were not shown because too many files have changed in this diff Show more