Styled, optimised spell dialog
This commit is contained in:
@@ -32,5 +32,8 @@ Template.textDialog.events({
|
||||
var setter = {$set: {}};
|
||||
setter.$set[this.field] = input;
|
||||
Characters.update(this.charId, setter);
|
||||
}
|
||||
},
|
||||
"tap #backButton": function(){
|
||||
GlobalUI.closeDetail()
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
.spellDialog paper-checkbox {
|
||||
margin: 8px 16px 8px 8px;
|
||||
}
|
||||
@@ -58,14 +58,8 @@
|
||||
</core-menu>
|
||||
</paper-dropdown>
|
||||
</paper-dropdown-menu>
|
||||
<!--Casting Time-->
|
||||
<paper-input id="castingTimeInput" class="fullwidth" label="Casting Time" floatinglabel value={{castingTime}} flex></paper-input>
|
||||
<!--Range-->
|
||||
<paper-input id="rangeInput" class="fullwidth" label="Range" floatinglabel value={{range}} flex></paper-input>
|
||||
<!--Duration-->
|
||||
<paper-input id="durationInput" class="fullwidth" label="Duration" floatinglabel value={{duration}} flex></paper-input>
|
||||
<!--Components-->
|
||||
<div horizontal layout wrap>
|
||||
<div horizontal layout center wrap>
|
||||
<div>Verbal:</div>
|
||||
<paper-checkbox id="verbalCheckbox" checked={{components.verbal}}></paper-checkbox>
|
||||
<div>Somatic:</div>
|
||||
@@ -77,6 +71,12 @@
|
||||
<paper-checkbox id="ritualCheckbox" checked={{ritual}}></paper-checkbox>
|
||||
</div>
|
||||
<paper-input id="materialInput" class="fullwidth" label="Material Components" floatinglabel value={{components.material}} flex></paper-input>
|
||||
<!--Casting Time-->
|
||||
<paper-input id="castingTimeInput" class="fullwidth" label="Casting Time" floatinglabel value={{castingTime}} flex></paper-input>
|
||||
<!--Range-->
|
||||
<paper-input id="rangeInput" class="fullwidth" label="Range" floatinglabel value={{range}} flex></paper-input>
|
||||
<!--Duration-->
|
||||
<paper-input id="durationInput" class="fullwidth" label="Duration" floatinglabel value={{duration}} flex></paper-input>
|
||||
<!--Description-->
|
||||
<paper-input-decorator label="Description" floatinglabel layout vertical>
|
||||
<paper-autogrow-textarea>
|
||||
|
||||
@@ -68,30 +68,35 @@ Template.spellDialog.events({
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
if (value == this.listId) return;
|
||||
Spells.update(this._id, {$set: {listId: value}});
|
||||
},
|
||||
"core-select #levelDropdown": function(event){
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
if(value == this.level) return;
|
||||
Spells.update(this._id, {$set: {level: value}});
|
||||
},
|
||||
"core-select #schoolDropdown": function(event){
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
if(value == this.school) return;
|
||||
Spells.update(this._id, {$set: {school: value}});
|
||||
},
|
||||
"core-select #preparedDropdown": function(event){
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
if(value == this.school) return;
|
||||
Spells.update(this._id, {$set: {prepared: value}});
|
||||
},
|
||||
"core-select .colorDropdown": function(event){
|
||||
var detail = event.originalEvent.detail;
|
||||
if(!detail.isSelected) return;
|
||||
var value = detail.item.getAttribute("name");
|
||||
if(value == this.color) return;
|
||||
Spells.update(this._id, {$set: {color: value}});
|
||||
},
|
||||
"change #verbalCheckbox": function(event){
|
||||
|
||||
Reference in New Issue
Block a user