just a little bit of polish for the appearance
This commit is contained in:
parent
fcee492c89
commit
7d2b6ef776
3 changed files with 13 additions and 4 deletions
|
@ -1,2 +1,2 @@
|
|||
<p><% param.graph %><% param.percent %>% <i>(<% param.count %>)</i><br>
|
||||
<p><% param.graph %><% param.percent %>% <span class="small">(<% param.count %><% param.text %>)</span><br>
|
||||
<% param.title %>
|
||||
|
|
|
@ -82,7 +82,7 @@ function choices_macro(param) {
|
|||
}
|
||||
|
||||
|
||||
function results_macro() {
|
||||
function results_macro(param2) {
|
||||
var str = "";
|
||||
for (var i=0; i<this.size(); i++) {
|
||||
var c = this.get(i);
|
||||
|
@ -94,6 +94,15 @@ function results_macro() {
|
|||
param.percent = this.calcPercent(param);
|
||||
param.width = Math.round(param.percent * 2.5);
|
||||
param.graph = c.renderSkinAsString("graph", param);
|
||||
param.text = " sucker";
|
||||
}
|
||||
if (param.count == 1) {
|
||||
if (param2.singular)
|
||||
param.text = " " + param2.singular;
|
||||
}
|
||||
else {
|
||||
if (param2.plural)
|
||||
param.text = " " + param2.plural;
|
||||
}
|
||||
str += c.renderSkinAsString("result", param);
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
</style>
|
||||
|
||||
<span class="storyTitle"><% this.question %></span>
|
||||
<% this.results %>
|
||||
<% this.results singular="vote" plural="votes" %>
|
||||
|
||||
<p><b>Total:</b> 100% <i>(<% this.total %>)</i>
|
||||
<p><b>Total:</b> 100% <span class="small">(<% this.total singular="vote" plural="votes" %>)</span>
|
||||
|
||||
<p><span class="small">created by <% this.creator %> on <% this.createtime format="short" %>.<% this.state text="<br>this poll was closed on " format="short" %></span>
|
Loading…
Add table
Reference in a new issue