From 40e1cbda37f2821cc6479d7bae46ccd39b07edaf Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 17 Oct 2012 18:55:33 +0530 Subject: [PATCH] [IMP] Improve code. bzr revid: bth@tinyerp.com-20121017132533-s4wxx3vvn1g3tdaf --- addons/web/static/src/css/base.css | 7 +++++++ addons/web/static/src/js/chrome.js | 12 +++++++---- addons/web/static/src/xml/base.xml | 32 ++++++++++++++++++------------ 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index c8f1567bee9..9b7524363fa 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -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; +} \ No newline at end of file diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index bfcb7639a26..ce871af68c3 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -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'); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 956d5164729..90dc55cb29a 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -11,19 +11,25 @@ -
- - - - - - - - - - -
100px200px
250px300px
-
+
+ + + + + + + + + + + + + + + + +
100px200px
250px300px
Original
+