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

Commit

Permalink
EZP-26897: Display broken when subitems sorted by not displayed column
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickroger committed Jan 25, 2017
1 parent 365e4be commit d8a424d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
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

0 comments on commit d8a424d

Please # to comment.