Skip to content

Commit

Permalink
Fix bug 1602374: Sort Priority and Unreviewed descendingly on first c…
Browse files Browse the repository at this point in the history
…lick (#1518)
  • Loading branch information
abowler2 authored and mathjazz committed Dec 12, 2019
1 parent 4ee4356 commit 53bc0f6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 4 additions & 2 deletions pontoon/base/static/css/style.css
Expand Up @@ -187,13 +187,15 @@ th {
position: absolute;
}

.table-sort th.asc i:after {
.table-sort th.asc i:after,
.table-sort th.desc.inverted i:after {
content: "";
display: inline-block;
margin-top: 5px;
}

.table-sort th.desc i:after {
.table-sort th.desc i:after,
.table-sort th.asc.inverted i:after {
content: "";
display: inline-block;
margin-top: -5px;
Expand Down
4 changes: 2 additions & 2 deletions pontoon/base/static/js/table.js
Expand Up @@ -168,7 +168,7 @@ var Pontoon = (function (my) {

// Sort by unreviewed state
} else if (node.is('.unreviewed-status')) {
return (getUnreviewed(a) - getUnreviewed(b)) * dir;
return (getUnreviewed(b) - getUnreviewed(a)) * dir;

// Sort by deadline
} else if (node.is('.deadline')) {
Expand All @@ -190,7 +190,7 @@ var Pontoon = (function (my) {

// Sort by priority
} else if (node.is('.priority')) {
return (getPriority(a) - getPriority(b)) * dir;
return (getPriority(b) - getPriority(a)) * dir;

// Sort by enabled state
} else if (node.is('.check')) {
Expand Down
Expand Up @@ -14,12 +14,12 @@
{% endif %}

{% if priority %}
<th class="priority">Priority<i class="fa"></i></th>
<th class="priority inverted">Priority<i class="fa"></i></th>
{% endif %}

<th class="latest-activity">Latest Activity<i class="fa"></i></th>
<th class="progress">Progress<i class="fa"></i></th>
<th class="unreviewed-status" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
<th class="unreviewed-status inverted" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
</tr>
</thead>
<tbody>
Expand Down
4 changes: 2 additions & 2 deletions pontoon/projects/templates/projects/widgets/project_list.html
Expand Up @@ -9,10 +9,10 @@
<tr>
<th class="name asc">Project<i class="fa"></i></th>
<th class="deadline">Deadline<i class="fa"></i></th>
<th class="priority">Priority<i class="fa"></i></th>
<th class="priority inverted">Priority<i class="fa"></i></th>
<th class="latest-activity">Latest Activity<i class="fa"></i></th>
<th class="progress">Progress<i class="fa"></i></th>
<th class="unreviewed-status" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
<th class="unreviewed-status inverted" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
{% if request %}
<th class="all-strings">Number of Strings<i class="fa"></i></th>
<th class="check">Request<i class="fa"></i></th>
Expand Down
4 changes: 2 additions & 2 deletions pontoon/tags/templates/tags/widgets/tag_list.html
Expand Up @@ -7,10 +7,10 @@
<thead>
<tr>
<th class="tag asc">Tag<i class="fa"></i></th>
<th class="priority">Priority<i class="fa"></i></th>
<th class="priority inverted">Priority<i class="fa"></i></th>
<th class="latest-activity">Latest Activity<i class="fa"></i></th>
<th class="progress">Progress<i class="fa"></i></th>
<th class="unreviewed-status" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
<th class="unreviewed-status inverted" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion pontoon/teams/templates/teams/widgets/team_list.html
Expand Up @@ -10,7 +10,7 @@
<th class="population">Speakers<i class="fa"></i></th>
<th class="latest-activity">Latest Activity<i class="fa"></i></th>
<th class="progress">Progress<i class="fa"></i></th>
<th class="unreviewed-status" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
<th class="unreviewed-status inverted" title="Unreviewed suggestions"><span class="fa fa-lightbulb"></span><i class="fa"></i></th>
{% if request %}
<th class="check">Request<i class="fa"></i></th>
{% endif %}
Expand Down

0 comments on commit 53bc0f6

Please sign in to comment.