[FIX] im: do not send empty messages
bzr revid: nicolas.vanhoren@openerp.com-20130531111317-h17qwsevk06bhf84
This commit is contained in:
parent
c30d90e97a
commit
3a3841aabe
|
@ -412,6 +412,9 @@ openerp.im = function(instance) {
|
|||
return;
|
||||
}
|
||||
var mes = this.$("input").val();
|
||||
if (! mes.trim()) {
|
||||
return;
|
||||
}
|
||||
this.$("input").val("");
|
||||
var send_it = _.bind(function() {
|
||||
var model = new instance.web.Model("im.message");
|
||||
|
|
|
@ -399,6 +399,9 @@ define(["nova", "underscore", "oeclient", "require", "jquery",
|
|||
return;
|
||||
}
|
||||
var mes = this.$("input").val();
|
||||
if (! mes.trim()) {
|
||||
return;
|
||||
}
|
||||
this.$("input").val("");
|
||||
var send_it = _.bind(function() {
|
||||
var model = connection.getModel("im.message");
|
||||
|
|
Loading…
Reference in New Issue