[FIX] TranslateDialog#start() should return a deferred
bzr revid: fme@openerp.com-20120830094811-p88qbd8tiesu8ry2
This commit is contained in:
parent
3b693e5ce2
commit
060baf72f9
|
@ -1077,14 +1077,13 @@ instance.web.TranslateDialog = instance.web.Dialog.extend({
|
|||
start: function() {
|
||||
var self = this;
|
||||
this._super();
|
||||
$.when(this.languages_loaded).then(function() {
|
||||
return $.when(this.languages_loaded).then(function() {
|
||||
self.$el.html(instance.web.qweb.render('TranslateDialog', { widget: self }));
|
||||
self.$fields_form = self.$el.find('.oe_translation_form');
|
||||
self.$fields_form.find('.oe_trad_field').change(function() {
|
||||
$(this).toggleClass('touched', ($(this).val() != $(this).attr('data-value')));
|
||||
});
|
||||
});
|
||||
return this;
|
||||
},
|
||||
on_languages_loaded: function(langs) {
|
||||
this.languages = langs;
|
||||
|
|
Loading…
Reference in New Issue