Merge pull request #131 from drewg13/development

Properly sort item lists alphabetically
This commit is contained in:
megastruktur 2021-07-26 09:12:34 +03:00 committed by GitHub
commit aff143945b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -177,7 +177,11 @@ export class BladesHelpers {
compendium_items = compendium_content.map(e => {return e.data}); compendium_items = compendium_content.map(e => {return e.data});
list_of_items = game_items.concat(compendium_items); list_of_items = game_items.concat(compendium_items);
list_of_items.sort(function(a, b) {
let nameA = a.name.toUpperCase();
let nameB = b.name.toUpperCase();
return nameA.localeCompare(nameB);
});
return list_of_items; return list_of_items;
} }

View file

@ -17,7 +17,7 @@
<label class="label-stripe">{{localize "BITD.Notes"}}</label> <label class="label-stripe">{{localize "BITD.Notes"}}</label>
<textarea rows="2" name="data.notes">{{data.notes}}</textarea> <textarea rows="2" name="data.notes">{{data.notes}}</textarea>
{{#if isGm }} {{#if isGM }}
<label class="label-stripe">{{localize "BITD.Goal"}}</label> <label class="label-stripe">{{localize "BITD.Goal"}}</label>
Clock {{data.goal_1_clock_max}}:<br>{{data.goal_1}}<br><br> Clock {{data.goal_1_clock_max}}:<br>{{data.goal_1}}<br><br>
Clock {{data.goal_2_clock_max}}:<br>{{data.goal_2}}<br><br> Clock {{data.goal_2_clock_max}}:<br>{{data.goal_2}}<br><br>