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:
Ingo Schommer 2013-08-20 13:32:22 -07:00
commit 010869a9b5

View File

@ -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));