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