Redraw revision graph on window resize (#10206).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8866 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Etienne Massip
2012-02-13 20:20:18 +00:00
parent cccfed7006
commit c5317a14ac
2 changed files with 30 additions and 18 deletions
@@ -2,11 +2,16 @@
<%= javascript_include_tag 'revision_graph.js' %>
<script type="text/javascript" charset="utf-8">
Event.observe(window, 'load', function(){
revisionGraph(
document.getElementById('holder'),
<%= commits.to_json.html_safe %>,
<%= space %>);
['load', 'resize'].each(function(window_event) {
Event.observe(window, window_event, function(){
drawRevisionGraph(
document.getElementById('holder'),
<%= commits.to_json.html_safe %>,
<%= space %>);
});
});
</script>