diff options
author | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2010-08-05 11:14:18 +0200 |
---|---|---|
committer | Arne Georg Gleditsch <argggh@lxr.linpro.no> | 2010-08-05 11:14:18 +0200 |
commit | 1c4967095e1e3f4e3ea7b36e540da0fca7fec403 (patch) | |
tree | b48ad87da5c9723970a97247bcba146e4c94ebb7 /tmpl | |
parent | a3464e8e24e5c2bf1a824f2e6a581f095e244b7a (diff) |
Make non-ajax interface redirect ajax urls to plain urls.
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/tree_list.tt2 | 9 |
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> |