forked from Techsystech/web
[CHG] display an item in the 'More' menu instead of adding a button
parent
0e25e20bab
commit
549b31bfa9
|
@ -8,9 +8,11 @@ openerp.web_translate_dialog_page = function (instance) {
|
||||||
|
|
||||||
instance.web.FormView.include({
|
instance.web.FormView.include({
|
||||||
load_form: function(data) {
|
load_form: function(data) {
|
||||||
|
var self = this;
|
||||||
this._super(data);
|
this._super(data);
|
||||||
this.$buttons.on('click', '.oe_form_button_translate',
|
this.sidebar.add_items('other', _.compact([
|
||||||
this.guard_active(this.on_button_translate));
|
self.is_action_enabled('edit') && { label: _t('Translate'), callback: self.on_button_translate },
|
||||||
|
]));
|
||||||
},
|
},
|
||||||
on_button_translate: function() {
|
on_button_translate: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
|
@ -30,11 +30,5 @@
|
||||||
<button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button>
|
<button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button>
|
||||||
</t>
|
</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>
|
</templates>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue