refactor: Adjust stat allocation modal

This commit is contained in:
Blade Barringer
2016-03-16 22:06:13 -05:00
parent a639038a41
commit 3f16cd4fbf
3 changed files with 17 additions and 5 deletions
+11 -2
View File
@@ -35,10 +35,19 @@ mixin ownedQuests(popoverAppend, popoverPlacement)
.badge.badge-info.stack-count {{points}}
mixin statAllocation
each statInfo, stat in { str: {title:"allocateStr",popover:'strengthText',allocatepop:'allocateStrPop'},int: {title:"allocateInt",popover:'intText',allocatepop:'allocateIntPop'},con: {title:"allocateCon",popover:'conText',allocatepop:'allocateConPop'},per: {title:"allocatePer",popover:'perText',allocatepop:'allocatePerPop'} }
-
var stats = {
str: { title:"allocateStr",popover:'strengthText',allocatepop:'allocateStrPop' },
int: { title:"allocateInt",popover:'intText',allocatepop:'allocateIntPop' },
con: { title:"allocateCon",popover:'conText',allocatepop:'allocateConPop' },
per: { title:"allocatePer",popover:'perText',allocatepop:'allocatePerPop' }
}
each statInfo, stat in stats
tr
td
span.hint(popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.popover))
=env.t(statInfo.title) + ' {{user.stats.' + stat + '}}'
td
a.btn.btn-primary(ng-show='user.stats.points', ng-click='allocate("#{stat}")', popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.allocatepop)) +
a.btn.btn-primary(ng-show='user.stats.points', ng-click='allocate("#{stat}")',
popover-trigger='mouseenter', popover-placement='right', popover=env.t(statInfo.allocatepop)) +
+4 -2
View File
@@ -17,9 +17,11 @@ script(type='text/ng-template', id='modals/levelUp.html')
p=env.t('fullyHealed')
br
div(ng-if='user.flags.classSelected && !user.preferences.disableClasses && !user.preferences.automaticAllocation')
a.btn.btn-default(data-toggle='collapse', data-target='#stat-allocation', aria-expanded=false, aria-controls='stat-allocation')=env.t('showHideQuickAllocation')
a.btn.btn-default(ng-click='statsAllocationBoxIsOpen = !statsAllocationBoxIsOpen',
data-toggle='collapse', data-target='#stat-allocation', aria-expanded=false, aria-controls='stat-allocation')
| {{statsAllocationBoxIsOpen ? env.t('hideQuickAllocation') : env.t('showQuickAllocation')}}
p  
div.collapse#stat-allocation
.collapse#stat-allocation
table.table.text-left
tr
td