diff options
| author | Bhumi Thakkar (Open ERP) <bth@tinyerp.com> | 2012-10-17 18:30:47 +0530 |
|---|---|---|
| committer | Bhumi Thakkar (Open ERP) <bth@tinyerp.com> | 2012-10-17 18:30:47 +0530 |
| commit | f78b41c2ba4d26a89082e82e5585de548dcca4b5 (patch) | |
| tree | fdb3899b3505800560f07e4c3826c6defd696d9e /addons/web/static/src | |
| parent | 25181d3f51904b86e84a1ff8b6be8aaf98790090 (diff) | |
[IMP] Right click on header logo open dialog box to resize logo.
bzr revid: bth@tinyerp.com-20121017130047-xw1j2jw9eje8wn8p
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 10 | ||||
| -rw-r--r-- | 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... </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> +</t> <t t-name="Notification"> <div class="oe_notification" t-translation="off"> <div id="oe_notification_default"> @@ -404,7 +419,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 +1105,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"/> |
