@Kowlin There is a pull request (not authored by me) which fixes the problem. The Javascript problem is easy to fix. However, that in and of itself does not wholly fix the problem. The second part is that the Persona theme is laid out a bit different in HTML and the poll client javascript expects to insert the poll into a certain HTML element. Altering the poll code to work correctly for Persona means breaking all other themes. I have my own fixes for these issues but haven't pushed anything because of the theme compatibility problem.
How I fixed the JS problem:
index 5eb6a09..7b78147 100644
--- a/public/js/poll/main.js
+++ b/public/js/poll/main.js
@@ -1,7 +1,7 @@
(function() {
window.Poll = {
load: function(data) {
- Poll.sockets.emit.load(data.pollid, function(err, poll)
+ Poll.sockets.emit.load(data, function(err, poll) {
if (!err) {
Poll.view.init(poll, function(pollView)
if (parseInt(poll.info.deleted,
diff --git a/templates/poll/notify.tpl b/templates/poll/notify.tpl
index a4c5354..fc693c2 100644
--- a/templates/poll/notify.tpl
+++ b/templates/poll/notify.tpl
@@ -1 +1 @@
-<script>Poll.load({ pollid: {pollid} })</script>
\ No newline at end of file
+<script>Poll.load({pollid})</script>
And how I fixed the Persona theme problem:
diff --git a/public/js/poll/view.js b/public/js/poll/view.js
index 1d586ad..900f3e4 100644
--- a/public/js/poll/view.js
+++ b/public/js/poll/view.js
@@ -63,7 +63,7 @@
},
insertPoll: function(poll, callback) {
View.parsePoll(poll, function(html) {
- $('#post-container .post-row[data-index="0"] .po
+ $('.posts .clearfix[data-index="0"] .content').p
callback();
});
},