aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-22 23:53:38 -0800
committerJose Antonio Marquez2012-02-22 23:53:38 -0800
commitd264092596ba697cd04738566184270dc608be63 (patch)
tree5e2138fe5fe45696bda3f8a620c92c5a60d36c31 /js
parent950bb79b1907e4f97735bed1430401dfd797fb0d (diff)
downloadninja-d264092596ba697cd04738566184270dc608be63.tar.gz
Temp fix for CSS url data
Added a temp fix to parse out the app url that is placed in the CSS styles.
Diffstat (limited to 'js')
-rwxr-xr-xjs/document/html-document.js2
-rw-r--r--js/mediators/io-mediator.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 3f417ffc..143b1598 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -558,7 +558,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
558 enumerable: false, 558 enumerable: false,
559 value: function () { 559 value: function () {
560 //TODO: Add logic to handle save before preview 560 //TODO: Add logic to handle save before preview
561 this.save(); 561 this.saveAll();
562 //Launching 'blank' tab for testing movie 562 //Launching 'blank' tab for testing movie
563 chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]}); 563 chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]});
564 } 564 }
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index 7606b168..4dc29c3c 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -280,7 +280,7 @@ exports.IoMediator = Montage.create(Component, {
280 enumerable: false, 280 enumerable: false,
281 value: function (list) { 281 value: function (list) {
282 //Variable to store CSS definitions 282 //Variable to store CSS definitions
283 var i, str, css = ''; 283 var i, str, url, css = '';
284 //Looping through list 284 //Looping through list
285 if (list && list.length > 0) { 285 if (list && list.length > 0) {
286 //Adding each list item to string and also adding breaks 286 //Adding each list item to string and also adding breaks
@@ -292,8 +292,10 @@ exports.IoMediator = Montage.create(Component, {
292 css += '\n'+str; 292 css += '\n'+str;
293 } 293 }
294 } 294 }
295 //TODO: Add better logic for creating this string
296 url = new RegExp(window.location.protocol+'//'+window.location.host+'/js/document/templates/montage-html/', 'gi');
295 //Returning the CSS string 297 //Returning the CSS string
296 return css; 298 return css.replace(url, '');
297 } 299 }
298 } 300 }
299 //////////////////////////////////////////////////////////////////// 301 ////////////////////////////////////////////////////////////////////