[FIX] im: do not send empty messages

bzr revid: nicolas.vanhoren@openerp.com-20130531111317-h17qwsevk06bhf84
This commit is contained in:
niv-openerp 2013-05-31 13:13:17 +02:00
parent c30d90e97a
commit 3a3841aabe
2 changed files with 6 additions and 0 deletions

View File

@ -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");

View File

@ -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");