[IMP] Offered different resolution of logo on right click.

bzr revid: jra@tinyerp.com-20121022130644-hcoclliqz00llxoq
This commit is contained in:
Jiten (OpenERP)
2012-10-22 18:36:44 +05:30
3 changed files with 45 additions and 3 deletions
+7
View File
@@ -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;
}
+15 -1
View File
@@ -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) {
+23 -2
View File
@@ -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"/>