Added setting to swap stats and modifiers

Although Schemas.Character was changed, a database migration should
not be required due to the way characterSettings handles it (since
undefined is a falsy value).
This commit is contained in:
Jacob
2017-07-18 21:58:00 +01:00
parent 2a332a2965
commit 6fc469f934
5 changed files with 28 additions and 1 deletions

View File

@@ -23,6 +23,15 @@ Template.characterSettings.events({
);
}
},
"change #swapStatAndModifier": function(event, instance){
var value = instance.find("#swapStatAndModifier").checked;
if (this.settings.swapStatAndModifier !== value){
Characters.update(
this._id,
{$set: {"settings.swapStatAndModifier": value}}
);
}
},
"click .doneButton": function(event, instance){
popDialogStack();
},