diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 11 | ||||
-rwxr-xr-x | view/tpl/head.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/settings_display.tpl | 1 |
3 files changed, 7 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; diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index 8a007232e..322273193 100755 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -28,6 +28,7 @@ var justifiedGalleryActive = false; {{if $channel_hash}}var channelHash = '{{$channel_hash}}';{{/if}} {{if $channel_id}}var channelId = '{{$channel_id}}';{{/if}}{{* Used in e.g. autocomplete *}} + var preloadImages = {{$preload_images}}; </script> diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index 02f679852..cf79671fd 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -65,6 +65,7 @@ {{include file="field_checkbox.tpl" field=$channel_list_mode}} {{include file="field_checkbox.tpl" field=$network_list_mode}} {{include file="field_checkbox.tpl" field=$user_scalable}} + {{include file="field_checkbox.tpl" field=$preload_images}} {{if $expert}} <div class="form-group"> <a class="btn btn-default "href="pdledit">{{$layout_editor}}</a> |