Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

EZP-26897: Display broken when subitems sorted by not displayed column #786

Merged
merged 1 commit into from
Jan 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Resources/public/js/views/subitem/ez-subitemlistmoreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ YUI.add('ez-subitemlistmoreview', function (Y) {

this._resetSortOrderClass();

if (sortCondition.sortOrder === 'ASC') {
column.addClass(COLUMN_SORT_ASC_CLASS);
} else {
column.addClass(COLUMN_SORT_DESC_CLASS);
if (column) {
if (sortCondition.sortOrder === 'ASC') {
column.addClass(COLUMN_SORT_ASC_CLASS);
} else {
column.addClass(COLUMN_SORT_DESC_CLASS);
}
}
},

Expand Down
6 changes: 6 additions & 0 deletions Tests/js/views/subitem/assets/ez-subitemlistmoreview-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ YUI.add('ez-subitemlistmoreview-tests', function (Y) {
tearDown: function () {
this.view.destroy();
},

"Should reset the view state when Location sortField is changed for a non sortable field": function () {
this._resetView(Y.bind(function () {
this.location.set('sortField', 'PATH');
},this));
},
}));

updatePriorityTest = new Y.Test.Case({
Expand Down