refactor(pets): render mounts server-side for better perf

This commit is contained in:
Tyler Renelle 2014-06-11 13:57:26 -06:00
parent 81b7eed8ca
commit df1867ef4d

View file

@ -13,13 +13,16 @@ script(type='text/ng-template', id='partials/options.inventory.mounts.html')
h4= '{{Shared.countMounts(null,User.user.items.mounts) || 0}} / {{totalMounts}} ' + env.t('mountsTamed')
.col-md-12
menu.pets(type='list')
li.customize-menu(ng-repeat='egg in Content.eggs')
menu
div(ng-repeat='potion in Content.hatchingPotions', popover-trigger='mouseenter', popover=env.t('mountName', {potion: '{{potion.text()}}', mount: '{{egg.mountText()}}'}), popover-placement='bottom', ng-init='mount = egg.key+"-"+potion.key')
button(class="pet-button Mount_Head_{{mount}}", ng-show='user.items.mounts[mount]', ng-class='{active: user.items.currentMount == mount}', ng-click='chooseMount(egg.key, potion.key)')
//div(class='Mount_Head_{{mount}}')
button(class="pet-button pet-not-owned", ng-hide='user.items.mounts[mount]')
.PixelPaw
each egg in env.Content.eggs
li.customize-menu
menu
each potion in env.Content.hatchingPotions
- mount = egg.key+"-"+potion.key
div(popover-trigger='mouseenter', popover=env.t('mountName', {potion: potion.text(), mount: egg.mountText()}), popover-placement='bottom')
button(class="pet-button Mount_Head_#{mount}", ng-show='user.items.mounts["#{mount}"]', ng-class='{active: user.items.currentMount == "#{mount}"', ng-click='chooseMount("#{egg.key}", "#{potion.key}")')
//div(class='Mount_Head_{{mount}}')
button(class="pet-button pet-not-owned", ng-hide='user.items.mounts["#{mount}"]')
.PixelPaw
.col-md-12
h4=env.t('rareMounts')
menu