Bhumi Thakkar (Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-improve-little-big-details-right-click-logo-bth
 into lp:~openerp-dev/openerp-web/trunk-improve-little-big-details.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-improve-little-big-details-right-click-logo-bth/+merge/130112

Hello,

  Right click on header logo, open resolution box and can select size of logo 
and logo will be resized.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-improve-little-big-details-right-click-logo-bth/+merge/130112
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openerp-web/trunk-improve-little-big-details-right-click-logo-bth
 into lp:~openerp-dev/openerp-web/trunk-improve-little-big-details.
=== modified file 'addons/web/static/src/css/base.css'
--- addons/web/static/src/css/base.css	2012-10-14 19:55:14 +0000
+++ addons/web/static/src/css/base.css	2012-10-17 13:30:37 +0000
@@ -2914,3 +2914,10 @@
   -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

=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js	2012-10-16 10:32:52 +0000
+++ addons/web/static/src/js/chrome.js	2012-10-17 13:30:37 +0000
@@ -983,7 +983,19 @@
     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() {
+                    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');
             });
             if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {

=== modified file 'addons/web/static/src/xml/base.xml'
--- addons/web/static/src/xml/base.xml	2012-10-16 08:52:49 +0000
+++ addons/web/static/src/xml/base.xml	2012-10-17 13:30:37 +0000
@@ -10,6 +10,27 @@
         Loading...
     </div>
 </t>
+<t t-name="Resolution">
+    <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">
         <div id="oe_notification_default">
@@ -404,7 +425,7 @@
         </tr>
         <tr>
             <td class="oe_leftbar" valign="top">
-                <a class="oe_logo" href="#"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
+                <a class="oe_logo" href="#"><img onContextMenu="return false;" t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
                 <div class="oe_secondary_menus_container"/>
                 <div class="oe_footer">
                     Powered by <a href="http://www.openerp.com"; target="_blank"><span>OpenERP</span></a>
@@ -1090,7 +1111,7 @@
         <div class="oe_form_field_image_controls oe_edit_only">
             <t t-call="HiddenInputFile">
                 <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
-                Edit 
+                Edit
             </t>
             <div class="oe_form_binary_progress" style="display: none">
                 <img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to