aboutsummaryrefslogtreecommitdiff
path: root/js/document/models
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-15 16:49:32 -0700
committerJose Antonio Marquez2012-05-15 16:49:32 -0700
commit620ae8f53d4da25c65adb675c0b0ee187e5754fc (patch)
tree57ceb3dd28eb5a2a0882aaf56e92984d014fb099 /js/document/models
parent1ab2c2925fbf6186c8d9872392831f69c61d063d (diff)
downloadninja-620ae8f53d4da25c65adb675c0b0ee187e5754fc.tar.gz
Adding special preview for templates
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 ////////////////////////////////////////////////////////////////////