-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
208 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
html /deep/ .moveItemDialog paper-tabs::shadow #selectionBar { | ||
background-color: #D50000; | ||
} | ||
|
||
html /deep/ .moveItemDialog paper-tab::shadow #ink { | ||
color: #D50000; | ||
} |
49 changes: 49 additions & 0 deletions
49
rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template name="moveItemDialog"> | ||
<div class="moveItemDialog"> | ||
<paper-tabs selected="{{selectedTab}}"> | ||
<paper-tab name="containers" | ||
class="clickable"> | ||
Containers | ||
</paper-tab> | ||
<paper-tab name="characters" | ||
class="clickable"> | ||
Characters | ||
</paper-tab> | ||
</paper-tabs> | ||
<core-animated-pages selected="{{selectedTab}}" | ||
transitions="slide-from-right" | ||
style="width: 250px; | ||
height: 200px; | ||
overflow-y: auto; | ||
overflow-x: hidden;"> | ||
<section name="containers"> | ||
<core-menu id="containerMenu" style="margin: 0;"> | ||
{{#each containers}} | ||
<paper-item name={{_id}} | ||
layout horizontal center> | ||
<core-icon icon="image:brightness-1" | ||
style="color: {{hexColor color}}; | ||
margin-right: 16px;"> | ||
</core-icon> | ||
<div>{{name}}</div> | ||
</paper-item> | ||
{{/each}} | ||
</core-menu> | ||
</section> | ||
<section name="characters"> | ||
<core-menu id="characterMenu" style="margin: 0;"> | ||
{{#each characters}} | ||
<paper-item name={{_id}} | ||
layout horizontal center> | ||
<div class="item small"> | ||
{{name}} | ||
</div> | ||
</paper-item> | ||
{{/each}} | ||
</core-menu> | ||
</section> | ||
</core-animated-pages> | ||
</div> | ||
<paper-button id="cancelButton" affirmative> Cancel </paper-button> | ||
<paper-button id="moveButton" affirmative> Move </paper-button> | ||
</template> |
56 changes: 56 additions & 0 deletions
56
rpg-docs/client/views/character/inventory/moveItemDialog/moveItemDialog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
}, | ||
}); |
9 changes: 9 additions & 0 deletions
9
rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template name="backgroundDialog"> | ||
{{#baseDialog title=title class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}} | ||
<div class="pre-wrap">{{evaluateString charId value}}</div> | ||
{{> proficiencyViewList charId=charId parentId=charId parentGroup="background"}} | ||
{{else}} | ||
{{> textDialogEdit}} | ||
{{> proficiencyEditList parentId=charId parentCollection="Characters" charId=charId parentGroup="background"}} | ||
{{/baseDialog}} | ||
</template> |
8 changes: 8 additions & 0 deletions
8
rpg-docs/client/views/character/persona/backgroundDialog/backgroundDialog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
rpg-docs/client/views/character/proficiencies/proficiencyView/proficiencyView.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<template name="proficiencyView"> | ||
<div class="proficiencyView" layout horizontal center> | ||
<core-icon icon="{{profIcon}}"></core-icon> | ||
<div class="sideMargin">{{getName}}</div> | ||
<div class="proficiencyView item small" | ||
style="padding: 0;" | ||
layout horizontal center> | ||
<core-icon icon="{{profIcon}}" style="margin-right: 16px;"></core-icon> | ||
<div>{{getName}}</div> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
rpg-docs/client/views/character/stats/healthCard/healthCard.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.healthCard paper-slider{ | ||
.healthCard paper-diff-slider{ | ||
width: 100%; | ||
margin-right: 8px; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.