diff options
author | hwc487 | 2012-03-23 13:49:03 -0700 |
---|---|---|
committer | hwc487 | 2012-03-23 13:49:03 -0700 |
commit | 51478dbad8290f55eeab9efdfb8c2cbe24b12b10 (patch) | |
tree | 1524c53d027d1f2f8cbb759f61e4d73b52b00481 /js/controllers/document-controller.js | |
parent | 31e924e1b8b8da8342b3ff2341c8284915486c0b (diff) | |
parent | bc8b0c17023ddea6d77150694a777e104ef99cbc (diff) | |
download | ninja-51478dbad8290f55eeab9efdfb8c2cbe24b12b10.tar.gz |
Merge branch 'montage-integration' of github.com:Motorola-Mobility/ninja-internal into integration
Conflicts:
js/io/system/ninjalibrary.json
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 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 | ||