|
|
|
@ -57,8 +57,6 @@ window.qBittorrent.DynamicTable = (function() {
@@ -57,8 +57,6 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const naturalSortCollator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }); |
|
|
|
|
|
|
|
|
|
const compareNumbers = (val1, val2) => { |
|
|
|
|
if (val1 < val2) |
|
|
|
|
return -1; |
|
|
|
@ -412,7 +410,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -412,7 +410,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
@ -2705,7 +2703,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -2705,7 +2703,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
@ -2801,7 +2799,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -2801,7 +2799,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
@ -2887,7 +2885,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -2887,7 +2885,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
@ -2974,7 +2972,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -2974,7 +2972,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
@ -3024,7 +3022,7 @@ window.qBittorrent.DynamicTable = (function() {
@@ -3024,7 +3022,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|
|
|
|
const value2 = this.getRowValue(row2); |
|
|
|
|
if ((typeof(value1) === 'number') && (typeof(value2) === 'number')) |
|
|
|
|
return compareNumbers(value1, value2); |
|
|
|
|
return naturalSortCollator.compare(value1, value2); |
|
|
|
|
return window.qBittorrent.Misc.naturalSortCollator.compare(value1, value2); |
|
|
|
|
}; |
|
|
|
|
column['updateTd'] = function(td, row) { |
|
|
|
|
const value = this.getRowValue(row); |
|
|
|
|