aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/document-controller.js3
-rwxr-xr-xjs/document/views/design.js1
2 files changed, 3 insertions, 1 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index dadfaf05..4edcff48 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -80,6 +80,8 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
80 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/banner/'))[1]}; 80 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/banner/'))[1]};
81 } else if (request.url.indexOf('js/document/templates/html') !== -1) { 81 } else if (request.url.indexOf('js/document/templates/html') !== -1) {
82 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/html/'))[1]}; 82 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/html/'))[1]};
83 } else if (request.url.indexOf('js/document/templates/app') !== -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/app/'))[1]};
83 } else { 85 } else {
84 //Error, not a valid folder 86 //Error, not a valid folder
85 } 87 }
@@ -103,7 +105,6 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
103 }, 105 },
104 //////////////////////////////////////////////////////////////////// 106 ////////////////////////////////////////////////////////////////////
105 107
106
107 108
108 109
109 110
diff --git a/js/document/views/design.js b/js/document/views/design.js
index b3887fdf..6da1b2e4 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -105,6 +105,7 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
105 // 105 //
106 onTemplateLoad: { 106 onTemplateLoad: {
107 value: function (e) { 107 value: function (e) {
108 //console.log(this.iframe.contentWindow);
108 this.application.ninja.documentController._hackRootFlag = true; 109 this.application.ninja.documentController._hackRootFlag = true;
109 //TODO: Add support to constructing URL with a base HREF 110 //TODO: Add support to constructing URL with a base HREF
110 var basetag = this.content.document.getElementsByTagName('base'); 111 var basetag = this.content.document.getElementsByTagName('base');