summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorHolger Brunn <hbrunn@therp.nl>2012-08-07 11:21:48 +0200
committerHolger Brunn <hbrunn@therp.nl>2012-08-07 11:21:48 +0200
commitf49caa90ab49b2c66df8bb64de2a1ed73f156f66 (patch)
tree94a1db89807ab61380a12941332318d9db564b12 /addons/web/static/src
parent4e641e9f2c0b5dba1ba8bc937d54c7108c1241ab (diff)
parent30ba281af0ace8c31862e9260339e6e4d321fb53 (diff)
[ADD] enable accesskeys (=shortcuts) without translation facilities
bzr revid: hbrunn@therp.nl-20120807092148-poz2wi4dga0gi0qw
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/coresetup.js2
-rw-r--r--addons/web/static/src/xml/base.xml11
2 files changed, 7 insertions, 6 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 6ba62162e93..60a10d986bf 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -631,7 +631,7 @@ instance.web.qweb.preprocess_node = function() {
break;
case 1:
// Element
- var attr, attrs = ['label', 'title', 'alt', 'placeholder'];
+ var attr, attrs = ['label', 'title', 'alt', 'placeholder', 'accesskey'];
while (attr = attrs.pop()) {
if (this.attributes[attr]) {
this.attributes[attr] = instance.web._t(this.attributes[attr]);
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 601fe165f81..a75efffdb3a 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -708,11 +708,11 @@
<div t-name="FormView.buttons" class="oe_form_buttons">
<t t-if="widget.options.action_buttons !== false">
<span class="oe_form_buttons_view">
- <button type="button" class="oe_button oe_form_button_edit">Edit</button>
- <button type="button" class="oe_button oe_form_button_create">Create</button>
+ <button type="button" class="oe_button oe_form_button_edit" accesskey="E">Edit</button>
+ <button type="button" class="oe_button oe_form_button_create" accesskey="C">Create</button>
</span>
<span class="oe_form_buttons_edit">
- <button type="button" class="oe_button oe_form_button_save oe_highlight">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
+ <button type="button" class="oe_button oe_form_button_save oe_highlight" accesskey="S">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel" accesskey="D">Discard</a>
</span>
</t>
</div>
@@ -798,7 +798,7 @@
<div class="oe_clear">
<ul t-attf-class="oe_notebook #{classnames}">
<li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers">
- <a t-attf-href="##{page.id}">
+ <a t-attf-href="##{page.id}" t-att-accesskey="page.accesskey">
<t t-esc="page.string"/>
</a>
</li>
@@ -1142,7 +1142,8 @@
<button type="button" class="oe_button oe_form_button"
t-att-style="widget.node.attrs.style"
t-att-tabindex="widget.node.attrs.tabindex"
- t-att-autofocus="widget.node.attrs.autofocus">
+ t-att-autofocus="widget.node.attrs.autofocus"
+ t-att-accesskey="widget.node.attrs.accesskey">
<img t-if="widget.node.attrs.icon" t-att-src="_s + widget.node.attrs.icon" width="16" height="16"/>
<span t-if="widget.string"><t t-esc="widget.string"/></span>
</button>