Browse Source

[CHG] display an item in the 'More' menu instead of adding a button

pull/4/head
Guewen Baconnier 11 years ago
parent
commit
549b31bfa9
  1. 6
      web_translate_dialog_page/static/src/js/web_translate_dialog_page.js
  2. 6
      web_translate_dialog_page/static/src/xml/base.xml

6
web_translate_dialog_page/static/src/js/web_translate_dialog_page.js

@ -8,9 +8,11 @@ openerp.web_translate_dialog_page = function (instance) {
instance.web.FormView.include({
load_form: function(data) {
var self = this;
this._super(data);
this.$buttons.on('click', '.oe_form_button_translate',
this.guard_active(this.on_button_translate));
this.sidebar.add_items('other', _.compact([
self.is_action_enabled('edit') && { label: _t('Translate'), callback: self.on_button_translate },
]));
},
on_button_translate: function() {
var self = this;

6
web_translate_dialog_page/static/src/xml/base.xml

@ -30,11 +30,5 @@
<button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button>
</t>
<div t-extend="FormView.buttons">
<t t-jquery="span.oe_form_buttons_view" t-operation="append">
<button type="button" class="oe_button oe_form_button_translate">Translate</button>
</t>
</div>
</templates>
Loading…
Cancel
Save