Skip to content

Commit

Permalink
Merge branch 'bugfix-smallbugs'
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaumRystra committed Apr 25, 2017
2 parents 492b5d4 + 2a9d170 commit 1835d96
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions rpg-docs/client/globalHelpers/valueString.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Template.registerHelper("valueString", function(value) {

var resultArray = [];
if (gp > 0) {
resultArray.push(gp + "gp");
resultArray.push(gp + " gp");
}
if (sp > 0) {
resultArray.push(sp + "sp");
resultArray.push(sp + " sp");
}
if (cp > 0) {
resultArray.push(cp + "cp");
resultArray.push(cp + " cp");
}

//build string with correct spacing
Expand All @@ -36,18 +36,18 @@ Template.registerHelper("longValueString", function(value) {
//sp
var gp = Math.floor(value);
if (gp > 0) {
resultArray.push(gp + "gp");
resultArray.push(gp + " gp");
}
//sp
var sp = Math.floor(10 * (value % 1));
if (sp > 0 || resultArray.length) {
resultArray.push(sp + "sp");
resultArray.push(sp + " sp");
}
//cp
var cp = 10 * ((value * 10) % 1);
cp = Math.round(cp * 1000) / 1000;
if (cp > 0 || resultArray.length) {
resultArray.push(cp + "cp");
resultArray.push(cp + " cp");
}

//build string with correct spacing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
Limit uses
</paper-toggle-button>
{{#if usesSet}}
<paper-input id="usesInput" type="number" allowed-pattern="[0-9]" class="flex"
label="Uses" value={{uses}} style="flex-basis: 100px; max-width: 200px">
<paper-input id="usesInput" class="flex" label="Uses" value={{uses}} style="flex-basis: 100px; max-width: 200px">
{{> formulaSuffix}}
</paper-input>
{{else}}
<div class="flex" style="flex-basis: 100px; max-width: 200px"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<template name="containerView">
<div class="layout horizontal wrap center justified">
<table class="summaryTable fullwidth">
<tr><td>Container</td><td>{{round weight}}lbs</td><td>{{longValueString value}}</td></tr>
<tr><td>Contents</td><td>{{round contentsWeight}}lbs</td><td>{{longValueString contentsValue}}</td></tr>
<tr class="paper-font-body2"><td>Total</td><td>{{round totalWeight}}lbs</td><td>{{longValueString totalValue}}</td></tr>
<tr><td>Container</td><td>{{round weight}} lbs</td><td>{{longValueString value}}</td></tr>
<tr><td>Contents</td><td>{{round contentsWeight}} lbs</td><td>{{longValueString contentsValue}}</td></tr>
<tr class="paper-font-body2"><td>Total</td><td>{{round totalWeight}} lbs</td><td>{{longValueString totalValue}}</td></tr>
</table>
</div>
{{#if description}}
Expand Down
10 changes: 5 additions & 5 deletions rpg-docs/client/views/character/inventory/inventory.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<div>
<paper-material class="card">
<div class="top green white-text weightCarried layout horizontal center">
<div class="paper-font-subhead" flex>
<div class="paper-font-subhead flex">
Weight Carried
</div>
<div>
{{round weightCarried}}lbs
{{round weightCarried}} lbs
</div>
</div>
<div class="bottom green" style="padding: 0;">
Expand Down Expand Up @@ -57,7 +57,7 @@
{{valueString equipmentValue}}
</div>
<div class="paper-font-caption">
{{round equipmentWeight}}lbs
{{round equipmentWeight}} lbs
</div>
</div>
<div flex class="bottom list">
Expand Down Expand Up @@ -87,7 +87,7 @@
{{valueString carriedValue}}
</div>
<div class="paper-font-caption">
{{round carriedWeight}}lbs
{{round carriedWeight}} lbs
</div>
</div>
<div flex class="bottom list">
Expand All @@ -108,7 +108,7 @@
{{valueString totalValue}}
</div>
<div class="paper-font-caption" style="margin-right: 8px">
{{round totalWeight}}lbs
{{round totalWeight}} lbs
</div>
<div>
<paper-checkbox class="carriedCheckbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<template name="itemDetails">
<div class="paper-font-headline layout horizontal wrap center justified">
{{#if weight}}<div class="sideMargin">{{round totalWeight}}lbs</div>{{/if}}
{{#if weight}}<div class="sideMargin">{{round totalWeight}} lbs</div>{{/if}}
{{#if value}}<div>{{valueString totalValue}}</div>{{/if}}
</div>
<div class="paper-font-caption layout horizontal wrap">
Expand Down

0 comments on commit 1835d96

Please sign in to comment.