aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js19
-rwxr-xr-xview/tpl/head.tpl1
-rw-r--r--view/tpl/pdledit.tpl4
-rwxr-xr-xview/tpl/register.tpl1
-rwxr-xr-xview/tpl/settings_display.tpl1
5 files changed, 16 insertions, 10 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 1fb61ebab..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() {
@@ -648,9 +646,12 @@ function collapseHeight() {
if(! $(this).hasClass('divmore')) {
//var trigger = $(window).scrollTop() < $(this).offset().top ? true : false;
+ //console.log($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i));
// check if we will collapse some content above the visible content and compensate the diff later
- if($(window).scrollTop() > $(this).offset().top) {
+ if($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i) < 65) {
+ //$(this).css('color', 'red');
+ //console.log($(this).offset().top + divmore_height + ' / ' + $(window).scrollTop());
diff = orgHeight - divmore_height;
cDiff = cDiff + diff;
i++;
@@ -683,7 +684,7 @@ function collapseHeight() {
if(i){
var sval = position - cDiff + ($(".divgrow-showmore").outerHeight() * i);
- console.log('collapsed above vieport count: ' + i);
+ console.log('collapsed above viewport count: ' + i);
$(window).scrollTop(sval);
}
@@ -739,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() {
@@ -753,7 +753,10 @@ function liveUpdate() {
$("#page-spinner").spin(false);
$("#profile-jot-text-loading").spin(false);
- $(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff);
+ // adjust scroll position if new content was added above viewport
+ 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/pdledit.tpl b/view/tpl/pdledit.tpl
index 9df93e4c6..af8e37602 100644
--- a/view/tpl/pdledit.tpl
+++ b/view/tpl/pdledit.tpl
@@ -1,3 +1,4 @@
+<div class="generic-content-wrapper-styled">
<h1>{{$header}}</h1>
<h2>{{$mname}} {{$module}}</h2>
@@ -17,5 +18,4 @@
<input type="submit" name="submit" value="{{$submit}}" />
</form>
-
-
+</div>
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index b72e069c3..857b5e984 100755
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -66,6 +66,7 @@
<label for="newchannel-nickname" id="label-newchannel-nickname" class="register-label" >{{$label_nick}}</label>
<input type="text" name="nickname" id="newchannel-nickname" class="register-input" value="{{$nickname}}" />
<div id="nick-spinner"></div>
+ <div id="newchannel-nick-desc" class="descriptive-paragraph" style="text-align: right;">{{$nick_hub}}</div>
<div id="newchannel-nickname-feedback" class="register-feedback"></div>
<div id="newchannel-nickname-end" class="register-field-end"></div>
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>