From 4d9832acbd78f82a63fba59187bd82a5afad8240 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 9 May 2012 11:46:14 -0700 Subject: Squashed commit of google-components into master Signed-off-by: Valerio Virgillito --- js/io/system/ninjalibrary.js | 28 ++++++++++++---------------- js/io/system/ninjalibrary.json | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) (limited to 'js/io/system') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index 201598fc..f4915a91 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -152,7 +152,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { // this.chromeApi = chrome; // - var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = [], copied; +// debugger; + var i, l, libs, libjson, xhr = new XMLHttpRequest(), tocopylibs = []; //Getting known json list of libraries to copy to chrome xhr.open("GET", '/js/io/system/ninjalibrary.json', false); xhr.send(); @@ -166,23 +167,18 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { if (chromeLibs.length > 0) { // for (i=0; chromeLibs[i]; i++) { - copied = false; for (var j in libs.libraries) { if (String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase() === chromeLibs[i]) { - copied = true; - } - } - // - if (!copied) { - if (libs.libraries[j].file) { - tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file}); - } else { - tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path}); - } - } else { - //TODO: Remove, currently manually removing copied libraries - //this.chromeApi.directoryDelete(chromeLibs[i]); - } + //TODO: Remove, currently manually removing copied libraries + // //this.chromeApi.directoryDelete(chromeLibs[i]); + } else { + if (libs.libraries[j].file) { + tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path, file: libs.libraries[j].file}); + } else { + tocopylibs.push({name: String(libs.libraries[j].name+libs.libraries[j].version).toLowerCase(), path: libs.libraries[j].path}); + } + } + } } } else { diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index e236f2e0..f7b87a91 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,6 @@ { "libraries": [ - {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.7.0.0"}, + {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.8.0.0"}, {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.5.0"} ] } \ No newline at end of file -- cgit v1.2.3