Enabling sorting by the Name column.
OrderDirection is only reversed if reclicking the same sort column.
This commit is contained in:
@@ -248,13 +248,12 @@
|
||||
|
||||
function setSorting(field, allow, options) {
|
||||
if (allow) {
|
||||
options.orderBy = field;
|
||||
|
||||
if (options.orderDirection === "desc") {
|
||||
options.orderDirection = "asc";
|
||||
} else {
|
||||
if (options.orderBy === field && options.orderDirection === 'asc') {
|
||||
options.orderDirection = "desc";
|
||||
} else {
|
||||
options.orderDirection = "asc";
|
||||
}
|
||||
options.orderBy = field;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
ng-checked="isSelectedAll()">
|
||||
</div>
|
||||
<div class="umb-table-cell umb-table__name">
|
||||
<a class="umb-table-head__link sortable" href="#" ng-click="sort('Name', true)" prevent-default>
|
||||
<a class="umb-table-head__link sortable" href="#" ng-click="sort('Name', true, true)" prevent-default>
|
||||
<localize key="general_name">Name</localize>
|
||||
<i class="umb-table-head__icon icon" ng-class="{'icon-navigation-up': isSortDirection('Name', 'asc'), 'icon-navigation-down': isSortDirection('Name', 'desc')}"></i>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user