[FIX] Kanban quick create should send false if input is empty thus triggering slow create
bzr revid: fme@openerp.com-20120919130239-f7wcd91ng9x6kpo7
This commit is contained in:
parent
3896111478
commit
16f52fcdb8
|
@ -1013,7 +1013,8 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
|
|||
$(".oe_kanban_quick_create_add", this.$el).click(function () {
|
||||
self.quick_add();
|
||||
});
|
||||
$(".oe_kanban_quick_create_close", this.$el).click(function () {
|
||||
$(".oe_kanban_quick_create_close", this.$el).click(function (ev) {
|
||||
ev.preventDefault();
|
||||
self.trigger('close');
|
||||
});
|
||||
self.$input.keyup(function(e) {
|
||||
|
@ -1031,7 +1032,7 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
|
|||
quick_add: function () {
|
||||
var self = this;
|
||||
this._dataset.call(
|
||||
'name_create', [self.$input.val(), new instance.web.CompoundContext(
|
||||
'name_create', [self.$input.val() || false, new instance.web.CompoundContext(
|
||||
this._dataset.get_context(), this._context)])
|
||||
.pipe(function(record) {
|
||||
self.$input.val("");
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<t t-if="widget._buttons">
|
||||
<div class="oe_kanban_quick_create_buttons">
|
||||
<button class="oe_kanban_quick_create_add">Add</button>
|
||||
or <a class="oe_kanban_quick_create_close">Cancel</a>
|
||||
or <a href="#" class="oe_kanban_quick_create_close">Cancel</a>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue