diff --git a/rpg-docs/client/globalHelpers/openParentDialog.js b/rpg-docs/client/globalHelpers/openParentDialog.js index 7f1528a2..139428fe 100644 --- a/rpg-docs/client/globalHelpers/openParentDialog.js +++ b/rpg-docs/client/globalHelpers/openParentDialog.js @@ -1,32 +1,23 @@ -openParentDialog = function(parent, charId, heroId) { - var detail; +openParentDialog = function({ + parent, charId, element, returnElement, callback, +}) { + let template; + let data; if (parent.collection === "Characters" && parent.group === "racial") { - detail = { - template: "raceDialog", - data: {charId: parent.id}, - }; + template = "raceDialog"; + data = {charId: parent.id}; } else if (parent.collection === "Features") { - detail = { - template: "featureDialog", - data: {featureId: parent.id}, - }; + template = "featureDialog"; + data = {featureId: parent.id}; } else if (parent.collection === "Classes") { - detail = { - template: "classDialog", - data: {classId: parent.id}, - }; + template = "classDialog"; + data = {classId: parent.id}; } else if (parent.collection === "Items") { - detail = { - template: "itemDialog", - data: {itemId: parent.id}, - }; + template = "itemDialog"; + data = {itemId: parent.id}; } else if (parent.collection === "Spells") { - detail = { - template: "spellDialog", - data: {spellId: parent.id}, - }; + template = "spellDialog"; + data = {spellId: parent.id}; } - detail.heroId = heroId; - detail.charId = charId; - GlobalUI.setDetail(detail); + pushDialogStack({template, data, element, returnElement, callback}); }; diff --git a/rpg-docs/client/style/main.css b/rpg-docs/client/style/main.css index 7977a784..7884736f 100644 --- a/rpg-docs/client/style/main.css +++ b/rpg-docs/client/style/main.css @@ -55,6 +55,8 @@ paper-icon-item::shadow #contentIcon { position: fixed; bottom: 24px; right: 24px; + /* stop the fab from flashing during animation */ + transform: translateZ(0); } paper-fab { @@ -75,6 +77,11 @@ paper-button { text-transform: uppercase; } +dicecloud-selector paper-item { + white-space: nowrap; + overflow: hidden; +} + /*Style shortcuts*/ .scroll-y { overflow-y: auto; diff --git a/rpg-docs/client/views/character/characterSettings/shareDialog.html b/rpg-docs/client/views/character/characterSettings/shareDialog.html index 3be53bba..4554da61 100644 --- a/rpg-docs/client/views/character/characterSettings/shareDialog.html +++ b/rpg-docs/client/views/character/characterSettings/shareDialog.html @@ -8,10 +8,10 @@
- + Only people I share with Anyone with link - +
diff --git a/rpg-docs/client/views/character/characterSheet.js b/rpg-docs/client/views/character/characterSheet.js index c29332bf..bbb9b367 100644 --- a/rpg-docs/client/views/character/characterSheet.js +++ b/rpg-docs/client/views/character/characterSheet.js @@ -30,24 +30,21 @@ Template.characterSheet.events({ "color-change": function(event, instance){ Characters.update(this._id, {$set: {color: event.color}}); }, - "tap #deleteCharacter": function(event, instance){ - const menu = instance.find(".character-menu"); + "click #deleteCharacter": function(event, instance){ pushDialogStack({ data: this, template: "deleteCharacterConfirmation", element: event.currentTarget.parentElement.parentElement, }); }, - "tap #shareCharacter": function(event, instance){ - const menu = instance.find(".character-menu"); + "click #shareCharacter": function(event, instance){ pushDialogStack({ data: this, template: "shareDialog", element: event.currentTarget.parentElement.parentElement, }); }, - "tap #characterSettings": function(event, instance){ - const menu = instance.find(".character-menu"); + "click #characterSettings": function(event, instance){ pushDialogStack({ data: this, template: "characterSettings", diff --git a/rpg-docs/client/views/character/features/featureDialog/featureDialog.html b/rpg-docs/client/views/character/features/featureDialog/featureDialog.html index 500da4f9..77dde01c 100644 --- a/rpg-docs/client/views/character/features/featureDialog/featureDialog.html +++ b/rpg-docs/client/views/character/features/featureDialog/featureDialog.html @@ -10,10 +10,9 @@