Mercurial > hg
changeset 6729:855851eae70f
graph: improve script hiding tricks
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Tue, 24 Jun 2008 10:18:03 +0200 |
parents | 84294e3710b8 |
children | a1df94d9c764 |
files | templates/coal/graph.tmpl templates/gitweb/graph.tmpl templates/graph.tmpl templates/static/style-gitweb.css |
diffstat | 4 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/templates/coal/graph.tmpl Tue Jun 24 10:08:32 2008 +0200 +++ b/templates/coal/graph.tmpl Tue Jun 24 10:18:03 2008 +0200 @@ -50,8 +50,9 @@ <script type="text/javascript" src="{staticurl}graph.js"></script> <script> +<!-- hide script content -document.getElementById('noscript').style.visibility = 'hidden'; +document.getElementById('noscript').style.display = 'none'; data = {jsdata|json}; graph = new Graph(); @@ -96,6 +97,8 @@ } graph.render(data); + +// stop hiding script --> </script> <div class="navigate">
--- a/templates/gitweb/graph.tmpl Tue Jun 24 10:08:32 2008 +0200 +++ b/templates/gitweb/graph.tmpl Tue Jun 24 10:18:03 2008 +0200 @@ -42,8 +42,9 @@ <script type="text/javascript" src="#staticurl#graph.js"></script> <script> +<!-- hide script content -document.getElementById('noscript').style.visibility = 'hidden'; +document.getElementById('noscript').style.display = 'none'; data = {jsdata|json}; graph = new Graph(); @@ -107,6 +108,8 @@ } graph.render(data); + +// stop hiding script --> </script> <div class="page_nav">
--- a/templates/graph.tmpl Tue Jun 24 10:08:32 2008 +0200 +++ b/templates/graph.tmpl Tue Jun 24 10:18:03 2008 +0200 @@ -35,8 +35,9 @@ <script type="text/javascript" src="#staticurl#graph.js"></script> <script> +<!-- hide script content -document.getElementById('noscript').style.visibility = 'hidden'; +document.getElementById('noscript').style.display = 'none'; data = {jsdata|json}; graph = new Graph(); @@ -79,6 +80,8 @@ } graph.render(data); + +// stop hiding script --> </script> <form action="#url#log">