Initial commit: add allocationMode user preference and form for choosing it

This commit is contained in:
Sabe Jones 2013-12-27 09:54:48 -06:00
parent e6e961f991
commit cc5a6de9cb
2 changed files with 17 additions and 3 deletions

View file

@ -228,6 +228,7 @@ var UserSchema = new Schema({
timezoneOffset: Number,
language: String,
automaticAllocation: Boolean,
allocationMode: {type:String, enum: ['flat','classbased','taskbased'], 'default': 'flat'},
costume: Boolean,
sleep: {type: Boolean, 'default': false},
stickyHeader: {type: Boolean, 'default': true},

View file

@ -141,15 +141,28 @@ script(id='partials/options.profile.stats.html', type='text/ng-template')
h4
| {{user.stats.class}} 
a.btn.btn-danger.btn-mini(ng-click='changeClass(null)')
| Change & Re-Roll 
| Change Class, Refund Attribute Points 
small 3 <span class="Pet_Currency_Gem1x inline-gems"/>
h6 Points: {{user.stats.points}}
fieldset.auto-allocate
label.checkbox
input(type='checkbox', ng-model='user.preferences.automaticAllocation', ng-change='set({"preferences.automaticAllocation": user.preferences.automaticAllocation?true: false})')
| Automatic Allocation
i.icon-question-sign(popover-trigger='mouseenter', popover-placement='bottom', popover="When 'automatic' is checked, your points will be allocated to the stat representing your task focus (see Task > Edit). When unchecked, you'll have one point to allocate each level. The system makes a suggestion, but you can ignore the suggestion.")
| Automatic Allocation&nbsp;
i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Places points into attributes according to your preferences, when you level up.")
form(ng-show='user.preferences.automaticAllocation')
label.radio
input(type='radio', name='allocationMode', value='flat', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "flat"})')
| Distribute attribute points evenly&nbsp;
i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns the same number of points to each attribute.")
label.radio
input(type='radio', name='allocationMode', value='classbased', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "classbased"})')
| Distribute attribute points based on Class&nbsp;
i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns more points to the attributes important to your Class.")
label.radio
input(type='radio', name='allocationMode', value='taskbased', ng-model='user.preferences.allocationMode', ng-change='set({"preferences.allocationMode": "taskbased"})')
| Distribute attribute points based on task activity&nbsp;
i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover="Assigns points based on the Physical (STR), Mental (INT), Social (CON), and Other (PER) categories associated with the tasks you complete.")
table.table.table-striped
tr
td