From 018a6132d93a73d28bd349122404c236e61cb765 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Mon, 13 Feb 2012 15:03:23 -0800 Subject: Save 'code' view files Added functionality (temp) to save files in code view. --- js/io/document/html-document.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/io/document/html-document.js') diff --git a/js/io/document/html-document.js b/js/io/document/html-document.js index 99bf4576..dfd8566a 100755 --- a/js/io/document/html-document.js +++ b/js/io/document/html-document.js @@ -471,9 +471,12 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base save: { enumerable: false, value: function () { - //console.log(this._styles, this._stylesheets); //TODO: Add code view logic and also styles for HTML - return {mode: 'html', document: this._userDocument, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; + if (this.currentView === 'design') { + return {mode: 'html', document: this._userDocument, style: this._styles, head: this._templateDocument.head.innerHTML, body: this._templateDocument.body.innerHTML}; + } else if(this.currentView === "code"){ + //TODO: Would this get call when we are in code of HTML? + } } } //////////////////////////////////////////////////////////////////// -- cgit v1.2.3