aboutsummaryrefslogtreecommitdiff
path: root/js/document/models
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-15 17:08:51 -0700
committerValerio Virgillito2012-05-15 17:08:51 -0700
commit012a6e8fa8bfb56e1a50f3b2fc6058f3651701a2 (patch)
tree9c39eeee2255b76aea5ade260af485f4a1089398 /js/document/models
parent46bd3712329cd3c9311e50ed9ee4c2245bd1be5a (diff)
parentb3f9a31e99a4c2b05792073e0cb15c4d517e5acf (diff)
downloadninja-012a6e8fa8bfb56e1a50f3b2fc6058f3651701a2.tar.gz
Merge pull request #236 from joseeight/Document
Improving Chrome Preview
Diffstat (limited to 'js/document/models')
-rwxr-xr-xjs/document/models/base.js14
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 ////////////////////////////////////////////////////////////////////