diff options
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 4363e440..a308f191 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -73,22 +73,29 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
73 | 73 | ||
74 | this.eventManager.addEventListener("styleSheetDirty", this, false); | 74 | this.eventManager.addEventListener("styleSheetDirty", this, false); |
75 | 75 | ||
76 | this.eventManager.addEventListener("addComponentFirstDraw", this, false); | ||
76 | } | 77 | } |
77 | }, | 78 | }, |
78 | 79 | ||
79 | 80 | handleAddComponentFirstDraw: { | |
81 | value: function (e) { | ||
82 | //TODO: Add logic to reparse the document for dynamically added styles | ||
83 | console.log(e); | ||
84 | } | ||
85 | }, | ||
80 | 86 | ||
81 | 87 | ||
82 | 88 | ||
83 | 89 | ||
84 | 90 | ||
85 | //////////////////////////////////////////////////////////////////// | 91 | //////////////////////////////////////////////////////////////////// |
86 | // | 92 | // |
87 | handleWebRequest: { | 93 | handleWebRequest: { |
88 | value: function (request) { | 94 | value: function (request) { |
89 | //TODO: Check if frameId is proper | 95 | //TODO: Check if frameId is proper |
90 | if (this._hackRootFlag && request.parentFrameId !== -1) { | 96 | if (this._hackRootFlag && request.parentFrameId !== -1) { |
91 | //TODO: Optimize creating string | 97 | //TODO: Optimize creating string |
98 | //console.log(request); | ||
92 | //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); | 99 | //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); |
93 | //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]}; | 100 | //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]}; |
94 | 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]}; | 101 | 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]}; |
@@ -112,6 +119,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
112 | }, | 119 | }, |
113 | //////////////////////////////////////////////////////////////////// | 120 | //////////////////////////////////////////////////////////////////// |
114 | 121 | ||
122 | |||
115 | 123 | ||
116 | 124 | ||
117 | 125 | ||