diff options
Diffstat (limited to 'js/io/document/html-document.js')
-rwxr-xr-x | js/io/document/html-document.js | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/js/io/document/html-document.js b/js/io/document/html-document.js index da1bbe4a..8e1eb614 100755 --- a/js/io/document/html-document.js +++ b/js/io/document/html-document.js | |||
@@ -449,17 +449,22 @@ var HTMLDocument = exports.HTMLDocument = Montage.create(baseDocumentModule.Base | |||
449 | */ | 449 | */ |
450 | save:{ | 450 | save:{ |
451 | value:function(removeCodeMirrorDivFlag){ | 451 | value:function(removeCodeMirrorDivFlag){ |
452 | if(this.currentView === "design"){ | 452 | try{ |
453 | //generate html and save | 453 | if(this.currentView === "design"){ |
454 | }else if((this.currentView === "code") && (this.codeViewDocument !== null)){ | 454 | //generate html and save |
455 | if(removeCodeMirrorDivFlag === true){ | 455 | }else if((this.currentView === "code") && (this.codeViewDocument !== null)){ |
456 | this.codeViewDocument.save(true); | 456 | if(removeCodeMirrorDivFlag === true){ |
457 | }else{ | 457 | this.codeViewDocument.save(true); |
458 | this.codeViewDocument.save(); | 458 | }else{ |
459 | this.codeViewDocument.save(); | ||
460 | } | ||
461 | //persist to filesystem | ||
459 | } | 462 | } |
460 | //persist to filesystem | 463 | this.dirtyFlag=false; |
464 | }catch(e){ | ||
465 | console.log("Error while saving "+this.uri); | ||
466 | console.log(e.stack); | ||
461 | } | 467 | } |
462 | |||
463 | } | 468 | } |
464 | } | 469 | } |
465 | }); \ No newline at end of file | 470 | }); \ No newline at end of file |