minor cleanup

This commit is contained in:
rolux 2012-06-20 18:49:06 +02:00
parent 9093d5f3ed
commit 9e35ae0be2
2 changed files with 4 additions and 5 deletions

View file

@ -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);

View file

@ -116,7 +116,7 @@ Ox.load <f> 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);
});
}
);