diff --git a/source/Ox.UI/Ox.UI.js b/source/Ox.UI/Ox.UI.js index 7b0a81d9..07a83712 100644 --- a/source/Ox.UI/Ox.UI.js +++ b/source/Ox.UI/Ox.UI.js @@ -125,7 +125,7 @@ Ox.load.UI = function(options, callback) { } function showWarning() { - Ox.print('showWarning') + //Ox.print('showWarning') var counter = 0, message = 'Browser not supported, use ' + browsers.map(function(browser, i) { return browser.name + ( @@ -203,17 +203,17 @@ Ox.load.UI = function(options, callback) { if ($.browser.opera && Ox.endsWith(file, '.svg')) { return; } - Ox.print('load', file) + //Ox.print('load', file) var dfd = new $.Deferred(); Ox.loadFile(Ox.PATH + file, function() { dfd.resolve(); }); promises.push(dfd.promise()); }); - Ox.print('promises.length', promises.length) + //Ox.print('promises.length', promises.length) $.when.apply(null, promises) .done(function() { - Ox.print('promises done') + //Ox.print('promises done') $(function() { if (options.showScreen && options.hideScreen) { Ox.UI.hideLoadingScreen(); @@ -273,7 +273,7 @@ Ox.load.UI = function(options, callback) { + filename.split('.').pop() + '/' + filename; }; Ox.UI.hideLoadingScreen = function() { - Ox.print('hideLoadingScreen') + //Ox.print('hideLoadingScreen') var $div = $('.OxLoadingScreen'), error = $div.is('.OxError'); //$div.find('img').remove(); diff --git a/source/Ox.UI/css/Ox.UI.css b/source/Ox.UI/css/Ox.UI.css index 9f0f9b31..7519b65f 100644 --- a/source/Ox.UI/css/Ox.UI.css +++ b/source/Ox.UI/css/Ox.UI.css @@ -1,6 +1,5 @@ @import url("../themes/classic/css/classic.css"); @import url("../themes/modern/css/modern.css"); -//@import url("Ox.UI.future.css"); /* ================================================================================ diff --git a/source/Ox.UI/js/Core/Ox.Keyboard.js b/source/Ox.UI/js/Core/Ox.Keyboard.js index b2569d4e..4f20c651 100644 --- a/source/Ox.UI/js/Core/Ox.Keyboard.js +++ b/source/Ox.UI/js/Core/Ox.Keyboard.js @@ -180,11 +180,13 @@ buffer += key == 'SPACE' ? ' ' : key; bufferTime = time; } - focused !== null && Ox.UI.elements[focused].triggerEvent('key_' + key); - // fixme: oxdb context browser suggests we should add left and right keys here - if (['down', 'space', 'up'].indexOf(key) > -1 && !Ox.UI.elements[focused].hasClass('OxInput')) { - // prevent chrome from scrolling - return false; + if (focused !== null) { + Ox.UI.elements[focused].triggerEvent('key_' + key); + // fixme: oxdb context browser suggests we should add left and right keys here + if (['down', 'space', 'up'].indexOf(key) > -1 && !Ox.UI.elements[focused].hasClass('OxInput')) { + // prevent chrome from scrolling + return false; + } } /* stack.forEach(function(v) { diff --git a/source/Ox.js b/source/Ox.js index fde01879..f25e1312 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -194,7 +194,7 @@ Ox.loadFile = (function() { callback(); } function addFileToCache() { - type == 'svg' && Ox.print('addToCache', file) + //type == 'svg' && Ox.print('addToCache', file) if (type == 'css' || type == 'js') { cache['file'] = true; callback(); @@ -650,10 +650,10 @@ Ox.makeObject = function(obj) { undefined */ var ret = {}; - if (obj.length == 1) { + if (Ox.isObject(obj[0])) { // ({foo: 'bar'}) ret = obj[0]; - } else if (obj.length == 2){ + } else if (obj.length) { // ('foo', 'bar') ret[obj[0]] = obj[1] }