summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-01 13:27:23 +0100
committerYorhel <git@yorhel.nl>2010-02-01 13:29:35 +0100
commitc2df52da18ce8a772a1dd70c8ff14b7527fd4339 (patch)
tree73743dd63ebba980c22bbfb2ed952ee7cb263a95 /data
parent2bda6076a93e45c259148f0723fff37cd5aa56dc (diff)
Properly copy over search string on switching with the searchtabs
Diffstat (limited to 'data')
-rw-r--r--data/script.js16
-rw-r--r--data/style.css6
2 files changed, 19 insertions, 3 deletions
diff --git a/data/script.js b/data/script.js
index 437385cd..07dd1581 100644
--- a/data/script.js
+++ b/data/script.js
@@ -1973,6 +1973,22 @@ if(byId('lang_select')) {
l[i].onclick = f;
}
+// search tabs
+if(byId('searchtabs')) {
+ var f = function() {
+ var str = byId('q').value;
+ if(str.length > 1) {
+ if(this.href.indexOf('/g') >= 0)
+ this.href += '/list';
+ this.href += '?q=' + encodeURIComponent(str);
+ }
+ return true;
+ };
+ var l = byName(byId('searchtabs'), 'a');
+ for(var i=0; i<l.length; i++)
+ l[i].onclick = f;
+}
+
// spam protection on all forms
setTimeout(function() {
for(i=1; i<document.forms.length; i++)
diff --git a/data/style.css b/data/style.css
index 14672ccf..d70e539d 100644
--- a/data/style.css
+++ b/data/style.css
@@ -457,16 +457,16 @@ fieldset.search {
fieldset.search .submit {
padding: 0 1px;
}
-p.searchtabs {
+p#searchtabs {
height: 12px;
padding-right: 70px;
}
-p.searchtabs a {
+p#searchtabs a {
padding: 2px 6px 2px 6px;
margin: 0 2px;
color: $maintext$!important;
}
-p.searchtabs a:hover, p.searchtabs a.sel {
+p#searchtabs a:hover, p#searchtabs a.sel {
border: 1px solid $secborder$;
border-bottom: none;
padding: 1px 5px 2px 5px;