REFACTOR: rename "total_votes" poll field to the more accurate "voters"

FEATURE: automagically load plugin's migrations
This commit is contained in:
Régis Hanol
2015-05-04 16:01:57 +02:00
parent 8f706f11cb
commit 86d7412f30
13 changed files with 58 additions and 39 deletions

View File

@ -98,10 +98,8 @@
}
// that's our poll!
var result = ["div", attributes].concat(contents);
// add a small paragraph displaying the total number of votes
result.push(["p", I18n.t("poll.total_votes", { count: 0 })]);
var pollContainer = ["div", { "class": "poll-container" }].concat(contents);
var result = ["div", attributes, pollContainer];
// add some information when type is "multiple"
if (attributes[DATA_PREFIX + "type"] === "multiple") {
@ -144,6 +142,7 @@
});
Discourse.Markdown.whiteListTag("div", "class", "poll");
Discourse.Markdown.whiteListTag("div", "class", "poll-container");
Discourse.Markdown.whiteListTag("div", "data-*");
Discourse.Markdown.whiteListTag("a", "class", /^button (cast-votes|toggle-results)/);