Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Updating sortable columns to have sorting icon and updated cursor (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-the-pete authored and jkleinsc committed Jul 22, 2016
1 parent 38759dd commit e6e6f4d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/components/sortable-column.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['sortable-column'],
tagName: 'th',
action: 'sortByKey',
sortDesc: false,
Expand Down
9 changes: 9 additions & 0 deletions app/styles/_temp_misc.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
$table-header-color: rgba($navy_drk2,.7);
$inactive-sort-indicator: rgba($navy_drk2,.3);

.table-header {
background-color: $navy_light;
color: $table-header-color;

.sortable-column {
cursor: pointer;

.inactive {
color: $inactive-sort-indicator;
}
}
}

.twitter-typeahead {
Expand Down
6 changes: 4 additions & 2 deletions app/templates/components/sortable-column.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{{#if sorted}}
<span class="glyphicon {{if sortDesc 'glyphicon-arrow-down' 'glyphicon-arrow-up'}}"></span>
<span class="octicon {{if sortDesc 'octicon-triangle-down' 'octicon-triangle-up'}}"></span>
{{else}}
<span class="octicon octicon-triangle-down inactive"></span>
{{/if}}

{{yield}}
{{yield}}

0 comments on commit e6e6f4d

Please sign in to comment.