From f78b41c2ba4d26a89082e82e5585de548dcca4b5 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 17 Oct 2012 18:30:47 +0530 Subject: [PATCH 01/56] [IMP] Right click on header logo open dialog box to resize logo. bzr revid: bth@tinyerp.com-20121017130047-xw1j2jw9eje8wn8p --- addons/web/static/src/js/chrome.js | 10 +++++++++- addons/web/static/src/xml/base.xml | 19 +++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 67e36678040..bfcb7639a26 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -983,7 +983,15 @@ instance.web.WebClient = instance.web.Client.extend({ start: function() { var self = this; return $.when(this._super()).pipe(function() { - self.$el.on('click', '.oe_logo', function() { + 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"); + }) + }) + self.$el.on('click', '.oe_logo', function(e) { self.action_manager.do_action('home'); }); if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index a09897862f6..956d5164729 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -10,6 +10,21 @@ Loading... + +
+ + + + + + + + + + +
100px200px
250px300px
+
+
@@ -404,7 +419,7 @@ - +