summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormr-deamon <christian.lehmann@swisstxt.ch>2014-03-12 10:13:15 +0100
committermr-deamon <christian.lehmann@swisstxt.ch>2014-03-12 10:13:15 +0100
commit76a645b75b0f8173a5e5c7c1e16ea9633ca11e40 (patch)
tree071a18d52cb88d9d1b50778b031e5914ed3b912b /templates
parent6f097d8293eb69106c2c35f42ad18b8fdcf95d14 (diff)
Adding Suffix and Prefix to Meter-Widget
Diffstat (limited to 'templates')
-rw-r--r--templates/project/dashboards/sample.erb2
-rw-r--r--templates/project/widgets/meter/meter.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/project/dashboards/sample.erb b/templates/project/dashboards/sample.erb
index 8269b7e..08c3b51 100644
--- a/templates/project/dashboards/sample.erb
+++ b/templates/project/dashboards/sample.erb
@@ -6,7 +6,7 @@
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
- <div data-id="synergy" data-view="Meter" data-title="Synergy" data-height="200" data-width="200" data-min="0" data-max="100"></div>
+ <div data-id="synergy" data-view="Meter" data-title="Synergy" data-height="200" data-width="200" data-min="0" data-max="100" data-suffix="%"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
diff --git a/templates/project/widgets/meter/meter.html b/templates/project/widgets/meter/meter.html
index d2b8c22..72592fb 100644
--- a/templates/project/widgets/meter/meter.html
+++ b/templates/project/widgets/meter/meter.html
@@ -1,6 +1,6 @@
<h1 class="title" data-bind="title"></h1>
-<input class="meter" data-angleOffset=-125 data-angleArc=250 data-bind-data-height="height | default 200" data-bind-data-width="width | default 200" data-readOnly=true data-bind-value="value | shortenedNumber" data-bind-data-min="min" data-bind-data-max="max">
+<input class="meter" data-angleOffset=-125 data-angleArc=250 data-bind-data-height="height | default 200" data-bind-data-width="width | default 200" data-readOnly=true data-bind-value="value | shortenedNumber | prepend prefix | append suffix" data-bind-data-min="min" data-bind-data-max="max">
<p class="more-info" data-bind="moreinfo"></p>