[IMP] improved dialog
bzr revid: pga@tinyerp.com-20140327111612-g0cukmzw4kripewq
This commit is contained in:
parent
eedb1bedb1
commit
e1fee1a4c3
|
@ -118,6 +118,20 @@
|
|||
'hidden.bs.modal': 'destroy',
|
||||
}),
|
||||
template: 'website.GengoTranslatorStatisticDialog',
|
||||
init:function(res){
|
||||
var self = this;
|
||||
this.inprogess = 0;
|
||||
this.new_words = 0;
|
||||
this.done = res.done;
|
||||
$('.oe_translatable_todo').each(function () {
|
||||
self.new_words += $(this).text().trim().replace(/ +/g," ").split(" ").length;
|
||||
});
|
||||
$('.oe_translatable_inprogress').each(function () {
|
||||
self.inprogess += $(this).text().trim().replace(/ +/g," ").split(" ").length;
|
||||
});
|
||||
this.total = this.done + this.inprogess;
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
start: function (res) {
|
||||
this.$el.modal(this.res);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue