Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 222389 Details for
Bug 208376
Missing "Search" Capability on Packages Webpage
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds a search box that will redirect to a site:p.g.o google search
0003-Add-a-search-box-that-will-redirect-to-a-p.g.o-o.patch.txt (text/plain), 2.13 KB, created by
John Klehm
on 2010-03-07 02:21:13 UTC
(
hide
)
Description:
Adds a search box that will redirect to a site:p.g.o google search
Filename:
MIME Type:
Creator:
John Klehm
Created:
2010-03-07 02:21:13 UTC
Size:
2.13 KB
patch
obsolete
>From e0af2664e42edc815fce0c4b3d9c54304562803a Mon Sep 17 00:00:00 2001 >From: John Klehm <xixsimplicityxix@gmail.com> >Date: Sat, 6 Mar 2010 20:10:28 -0600 >Subject: Add a search box that will redirect to a p.g.o only google search to the left hand side of the default layout. > >--- > web/templates/layout.html | 30 ++++++++++++++++++++++++++++++ > 1 files changed, 30 insertions(+), 0 deletions(-) > >diff --git a/web/templates/layout.html b/web/templates/layout.html >index 01d3d0a..acf13ce 100644 >--- a/web/templates/layout.html >+++ b/web/templates/layout.html >@@ -60,6 +60,30 @@ def alpha_url(baseurl): > rel="search" type="application/opensearchdescription+xml" > href="http://www.gentoo.org/search/packages-gentoo-org.xml" > title="Gentoo Packages" /> >+ <script type="text/javascript"> >+ function el(id) { >+ if (document.getElementById) { //W3C >+ return document.getElementById(id); >+ } else if (document.all) { //IE >+ return document.all[id]; >+ } >+ } >+ window.onload = function() { >+ el('searchString').onkeydown = function(e) { >+ var key = (e)? e.keyCode : window.event.keyCode; >+ if (key == 13) { // if ENTER is pressed >+ var siteSearch = 'http://www.google.com/search?q=site:packages.gentoo.org '; >+ var terms = el('searchString').value; >+ >+ window.location = siteSearch + terms; >+ >+ return false; //trap this key >+ } >+ >+ return true; //bubble through >+ } >+ } >+ </script> > </head> > </py:match> > >@@ -68,6 +92,12 @@ def alpha_url(baseurl): > <div id="banner"> > <a href="/"><img src="/media/packages_gentoo_logo.jpg" alt="Gentoo Logo" /></a> > </div> >+ <div id="search"> >+ <form> >+ <label for="searchString"><p>Search:</p></label> >+ <input type="text" id="searchString" name="searchString" size="16" /> >+ </form> >+ </div> > <div py:for="day, pvs in daylist"> > <p>${day}</p> > <ul> >-- >1.7.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208376
:
162768
| 222389 |
222497