more infrastructure for notification auto-scroll to comment
This commit is contained in:
parent
39dc4fc992
commit
bfc2552841
@ -412,8 +412,11 @@ class ThreadItem {
|
|||||||
if($visible_comments === false)
|
if($visible_comments === false)
|
||||||
$visible_comments = 3;
|
$visible_comments = 3;
|
||||||
|
|
||||||
if(in_array(\App::$module,['display','update_display']))
|
// needed for scroll to comment from notification but needs more work
|
||||||
$visible_comments = 99999;
|
// as we do not want to open all comments unless there is actually an #item_xx anchor
|
||||||
|
// and the url fragment is not sent to the server.
|
||||||
|
// if(in_array(\App::$module,['display','update_display']))
|
||||||
|
// $visible_comments = 99999;
|
||||||
|
|
||||||
if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) {
|
if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) {
|
||||||
foreach($children as $child) {
|
foreach($children as $child) {
|
||||||
|
@ -249,6 +249,7 @@ var divmore_height = 400;
|
|||||||
var last_filestorage_id = null;
|
var last_filestorage_id = null;
|
||||||
var mediaPlaying = false;
|
var mediaPlaying = false;
|
||||||
var contentHeightDiff = 0;
|
var contentHeightDiff = 0;
|
||||||
|
var gotoAnchor = ((document.location.hash.includes('item_')) ? document.location.hash : '');
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$.ajaxSetup({cache: false});
|
$.ajaxSetup({cache: false});
|
||||||
@ -650,6 +651,11 @@ function updateConvItems(mode,data) {
|
|||||||
collapseHeight();
|
collapseHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(gotoAnchor != '') {
|
||||||
|
document.location.hash = gotoAnchor;
|
||||||
|
gotoAnchor = '';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function collapseHeight() {
|
function collapseHeight() {
|
||||||
|
Reference in New Issue
Block a user