From 1146cf371cc589668db6fbb47c171c86b68ceed4 Mon Sep 17 00:00:00 2001
From: Seth Meranda <smeranda2@unl.edu>
Date: Wed, 19 Aug 2009 19:19:56 +0000
Subject: [PATCH] started common JS file and added it to the pear setup. Also
 some files for the styling of the search box.

---
 unl_theme/scripts/social.js                   |   9 +++++++
 unl_theme/views/default/css.php               |  25 ++++++++++++++++--
 .../views/default/images/magnifyingGlass.png  | Bin 0 -> 527 bytes
 .../views/default/page_elements/unl_nav.php   |   4 ++-
 .../views/default/pageshells/pageshell.php    |   2 +-
 5 files changed, 36 insertions(+), 4 deletions(-)
 create mode 100644 unl_theme/scripts/social.js
 create mode 100644 unl_theme/views/default/images/magnifyingGlass.png

diff --git a/unl_theme/scripts/social.js b/unl_theme/scripts/social.js
new file mode 100644
index 00000000..2650137c
--- /dev/null
+++ b/unl_theme/scripts/social.js
@@ -0,0 +1,9 @@
+WDN.jQuery(document).ready(function() {
+	WDN.jQuery('form#searchform label').css({display: "block");
+	WDN.jQuery('form#searchform input#search_input').focus(function(){
+		if (WDN.jQuery('#wdn_search_form input#search_input').val() != "") {
+			WDN.jQuery(this).siblings("label").hide();
+		};
+	})
+	}
+})
\ No newline at end of file
diff --git a/unl_theme/views/default/css.php b/unl_theme/views/default/css.php
index 9d067395..0f95095b 100644
--- a/unl_theme/views/default/css.php
+++ b/unl_theme/views/default/css.php
@@ -790,9 +790,30 @@ p.user_menu_friends_of {
 #maincontent #elgg_topbar_container_search {
 	float:right;
 	diplay:block;
-	margin-top:-30px;
-	margin-bottom:30px;
+	margin-top:-25px;
+	margin-bottom:20px;
 }
+form#searchform input#search_input {background:#eee; border:1px solid #ccc;
+ 	  border-color:#ccc #fff #fff #ccc;padding:2px;width:200px;}
+form#searchform label {
+	z-index:10;
+	position:absolute;
+	margin-left:5px;
+	margin-top:2px;
+	color:#6d6d6d;
+	display:none;
+}
+form#searchform .search_submit_button {
+    background:url('<?php echo $vars['url']; ?>/mod/unl_theme/views/default/images/magnifyingGlass.png') no-repeat;
+    width:20px;
+    height:20px;
+    text-indent:-9999em;
+    border:none;
+}
+form#searchform .search_submit_button:hover {
+	cursor:pointer;
+}
+
 /* ***************************************
 	SEARCH LISTINGS	
 *************************************** */
diff --git a/unl_theme/views/default/images/magnifyingGlass.png b/unl_theme/views/default/images/magnifyingGlass.png
new file mode 100644
index 0000000000000000000000000000000000000000..b5805b37273f3acf1d3935c876574b1ad9ae4789
GIT binary patch
literal 527
zcmeAS@N?(olHy`uVBq!ia0y~yU=RXf4mJh`hOl#e;S3B6k|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+7&m&lIEGZ*nseFKBRWvx*hgvMRxc^n0FEFdjYSdS
zj+gmb_3nxog=lm<c(g!G>(!zMdOLRP;NZI(EucANO3=iBjP|76AudN2b-TR1knw@p
z_rJbP<LuL4KOgAl-uc|_x$S#P&Lu&b$4!$wJfxd$9CY7vTtCLjZt<C~Tlz20IPM+t
zqMUoqF|A1zPsBwoZRXAwJScbXq4l~84RJPCmCVw`#P2Pb5qG0y{S2pLn-}C}v(-u*
zx3a6){!L2vM%YWq`KPuUbe><~wqHz-(<_7f^pBS@_M0MtHqT#tQu<1dO`XN|{`)_=
zHD2v;bPO%2Y+vwbPs2WK&P~-poyV+MY#nv^3ZL+Lz5cQ*u-@52!gke@*?bFBPV||z
zr&~Q*;qM{J_JNIc&4UBBiW2?DH*;0B`kl-c%+A=I_l@P0=$6&i<<Is_xVFdjN&=65
zO8nWi#ebQ(q7+sxkG)rav`eOSZKAWfP~d*K*E{wn@YM^1XSCnDT`sQZub=aN{)JU>
zQ(u;tl?Ek-yPCBX=1py_k*cmb{M06Fe@?e%sD092F3a!omS2zk`@8tn{RhrXIdfJR
ht*+zX{?97Guvaqa=KoTK6b1$c22WQ%mvv4FO#tNW<#Yf5

literal 0
HcmV?d00001

diff --git a/unl_theme/views/default/page_elements/unl_nav.php b/unl_theme/views/default/page_elements/unl_nav.php
index 63563895..bd30644a 100644
--- a/unl_theme/views/default/page_elements/unl_nav.php
+++ b/unl_theme/views/default/page_elements/unl_nav.php
@@ -88,9 +88,11 @@
 </ul>
 <div id="elgg_topbar_container_search">
 <form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get">
+<fieldset>
 <label for="search_input">Search the Social Network</label>
 	<input type="text" id="search_input" name="tag" class="search_input" />
-	<input type="submit" value="Search" class="search_submit_button" />
+	<input type="submit" value="Go" class="search_submit_button" />
+</fieldset>
 </form>
 </div>
 <div class="clear"></div>
\ No newline at end of file
diff --git a/unl_theme/views/default/pageshells/pageshell.php b/unl_theme/views/default/pageshells/pageshell.php
index 02366fa3..57cce0bc 100644
--- a/unl_theme/views/default/pageshells/pageshell.php
+++ b/unl_theme/views/default/pageshells/pageshell.php
@@ -16,9 +16,9 @@ if (empty($vars['title'])) {
     $title = $vars['config']->sitename . ": " . $vars['title'];
 }
 $page->breadcrumbs = "<!-- WDN: see glossary item \'breadcrumbs\' --> <ul> <li class=\"first\"><a href=\"http://www.unl.edu/\">UNL</a></li>  <li>Social Network</li> </ul>";
-
 $page->doctitle = '<title>'.$title.'</title>';
 $page->head .= elgg_view('page_elements/header', $vars);
+$page->addScript($vars['url'] . 'mod/unl_theme/scripts/social.js');
 
 $page->maincontentarea .= elgg_view('page_elements/unl_nav', $vars);
 $page->titlegraphic = '<h1>'.$vars['config']->sitename.'</h1>';
-- 
GitLab