summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorJiten (OpenERP) <jra@tinyerp.com>2012-10-22 18:36:44 +0530
committerJiten (OpenERP) <jra@tinyerp.com>2012-10-22 18:36:44 +0530
commit7ff1b399c3de0e6121516ea4a7366adca79f26c2 (patch)
tree9de29d6a683a022cba9f428eab87b97283e4cd76 /addons/web/static/src
parent11a583c9b13c5ab1f669f9ac850527ed066538fa (diff)
parentc429019b5c56ce1a835f0854834fb935e6cb6407 (diff)
[IMP] Offered different resolution of logo on right click.
bzr revid: jra@tinyerp.com-20121022130644-hcoclliqz00llxoq
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css7
-rw-r--r--addons/web/static/src/js/chrome.js16
-rw-r--r--addons/web/static/src/xml/base.xml25
3 files changed, 45 insertions, 3 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index e4b8885b1a1..4dad3505d4b 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -2925,3 +2925,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 3cb4437d1c3..8cd02c46763 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -987,7 +987,21 @@ 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" });
+
+ $(self.$el).click(function(){
+ $('.resolution').dialog('close');
+ })
+ $('.resolution a').click(function() {
+ self.$el.find('.oe_logo').css('width', $(this).attr('awidth')+"px");
+ self.$el.find('.oe_logo').css('height', $(this).attr('aheight')+"px");
+ self.$el.find('.oe_logo img').css('width', $(this).attr('imgw')+"px");
+ self.$el.find('.oe_logo img').css('height', $(this).attr('imgh')+"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 899bd614f76..caba50416ad 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -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 awidth="150" aheight="60" imgw="100" imgh="30">150 x 60</a></td>
+ <td><a awidth="250" aheight="90" imgw="200" imgh="60">250 x 90</a></td>
+ </tr>
+ <tr>
+ <td><a awidth="290" aheight="90" imgw="225" imgh="60">290 x 90</a></td>
+ <td><a awidth="320" aheight="100" imgw="257" imgh="70">320 x 100</a></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td style="float:right;"><a awidth="220" aheight="70" imgw="157" imgh="40">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"/>