[FIX] web_kanban: remove add new column on 'Discard'
The 'Add New Column' was still in `folded` mode after clicking on 'Discard' because the mode was toggle two times: one by `_cancel` and another one by `_onClick` which already toggles the mode.
This commit is contained in:
@@ -184,14 +184,6 @@ var ColumnQuickCreate = AbstractQuickCreate.extend({
|
||||
// Private
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
_cancel: function () {
|
||||
this.folded = true;
|
||||
this._update();
|
||||
},
|
||||
/**
|
||||
* Triggers up an event to quick create a column with the given value
|
||||
*
|
||||
|
||||
@@ -587,7 +587,7 @@ QUnit.module('Views', {
|
||||
});
|
||||
|
||||
QUnit.test('create a column in grouped on m2o', function (assert) {
|
||||
assert.expect(10);
|
||||
assert.expect(12);
|
||||
|
||||
var nbRPCs = 0;
|
||||
var kanban = createView({
|
||||
@@ -615,6 +615,15 @@ QUnit.module('Views', {
|
||||
|
||||
kanban.$('.o_column_quick_create').click();
|
||||
|
||||
assert.ok(kanban.$('.o_column_quick_create input').is(':visible'),
|
||||
"the input should be visible");
|
||||
|
||||
// discard the column creation and click it again
|
||||
kanban.$('.o_column_quick_create .o_kanban_cancel').click();
|
||||
assert.notOk(kanban.$('.o_column_quick_create input').is(':visible'),
|
||||
"the input should not be visible after discard");
|
||||
|
||||
kanban.$('.o_column_quick_create').click();
|
||||
assert.ok(kanban.$('.o_column_quick_create input').is(':visible'),
|
||||
"the input should be visible");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user