From 31278a8f3839a637f2e3bbe3541989f118e6a578 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 23 Jun 2012 19:23:58 -0700 Subject: Adding soft reset Adding a soft reset to the HTML file we create, this eliminates the margin/padding added to the page by browsers, and better illustrates what the user sees in Ninja. --- js/io/templates/files/html.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js') diff --git a/js/io/templates/files/html.txt b/js/io/templates/files/html.txt index 3449ae39..33d50c49 100755 --- a/js/io/templates/files/html.txt +++ b/js/io/templates/files/html.txt @@ -10,6 +10,12 @@ -- cgit v1.2.3 From baa9d992a1fc3eb99b53838d898970d7b2be2c65 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 23 Jun 2012 20:21:27 -0700 Subject: Support for browser escaped file paths (CSS) This fixes an issue with files located in folder with names/paths that the browser escapes, hence, caused a bug with the path passed to the cloud simulator and files not to be found. This does not require testing to merge. The fix is simple, addresses folder paths with spaces and such characters in which CSS files consumed by the HTML we open in design view. --- js/document/helpers/url-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/document/helpers/url-parser.js b/js/document/helpers/url-parser.js index 5e71d148..7bded27d 100755 --- a/js/document/helpers/url-parser.js +++ b/js/document/helpers/url-parser.js @@ -53,7 +53,7 @@ exports.UrlParser = Montage.create(Component, { //Getting file URI (not URL since we must load through I/O API) var css = {}, file; css.cssUrl = href.split(this.application.ninja.coreIoApi.rootUrl)[1]; - css.fileUri = this.application.ninja.coreIoApi.cloudData.root + css.cssUrl; + css.fileUri = this.application.ninja.coreIoApi.cloudData.root + unescape(css.cssUrl); //Loading data from CSS file file = this.application.ninja.coreIoApi.readFile({uri: css.fileUri}); //Checking for file to be writable on disk -- cgit v1.2.3