From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Fri, 27 Jan 2012 12:05:17 -0800
Subject: Merged old FileIO

---
 js/io/system/projectio.js | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 js/io/system/projectio.js

(limited to 'js/io/system/projectio.js')

diff --git a/js/io/system/projectio.js b/js/io/system/projectio.js
old mode 100644
new mode 100755
-- 
cgit v1.2.3


From 33e655cbbb0816340c5a2e5d5cc0a6b0c7d9f53c Mon Sep 17 00:00:00 2001
From: Jose Antonio Marquez
Date: Wed, 1 Feb 2012 23:31:36 -0800
Subject: File IO clean up and setting up

Cleaned up file IO templates and removed app-caching from Ninja since it would be needed. Setting up io-mediator to hook up to controller. Still need to address naming conventions and clean up more in the io directory.
---
 js/io/system/projectio.js | 70 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 25 deletions(-)

(limited to 'js/io/system/projectio.js')

diff --git a/js/io/system/projectio.js b/js/io/system/projectio.js
index 822fd385..ad4cf151 100755
--- a/js/io/system/projectio.js
+++ b/js/io/system/projectio.js
@@ -4,56 +4,76 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
 (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
 </copyright> */
 
-var FileIo = require("js/io/system/fileio").FileIo;
 ////////////////////////////////////////////////////////////////////////
-//Exporting as Project I/O
-exports.ProjectIo = (require("montage/core/core").Montage).create(Object.prototype, {
+//
+var Montage = 	require("montage/core/core").Montage,
+	FileIo = 	require("js/io/system/fileio").FileIo;
+////////////////////////////////////////////////////////////////////////
+//
+exports.ProjectIo = = Montage.create(Object.prototype, {
 	////////////////////////////////////////////////////////////////////
     //
-    create: {
+    newProject: {
     	enumerable: false,
     	value: function () {
+    		//Checking for API to be available
+    		if (!this.application.ninja.coreIoApi.cloudAvailable()) {
+    			//API not available, no IO action taken
+    			return null;
+    		}
+    		//
     	}
     },
 	////////////////////////////////////////////////////////////////////
     //
-    open: {
+    readProject: {
     	enumerable: false,
     	value: function(e) {
-    		//TODO: Add functionality
-    		console.log('ProjectIO: open');
+    		//Checking for API to be available
+    		if (!this.application.ninja.coreIoApi.cloudAvailable()) {
+    			//API not available, no IO action taken
+    			return null;
+    		}
+    		//
     	}
     },
     ////////////////////////////////////////////////////////////////////
     //
-    save: {
+    saveProject: {
     	enumerable: false,
-    	value: function(type, id, components) {
-    		//
-    		var rObj;
+    	value: function() {
+    		//Checking for API to be available
+    		if (!this.application.ninja.coreIoApi.cloudAvailable()) {
+    			//API not available, no IO action taken
+    			return null;
+    		}
     		//
-    		switch (type) {
-    			case 'montageapp':
-    				//
-    				var css = FileIo.save('css', id);
-    				var html = FileIo.save('html', id, components);
-    				//
-    				rObj = {html: html, css: css};
-    				break;
-    			default:
-    				break;
+    	}
+    },
+    ////////////////////////////////////////////////////////////////////
+    //
+    copyProject: {
+    	enumerable: false,
+    	value: function(e) {
+    		//Checking for API to be available
+    		if (!this.application.ninja.coreIoApi.cloudAvailable()) {
+    			//API not available, no IO action taken
+    			return null;
     		}
     		//
-    		return rObj;
     	}
     },
     ////////////////////////////////////////////////////////////////////
     //
-    saveAs: {
+    infoProject: {
     	enumerable: false,
     	value: function(e) {
-    		//TODO: Add functionality
-    		console.log('ProjectIO: saveAs');
+    		//Checking for API to be available
+    		if (!this.application.ninja.coreIoApi.cloudAvailable()) {
+    			//API not available, no IO action taken
+    			return null;
+    		}
+    		//
     	}
     }
     ////////////////////////////////////////////////////////////////////
-- 
cgit v1.2.3


From 1daf146c849a0a8dbd2b61b14218c9a39bdee3a7 Mon Sep 17 00:00:00 2001
From: Ananya Sen
Date: Fri, 3 Feb 2012 17:22:48 -0800
Subject: added editor tab save while switching code view tabs, integrated new
 file dialog with io mediator to open the new file in a new tab

Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
---
 js/io/system/projectio.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'js/io/system/projectio.js')

diff --git a/js/io/system/projectio.js b/js/io/system/projectio.js
index ad4cf151..8e3230d7 100755
--- a/js/io/system/projectio.js
+++ b/js/io/system/projectio.js
@@ -10,7 +10,7 @@ var Montage = 	require("montage/core/core").Montage,
 	FileIo = 	require("js/io/system/fileio").FileIo;
 ////////////////////////////////////////////////////////////////////////
 //
-exports.ProjectIo = = Montage.create(Object.prototype, {
+exports.ProjectIo = Montage.create(Object.prototype, {
 	////////////////////////////////////////////////////////////////////
     //
     newProject: {
-- 
cgit v1.2.3