mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 23:30:36 +01:00
scroll to the actual subsection in the ACP when clicking on links pointing to that hash
This commit is contained in:
@@ -17,6 +17,13 @@ define('admin/settings', ['uploader'], function (uploader) {
|
||||
$(this).prepend('<a name="' + anchor + '"></a>');
|
||||
$('.section-content ul').append('<li><a href="#' + anchor + '">' + header + '</a></li>');
|
||||
});
|
||||
|
||||
var scrollTo = $('a[name="' + window.location.hash.replace('#', '') + '"]');
|
||||
if (scrollTo.length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: (scrollTo.offset().top) + 'px',
|
||||
}, 400);
|
||||
}
|
||||
};
|
||||
|
||||
Settings.prepare = function (callback) {
|
||||
|
||||
Reference in New Issue
Block a user