CMS tree pane to scroll to the page being edited. Fixes #827

This commit is contained in:
Shea Dawson 2013-08-19 11:18:37 +10:00
parent 44fdf66834
commit bb86373ab9

View File

@ -110,6 +110,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));