diff --git a/rpg-docs/client/globalHelpers/openParentDialog.js b/rpg-docs/client/globalHelpers/openParentDialog.js
index 0d09dec3..7f1528a2 100644
--- a/rpg-docs/client/globalHelpers/openParentDialog.js
+++ b/rpg-docs/client/globalHelpers/openParentDialog.js
@@ -20,6 +20,11 @@ openParentDialog = function(parent, charId, heroId) {
template: "itemDialog",
data: {itemId: parent.id},
};
+ } else if (parent.collection === "Spells") {
+ detail = {
+ template: "spellDialog",
+ data: {spellId: parent.id},
+ };
}
detail.heroId = heroId;
detail.charId = charId;
diff --git a/rpg-docs/client/views/character/inventory/inventory.js b/rpg-docs/client/views/character/inventory/inventory.js
index 72b1fb19..58e70ea2 100644
--- a/rpg-docs/client/views/character/inventory/inventory.js
+++ b/rpg-docs/client/views/character/inventory/inventory.js
@@ -174,6 +174,20 @@ Template.inventory.events({
heroId: itemId,
});
},
+ "hold .inventoryItem": function(event, instance) {
+ var itemId = this._id;
+ var charId = Template.parentData()._id;
+ var containerId = this.parent.id;
+ GlobalUI.showDialog({
+ template: "moveItemDialog",
+ data: {
+ charId: charId,
+ itemId: itemId,
+ containerId: containerId,
+ },
+ heading: "Move " + this.pluralName(),
+ });
+ },
"tap .incrementButtons": function(event) {
event.stopPropagation();
},
diff --git a/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.css b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.css
new file mode 100644
index 00000000..5762ebbf
--- /dev/null
+++ b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.css
@@ -0,0 +1,7 @@
+html /deep/ .moveItemDialog paper-tabs::shadow #selectionBar {
+ background-color: #D50000;
+}
+
+html /deep/ .moveItemDialog paper-tab::shadow #ink {
+ color: #D50000;
+}
diff --git a/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.html b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.html
new file mode 100644
index 00000000..d11cfa41
--- /dev/null
+++ b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.html
@@ -0,0 +1,49 @@
+
+
+
+
+ Containers
+
+
+ Characters
+
+
+
+
+
+
+
+ Cancel
+ Move
+
diff --git a/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.js b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.js
new file mode 100644
index 00000000..cf69a756
--- /dev/null
+++ b/rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.js
@@ -0,0 +1,56 @@
+Template.moveItemDialog.onCreated(function() {
+ Session.setDefault("moveItemDialogTab", "containers");
+});
+
+Template.moveItemDialog.helpers({
+ selectedTab: function() {
+ return Session.get("moveItemDialogTab");
+ },
+ characters: function() {
+ var userId = Meteor.userId();
+ return Characters.find(
+ {
+ $or: [
+ {readers: userId},
+ {writers: userId},
+ {owner: userId},
+ ],
+ _id: {$ne: this.charId},
+ },
+ {fields: {name: 1}}
+ );
+ },
+ containers: function(){
+ return Containers.find(
+ {
+ charId: this.charId,
+ _id: {$ne: this.containerId},
+ },
+ {
+ fields: {color: 1, name: 1},
+ sort: {color: 1, name: 1},
+ }
+ );
+ },
+});
+
+Template.moveItemDialog.events({
+ "tap paper-tab": function(event) {
+ Session.set("moveItemDialogTab", event.currentTarget.getAttribute("name"));
+ },
+ "tap #moveButton": function(event, instance) {
+ var tab = Session.get("moveItemDialogTab");
+ if (tab === "containers"){
+ var containerId = instance.find("#containerMenu").selected;
+ if (!containerId) throw "no menu selection";
+ Meteor.call("moveItemToContainer", this.itemId, containerId);
+ } else if (tab === "characters"){
+ var characterId = instance.find("#characterMenu").selected;
+ if (!characterId) throw "no menu selection";
+ Meteor.call("moveItemToCharacter", this.itemId, characterId);
+ } else {
+ throw "Move item dialog tab is not set to containers or character," +
+ " it is set to " + tab;
+ }
+ },
+});
diff --git a/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.html b/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.html
new file mode 100644
index 00000000..4d31f38e
--- /dev/null
+++ b/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.html
@@ -0,0 +1,9 @@
+
+ {{#baseDialog title=title class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
+ {{evaluateString charId value}}
+ {{> proficiencyViewList charId=charId parentId=charId parentGroup="background"}}
+ {{else}}
+ {{> textDialogEdit}}
+ {{> proficiencyEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="background"}}
+ {{/baseDialog}}
+
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.js b/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.js
new file mode 100644
index 00000000..2ec4e486
--- /dev/null
+++ b/rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.js
@@ -0,0 +1,8 @@
+Template.backgroundDialog.helpers({
+ value: function(){
+ var fieldSelector = {fields: {}};
+ fieldSelector.fields[this.field] = 1;
+ var char = Characters.findOne(this.charId, fieldSelector);
+ return char[this.field];
+ }
+});
diff --git a/rpg-docs/client/views/character/persona/persona.js b/rpg-docs/client/views/character/persona/persona.js
index f3df7e3f..46063f25 100644
--- a/rpg-docs/client/views/character/persona/persona.js
+++ b/rpg-docs/client/views/character/persona/persona.js
@@ -40,11 +40,20 @@ Template.persona.helpers({
Template.persona.events({
"tap .characterField": function(event){
- if (this.field !== "details"){
+ if (this.field === "details"){
+ this.charId = Template.parentData()._id;
+ GlobalUI.setDetail({
+ template: "personaDetailsDialog",
+ data: this,
+ heroId: this._id + this.field,
+ });
+ } else {
+ var template = "textDialog";
+ if (this.field === "backstory") template = "backgroundDialog";
var charId = Template.parentData()._id;
GlobalUI.setDetail({
- template: "textDialog",
- data: {
+ template: template,
+ data: {
charId: charId,
field: this.field,
title: this.title,
@@ -52,13 +61,6 @@ Template.persona.events({
},
heroId: this._id + this.field,
});
- } else {
- this.charId = Template.parentData()._id;
- GlobalUI.setDetail({
- template: "personaDetailsDialog",
- data: this,
- heroId: this._id + this.field,
- });
}
}
});
diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html b/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html
index d9a27836..5d79e37f 100644
--- a/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html
+++ b/rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html
@@ -1,6 +1,10 @@
-
-
-
{{getName}}
+
+
+
diff --git a/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html b/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html
index 1a54310c..b4a08c23 100644
--- a/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html
+++ b/rpg-docs/client/views/character/proficiencies/proficiencyViewList/proficiencyViewList.html
@@ -2,7 +2,7 @@
{{#if proficiencies.count}}
-
Proficiencies
+ Proficiencies
{{#each proficiencies}}
{{> proficiencyView}}
{{/each}}
diff --git a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html
index 155184db..68552057 100644
--- a/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html
+++ b/rpg-docs/client/views/character/spells/spellDialog/spellDialog.html
@@ -27,6 +27,7 @@
{{evaluateString charId description}}
+ {{> attacksViewList charId=charId parentId=_id}}
@@ -126,4 +127,5 @@
+ {{> attackEditList parentId=_id parentCollection="Spells" charId=charId enabled=true name=name}}
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/stats/healthCard/healthCard.css b/rpg-docs/client/views/character/stats/healthCard/healthCard.css
index a170d09e..98280aaf 100644
--- a/rpg-docs/client/views/character/stats/healthCard/healthCard.css
+++ b/rpg-docs/client/views/character/stats/healthCard/healthCard.css
@@ -1,4 +1,4 @@
-.healthCard paper-slider{
+.healthCard paper-diff-slider{
width: 100%;
margin-right: 8px;
}
diff --git a/rpg-docs/client/views/character/stats/healthCard/healthCard.html b/rpg-docs/client/views/character/stats/healthCard/healthCard.html
index 20c3a788..56f035e9 100644
--- a/rpg-docs/client/views/character/stats/healthCard/healthCard.html
+++ b/rpg-docs/client/views/character/stats/healthCard/healthCard.html
@@ -10,24 +10,24 @@
{{#each tempHitPoints}}
{{name}}
-
+ >
{{#unless left}}{{#unless deleteOnZero}}
{{/unless}}{{/unless}}
diff --git a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js
index 8976b1aa..c2cbf6fc 100644
--- a/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js
+++ b/rpg-docs/client/views/character/stats/skillDialog/skillDialog.js
@@ -212,7 +212,15 @@ Template.skillDialogView.helpers({
return Characters.findOne(this.charId, {fields:{_id: 1}});
},
sourceName: function(){
- if (this.parent.collection === "Characters") return "inate";
+ if (this.parent.collection === "Characters"){
+ if (this.parent.group === "racial"){
+ return Characters.findOne(this.charId, {fields:{race: 1}}).race || "Race";
+ }
+ if (this.parent.group === "background"){
+ return "Background";
+ }
+ return "Innate";
+ }
return this.getParent().name;
},
operationName: function(){
diff --git a/rpg-docs/client/views/layout/imports.html b/rpg-docs/client/views/layout/imports.html
index 911456ec..bedc1ce6 100644
--- a/rpg-docs/client/views/layout/imports.html
+++ b/rpg-docs/client/views/layout/imports.html
@@ -33,11 +33,12 @@
+
-
+
diff --git a/rpg-docs/private/changeLogs/changeLogs.js b/rpg-docs/private/changeLogs/changeLogs.js
index 59f39365..8d369126 100644
--- a/rpg-docs/private/changeLogs/changeLogs.js
+++ b/rpg-docs/private/changeLogs/changeLogs.js
@@ -160,10 +160,19 @@ ChangeLogs.insert({
});
ChangeLogs.insert({
- version: "0.5.5",
+ version: "0.5.6",
changes: [
"Changed front page",
"Moved to a darker style",
"Added support for letting characters be viewed by \"anyone with the link\"",
],
});
+
+ChangeLogs.insert({
+ version: "0.5.7",
+ changes: [
+ "Added proficiencies to backgrounds",
+ "Added attacks to spells",
+ "Added a move item dialog to mobile devices, but it can't be accessed yet, because long-presses are broken",
+ ],
+});
diff --git a/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.css
similarity index 100%
rename from rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css
rename to rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.css
diff --git a/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html
similarity index 92%
rename from rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html
rename to rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html
index b991e190..0a2e283b 100644
--- a/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html
+++ b/rpg-docs/public/custom_components/paper-diff-slider/paper-diff-slider.html
@@ -8,55 +8,55 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
-->
@@ -65,10 +65,10 @@ To change the slider secondary progress bar color:
-
+
-
+
@@ -109,7 +109,7 @@ To change the slider secondary progress bar color: