aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorAnanya Sen2012-03-06 23:53:21 -0800
committerAnanya Sen2012-03-06 23:53:21 -0800
commit8020dc6e99e3bf0aad605f66a175bc2245da534b (patch)
tree12d4a659a6cf214dcabe41a5b9d4c3f1d9f4f212 /js/controllers
parent5afc582a1ae537f1e30113394780f1c8eec58f89 (diff)
downloadninja-8020dc6e99e3bf0aad605f66a175bc2245da534b.tar.gz
added close file menu item
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/document-controller.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index de080167..ca3cd585 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -60,6 +60,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
60 this.eventManager.addEventListener("executeSave", this, false); 60 this.eventManager.addEventListener("executeSave", this, false);
61 this.eventManager.addEventListener("executeSaveAs", this, false); 61 this.eventManager.addEventListener("executeSaveAs", this, false);
62 this.eventManager.addEventListener("executeSaveAll", this, false); 62 this.eventManager.addEventListener("executeSaveAll", this, false);
63 this.eventManager.addEventListener("executeFileClose", this, false);
63 64
64 this.eventManager.addEventListener("styleSheetDirty", this, false); 65 this.eventManager.addEventListener("styleSheetDirty", this, false);
65 66
@@ -162,7 +163,15 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
162 } 163 }
163 } 164 }
164 }, 165 },
165 166 ////////////////////////////////////////////////////////////////////
167 handleExecuteFileClose:{
168 value: function(event) {
169 if((typeof this.activeDocument !== "undefined") && this.application.ninja.coreIoApi.cloudAvailable()){
170 this.closeDocument(this.activeDocument.uuid);
171 }
172 }
173 },
174 ////////////////////////////////////////////////////////////////////
166 // 175 //
167 fileSaveResult: { 176 fileSaveResult: {
168 value: function (result) { 177 value: function (result) {