From ec14eff9831026600ba4cf71810444d54e143e04 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 14 Feb 2012 14:53:32 -0800 Subject: allow / in windows directory path Signed-off-by: Ananya Sen --- js/io/system/coreioapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/io/system/coreioapi.js') diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 614b0850..ea9627cc 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js @@ -1101,7 +1101,7 @@ window.hack = function (name, type) { uri = uri.replace(/^\s+|\s+$/g,""); // strip any leading or trailing spaces //for local machine folder uri - isWindowsUri = /^([a-zA-Z]:)(\\[^<>:"/\\|?*]+)*\\?$/gi.test(uri); + isWindowsUri = /^([a-zA-Z]:)([\\/][^<>:"/\\|?*]+)*[\\/]?$/gi.test(uri); isUnixUri = /^(\/)?(\/(?![.])[^/]*)*\/?$/gi.test(uri);//folders beginning with . are hidden on Mac / Unix status = isWindowsUri || isUnixUri; if(isWindowsUri && isUnixUri){status = false;} -- cgit v1.2.3 From 68ce64a5a2f4a71b54d33916aaf1d57161302425 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 14 Feb 2012 20:48:40 -0800 Subject: Reverting text/html document classes and setting up MVC folder structure Setting up the folder structure for the proposed set up for documents in Ninja. Reverted to have a temp HTML/Text document class. Tweak some UI for file pickers. --- js/io/system/coreioapi.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/io/system/coreioapi.js') diff --git a/js/io/system/coreioapi.js b/js/io/system/coreioapi.js index 614b0850..6dcd795e 100755 --- a/js/io/system/coreioapi.js +++ b/js/io/system/coreioapi.js @@ -97,10 +97,12 @@ 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) { + /* +window.hack = function (path) { // this.application.ninja.ioMediator.fileOpen('Users/kgq387/Desktop/Ninja Cloud/Disk/'+path, function (result) {console.log(result)}); }.bind(this); +*/ } }, //////////////////////////////////////////////////////////////////// -- 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 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'js/io/system/coreioapi.js') 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) } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3