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.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index 7d982a62..d5556fa8 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -64,22 +64,29 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
64 64
65 this.eventManager.addEventListener("styleSheetDirty", this, false); 65 this.eventManager.addEventListener("styleSheetDirty", this, false);
66 66
67 this.eventManager.addEventListener("addComponentFirstDraw", this, false);
67 } 68 }
68 }, 69 },
69 70
70 71 handleAddComponentFirstDraw: {
72 value: function (e) {
73 //TODO: Add logic to reparse the document for dynamically added styles
74 console.log(e);
75 }
76 },
71 77
72 78
73 79
74 80
75 81
76 //////////////////////////////////////////////////////////////////// 82////////////////////////////////////////////////////////////////////
77 // 83 //
78 handleWebRequest: { 84 handleWebRequest: {
79 value: function (request) { 85 value: function (request) {
80 //TODO: Check if frameId is proper 86 //TODO: Check if frameId is proper
81 if (this._hackRootFlag && request.parentFrameId !== -1) { 87 if (this._hackRootFlag && request.parentFrameId !== -1) {
82 //TODO: Optimize creating string 88 //TODO: Optimize creating string
89 //console.log(request);
83 //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); 90 //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url);
84 //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]}; 91 //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]};
85 return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split(chrome.extension.getURL('js/document/templates/montage-html/'))[1]}; 92 return {redirectUrl: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]+request.url.split(chrome.extension.getURL('js/document/templates/montage-html/'))[1]};
@@ -103,6 +110,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
103 }, 110 },
104 //////////////////////////////////////////////////////////////////// 111 ////////////////////////////////////////////////////////////////////
105 112
113
106 114
107 115
108 116