mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00: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;
|
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…
x
Reference in New Issue
Block a user