summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAnand Patel (OpenERP) <pan@tinyerp.com>2012-10-23 15:49:02 +0530
committerAnand Patel (OpenERP) <pan@tinyerp.com>2012-10-23 15:49:02 +0530
commit5ff01ba6bd75a6774ed7d2e62d354d3465ee4555 (patch)
tree50cc033f6d80bb851130ecb88f62f5ad65d0cfaf /addons/web/static/src
parent8351473832502b236f2232e6c7d2bc2a5c663a8f (diff)
parent2d0a401abb92ec0846786e053545017777844902 (diff)
[MERGE] Merged lp:~openerp-dev/openerp-web/trunk-improve-little-big-details
bzr revid: pan@tinyerp.com-20121023101902-xszj0m9cvgci37ig
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css18
-rw-r--r--addons/web/static/src/css/base.sass9
-rw-r--r--addons/web/static/src/js/chrome.js16
-rw-r--r--addons/web/static/src/js/view_form.js11
-rw-r--r--addons/web/static/src/xml/base.xml25
5 files changed, 72 insertions, 7 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 565bf9c12f5..eb70b150d76 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -394,6 +394,10 @@
.openerp .oe_image_medium > img {
max-width: 180px;
max-height: 180px; }
+ .openerp .oe_view_manager_current .accessactive:first-letter{
+ text-decoration:underline;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ font-weight:bold; }
.openerp .oe_button.oe_link {
border: none;
padding: 0;
@@ -2386,7 +2390,13 @@ div.ui-widget-overlay {
.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active {
background: #7c7bad; }
-.ui-corner-all {
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px; }
+ .ui-corner-all {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px; }
+
+ .resolution table {
+ width: 100%;
+ line-height: 20px; }
+ .resolution table td {
+ valign: middle; }
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 568db634815..70a9898022c 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -434,6 +434,10 @@ $sheet-max-width: 860px
.oe_image_medium > img
max-width: 180px
max-height: 180px
+ .oe_view_manager_current .accessactive:first-letter
+ text-decoration: underline
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2)
+ font-weight: bold
.oe_button.oe_link
@include reset()
img
@@ -2314,5 +2318,10 @@ div.ui-widget-overlay
.ui-corner-all
@include radius(3px)
+.resolution table
+ width: 100%
+ line-height: 20px
+ td
+ valign: middle
// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
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/js/view_form.js b/addons/web/static/src/js/view_form.js
index 7bb25d8bc4d..c913e2e74bd 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -125,6 +125,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
self.check_actual_mode();
self.on("change:actual_mode", self, self.init_pager);
self.init_pager();
+ self.widgetAccesskey();
});
self.on("load_record", self, self.load_record);
this.on('view_loaded', self, self.load_form);
@@ -219,6 +220,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return $.when();
},
+ widgetAccesskey:function(){
+ $(document).keydown(function(e){
+ if(e.keyCode === $.ui.keyCode.ALT) {
+ $("[accesskey]").addClass('accessactive');
+ }
+ e.stopPropagation();
+ }).keyup(function(e){
+ $("[accesskey]").removeClass('accessactive');
+ });
+ },
widgetFocused: function() {
// Clear click flag if used to focus a widget
this.__clicked_inside = false;
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"/>