[IMP] In Formview,highlight keyboard shortcuts when press ALT key.
bzr revid: jra@tinyerp.com-20121023095814-4lt8nn8yzn9n5b2c
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
@@ -216,6 +217,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||
this.trigger('form_view_loaded', data);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user