graph: fix JavaScript issues to make it work on IE
authorBenoit Allard <benoit@aeteurope.nl>
Wed, 25 Jun 2008 20:50:40 +0200
changeset 6733 936a9073bb73
parent 6732 3e532b97d1e1
child 6734 41edbc2e0b0b
graph: fix JavaScript issues to make it work on IE
templates/coal/graph.tmpl
templates/gitweb/graph.tmpl
templates/graph.tmpl
--- a/templates/coal/graph.tmpl	Wed Jun 25 10:54:48 2008 +0200
+++ b/templates/coal/graph.tmpl	Wed Jun 25 20:50:40 2008 +0200
@@ -54,8 +54,8 @@
 
 document.getElementById('noscript').style.display = 'none';
 
-data = {jsdata|json};
-graph = new Graph();
+var data = {jsdata|json};
+var graph = new Graph();
 graph.scale({bg_height});
 
 graph.edge = function(x0, y0, x1, y1, color) {
--- a/templates/gitweb/graph.tmpl	Wed Jun 25 10:54:48 2008 +0200
+++ b/templates/gitweb/graph.tmpl	Wed Jun 25 20:50:40 2008 +0200
@@ -46,8 +46,8 @@
 
 document.getElementById('noscript').style.display = 'none';
 
-data = {jsdata|json};
-graph = new Graph();
+var data = {jsdata|json};
+var graph = new Graph();
 graph.scale({bg_height});
 
 graph.edge = function(x0, y0, x1, y1, color) {
--- a/templates/graph.tmpl	Wed Jun 25 10:54:48 2008 +0200
+++ b/templates/graph.tmpl	Wed Jun 25 20:50:40 2008 +0200
@@ -4,6 +4,7 @@
    href="#url#atom-tags" title="Atom feed for #repo|escape#: tags">
 <link rel="alternate" type="application/rss+xml"
    href="#url#rss-tags" title="RSS feed for #repo|escape#: tags">
+<!--[if IE]><script type="text/javascript" src="#staticurl#excanvas.js"></script><![endif]-->
 </head>
 <body>
 
@@ -39,8 +40,8 @@
 
 document.getElementById('noscript').style.display = 'none';
 
-data = {jsdata|json};
-graph = new Graph();
+var data = {jsdata|json};
+var graph = new Graph();
 graph.scale({bg_height});
 
 graph.edge = function(x0, y0, x1, y1, color) {