-
-
+
+
- {{characterCalculate "attributeValue" ../_id name}}
+
+
+
+
-
- d{{diceNum}} {{conMod}}
+
+
+ {{characterCalculate "attributeValue" ../_id name}}
+
+
+ d{{diceNum}} {{conMod}}
+
-
-
- Hit Dice
-
-
+
+ Hit Dice
+
+
{{/if}}
diff --git a/rpg-docs/client/views/character/stats/hitDice/hitDice.js b/rpg-docs/client/views/character/stats/hitDice/hitDice.js
index 4e49f4b3..90afb5ba 100644
--- a/rpg-docs/client/views/character/stats/hitDice/hitDice.js
+++ b/rpg-docs/client/views/character/stats/hitDice/hitDice.js
@@ -16,7 +16,7 @@ Template.hitDice.helpers({
});
Template.hitDice.events({
- "tap .resourceUp": function(event){
+ "click .resourceUp": function(event){
var value = Characters.calculate.attributeValue(this.char._id, this.name);
var base = Characters.calculate.attributeBase(this.char._id, this.name);
if (value < base){
@@ -25,7 +25,7 @@ Template.hitDice.events({
Characters.update(this.char._id, modifier, {validate: false});
}
},
- "tap .resourceDown": function(event){
+ "click .resourceDown": function(event){
var value = Characters.calculate.attributeValue(this.char._id, this.name);
if (value > 0){
var modifier = {$inc: {}};
@@ -33,10 +33,10 @@ Template.hitDice.events({
Characters.update(this.char._id, modifier, {validate: false});
}
},
- "tap .right": function() {
+ "click .right": function(event, template) {
var charId = Template.parentData()._id;
var title = "d" + this.diceNum + " Hit Dice";
- GlobalUI.setDetail({
+ pushDialogStack({
template: "attributeDialog",
data: {
name: title,
@@ -44,7 +44,7 @@ Template.hitDice.events({
charId: charId,
color: "green",
},
- heroId: charId + this.name,
+ element: event.currentTarget.parentElement,
});
},
});
diff --git a/rpg-docs/client/views/character/stats/skillRow/skillRow.html b/rpg-docs/client/views/character/stats/skillRow/skillRow.html
index d8f7db0c..0b01f919 100644
--- a/rpg-docs/client/views/character/stats/skillRow/skillRow.html
+++ b/rpg-docs/client/views/character/stats/skillRow/skillRow.html
@@ -1,9 +1,6 @@
-
+
{{#if failSkill}}
fail
@@ -23,4 +20,4 @@
-
\ No newline at end of file
+
diff --git a/rpg-docs/client/views/character/stats/skillRow/skillRow.js b/rpg-docs/client/views/character/stats/skillRow/skillRow.js
index fae6145a..20915294 100644
--- a/rpg-docs/client/views/character/stats/skillRow/skillRow.js
+++ b/rpg-docs/client/views/character/stats/skillRow/skillRow.js
@@ -12,7 +12,7 @@ Template.skillRow.helpers({
if (prof > 0 && prof < 1) return "image:brightness-2";
if (prof === 1) return "image:brightness-1";
if (prof > 1) return "av:album";
- return "radio-button-off";
+ return "radio-button-unchecked";
},
failSkill: function(){
var charId = Template.parentData()._id;
diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.css b/rpg-docs/client/views/character/stats/statCard/statCard.css
new file mode 100644
index 00000000..04a9250e
--- /dev/null
+++ b/rpg-docs/client/views/character/stats/statCard/statCard.css
@@ -0,0 +1,16 @@
+.stat-card {
+ min-width: 75px;
+ text-align: center;
+ cursor: pointer;
+ -webkit-margin-collapse: separate;
+ background: #fff;
+}
+
+.stat-card .title {
+ padding: 16px;
+}
+
+.stat-card .numbers {
+ min-width: 72px;
+ padding: 16px;
+}
diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.html b/rpg-docs/client/views/character/stats/statCard/statCard.html
new file mode 100644
index 00000000..997a6df5
--- /dev/null
+++ b/rpg-docs/client/views/character/stats/statCard/statCard.html
@@ -0,0 +1,16 @@
+
+
+
+
+ {{#if isSkill}}
+ {{prefix}}{{skillMod}}
+ {{else}}
+ {{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
+ {{/if}}
+
+
+ {{name}}
+
+
+
+
diff --git a/rpg-docs/client/views/character/stats/statCard/statCard.js b/rpg-docs/client/views/character/stats/statCard/statCard.js
new file mode 100644
index 00000000..32a89cad
--- /dev/null
+++ b/rpg-docs/client/views/character/stats/statCard/statCard.js
@@ -0,0 +1,9 @@
+Template.statCard.helpers({
+ skillMod: function() {
+ return signedString(
+ Characters.calculate.skillMod(
+ Template.parentData()._id, this.stat
+ )
+ );
+ },
+});
diff --git a/rpg-docs/client/views/character/stats/stats.html b/rpg-docs/client/views/character/stats/stats.html
index 3f3df6ab..2e33a9ba 100644
--- a/rpg-docs/client/views/character/stats/stats.html
+++ b/rpg-docs/client/views/character/stats/stats.html
@@ -29,7 +29,7 @@
-
+
Saving Throws
@@ -45,7 +45,7 @@
-
+
Skills
@@ -73,21 +73,3 @@
-
-
-
-
-
- {{#if isSkill}}
- {{prefix}}{{skillMod}}
- {{else}}
- {{prefix}}{{characterCalculate "attributeValue" ../_id stat}}
- {{/if}}
-
-
- {{name}}
-
-
-
-
diff --git a/rpg-docs/client/views/character/stats/stats.js b/rpg-docs/client/views/character/stats/stats.js
index 0cf7b922..9d2f7e6e 100644
--- a/rpg-docs/client/views/character/stats/stats.js
+++ b/rpg-docs/client/views/character/stats/stats.js
@@ -1,8 +1,8 @@
Template.stats.events({
- "tap .statCard": function(event, instance){
+ "click .statCard": function(event, instance){
var charId = instance.data._id;
if (this.isSkill){
- GlobalUI.setDetail({
+ pushDialogStack({
template: "skillDialog",
data: {
name: this.name,
@@ -10,10 +10,10 @@ Template.stats.events({
charId: charId,
color: this.color,
},
- heroId: charId + this.stat,
+ element: event.currentTarget,
});
} else {
- GlobalUI.setDetail({
+ pushDialogStack({
template: "attributeDialog",
data: {
name: this.name,
@@ -21,15 +21,15 @@ Template.stats.events({
charId: charId,
color: this.color,
},
- heroId: charId + this.stat,
+ element: event.currentTarget,
});
}
},
- "tap .abilityMiniCard": function(event, instance){
+ "click .ability-mini-card": function(event, instance){
var charId = Template.parentData()._id;
var template = "attributeDialog";
if (this.ability === "strength") template = "strengthDialog";
- GlobalUI.setDetail({
+ pushDialogStack({
template: template,
data: {
name: this.title,
@@ -37,24 +37,24 @@ Template.stats.events({
charId: charId,
color: this.color,
},
- heroId: charId + this.ability,
+ element: event.currentTarget,
});
},
"tap .skill-row": function(event, instance){
var skill = this.skill;
var charId = instance.data._id;
- GlobalUI.setDetail({
+ pushDialogStack({
template: "skillDialog",
data: {
name: this.name,
skillName: skill,
charId: charId,
},
- heroId: charId + skill,
+ element: event.currentTarget,
});
},
"tap .hitPointTitle": function(event, instance) {
- GlobalUI.setDetail({
+ pushDialogStack({
template: "attributeDialog",
data: {
name: "Hit Points",
@@ -62,17 +62,7 @@ Template.stats.events({
charId: this._id,
color: "green",
},
- heroId: this._id + "hitPoints",
+ element: event.currentTarget.parentElement.parentElement,
});
},
});
-
-Template.statCard.helpers({
- skillMod: function() {
- return signedString(
- Characters.calculate.skillMod(
- Template.parentData()._id, this.stat
- )
- );
- },
-});
diff --git a/rpg-docs/client/views/layout/polymerImports.html b/rpg-docs/client/views/layout/polymerImports.html
index b751207c..37a246b6 100644
--- a/rpg-docs/client/views/layout/polymerImports.html
+++ b/rpg-docs/client/views/layout/polymerImports.html
@@ -11,12 +11,12 @@
-
+
-
+
diff --git a/rpg-docs/public/custom_components/app-theme.html b/rpg-docs/public/custom_components/app-theme.html
index 401c579c..b2427fe7 100644
--- a/rpg-docs/public/custom_components/app-theme.html
+++ b/rpg-docs/public/custom_components/app-theme.html
@@ -1,6 +1,7 @@
+