Skip to content

Commit

Permalink
o19s#307 added modified column for sorting queries -- incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrykan committed May 2, 2021
1 parent af695bd commit df4886e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/controllers/queriesCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ angular.module('QuepidApp')
$scope.sortName = 'default';
$scope.queries.sortableOptions.disabled = false;
break;
case 'modified':
$scope.sort = 'modified';
$scope.sortName = 'default';
$scope.queries.sortableOptions.disabled = true;
break;
case 'query':
$scope.sort = 'queryText';
$scope.sortName = 'query';
Expand Down
2 changes: 2 additions & 0 deletions app/assets/javascripts/services/queriesSvc.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ angular.module('QuepidApp')

self.ratingVariance = queryWithRatings.rating_variance;

self.modified = queryWithRatings.updated_at;


// Threshold properties
self.threshold = queryWithRatings.threshold;
Expand Down
6 changes: 3 additions & 3 deletions app/assets/templates/views/queries.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<a ng-class="{active: sort == 'defaultCaseOrder'}" ng-click="sortBy('default')">
Manual
<span ng-show="sortName == 'default'"
class="glyphicon"
ng-class="reverse ? 'glyphicon-arrow-up' : 'glyphicon-arrow-down'"
aria-hidden="true">
class="glyphicon"
ng-class="reverse ? 'glyphicon-arrow-up' : 'glyphicon-arrow-down'"
aria-hidden="true">
</span>
</a>
</li>
Expand Down

0 comments on commit df4886e

Please sign in to comment.