summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormr-deamon <christian.lehmann@swisstxt.ch>2014-03-12 08:42:05 +0100
committermr-deamon <christian.lehmann@swisstxt.ch>2014-03-12 08:42:05 +0100
commit6f097d8293eb69106c2c35f42ad18b8fdcf95d14 (patch)
tree3f8aaab3d927c45c80282a82b7b58400d1e3837b /templates
parent9e8dfe7d4290f0150fdef10230cd0ca7a75c9755 (diff)
Making meter-widget adjustable
Diffstat (limited to 'templates')
-rw-r--r--templates/project/dashboards/sample.erb4
-rw-r--r--templates/project/widgets/meter/meter.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/project/dashboards/sample.erb b/templates/project/dashboards/sample.erb
index d41d538..8269b7e 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-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"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
@@ -22,4 +22,4 @@
</li>
</ul>
<center><div style="font-size: 12px">Try this: curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "text": "Hey, Look what I can do!" }' \http://<%=request.host%>:<%=request.port%>/widgets/welcome</div></center>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/project/widgets/meter/meter.html b/templates/project/widgets/meter/meter.html
index 16f1f06..d2b8c22 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-width=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" data-bind-data-min="min" data-bind-data-max="max">
<p class="more-info" data-bind="moreinfo"></p>