mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
49
UI/Mixins/tablesorter.extensions.js
Normal file
49
UI/Mixins/tablesorter.extensions.js
Normal file
@@ -0,0 +1,49 @@
|
||||
$.tablesorter.addParser({
|
||||
// set a unique id
|
||||
id: 'title',
|
||||
is: function (s) {
|
||||
// return false so this parser is not auto detected
|
||||
return false;
|
||||
},
|
||||
format: function (s) {
|
||||
// format your data for normalization
|
||||
return s.match(/title="(.*?)"/)[1].toLowerCase();
|
||||
},
|
||||
// set type, either numeric or text
|
||||
type: 'text'
|
||||
});
|
||||
|
||||
$.tablesorter.addParser({
|
||||
// set a unique id
|
||||
id: 'date',
|
||||
is: function (s) {
|
||||
// return false so this parser is not auto detected
|
||||
return false;
|
||||
},
|
||||
format: function (s) {
|
||||
// format your data for normalization
|
||||
var match = s.match(/data-date="(.*?)"/)[1];
|
||||
|
||||
if (match === '')
|
||||
return Date.create().addYears(100).format(Date.ISO8601_DATETIME);
|
||||
|
||||
return match;
|
||||
},
|
||||
// set type, either numeric or text
|
||||
type: 'text'
|
||||
});
|
||||
|
||||
$.tablesorter.addParser({
|
||||
// set a unique id
|
||||
id: 'innerHtml',
|
||||
is: function (s) {
|
||||
// return false so this parser is not auto detected
|
||||
return false;
|
||||
},
|
||||
format: function (s) {
|
||||
// format your data for normalization
|
||||
return $(s).get(0).innerHTML;
|
||||
},
|
||||
// set type, either numeric or text
|
||||
type: 'text'
|
||||
});
|
Reference in New Issue
Block a user