The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 76935f4a authored by Chris Hallberg's avatar Chris Hallberg
Browse files

VuDL fixes to scrolling behaviour and bottom item padding.

parent f50df185
No related merge requests found
...@@ -123,6 +123,9 @@ function scrollToSelected() { ...@@ -123,6 +123,9 @@ function scrollToSelected() {
scrollTop: $('#collapse1 .selected').offset().top-$('#collapse1').offset().top+$('#collapse1').scrollTop()-12 scrollTop: $('#collapse1 .selected').offset().top-$('#collapse1').offset().top+$('#collapse1').scrollTop()-12
}); });
} }
function scrollAdjust() {
$('#collapse1').scrollTop($('#'+topScrollItem).offset().top-$('#collapse1').offset().top+$('#collapse1').scrollTop());
}
// Accordion size // Accordion size
function resizeAccordions(offset) { function resizeAccordions(offset) {
var accordionHeight = window.innerHeight // Window height var accordionHeight = window.innerHeight // Window height
...@@ -181,6 +184,16 @@ $(document).ready(function() { ...@@ -181,6 +184,16 @@ $(document).ready(function() {
$('#side-nav-toggle').click(toggleSideNav); $('#side-nav-toggle').click(toggleSideNav);
setTimeout(findVisible, 1000); setTimeout(findVisible, 1000);
ajaxGetView(initPage); ajaxGetView(initPage);
// Track top item in the scroll bar
$('.accordion-body').scroll(function(e){
var pageLinks = $('.page-link');
for(var i=0;i<pageLinks.length;i++) {
if($(pageLinks[i]).position().top >= 0) {
topScrollItem = pageLinks[i].id;
break;
}
}
});
}); });
// Initial alignment // Initial alignment
$( window ).load( scrollToSelected ); $( window ).load( scrollToSelected );
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
<? endforeach; ?> <? endforeach; ?>
<!-- POST LOADING PLACEHOLDERS --> <!-- POST LOADING PLACEHOLDERS -->
<? if(isset($this->outline['counts'][$key])): ?> <? if(isset($this->outline['counts'][$key])): ?>
<? for($i=$this->page+count($list);$i<$this->outline['counts'][$key];$i++): ?> <? for($i=$this->initPage+count($list);$i<$this->outline['counts'][$key];$i++): ?>
<a class="page-link unloaded" id="item<?=($i) ?>" title="<?=$i ?>">Loading...</a> <a class="page-link unloaded" id="item<?=($i) ?>" title="<?=$i ?>">Loading...</a>
<? endfor; ?> <? endfor; ?>
<? endif; ?> <? endif; ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment