diff options
author | Ananya Sen | 2012-02-05 19:20:37 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-05 19:20:37 -0800 |
commit | 272c5f74f4ce76fec9cbe360817bf23639307d3a (patch) | |
tree | 1ae8ff6bbf6f22fbcca1e1a70f3063855d00ee46 /js/io/document/html-document.js | |
parent | 45cfffd9261ab1aa714554c584f0d0d8fe627c91 (diff) | |
download | ninja-272c5f74f4ce76fec9cbe360817bf23639307d3a.tar.gz |
changes to show document dirty indicator on editing code view, and to remove dirty indicator on save.
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
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 |