[IMP] Improve code.

bzr revid: bth@tinyerp.com-20121017132533-s4wxx3vvn1g3tdaf
This commit is contained in:
Bhumi Thakkar (Open ERP) 2012-10-17 18:55:33 +05:30
parent a72d4a76ed
commit 40e1cbda37
3 changed files with 34 additions and 17 deletions

View File

@ -2913,3 +2913,10 @@ div.ui-widget-overlay {
-webkit-border-radius: 3px;
border-radius: 3px;
}
.resolution table {
width: 100%;
line-height: 20px;
}
.resolution table td {
valign: middle;
}

View File

@ -986,10 +986,14 @@ instance.web.WebClient = instance.web.Client.extend({
self.$el.on('contextmenu','.oe_logo',function(e) {
instance.web.dialog($(QWeb.render('Resolution')),{
title: "OpenERP Resolution" });
$('.resolution a').click(function() {
self.$el.find('.oe_logo').css('width', $(this).text()+"px");
self.$el.find('.oe_logo img').css('width', $(this).text()+"px");
})
$('.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.on('click', '.oe_logo', function(e) {
self.action_manager.do_action('home');

View File

@ -11,19 +11,25 @@
</div>
</t>
<t t-name="Resolution">
<div class="resolution">
<label style="font-size:20px;font-weight:bold;">Resolution:</label>
<table width="100%" >
<tr>
<td valign="middle"><a class="whiteres" href="#">100</a>px</td>
<td valign="middle"><a class="whiteres" href="#" >200</a>px</td>
</tr>
<tr>
<td valign="middle"><a class="whiteres" href="#">250</a>px</td>
<td valign="middle"><a class="whiteres" href="#" >300</a>px</td>
</tr>
</table>
</div>
<div class="resolution">
<table>
<tr>
<td colspan="2"><label>Resolution:</label></td>
</tr>
<tr>
<td><a>100</a>px</td>
<td><a>200</a>px</td>
</tr>
<tr>
<td><a>250</a>px</td>
<td><a>300</a>px</td>
</tr>
<tr>
<td></td>
<td style="float:right;"><a>Original</a></td>
</tr>
</table>
</div>
</t>
<t t-name="Notification">
<div class="oe_notification" t-translation="off">