Sourcecode in Poll/macros.js:
1: function choices_macro(param) {
2: var vote;
3: if (session.user && this.votes.get(session.user.name))
4: vote = this.votes.get(session.user.name).choice;
5: for (var i=0; i<this.size(); i++) {
6: var choice = this.get(i);
7: param.name = "choice";
8: param.title = renderSkinAsString(createSkin(choice.title));
9: param.value = choice._id;
10: param.checked = "";
11: if (choice == vote)
12: param.checked = " checked=\"checked\"";
13: res.write(choice.renderSkinAsString("main", param));
14: }
15: return;
16: }
|