mirror of
https://github.com/Radarr/Radarr
synced 2025-02-28 08:55:51 +00:00
Fixed: Added symbols and tooltips to Manual Search last two sort columns.
This commit is contained in:
parent
f39e99bd3c
commit
6393f66448
4 changed files with 34 additions and 12 deletions
|
@ -470,3 +470,7 @@
|
||||||
.icon-sonarr-episode-file {
|
.icon-sonarr-episode-file {
|
||||||
.fa-icon-content(@fa-var-file-video-o);
|
.fa-icon-content(@fa-var-file-video-o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-sonarr-header-rejections {
|
||||||
|
.fa-icon-content(@fa-var-exclamation-circle);
|
||||||
|
}
|
|
@ -292,3 +292,9 @@ dl.info {
|
||||||
vertical-align : bottom;
|
vertical-align : bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sort-direction-icon {
|
||||||
|
.pull-right();
|
||||||
|
position : relative;
|
||||||
|
width : 0px;
|
||||||
|
}
|
|
@ -54,15 +54,21 @@ module.exports = Marionette.Layout.extend({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'rejections',
|
name : 'rejections',
|
||||||
label : '',
|
label : '<i class="icon-sonarr-header-rejections" />',
|
||||||
|
tooltip : 'Rejections',
|
||||||
cell : ApprovalStatusCell,
|
cell : ApprovalStatusCell,
|
||||||
sortable : false
|
sortable : true,
|
||||||
|
sortType : 'fixed',
|
||||||
|
direction : 'ascending'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'download',
|
name : 'download',
|
||||||
label : '',
|
label : '<i class="icon-sonarr-download" />',
|
||||||
|
tooltip : 'Auto-Search Prioritization',
|
||||||
cell : DownloadReportCell,
|
cell : DownloadReportCell,
|
||||||
sortable : true
|
sortable : true,
|
||||||
|
sortType : 'fixed',
|
||||||
|
direction : 'ascending'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,19 @@ module.exports = function() {
|
||||||
render : function() {
|
render : function() {
|
||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
this.$el.append(this.column.get('label'));
|
this.$el.append(this.column.get('label'));
|
||||||
|
if (this.column.get('tooltip')) {
|
||||||
|
this.$el.attr({
|
||||||
|
'title' : this.column.get('tooltip'),
|
||||||
|
'data-container' : '.table'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var column = this.column;
|
var column = this.column;
|
||||||
var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
|
var sortable = Backgrid.callByNeed(column.sortable(), column, this.collection);
|
||||||
|
|
||||||
if (sortable) {
|
if (sortable) {
|
||||||
this.$el.addClass('sortable');
|
this.$el.addClass('sortable');
|
||||||
this.$el.append(' <i class="pull-right"></i>');
|
this.$el.prepend(' <i class="sort-direction-icon"></i>');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Do we need this?
|
//Do we need this?
|
||||||
|
@ -51,7 +57,7 @@ module.exports = function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
direction : function(dir) {
|
direction : function(dir) {
|
||||||
this.$el.children('i').removeClass('icon-sonarr-sort-asc icon-sonarr-sort-desc');
|
this.$el.children('i.sort-direction-icon').removeClass('icon-sonarr-sort-asc icon-sonarr-sort-desc');
|
||||||
|
|
||||||
if (arguments.length) {
|
if (arguments.length) {
|
||||||
if (dir) {
|
if (dir) {
|
||||||
|
@ -137,11 +143,11 @@ module.exports = function() {
|
||||||
|
|
||||||
_setSortIcon : function(dir) {
|
_setSortIcon : function(dir) {
|
||||||
this._removeSortIcon();
|
this._removeSortIcon();
|
||||||
this.$el.children('i').addClass(this._convertDirectionToIcon(dir));
|
this.$el.children('i.sort-direction-icon').addClass(this._convertDirectionToIcon(dir));
|
||||||
},
|
},
|
||||||
|
|
||||||
_removeSortIcon : function() {
|
_removeSortIcon : function() {
|
||||||
this.$el.children('i').removeClass('icon-sonarr-sort-asc icon-sonarr-sort-desc');
|
this.$el.children('i.sort-direction-icon').removeClass('icon-sonarr-sort-asc icon-sonarr-sort-desc');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue