diff options
author | zotlabs <mike@macgirvin.com> | 2020-01-30 15:56:33 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2020-01-30 15:56:33 -0800 |
commit | 989443a5698adf5e7a93f874048699526aa103a7 (patch) | |
tree | f5db527455879b0d39b63a4356c25bb260858a1a /view | |
parent | e9b2dacb61ad5a4c81a8b0a19db92adecb51b2f5 (diff) | |
download | volse-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')
-rw-r--r-- | view/js/autocomplete.js | 2 | ||||
-rw-r--r-- | view/js/main.js | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 278a0a176..c194338d6 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -372,7 +372,7 @@ function string2bb(element) { return; if(type=='bbcode') { - var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'summary', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']; + var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'summary', 'map', 'nobb', 'list', 'checklist', 'question', 'answer', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']; var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr' ]; var elements = open_close_elements.concat(open_elements); 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; |