forked from Techsystech/web
commit
3e543c804b
|
@ -23,6 +23,7 @@ var Mutex = concurrency.Mutex;
|
||||||
var TranslateDialog = Dialog.extend({
|
var TranslateDialog = Dialog.extend({
|
||||||
template: "TranslateDialog",
|
template: "TranslateDialog",
|
||||||
init: function(parent, options) {
|
init: function(parent, options) {
|
||||||
|
this._open_dialog_wait_for = []
|
||||||
var title_string = _t("Translate fields: /");
|
var title_string = _t("Translate fields: /");
|
||||||
var field_names;
|
var field_names;
|
||||||
var single_field = false;
|
var single_field = false;
|
||||||
|
@ -50,6 +51,7 @@ var TranslateDialog = Dialog.extend({
|
||||||
);
|
);
|
||||||
this.lang_data.set_sort(['tr_sequence asc','id asc']);
|
this.lang_data.set_sort(['tr_sequence asc','id asc']);
|
||||||
this.lang_data.read_slice(['code', 'name']).then(this.on_languages_loaded);
|
this.lang_data.read_slice(['code', 'name']).then(this.on_languages_loaded);
|
||||||
|
this._open_dialog_wait_for.push(this.languages_loaded)
|
||||||
},
|
},
|
||||||
willStart: function () {
|
willStart: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -75,7 +77,7 @@ var TranslateDialog = Dialog.extend({
|
||||||
},
|
},
|
||||||
open: function() {
|
open: function() {
|
||||||
// the template needs the languages
|
// the template needs the languages
|
||||||
return $.when(this.languages_loaded).then($.proxy(this._super, this));
|
return $.when.apply($, this._open_dialog_wait_for).then($.proxy(this._super, this));
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
Loading…
Reference in New Issue