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.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index e0402219..7491ef9f 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -66,19 +66,19 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
66 66
67 67
68 68
69 69
70 70
71 71
72 72
73 //////////////////////////////////////////////////////////////////// 73 ////////////////////////////////////////////////////////////////////
74 // 74 //
75 handleWebRequest: { 75 handleWebRequest: {
76 value: function (request) { 76 value: function (request) {
77 if (this._hackRootFlag && request.url.indexOf('js/document/templates/montage-html') !== -1) { 77 if (this._hackRootFlag && request.url.indexOf('js/document/templates/montage-html') !== -1) {
78 //TODO: Optimize creating string 78 //TODO: Optimize creating string
79 return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split('/')[request.url.split('/').length-1]}; 79 return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split('/')[request.url.split('/').length-1]};
80 }
80 } 81 }
81 }
82 }, 82 },
83 //////////////////////////////////////////////////////////////////// 83 ////////////////////////////////////////////////////////////////////
84 // 84 //
@@ -89,7 +89,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
89 } 89 }
90 }, 90 },
91 //////////////////////////////////////////////////////////////////// 91 ////////////////////////////////////////////////////////////////////
92 92
93 93
94 94
95 95
@@ -121,9 +121,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
121 handleExecuteSave: { 121 handleExecuteSave: {
122 value: function(event) { 122 value: function(event) {
123 if(!!this.activeDocument){ 123 if(!!this.activeDocument){
124 //Text and HTML document classes should return the same save object for fileSave 124 //Text and HTML document classes should return the same save object for fileSave
125 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this)); 125 this.application.ninja.ioMediator.fileSave(this.activeDocument.save(), this.fileSaveResult.bind(this));
126 } 126 }
127 } 127 }
128 }, 128 },
129 //////////////////////////////////////////////////////////////////// 129 ////////////////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
135 } 135 }
136 } 136 }
137 }, 137 },
138 138
139 createNewFile:{ 139 createNewFile:{
140 value:function(newFileObj){ 140 value:function(newFileObj){
141 //console.log(newFileObj);//contains the template uri and the new file uri 141 //console.log(newFileObj);//contains the template uri and the new file uri
@@ -456,5 +456,5 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
456 value: function() { 456 value: function() {
457 return "userDocument_" + (this._iframeCounter++); 457 return "userDocument_" + (this._iframeCounter++);
458 } 458 }
459 } 459 }
460}); 460});