aboutsummaryrefslogtreecommitdiff
path: root/js/io/document/text-document.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-04 22:35:28 -0800
committerJose Antonio Marquez2012-02-04 22:35:28 -0800
commitd1fda420f898965b5dd57de0c8340886cef308a8 (patch)
tree2fad2e890c1142a7eee30c45710f1f0b78adfdde /js/io/document/text-document.js
parentcc64cfc5aaa570ed9f72545fc135200019d62311 (diff)
parent45cfffd9261ab1aa714554c584f0d0d8fe627c91 (diff)
downloadninja-d1fda420f898965b5dd57de0c8340886cef308a8.tar.gz
Merge branch 'refs/heads/AnanyaFileIO' into FileIO
Diffstat (limited to 'js/io/document/text-document.js')
-rwxr-xr-xjs/io/document/text-document.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/io/document/text-document.js b/js/io/document/text-document.js
index 156aaacb..a768779f 100755
--- a/js/io/document/text-document.js
+++ b/js/io/document/text-document.js
@@ -85,6 +85,22 @@ var TextDocument = exports.TextDocument = Montage.create(baseDocumentModule.Base
85 85
86 xhr.send(''); 86 xhr.send('');
87 } 87 }
88 },
89
90 /**
91 * public method
92 * parameter:
93 * removeCodeMirrorDivFlag - for code view, tell to remove the codemirror div after saving
94 */
95 save:{
96 value:function(removeCodeMirrorDivFlag){
97 this.editor.save();
98 if(removeCodeMirrorDivFlag === true){
99 var codemirrorDiv = this.textArea.parentNode.querySelector(".CodeMirror");
100 if(!!codemirrorDiv){codemirrorDiv.parentNode.removeChild(codemirrorDiv);}
101 }
102 //persist to filesystem
103 }
88 } 104 }
89 105
90}); \ No newline at end of file 106}); \ No newline at end of file