aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl/tree_list.tt2
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2010-08-05 11:14:18 +0200
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2010-08-05 11:14:18 +0200
commit1c4967095e1e3f4e3ea7b36e540da0fca7fec403 (patch)
treeb48ad87da5c9723970a97247bcba146e4c94ebb7 /tmpl/tree_list.tt2
parenta3464e8e24e5c2bf1a824f2e6a581f095e244b7a (diff)
Make non-ajax interface redirect ajax urls to plain urls.
Diffstat (limited to 'tmpl/tree_list.tt2')
-rw-r--r--tmpl/tree_list.tt29
1 files changed, 8 insertions, 1 deletions
diff --git a/tmpl/tree_list.tt2 b/tmpl/tree_list.tt2
index d862cae..e517d0c 100644
--- a/tmpl/tree_list.tt2
+++ b/tmpl/tree_list.tt2
@@ -8,7 +8,14 @@
<script type="text/javascript" src=".static/js/lxrng-funcs.js"></script>
<link rel="shortcut icon" href=".static/gfx/favicon.png" type="image/png">
<link rel="stylesheet" href=".static/css/lxrng.css" type="text/css" title="LXRng">
-
+ [% IF !is_ajax %]
+ <script type="text/javascript">
+ var hashnav = location.hash.match(/^#(.+)/);
+ if (hashnav) {
+ document.write('<meta http-equiv="Refresh" content="0;url=[% base_url | html %]' + hashnav[1] + '">');
+ }
+ </script>
+ [% END %]
<title id="title">LXR Inventory</title>
</head>
<body>