[IMP] Set height & width for logo and improve code.

bzr revid: bth@tinyerp.com-20121018071840-mzl3286v0twl088n
This commit is contained in:
Bhumi Thakkar (Open ERP)
2012-10-18 12:48:40 +05:30
parent 40e1cbda37
commit decc05e68e
2 changed files with 9 additions and 11 deletions
+4 -6
View File
@@ -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) {
+5 -5
View File
@@ -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>