[IMP]Improve code for keyboard shortcuts.

bzr revid: vja@tinyerp.com-20121106094604-q2aiwv655vajdebj
This commit is contained in:
Vishmita
2012-11-06 15:16:04 +05:30
parent 7fb4bdf6ef
commit a5cb086624
3 changed files with 15 additions and 5 deletions
+4
View File
@@ -475,6 +475,10 @@
max-width: 180px;
max-height: 180px;
}
.openerp .oe_view_manager_current a.accessactive {
display:inline-block;
text-decoration:none;
}
.openerp .oe_view_manager_current .accessactive:first-letter{
text-decoration:underline;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+8 -4
View File
@@ -437,10 +437,14 @@ $sheet-padding: 16px
.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_view_manager_current
a.accessactive
display: inline-block
text-decoration: none
.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
+3 -1
View File
@@ -222,8 +222,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
},
widgetAccesskey:function(){
$(document).keydown(function(e){
if(e.keyCode === $.ui.keyCode.ALT) {
if(e.keyCode === $.ui.keyCode.ALT || e.keyCode === $.ui.keyCode.SHIFT && e.altKey) {
$("[accesskey]").addClass('accessactive');
}else {
$("[accesskey]").removeClass('accessactive');
}
e.stopPropagation();
}).keyup(function(e){