aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-02-17 12:32:12 +0100
committerMario Vavti <mario@mariovavti.com>2016-02-17 12:32:12 +0100
commitddbe3c7426a551420bb6ead09984333e956b3a58 (patch)
tree4289d39a2632b1f38fdecbcb9a550258da4d2631 /view/js
parentb8c7b2f81df61e5068366cbdb0f18940ff5d4bf1 (diff)
downloadvolse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.tar.gz
volse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.tar.bz2
volse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.zip
make always preload images before rendering the page a display setting
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 6bc7d9e91..04b317914 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -618,7 +618,7 @@ function updateConvItems(mode,data) {
/* autocomplete @nicknames */
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");
- var bimgs = $(".wall-item-body img").not(function() { return this.complete; });
+ var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; }));
var bimgcount = bimgs.length;
if (bimgcount) {
@@ -632,8 +632,6 @@ function updateConvItems(mode,data) {
collapseHeight();
}
- //collapseHeight();
-
}
function collapseHeight() {
@@ -742,8 +740,7 @@ function liveUpdate() {
var dready = new Date();
console.log('DATA ready in: ' + (dready - dstart)/1000 + ' seconds.');
-
- if(update_mode === 'update') {
+ if(update_mode === 'update' || preloadImages) {
console.log('LOADING images...');
$('.wall-item-body, .wall-photo-item',data).imagesLoaded( function() {
@@ -757,7 +754,9 @@ function liveUpdate() {
$("#profile-jot-text-loading").spin(false);
// adjust scroll position if new content was added above viewport
- $(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
+ if(update_mode === 'update') {
+ $(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
+ }
in_progress = false;