Prettified all remaining detail boxes to be view -> edit
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
<template name="classDialog">
|
||||
{{#with class}}
|
||||
{{#baseDialog title=name class=colorClass hideColor="true"}}
|
||||
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
||||
<div layout vertical center>
|
||||
<div class="display2">
|
||||
{{level}}
|
||||
</div>
|
||||
<div>
|
||||
level
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> effectsViewList charId=charId parentId=_id}}
|
||||
{{> proficiencyViewList charId=charId parentId=_id}}
|
||||
{{else}}
|
||||
<!--Name-->
|
||||
<paper-input id="classNameInput" label="Class Name" floatinglabel value={{name}}></paper-input>
|
||||
<!--Level-->
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Template.classDialog.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.classDialog.events({
|
||||
"tap #deleteButton": function(event, instance){
|
||||
Classes.softRemoveNode(instance.data.classId);
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<template name="experienceDialog">
|
||||
{{#with experience}}
|
||||
{{#baseDialog title=name class=colorClass hideColor="true"}}
|
||||
{{#baseDialog title=name class=colorClass hideColor="true" startEditing=../startEditing}}
|
||||
<div horizontal layout center-justified>
|
||||
{{value}}
|
||||
</div>
|
||||
{{#if description}}
|
||||
<hr class="vertMargin">
|
||||
<div class="prewrap">{{description}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div horizontal layout>
|
||||
<!--Name-->
|
||||
<paper-input id="experienceNameInput" label="Name" floatinglabel value={{name}} flex></paper-input>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
Template.experienceDialog.helpers({
|
||||
feature: function(){
|
||||
return Features.findOne(this.featureId);
|
||||
},
|
||||
});
|
||||
|
||||
Template.experienceDialog.events({
|
||||
"tap #deleteButton": function(event, instance){
|
||||
Experiences.softRemove(instance.data.experienceId);
|
||||
|
||||
@@ -76,7 +76,7 @@ Template.journal.events({
|
||||
if(!error){
|
||||
GlobalUI.setDetail({
|
||||
template: "noteDialog",
|
||||
data: {noteId: id, charId: charId},
|
||||
data: {noteId: id, charId: charId, startEditing: true},
|
||||
heroId: id
|
||||
});
|
||||
}
|
||||
@@ -90,11 +90,11 @@ Template.journal.events({
|
||||
if(!error){
|
||||
GlobalUI.setDetail({
|
||||
template: "experienceDialog",
|
||||
data: {experienceId: id, charId: charId},
|
||||
data: {experienceId: id, charId: charId, startEditing: true},
|
||||
heroId: id
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
"tap #addClassButton":function(event){
|
||||
var charId = this._id;
|
||||
@@ -106,11 +106,11 @@ Template.journal.events({
|
||||
if(!error){
|
||||
GlobalUI.setDetail({
|
||||
template: "classDialog",
|
||||
data: {classId: id, charId: charId},
|
||||
data: {classId: id, charId: charId, startEditing: true},
|
||||
heroId: id
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
"tap #moreExperiences": function(event){
|
||||
var inst = Template.instance();
|
||||
@@ -125,6 +125,6 @@ Template.journal.events({
|
||||
}, 300);
|
||||
//HACK giggle the columns :( to workaround chrome bug that stops .containers height from updating
|
||||
var cs = inst.$(".containers").removeClass("containers");
|
||||
_.defer(function(){cs.addClass("containers")});
|
||||
_.defer(function(){cs.addClass("containers");});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template name="noteDialog">
|
||||
{{#with note}}
|
||||
{{#baseDialog title=name class=colorClass}}
|
||||
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
||||
<div class="prewrap">{{description}}</div>
|
||||
{{else}}
|
||||
<!--Name-->
|
||||
<div horizontal layout>
|
||||
<paper-input id="noteNameInput" label="Name" floatinglabel value={{name}} flex></paper-input>
|
||||
@@ -8,7 +10,7 @@
|
||||
<!--Description-->
|
||||
<paper-input-decorator label="Description" floatinglabel layout vertical>
|
||||
<paper-autogrow-textarea>
|
||||
<textarea id="noteDescriptionInput" placeholder value={{description}}></textarea>
|
||||
<textarea id="noteDescriptionInput" value={{description}}></textarea>
|
||||
</paper-autogrow-textarea>
|
||||
</paper-input-decorator>
|
||||
{{/baseDialog}}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Template.noteDialog.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.noteDialog.events({
|
||||
"color-change": function(event, instance){
|
||||
Notes.update(instance.data.noteId, {$set: {color: event.color}});
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template name="raceDialog">
|
||||
{{#baseDialog title="Race" class=colorClass hideColor="true" hideDelete="true"}}
|
||||
{{#baseDialog title="Race" class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
|
||||
{{> effectsViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||
{{> proficiencyViewList charId=charId parentId=charId parentGroup="racial"}}
|
||||
{{else}}
|
||||
<paper-input id="raceInput" label="Race" floatinglabel value={{race}}></paper-input>
|
||||
{{> effectsEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="racial"}}
|
||||
{{> proficiencyEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="racial"}}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Template.raceDialog.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.raceDialog.events({
|
||||
"change #raceInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
|
||||
Reference in New Issue
Block a user