Make search work if no javascript, if javascript on winehq.org but no javascript for google.com search will still not work.
scientes
instigatorirc at gmail.com
Tue Dec 16 00:35:42 CST 2008
---
include/themes/winehq/content.template | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/themes/winehq/content.template b/include/themes/winehq/content.template
index 4fb8cad..040016a 100644
--- a/include/themes/winehq/content.template
+++ b/include/themes/winehq/content.template
@@ -30,9 +30,17 @@
<div id="search_box">
- <form action="{$root}/search/" id="cse-search-box" style="margin: 0; padding: 0;">
- <input type="hidden" name="cx" value="partner-pub-0971840239976722:w9sqbcsxtyf">
- <input type="hidden" name="cof" value="FORID:10">
+ <form action="http://www.google.com/cse" id="cse-search-box" style="margin: 0; padding: 0;">
+ <script>
+ $("#cse-search-box").submit(function() {
+ $("#cse-search-box input[name='cx']").val("partner-pub-0971840239976722:w9sqbcsxtyf");
+ //couldnt make work with your google search
+ $("#cse-search-box input[name='cx']").append('<input type="hidden" name="cof" value="FORID:10">');
+ //makes destination page have a search box if no javascript
+ });
+ $("#cse-search-box").attr("action","{$root}/search/"); //patches if javascript, doesnt work if in onSubmit event
+ </script>
+ <input type="hidden" name="cx" value="003357516082951100219:gavjitmtch8">
<input type="hidden" name="ie" value="UTF-8">
<span style="color: #ffffff;">Search:</span> <input type="text" name="q" size="20">
</form>
--
1.5.6.3
--=-Nin3RgP+041F1Gn8CwhO--
More information about the wine-patches
mailing list