brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [13/50] brooklyn-docs git commit: Fixed searchbox JS, added toplink to GitHub.
Date Mon, 01 Feb 2016 17:28:47 GMT
Fixed searchbox JS, added toplink to GitHub.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/60ab7f35
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/60ab7f35
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/60ab7f35

Branch: refs/heads/0.4.0
Commit: 60ab7f358d77b062feaf9d2d8764cf77b50fa514
Parents: d3e63cb
Author: David Toy <d@vidtoy.co.uk>
Authored: Wed Jun 27 15:57:24 2012 +0100
Committer: David Toy <d@vidtoy.co.uk>
Committed: Wed Jun 27 15:57:24 2012 +0100

----------------------------------------------------------------------
 docs/_layouts/page.html | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/60ab7f35/docs/_layouts/page.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html
index 2cfcba6..21a4edd 100644
--- a/docs/_layouts/page.html
+++ b/docs/_layouts/page.html
@@ -66,10 +66,22 @@ $(document).ready(function() {
 
 <script type="text/javascript"> <!-- search -->
 	$(function() {
-		$('#simple_google').submit(function() {
-      		$('input[name="q"]').val("site:" + document.location.hostname + " " + $('input[name="qfront"]').val());
-        return true;
-		});
+		$('#simple_google')
+			.submit(function() {
+				$('input[name="q"]').val("site:" + document.location.hostname + " " + $('input[name="brooklyn-search"]').val());
+			return true;
+			});
+		$('input[name="brooklyn-search"]').focus(function() {
+				if ($(this).val() === $(this).attr('placeholder')) {
+					$(this).val('');
+				}
+			})
+			.blur(function() {
+				if ($(this).val() === '') {
+					$(this).val($(this).attr('placeholder'));
+				}
+			})
+			.blur();
     });
 </script>
 
@@ -106,15 +118,16 @@ _gaq.push(['_trackPageview']);
             <li><a href="{{site.url}}/meta/contact.html">Contact</a></li>
             <li><a href="{{site.url}}/start/download.html">Download</a></li>
             <li><a href="https://twitter.com/#!/search?q=brooklyncentral">Twitter</a></li>
+            <li><a href="https://github.com/brooklyncentral">GitHub</a></li>
         </ul>
 
         <div id="menubar">  
 
 {% include topbar.html %}                    
 
-            <form method="get" id="simple_google" class="searchform" action="http://www.google.com/search">
-                <input type="text" class="searchinput" value="Search: type &amp; hit
enter" name="qfront" id="qfront" onfocus="if (this.value == 'Search: type &amp; hit enter')
{this.value = '';}" onblur="if (this.value == '') {this.value = 'Search: type &amp; hit
enter';}" />
-                <input type="hidden" id="q" value="Search" />
+            <form method="get" id="simple_google" class="searchform" action="http://www.google.com/search"
method="get">
+                <input type="text" class="searchinput" name="brooklyn-search" placeholder="Search:
type &amp; hit enter" />
+                <input type="hidden" name="q" value="" />
             </form>
             
         </div>


Mime
View raw message