aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-01-30 15:56:33 -0800
committerzotlabs <mike@macgirvin.com>2020-01-30 15:56:33 -0800
commit989443a5698adf5e7a93f874048699526aa103a7 (patch)
treef5db527455879b0d39b63a4356c25bb260858a1a /view/js/main.js
parente9b2dacb61ad5a4c81a8b0a19db92adecb51b2f5 (diff)
downloadvolse-hubzilla-989443a5698adf5e7a93f874048699526aa103a7.tar.gz
volse-hubzilla-989443a5698adf5e7a93f874048699526aa103a7.tar.bz2
volse-hubzilla-989443a5698adf5e7a93f874048699526aa103a7.zip
basic poll support and patch to not call System::get_platform_name() within t() unless needed. Polls probably need refining and have not yet been fully tested after porting
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 4ec7a71aa..e735e9d6b 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1267,6 +1267,20 @@ function filestorage(event, nick, id) {
});
}
+function submitPoll(id) {
+
+ $.post('vote/' + id,
+ $('#question-form-' + id).serialize(),
+ function(data) {
+ $.jGrowl(data.message, { sticky: false, theme: ((data.success) ? 'info' : 'notice'), life: 10000 });
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(updateInit,1500);
+ }
+ );
+
+}
+
+
function post_comment(id) {
unpause();
commentBusy = true;