aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-xjs/controllers/document-controller.js20
1 files changed, 6 insertions, 14 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 3cd2c254..9a063280 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -100,26 +100,18 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
100 handleExecuteFileOpen: { 100 handleExecuteFileOpen: {
101 value: function(event) { 101 value: function(event) {
102 var pickerSettings = event._event.settings || {}; 102 var pickerSettings = event._event.settings || {};
103 //adding callback so that file picker can be opened after checking cloud status 103 pickerSettings.callback = this.openFileWithURI.bind(this);
104 this.application.ninja.coreIoApi.cloudAvailable(function(){ 104 pickerSettings.pickerMode = "read";
105 pickerSettings.callback = this.openFileWithURI.bind(this); 105 pickerSettings.inFileMode = true;
106 pickerSettings.pickerMode = "read"; 106 this.application.ninja.filePickerController.showFilePicker(pickerSettings);
107 pickerSettings.inFileMode = true;
108 this.application.ninja.filePickerController.showFilePicker(pickerSettings);
109 }.bind(this));
110
111 } 107 }
112 }, 108 },
113 109
114 handleExecuteNewFile: { 110 handleExecuteNewFile: {
115 value: function(event) { 111 value: function(event) {
116 var newFileSettings = event._event.settings || {}; 112 var newFileSettings = event._event.settings || {};
117 //adding callback so that new file dialog can be opened after checking cloud status 113 newFileSettings.callback = this.createNewFile.bind(this);
118 this.application.ninja.coreIoApi.cloudAvailable(function(){ 114 this.application.ninja.newFileController.showNewFileDialog(newFileSettings);
119 newFileSettings.callback = this.createNewFile.bind(this);
120 this.application.ninja.newFileController.showNewFileDialog(newFileSettings);
121 }.bind(this));
122
123 } 115 }
124 }, 116 },
125 117