aboutsummaryrefslogtreecommitdiff
path: root/js/io/document
diff options
context:
space:
mode:
Diffstat (limited to 'js/io/document')
-rwxr-xr-xjs/io/document/document-controller.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/js/io/document/document-controller.js b/js/io/document/document-controller.js
index 8ce43dcc..dd62b40b 100755
--- a/js/io/document/document-controller.js
+++ b/js/io/document/document-controller.js
@@ -71,8 +71,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
71 deserializedFromTemplate: { 71 deserializedFromTemplate: {
72 value: function() { 72 value: function() {
73 this.eventManager.addEventListener("appLoaded", this, false); 73 this.eventManager.addEventListener("appLoaded", this, false);
74
75 this.eventManager.addEventListener("executeFileOpen", this, false); 74 this.eventManager.addEventListener("executeFileOpen", this, false);
75 this.eventManager.addEventListener("executeNewFile", this, false);
76 } 76 }
77 }, 77 },
78 78
@@ -93,6 +93,21 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
93 } 93 }
94 }, 94 },
95 95
96 handleExecuteNewFile: {
97 value: function(event) {
98 var newFileSettings = event._event.settings || {};
99 newFileSettings.callback = this.createNewFile;
100 newFileSettings.callbackScope = this;
101 this.application.ninja.newFileController.showNewFileDialog(newFileSettings);
102 }
103 },
104
105 createNewFile:{
106 value:function(newFileObj){
107 //console.log(newFileObj);
108 }
109 },
110
96 openFileWithURI: { 111 openFileWithURI: {
97 value: function(uriArrayObj) { 112 value: function(uriArrayObj) {
98 var uri = "", fileContent = "", response=null, filename="", fileType="js"; 113 var uri = "", fileContent = "", response=null, filename="", fileType="js";