From c7ef6951baff283266df7567e30c8074dda4ad01 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 15 Feb 2012 15:31:30 -0800 Subject: Setting up webGL local library (assets) --- js/io/system/ninjalibrary.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/io') diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index 272cc2c7..05e0a427 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,6 +1,7 @@ { "libraries": [ - {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0"}, - {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.6.0", "file": "rdge-compiled.js"} + {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"}, + {"name": "Assets", "path": "/assets/descriptor.json", "version": "0.5.0.0"}, + {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.5.0.0", "file": "rdge-compiled.js"} ] } \ No newline at end of file -- cgit v1.2.3 From 075252ad893452df446566f01d0b26eeab08be3d Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 15 Feb 2012 23:07:00 -0800 Subject: Setting up webGL library copy on save --- js/io/system/coreioapi.js | 20 +++----------------- js/io/system/ninjalibrary.js | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 20 deletions(-) (limited to 'js/io') diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 507804fd..a75b59bb 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js @@ -40,6 +40,7 @@ exports.CoreIoApi = Montage.create(Component, { //////////////////////////////////////////////////////////// //Instance of ninja library this.ninjaLibrary = NinjaLibrary; + this.ninjaLibrary.coreApi = this; //Getting reference of chrome file system API this.chromeFileSystem = ChromeApi; //Sending size in MBs for file system storage @@ -62,6 +63,7 @@ exports.CoreIoApi = Montage.create(Component, { this.chromeFileSystem.removeEventListener('ready', this, false); //Listening for library to be copied event (builds list) this.chromeFileSystem.addEventListener('library', this, false); + //TODO: Add sync loading screen logic (Add screen here) } }, //////////////////////////////////////////////////////////////////// @@ -86,23 +88,7 @@ exports.CoreIoApi = Montage.create(Component, { console.log('Ninja Local Library: Ready'); //Removing events this.ninjaLibrary.removeEventListener('sync', this, false); - this.ninjaLibrary.coreApi = this; - //TODO: Add sync loading screen logic - - //TODO: Remove test - //this.ninjaLibrary.copyLibToCloud('Users/kgq387/Desktop/Ninja Cloud/Disk', 'montage0.6.0'); - //this.ninjaLibrary.deleteLibraries(); - /* -window.hack = function (name, type) { - this.application.ninja.ioMediator.fileNew('Users/kgq387/Desktop/Ninja Cloud/Disk/'+name+'.'+type, '/js/io/templates/files/'+type+'.txt', function (status) {console.log(status)}); - }.bind(this); -*/ - /* -window.hack = function (path) { - // - this.application.ninja.ioMediator.fileOpen('Users/kgq387/Desktop/Ninja Cloud/Disk/'+path, function (result) {console.log(result)}); - }.bind(this); -*/ + //TODO: Add sync loading screen logic (Remove screen here) } }, //////////////////////////////////////////////////////////////////// diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index fc943323..8c58883a 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -51,6 +51,23 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { }, //////////////////////////////////////////////////////////////////// // + _libs: { + enumerable: false, + value: null + }, + //////////////////////////////////////////////////////////////////// + // + libs: { + enumerable: false, + get: function() { + return this._libs; + }, + set: function(value) { + this._libs = value; + } + }, + //////////////////////////////////////////////////////////////////// + // _libsToSync: { enumerable: false, value: 0 @@ -67,14 +84,14 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { enumerable: false, value: function (path, libName) { // - if(this.coreApi.directoryExists({uri: '/'+path+'/'+libName+'/'}).status === 404) { + if(this.coreApi.directoryExists({uri: path+libName}).status === 404) { this.chromeApi.directoryContents(this.chromeApi.fileSystem.root, function (contents) { for (var i in contents) { if (libName === contents[i].name) { //Getting contents of library to be copied this.chromeApi.directoryContents(contents[i], function (lib) { //Creating directory structure from subfolders - this.copyDirectoryToCloud(path, contents[i], '/'+path, function (status) {console.log(status)}); + this.copyDirectoryToCloud(path, contents[i], path, function (status) {console.log(status)}); }.bind(this)); break; } @@ -99,7 +116,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { dir = folder.name; } // - if (!this.coreApi.createDirectory({uri: '/'+dir+'/'})) { + if (!this.coreApi.createDirectory({uri: dir})) { //Error occured while creating folders return; } @@ -140,6 +157,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { //Parsing json libraries libs = JSON.parse(xhr.response); // + this.libs = libs.libraries; + // if (chromeLibs.length > 0) { // for (i=0; chromeLibs[i]; i++) { -- cgit v1.2.3 From b88cfa79ed80a7eb473f4959b10b7f1d565b80f4 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 16 Feb 2012 15:21:33 -0800 Subject: Adding Cloud app download URLs --- js/io/ui/cloudpopup.reel/cloudpopup.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/io') diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index e5bad98e..62f7e522 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js @@ -88,7 +88,13 @@ exports.CloudPopup = Montage.create(Component, { downloadCloudApp: { enumerable: false, value: function() { - console.log(this._os); + if(this._os === 'mac') { + location.href = '/ninja_localcloud_for_mac.zip'; + } else if (this._os === 'win') { + location.href = '/ninja_localcloud_for_windows.zip'; + } else { + alert('Your operating system is not supported by the Ninja Local Cloud App.'); + } } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 25020fb66c38029dd57d3d90fedf9bde98b5d383 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 16 Feb 2012 15:48:48 -0800 Subject: Cloud download windows bug fix --- js/io/ui/cloudpopup.reel/cloudpopup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/io') diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.js b/js/io/ui/cloudpopup.reel/cloudpopup.js index 62f7e522..a2283d46 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.js +++ b/js/io/ui/cloudpopup.reel/cloudpopup.js @@ -90,7 +90,7 @@ exports.CloudPopup = Montage.create(Component, { value: function() { if(this._os === 'mac') { location.href = '/ninja_localcloud_for_mac.zip'; - } else if (this._os === 'win') { + } else if (this._os === 'windows') { location.href = '/ninja_localcloud_for_windows.zip'; } else { alert('Your operating system is not supported by the Ninja Local Cloud App.'); -- cgit v1.2.3 From 6bc07657c8ef58e6efddd383748ecf84d1c789ad Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 16 Feb 2012 15:58:26 -0800 Subject: Adding new RDGE library data --- js/io/system/ninjalibrary.js | 2 ++ js/io/system/ninjalibrary.json | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'js/io') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index 8c58883a..960bdef9 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -145,6 +145,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { synchronize: { enumerable: true, value: function(chromeLibs, chrome) { + //TODO: Remove + window.wipeLibrary = this.deleteLibraries.bind(this); // this.chromeApi = chrome; // diff --git a/js/io/system/ninjalibrary.json b/js/io/system/ninjalibrary.json index 05e0a427..a61c30d1 100644 --- a/js/io/system/ninjalibrary.json +++ b/js/io/system/ninjalibrary.json @@ -1,7 +1,6 @@ { "libraries": [ {"name": "Montage", "path": "/node_modules/descriptor.json", "version": "0.6.0.0"}, - {"name": "Assets", "path": "/assets/descriptor.json", "version": "0.5.0.0"}, - {"name": "RDGE", "path": "/js/helper-classes/RDGE/rdge-compiled.js", "version": "0.5.0.0", "file": "rdge-compiled.js"} + {"name": "RDGE", "path": "/assets/descriptor.json", "version": "0.5.0.1"} ] } \ No newline at end of file -- cgit v1.2.3 From a42c536c2b3209afc058eabd31167bd0aa6f71c8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 17 Feb 2012 13:40:38 -0800 Subject: Adding webRequest redirects for iFrame templates --- js/io/ui/cloudpopup.reel/cloudpopup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/io') diff --git a/js/io/ui/cloudpopup.reel/cloudpopup.html b/js/io/ui/cloudpopup.reel/cloudpopup.html index 2c1c169a..e58041ec 100755 --- a/js/io/ui/cloudpopup.reel/cloudpopup.html +++ b/js/io/ui/cloudpopup.reel/cloudpopup.html @@ -36,7 +36,7 @@

Connection to the Cloud Server was not detected. Please verify
that the server is running and the URL below is correct.

- + -- cgit v1.2.3