aboutsummaryrefslogtreecommitdiff
path: root/js/io/document/html-document.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/document/html-document.js')
-rwxr-xr-xjs/io/document/html-document.js33
1 files changed, 31 insertions, 2 deletions
diff --git a/js/io/document/html-document.js b/js/io/document/html-document.js
index fc7dd05b..da1bbe4a 100755
--- a/js/io/document/html-document.js
+++ b/js/io/document/html-document.js
@@ -43,9 +43,16 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
43 } 43 }
44 }, 44 },
45 45
46
46 // PUBLIC MEMBERS 47 // PUBLIC MEMBERS
47 cssLoadInterval: { value: null, enumerable: false }, 48 cssLoadInterval: { value: null, enumerable: false },
48 49
50 codeViewDocument:{
51 writable: true,
52 enumerable: true,
53 value:null
54 },
55
49 /* 56 /*
50 * PUBLIC API 57 * PUBLIC API
51 */ 58 */
@@ -209,8 +216,9 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
209 value: function(doc, uuid, iframe, callback) { 216 value: function(doc, uuid, iframe, callback) {
210 // Shell mode is not used anymore 217 // Shell mode is not used anymore
211 //if(!window.IsInShellMode()) { 218 //if(!window.IsInShellMode()) {
212 219 if(!doc.name){doc.name = "index-cloud"};
213 this.init("index-cloud", this._cloudTemplateUri, doc.type, iframe, uuid, callback); 220 if(!doc.uri){doc.uri = this._cloudTemplateUri};
221 this.init(doc.name, doc.uri, doc.type, iframe, uuid, callback);
214 /* 222 /*
215 } else { 223 } else {
216 var tmpurl = doc.uri.split('\\'); 224 var tmpurl = doc.uri.split('\\');
@@ -432,5 +440,26 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base
432 */ 440 */
433 } 441 }
434 } 442 }
443 },
444
445 /**
446 * public method
447 * parameter:
448 * removeCodeMirrorDivFlag - for code view, tell to remove the codemirror div after saving
449 */
450 save:{
451 value:function(removeCodeMirrorDivFlag){
452 if(this.currentView === "design"){
453 //generate html and save
454 }else if((this.currentView === "code") && (this.codeViewDocument !== null)){
455 if(removeCodeMirrorDivFlag === true){
456 this.codeViewDocument.save(true);
457 }else{
458 this.codeViewDocument.save();
459 }
460 //persist to filesystem
461 }
462
463 }
435 } 464 }
436}); \ No newline at end of file 465}); \ No newline at end of file