aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 4ec7a71aa..94fd940b2 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -581,8 +581,10 @@ function contextualHelpFocus(target, openSidePanel) {
function updatePageItems(mode, data) {
if(mode === 'append') {
+ newitemcount = 0;
$(data).each(function() {
$('#page-end').before($(this));
+ newitemcount++;
});
if(loadingPage) {
@@ -593,6 +595,10 @@ function updatePageItems(mode, data) {
var e = document.getElementById('content-complete');
if(e) {
pageHasMoreContent = false;
+ } else {
+ if (newitemcount < 1) {
+ pageUpdate();
+ }
}
collapseHeight();
@@ -1267,6 +1273,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;