diff options
author | Valerio Virgillito | 2012-05-15 17:08:51 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-15 17:08:51 -0700 |
commit | 012a6e8fa8bfb56e1a50f3b2fc6058f3651701a2 (patch) | |
tree | 9c39eeee2255b76aea5ade260af485f4a1089398 /js/document/models | |
parent | 46bd3712329cd3c9311e50ed9ee4c2245bd1be5a (diff) | |
parent | b3f9a31e99a4c2b05792073e0cb15c4d517e5acf (diff) | |
download | ninja-012a6e8fa8bfb56e1a50f3b2fc6058f3651701a2.tar.gz |
Merge pull request #236 from joseeight/Document
Improving Chrome Preview
Diffstat (limited to 'js/document/models')
-rwxr-xr-x | js/document/models/base.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/js/document/models/base.js b/js/document/models/base.js index 5f2a5893..e8eba89f 100755 --- a/js/document/models/base.js +++ b/js/document/models/base.js | |||
@@ -93,13 +93,21 @@ exports.BaseDocumentModel = Montage.create(Component, { | |||
93 | //Currently only supporting current browser (Chrome, obviously) | 93 | //Currently only supporting current browser (Chrome, obviously) |
94 | switch (this.browser) { | 94 | switch (this.browser) { |
95 | case 'chrome': | 95 | case 'chrome': |
96 | window.open(this.url); | 96 | if (this.template.type === 'banner' || this.template.type === 'animation') { |
97 | window.open('/js/document/templates/preview/banner.html?width='+this.template.size.width+'&height='+this.template.size.height+'&url='+this.url); | ||
98 | } else { | ||
99 | window.open(this.url); | ||
100 | } | ||
97 | break; | 101 | break; |
98 | default: | 102 | default: |
99 | window.open(this.url); | 103 | if (this.template.type === 'banner' || this.template.type === 'animation') { |
104 | window.open('/js/document/templates/preview/banner.html?width='+this.template.size.width+'&height='+this.template.size.height+'&url='+this.url); | ||
105 | } else { | ||
106 | window.open(this.url); | ||
107 | } | ||
100 | break; | 108 | break; |
101 | } | 109 | } |
102 | }.bind({browser: browser, url: url})); | 110 | }.bind({browser: browser, url: url, template: this.fileTemplate})); |
103 | } | 111 | } |
104 | }, | 112 | }, |
105 | //////////////////////////////////////////////////////////////////// | 113 | //////////////////////////////////////////////////////////////////// |