From c530b4fb977e4d3ecf797c79a00887bc54f9abf5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 29 Sep 2016 11:07:53 +0200 Subject: fixes for make scroll to mid work properly with collapsed threads: unhide the hidden items before scrolling to it, slideDown() is to slow - we must use show() here) --- view/js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 65a5311af..bbf2b7161 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -653,13 +653,14 @@ function updateConvItems(mode,data) { // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') { - $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight(true) }, 'slow'); if($('.collapsed-comments').length) { var scrolltoid = $('.collapsed-comments').attr('id').substring(19); - $('#collapsed-comments-' + scrolltoid).slideDown(); + $('#collapsed-comments-' + scrolltoid + ' .autotime').timeago(); + $('#collapsed-comments-' + scrolltoid).show(); $('#hide-comments-' + scrolltoid).html(aStr.showfewer); $('#hide-comments-total-' + scrolltoid).hide(); } + $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight() }, 'slow'); } } -- cgit v1.2.3 From 3c9809bfe6898e5c7cf4c9c70bbeb280cf9197a4 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 29 Sep 2016 11:28:27 +0200 Subject: highlight the displayed mid and css fixes --- view/css/conversation.css | 30 ++++++++++++++++++++++++++---- view/js/main.js | 1 + view/theme/redbasic/css/style.css | 13 ------------- 3 files changed, 27 insertions(+), 17 deletions(-) (limited to 'view') diff --git a/view/css/conversation.css b/view/css/conversation.css index 2688bde58..7ecd41627 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -97,6 +97,18 @@ /* conv_item */ +.wall-item-head { + padding: 10px 10px 0.5em 10px; +} + +.wall-item-content { + padding: 0.5em 10px; +} + +.wall-item-tools { + padding: 0.5em 10px 10px 10px; +} + .wall-item-info { display: block; float: left; @@ -195,6 +207,20 @@ a.wall-item-name-link { margin-bottom: 20px; } +.ivoted { + color: #337AB7; +} + +.item-highlight { + border-left: 3px solid #337AB7; +} + +.item-highlight .wall-item-head, +.item-highlight .wall-item-content, +.item-highlight .wall-item-tools { + padding-left: 7px; +} + /* comment_item */ .comment-edit-text-empty, @@ -340,7 +366,3 @@ img.smiley.emoji:hover { #filer_save { margin-left: 15px; } - -.ivoted { - color: #337AB7; -} diff --git a/view/js/main.js b/view/js/main.js index bbf2b7161..53a9a2ec7 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -661,6 +661,7 @@ function updateConvItems(mode,data) { $('#hide-comments-total-' + scrolltoid).hide(); } $('html, body').animate({ scrollTop: $('.item_' + bParam_mid.substring(0,32)).offset().top - $('nav').outerHeight() }, 'slow'); + $('.item_' + bParam_mid.substring(0,32)).addClass('item-highlight'); } } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 2b0f3b853..a6d1d2a7e 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1267,14 +1267,6 @@ img.mail-conv-sender-photo { font-size: $body_font_size; } -.wall-item-head { - padding: 10px 10px 0.5em 10px; -} - -.wall-item-content { - padding: 0.5em 10px; -} - .wall-event-item { padding: 10px; color: #fff; @@ -1289,11 +1281,6 @@ img.mail-conv-sender-photo { border-top-left-radius: $radiuspx; } -.wall-item-tools { - padding: 0.5em 10px 10px 10px; -} - - .wall-item-title { font-size: $font_size; } -- cgit v1.2.3 From 5d2cf3d23c440cbaab558cf76c7e2f596d488a41 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 29 Sep 2016 11:55:41 +0200 Subject: omit autoscrolling to toplevel items --- view/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 53a9a2ec7..0239fc1f8 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -652,7 +652,7 @@ function updateConvItems(mode,data) { } // auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode - if($('.item_' + bParam_mid.substring(0,32)).length && mode == 'replace') { + if($('.item_' + bParam_mid.substring(0,32)).length && !$('.item_' + bParam_mid.substring(0,32)).hasClass('toplevel_item') && mode == 'replace') { if($('.collapsed-comments').length) { var scrolltoid = $('.collapsed-comments').attr('id').substring(19); $('#collapsed-comments-' + scrolltoid + ' .autotime').timeago(); -- cgit v1.2.3