aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/document-controller.js
diff options
context:
space:
mode:
authorhwc4872012-03-24 14:07:58 -0700
committerhwc4872012-03-24 14:07:58 -0700
commitcca20db1f346fc9bf2ead64c83e479f5f5ebf2d2 (patch)
tree4f5c42f0a1df00dcd1a2064dd176fcff7930ba47 /js/controllers/document-controller.js
parent62f4327f9b83760e52a1f6bf1e689b1e0a780fbb (diff)
parent7ee75fef18c21275cf29740a6fdd81ea90e41f45 (diff)
downloadninja-cca20db1f346fc9bf2ead64c83e479f5f5ebf2d2.tar.gz
Merge branch 'montage-integration' of github.com:Motorola-Mobility/ninja-internal into Textures
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