mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-13 02:07:12 -07:00
Fixed sorting of cutoff when allowed list changes
This commit is contained in:
parent
37ff745521
commit
3bfdd1d9eb
4 changed files with 27 additions and 3 deletions
20
src/UI/Handlebars/Helpers/EachReverse.js
Normal file
20
src/UI/Handlebars/Helpers/EachReverse.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'handlebars'
|
||||
], function (Handlebars) {
|
||||
Handlebars.registerHelper('eachReverse', function (context) {
|
||||
var options = arguments[arguments.length - 1];
|
||||
var ret = '';
|
||||
|
||||
if (context && context.length > 0) {
|
||||
for (var i = context.length - 1; i >= 0; i--) {
|
||||
ret += options.fn(context[i]);
|
||||
}
|
||||
} else {
|
||||
ret = options.inverse(this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue