summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhumi Thakkar (Open ERP) <bth@tinyerp.com>2012-10-18 12:48:40 +0530
committerBhumi Thakkar (Open ERP) <bth@tinyerp.com>2012-10-18 12:48:40 +0530
commitdecc05e68eb1b57c2f02b5a005a3d28fd367c5fa (patch)
tree3ba0e25223336aaa3501df987d50fe1901f64564
parent40e1cbda37f2821cc6479d7bae46ccd39b07edaf (diff)
[IMP] Set height & width for logo and improve code.
bzr revid: bth@tinyerp.com-20121018071840-mzl3286v0twl088n
-rw-r--r--addons/web/static/src/js/chrome.js10
-rw-r--r--addons/web/static/src/xml/base.xml10
2 files changed, 9 insertions, 11 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index ce871af68c3..a039433f09b 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -987,12 +987,10 @@ instance.web.WebClient = instance.web.Client.extend({
instance.web.dialog($(QWeb.render('Resolution')),{
title: "OpenERP Resolution" });
$('.resolution a').click(function() {
- if ($(this).text() == "Original") {
- self.$el.find('.oe_logo').css('width', "220px");
- self.$el.find('.oe_logo img').css('width', "157px");
- }
- self.$el.find('.oe_logo').css('width', $(this).text()+"px");
- self.$el.find('.oe_logo img').css('width', $(this).text()+"px");
+ self.$el.find('.oe_logo').css('width', $(this).attr('awidth')+"px");
+ self.$el.find('.oe_logo').css('height', $(this).attr('aheight')+"px");
+ self.$el.find('.oe_logo img').css('width', $(this).attr('imgw')+"px");
+ self.$el.find('.oe_logo img').css('height', $(this).attr('imgh')+"px");
})
})
self.$el.on('click', '.oe_logo', function(e) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 90dc55cb29a..99437d8d66f 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -17,16 +17,16 @@
<td colspan="2"><label>Resolution:</label></td>
</tr>
<tr>
- <td><a>100</a>px</td>
- <td><a>200</a>px</td>
+ <td><a awidth="150" aheight="60" imgw="100" imgh="30">150 x 60</a></td>
+ <td><a awidth="250" aheight="90" imgw="200" imgh="60">250 x 90</a></td>
</tr>
<tr>
- <td><a>250</a>px</td>
- <td><a>300</a>px</td>
+ <td><a awidth="290" aheight="90" imgw="225" imgh="60">290 x 90</a></td>
+ <td><a awidth="320" aheight="100" imgw="257" imgh="70">320 x 100</a></td>
</tr>
<tr>
<td></td>
- <td style="float:right;"><a>Original</a></td>
+ <td style="float:right;"><a awidth="220" aheight="70" imgw="157" imgh="40">Original</a></td>
</tr>
</table>
</div>