mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
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'
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue