From 9e35ae0be2fa9d95745aa7ca2e6c72ea930311e0 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 20 Jun 2012 18:49:06 +0200 Subject: [PATCH] minor cleanup --- source/Ox.js | 1 - source/Ox/js/Core.js | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/source/Ox.js b/source/Ox.js index faaf6f24..41e59067 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -15,7 +15,6 @@ loadScriptsSerial(data.files, function() { Ox.VERSION = data.version; if (args.length == 1) { - console.log(document.body); callback() } else { Ox.load.apply(null, args); diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index 4e2c4bfc..9231bf54 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -116,7 +116,7 @@ Ox.load Loads one or more modules @*/ Ox.load = function() { var callback = arguments[arguments.length - 1], - counter = 0, length, modules = {}, success = 0, + length, loaded = 0, modules = {}, succeeded = 0, type = Ox.typeOf(arguments[0]); if (type == 'string') { modules = Ox.extend( @@ -138,9 +138,9 @@ Ox.load = function() { Ox.getFile( Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js', function() { - Ox.load[module](options, function(s) { - success += s; - ++counter == length && callback(success == counter); + Ox.load[module](options, function(success) { + succeeded += success; + ++loaded == length && callback(succeeded == length); }); } );