diff options
author | Valerio Virgillito | 2012-03-06 16:17:54 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-03-06 16:17:54 -0800 |
commit | c2805e03c84b6e598556fd06d1ede7aaeea7ce9c (patch) | |
tree | b033421762f5e0fedbc8700bfc1f175c7c5cabcf /js/controllers/document-controller.js | |
parent | 1cd89d4d06e3a8f2c221628b19cf26a2c69f5d3f (diff) | |
download | ninja-c2805e03c84b6e598556fd06d1ede7aaeea7ce9c.tar.gz |
Squashed commit FileIO-Build-Candidate into Master
Fixing issues with HTML and CSS URLs. Adjusted RegEx logic. Also code a mirror update and undo/redo changes were merged into this request.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers/document-controller.js')
-rwxr-xr-x | js/controllers/document-controller.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index 64ff2c7e..194496a6 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -76,11 +76,14 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
76 | // | 76 | // |
77 | handleWebRequest: { | 77 | handleWebRequest: { |
78 | value: function (request) { | 78 | value: function (request) { |
79 | if (this._hackRootFlag && request.url.indexOf('js/document/templates/montage-html') !== -1) { | 79 | //TODO: Check if frameId is proper |
80 | if (this._hackRootFlag && request.parentFrameId !== -1) { | ||
80 | //TODO: Optimize creating string | 81 | //TODO: Optimize creating string |
81 | 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]}; | 82 | //console.log(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1], request.url); |
82 | } | 83 | //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]}; |
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(chrome.extension.getURL('js/document/templates/montage-html/'))[1]}; | ||
83 | } | 85 | } |
86 | } | ||
84 | }, | 87 | }, |
85 | //////////////////////////////////////////////////////////////////// | 88 | //////////////////////////////////////////////////////////////////// |
86 | // | 89 | // |