Merge branch 'js_fixes' into 'dev'
fix regression from commit 04ec35d9cc
where...
See merge request hubzilla/core!1532
This commit is contained in:
commit
89bcb1de42
@ -784,16 +784,26 @@ function updateConvItems(mode,data) {
|
|||||||
collapseHeight();
|
collapseHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(bParam_mid && mode === 'replace')
|
||||||
|
scrollToItem();
|
||||||
|
|
||||||
|
$(document.body).trigger("sticky_kit:recalc");
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollToItem() {
|
||||||
// auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
|
// auto-scroll to a particular comment in a thread (designated by mid) when in single-thread mode
|
||||||
// use the same method to generate the submid as we use in ThreadItem,
|
// use the same method to generate the submid as we use in ThreadItem,
|
||||||
// base64_encode + replace(['+','='],['','']);
|
// base64_encode + replace(['+','='],['','']);
|
||||||
|
|
||||||
|
if(justifiedGalleryActive)
|
||||||
|
return;
|
||||||
|
|
||||||
var submid = ((bParam_mid.length) ? bParam_mid : 'abcdefg');
|
var submid = ((bParam_mid.length) ? bParam_mid : 'abcdefg');
|
||||||
var encoded = ((submid.substr(0,4) == 'b64.') ? true : false);
|
var encoded = ((submid.substr(0,4) == 'b64.') ? true : false);
|
||||||
var submid_encoded = ((encoded) ? submid.substr(4) : window.btoa(submid));
|
var submid_encoded = ((encoded) ? submid.substr(4) : window.btoa(submid));
|
||||||
|
|
||||||
submid_encoded = submid_encoded.replace(/[\+\=]/g,'');
|
submid_encoded = submid_encoded.replace(/[\+\=]/g,'');
|
||||||
if($('.item_' + submid_encoded).length && !$('.item_' + submid_encoded).hasClass('toplevel_item') && mode == 'replace') {
|
if($('.item_' + submid_encoded).length && !$('.item_' + submid_encoded).hasClass('toplevel_item')) {
|
||||||
if($('.collapsed-comments').length) {
|
if($('.collapsed-comments').length) {
|
||||||
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
var scrolltoid = $('.collapsed-comments').attr('id').substring(19);
|
||||||
$('#collapsed-comments-' + scrolltoid + ' .autotime').timeago();
|
$('#collapsed-comments-' + scrolltoid + ' .autotime').timeago();
|
||||||
@ -801,11 +811,9 @@ function updateConvItems(mode,data) {
|
|||||||
$('#hide-comments-' + scrolltoid).html(aStr.showfewer);
|
$('#hide-comments-' + scrolltoid).html(aStr.showfewer);
|
||||||
$('#hide-comments-total-' + scrolltoid).hide();
|
$('#hide-comments-total-' + scrolltoid).hide();
|
||||||
}
|
}
|
||||||
$('html, body').animate({ scrollTop: $('.item_' + submid_encoded).offset().top - $('nav').outerHeight() }, 'slow');
|
$('html, body').animate({ scrollTop: $('.item_' + submid_encoded).offset().top - $('nav').outerHeight(true) }, 'slow');
|
||||||
$('.item_' + submid_encoded).addClass('item-highlight');
|
$('.item_' + submid_encoded).addClass('item-highlight');
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document.body).trigger("sticky_kit:recalc");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function collapseHeight() {
|
function collapseHeight() {
|
||||||
|
@ -427,7 +427,9 @@ var activeCommentText = '';
|
|||||||
var imageparent = document.getElementById($(image).parent()[0].id);
|
var imageparent = document.getElementById($(image).parent()[0].id);
|
||||||
$(imageparent).toggleClass('embed-photo-selected-photo');
|
$(imageparent).toggleClass('embed-photo-selected-photo');
|
||||||
var href = $(imageparent).attr('href');
|
var href = $(imageparent).attr('href');
|
||||||
$.post("embedphotos/photolink", {href: href},
|
$.post(
|
||||||
|
"embedphotos/photolink",
|
||||||
|
{href: href},
|
||||||
function(ddata) {
|
function(ddata) {
|
||||||
if (ddata['status']) {
|
if (ddata['status']) {
|
||||||
addeditortext(ddata['photolink']);
|
addeditortext(ddata['photolink']);
|
||||||
@ -437,10 +439,8 @@ var activeCommentText = '';
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
'json');
|
'json'
|
||||||
$('#embedPhotoModalBodyAlbumDialog').html('');
|
);
|
||||||
$('#embedPhotoModalBodyAlbumDialog').off('click');
|
|
||||||
$('#embedPhotoModal').modal('hide');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
|
||||||
|
@ -302,7 +302,7 @@
|
|||||||
|
|
||||||
{{if $embedPhotos}}
|
{{if $embedPhotos}}
|
||||||
<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" aria-hidden="true">
|
<div class="modal" id="embedPhotoModal" tabindex="-1" role="dialog" aria-labelledby="embedPhotoLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h3>
|
<h3 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h3>
|
||||||
|
Reference in New Issue
Block a user