Merge branch 'bugfix-smallbugs'
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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}}
|
||||
|
||||
@@ -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;">
|
||||
@@ -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">
|
||||
@@ -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">
|
||||
@@ -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"
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user