mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
display backgrounds in reverse chronological order (most recent at top)
This commit is contained in:
parent
a4ae9332bb
commit
a7502e10ea
1 changed files with 7 additions and 2 deletions
|
|
@ -238,7 +238,11 @@ script(id='partials/options.profile.profile.html', type='text/ng-template')
|
|||
script(type='text/ng-template', id='partials/options.profile.backgrounds.html')
|
||||
.container-fluid
|
||||
menu(type='list')
|
||||
each bgs,k in env.Content.backgrounds
|
||||
// backgrounds are listed in content file in chronological order, but
|
||||
// we want to display them with most recent at top (reversed)
|
||||
- var bgsKeys = Object.keys(env.Content.backgrounds);
|
||||
- for (var i = bgsKeys.length-1; i >= 0; i--) {
|
||||
- var k = bgsKeys[i], bgs = env.Content.backgrounds[k];
|
||||
li.customize-menu
|
||||
menu(label=env.t(k))
|
||||
+gemCost(7)
|
||||
|
|
@ -246,6 +250,7 @@ script(type='text/ng-template', id='partials/options.profile.backgrounds.html')
|
|||
button.btn.btn-xs(ng-hide="ownsSet('background',#{JSON.stringify(bgs)})",ng-click="unlock(setKeys('background',#{JSON.stringify(bgs)}))")!= env.t('unlockSet',{cost:15}) + ' <span class="Pet_Currency_Gem1x inline-gems"/>'
|
||||
each bg,k in bgs
|
||||
button.customize-option(type='button',class='background_#{k}',ng-click='unlock("background.#{k}")',popover-title=bg.text(),popover=bg.notes(),popover-trigger='mouseenter')
|
||||
- }
|
||||
|
||||
script(id='partials/options.profile.html', type="text/ng-template")
|
||||
ul.options-menu
|
||||
|
|
@ -264,4 +269,4 @@ script(id='partials/options.profile.html', type="text/ng-template")
|
|||
|
||||
.tab-content
|
||||
.tab-pane.active
|
||||
div(ui-view)
|
||||
div(ui-view)
|
||||
|
|
|
|||
Loading…
Reference in a new issue