mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
CMS tree pane to scroll to the page being edited. Fixes #827
This commit is contained in:
parent
44fdf66834
commit
bb86373ab9
@ -110,6 +110,18 @@
|
|||||||
return config;
|
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));
|
}(jQuery));
|
||||||
|
Loading…
Reference in New Issue
Block a user