[ADD] enable accesskeys (=shortcuts) without translation facilities

bzr revid: hbrunn@therp.nl-20120807092148-poz2wi4dga0gi0qw
This commit is contained in:
Holger Brunn
2012-08-07 11:21:48 +02:00
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -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]);
+6 -5
View File
@@ -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>