aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-15 21:51:00 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2007-11-15 21:51:00 +0100
commit8c978d76179b4f573c1eb9b9bb9db966c81330bb (patch)
treeade066d6c36105de19e2a826188d0f1c14818f59 /tmpl
parente9fa4c98bb5f084739d3418ade3f0c51e34a0aa1 (diff)
Too many changes...
Diffstat (limited to 'tmpl')
-rw-r--r--tmpl/header.tt218
-rw-r--r--tmpl/prefs.tt213
-rw-r--r--tmpl/search_result.tt26
3 files changed, 28 insertions, 9 deletions
diff --git a/tmpl/header.tt2 b/tmpl/header.tt2
index 0c5b6f6..0b07111 100644
--- a/tmpl/header.tt2
+++ b/tmpl/header.tt2
@@ -2,9 +2,22 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
- <base href="[% base_url %]" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
+ [% IF is_ajax %]
+ <script type="text/javascript">
+ var tree = location.hash.match(/^#([^/+]+)([+][^/]*|)/);
+ if (tree) {
+ var base = '[% base_url %]';
+ base = base.replace(/\/ajax[+][*]/, '/' + tree[1] + '+*');
+ document.write('<base href="' + base + '" />');
+ }
+ else {
+ document.write('<base href="[% base_url %]" />');
+ }
+ </script>
+ [% ELSE %]
+ <base href="[% base_url %]" />
+ [% END %]
<script type="text/javascript" src="../../js/lxrng-funcs.js"></script>
<link rel="stylesheet" href="../../css/lxrng.css" type="text/css" title="LXRng" />
@@ -36,6 +49,7 @@
END %]
</span>
<img src="../../gfx/rolldown.png" />
+ <!-- TODO: appears to break w. ajax nav. -->
[% IF node.name.match('[^/]$') %]
<form action="+print=[% node.name %]" method="post">
<button type="submit" class="print"><img src="../../gfx/print.png"></button>
diff --git a/tmpl/prefs.tt2 b/tmpl/prefs.tt2
index c7f6a6d..6246ac6 100644
--- a/tmpl/prefs.tt2
+++ b/tmpl/prefs.tt2
@@ -18,7 +18,7 @@
</span>
<div class="lxr_menu">
- <span class="lxr_prefs"><a href="[% return || '.' %]">Back</a></span>
+ <span class="lxr_prefs"><a href="./[% return %]">Back</a></span>
</div>
<div class="headingbottom"></div>
</div>
@@ -30,10 +30,12 @@
<input type="hidden" name="return" value="[% return %]" />
Where do you want your search results to be displayed?
<ol>
- <li><input type="radio" name="resultloc" value="replace" />
+ <li><input type="radio" name="resultloc" value="replace"
+ [% IF is_replace %]checked[% END %]/>
Replace the active source browsing window</li>
- <li><input type="radio" name="resultloc" value="popup" />
+ <li><input type="radio" name="resultloc" value="popup"
+ [% IF is_popup %]checked[% END %]/>
Show them in a popup window (requires JavaScript enabled)<br>
<font size="-1"><em>If your browser limits the ability to
@@ -41,9 +43,10 @@
Preferences -> Content -> Enable JavaScript -> Advanced ->
Allow scripts to: Raise or lower windows), make sure you
either close your search result windows or avoid hiding them
- behing other windows after use.</em></font></li>
+ behind other windows after use.</em></font></li>
- <li><input type="radio" name="resultloc" value="ajax" />
+ <li><input type="radio" name="resultloc" value="ajax"
+ [% IF is_ajax %]checked[% END %]/>
Show them inside the active source browsing window
(requires JavaScript enabled)
</li>
diff --git a/tmpl/search_result.tt2 b/tmpl/search_result.tt2
index 639e951..1a38e22 100644
--- a/tmpl/search_result.tt2
+++ b/tmpl/search_result.tt2
@@ -56,7 +56,8 @@ at [% INCLUDE line_reference.tt2, file = file.1, line = file.2 %]
<ul>
[% FOREACH file = file_res.files %]
<li><a href="[% file %]" onclick="return load_file('[% context.tree %]',
- '[% file %][% context.args_url %]', '', '');" [% navtarget %]>[% file %]</a>
+ '[% file %][% context.args_url %]', '[% context.release %]', '');"
+ [% navtarget %]>[% file %]</a>
</li>
[% END %]
</ul>
@@ -67,7 +68,8 @@ at [% INCLUDE line_reference.tt2, file = file.1, line = file.2 %]
<ul>
[% FOREACH file = ambig_res.files %]
<li><a href="[% file %]" onclick="return load_file('[% context.tree %]',
- '[% file %][% context.args_url %]', '', '');" [% navtarget %]>[% file %]</a>
+ '[% file %][% context.args_url %]', '[% context.release %]', '');"
+ [% navtarget %]>[% file %]</a>
</li>
[% END %]
</ul>