diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/main.js | 17 | ||||
-rw-r--r-- | view/js/mod_cloud.js | 3 |
2 files changed, 12 insertions, 8 deletions
diff --git a/view/js/main.js b/view/js/main.js index aff6eab4d..fdebb5faa 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -197,8 +197,7 @@ $(document).ready(function() { if (singlethread_modules.indexOf(module) !== -1) { history.pushState(stateObj, '', module + '/' + b64mid); - $('.message').removeClass('active'); - $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + } if (b64mid) { @@ -207,6 +206,9 @@ $(document).ready(function() { if(! page_load) { prepareLiveUpdate(b64mid, notify_id); + $('.message').removeClass('active'); + $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + $('[data-b64mid="' + b64mid + '"].message .badge').remove(); } } } @@ -644,7 +646,6 @@ function updatePageItems(mode, data) { function updateConvItems(mode,data) { - var scroll_position = $(window).scrollTop(); if(mode !== 'update') @@ -657,10 +658,6 @@ function updateConvItems(mode,data) { next = 'threads-end'; } - if(mode === 'replace') { - $('.thread-parent').remove(); // clear existing content - } - $('.thread-wrapper', data).each(function() { if(this.classList.contains('toplevel_item')) { var ident = this.id; @@ -953,9 +950,13 @@ function liveUpdate(notify_id) { console.log('displaying: ' + update_url); if(page_load) { + $("#page-spinner").show(); - if(bParam_page == 1) + + if(bParam_page == 1) { update_mode = 'replace'; + $('.thread-wrapper').remove(); + } else update_mode = 'append'; } diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 7f9cb4fd1..e0f59beab 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -411,6 +411,9 @@ function UploadInit() { var filedrag = $(".cloud-index.attach-drop"); var reload = false; + if (!$('#invisible-cloud-file-upload').length) + return; + $('#invisible-cloud-file-upload').fileupload({ url: 'file_upload', dataType: 'json', |