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

Scroll fixes for VuDL.

parent d87372d6
Branches
Tags
No related merge requests found
...@@ -60,8 +60,9 @@ function findVisible() { ...@@ -60,8 +60,9 @@ function findVisible() {
var min = -1,max; var min = -1,max;
// Flag pages on screen // Flag pages on screen
$('.page-link.unloaded').each(function(index, item) { $('.page-link.unloaded').each(function(index, item) {
if($(item).offset().top > $('#collapse1').position().top-vudlSettings.scroll.top var listID = '#collapse'+currentList;
&& $(item).offset().top < $('#collapse1').position().top+$('#collapse1').height()+vudlSettings.scroll.bottom if($(item).offset().top > $(listID).position().top-vudlSettings.scroll.top
&& $(item).offset().top < $(listID).position().top+$(listID).height()+vudlSettings.scroll.bottom
&& $(item).hasClass('unloaded')) { && $(item).hasClass('unloaded')) {
$(item).addClass('loading'); $(item).addClass('loading');
max = parseInt($(item).attr('title')); max = parseInt($(item).attr('title'));
...@@ -173,6 +174,12 @@ $(document).ready(function() { ...@@ -173,6 +174,12 @@ $(document).ready(function() {
} }
} }
}); });
$('.panel-title a').click(function() {
if($(this).attr('href') == "#collapse_details") {
return;
}
currentList = parseInt($(this).attr('href').substring(9));
});
scrollToSelected(); scrollToSelected();
resizeElements(); resizeElements();
$( window ).resize( resizeElements ); $( window ).resize( resizeElements );
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
// HEADER FILES // HEADER FILES
$this->headLink()->appendStylesheet('vudl.css'); $this->headLink()->appendStylesheet('vudl.css');
$this->headScript()->appendFile('vendor/canvas-zoomy.js');
$this->headScript()->appendFile('vudl/config.js'); $this->headScript()->appendFile('vudl/config.js');
$this->headScript()->appendFile('vudl/record.js'); $this->headScript()->appendFile('vudl/record.js');
$this->headScript()->appendFile('zoomy/canvas-zoomy.js');
// Compact header // Compact header
$this->layout()->headerType = 'record'; $this->layout()->headerType = 'record';
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<script> <script>
var documentID = '<?=$this->id ?>'; var documentID = '<?=$this->id ?>';
var initPage = $.parseJSON('<?=str_replace('\"', "\'", json_encode($this->outline['lists'][$this->initList][$this->initPage], JSON_HEX_APOS | JSON_HEX_AMP)) ?>'); var initPage = $.parseJSON('<?=str_replace('\"', "\'", json_encode($this->outline['lists'][$this->initList][$this->initPage], JSON_HEX_APOS | JSON_HEX_AMP)) ?>');
var currentList = <?=$this->initList ?>;
counts = $.parseJSON('<?=json_encode($this->outline['counts'], JSON_HEX_APOS | JSON_HEX_AMP) ?>'); counts = $.parseJSON('<?=json_encode($this->outline['counts'], JSON_HEX_APOS | JSON_HEX_AMP) ?>');
<? if(count($this->outline['lists'][$this->initList]) >= $this->outline['counts'][$this->initList]): ?> <? if(count($this->outline['lists'][$this->initList]) >= $this->outline['counts'][$this->initList]): ?>
......
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