[IMP] In kanban for quick create if there is no any value then not displayed in kanban.

bzr revid: bth@tinyerp.com-20130402055921-o52gzvmoxqhulrxm
This commit is contained in:
bth-openerp 2013-04-02 11:29:21 +05:30
parent a4a7fb332d
commit d63a858dc5
1 changed files with 5 additions and 1 deletions

View File

@ -1038,6 +1038,10 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
self.quick_add();
}
});
$(".oe_kanban_quick_create").focusout(function () {
var val = self.$el.find('input').val()
if (/^\s*$/.test(val)) { self.$el.remove(); return; }
});
$(".oe_kanban_quick_create_add", this.$el).click(function () {
self.quick_add();
self.focus();
@ -1061,7 +1065,7 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
quick_add: function () {
var self = this;
var val = this.$input.val();
if (/^\s*$/.test(val)) { return; }
if (/^\s*$/.test(val)) { this.$el.remove(); return; }
this._dataset.call(
'name_create', [val, new instance.web.CompoundContext(
this._dataset.get_context(), this._context)])