mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #828 from sheadawson/827-treescroll
CMS tree pane to scroll to the page being edited. Fixes #827
This commit is contained in:
commit
010869a9b5
@ -141,6 +141,18 @@
|
||||
return config;
|
||||
}
|
||||
});
|
||||
|
||||
// Scroll tree down to context of the current page
|
||||
$('.cms-tree a.jstree-clicked').entwine({
|
||||
onmatch: function(){
|
||||
var self = this,
|
||||
panel = self.parents('.cms-panel-content');
|
||||
|
||||
panel.animate({
|
||||
scrollTop: self.offset().top - (panel.height() / 2)
|
||||
}, 'slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
Loading…
Reference in New Issue
Block a user