Replaced spell library spell selection highlighting with checkboxes

Makes it more intuitive that multiple items can be selected
This commit is contained in:
Stefan Zermatten
2017-09-08 09:47:43 +02:00
parent f600999c5f
commit e4ac400cbd
3 changed files with 18 additions and 34 deletions

View File

@@ -62,6 +62,10 @@ Template.spellLibraryDialog.helpers({
const selected = Template.instance().selectedSpells.get();
return _.contains(selected, spell._id);
},
selectedCount(){
const selected = Template.instance().selectedSpells.get();
return selected && selected.length;
},
isOpen(key){
const cats = Template.instance().categoriesOpen.get();
return _.contains(cats, key);
@@ -109,10 +113,6 @@ Template.spellLibraryDialog.events({
selected.push(spellId);
}
template.selectedSpells.set(selected);
console.log("selectedSpells", Template.instance().selectedSpells.get());
console.log("spellId", this.spell._id);
},
"click #backButton": function(event, template){
popDialogStack();