From 2a7c23f5b29ef9d1aaa54d340a3f81813c569ce5 Mon Sep 17 00:00:00 2001
From: Brett Bieber <brett.bieber@gmail.com>
Date: Fri, 12 Aug 2011 14:01:51 +0000
Subject: [PATCH] Remove unused js code for the directory popup

---
 www/searchFunc.js | 96 -----------------------------------------------
 1 file changed, 96 deletions(-)

diff --git a/www/searchFunc.js b/www/searchFunc.js
index bc65912..c1284da 100644
--- a/www/searchFunc.js
+++ b/www/searchFunc.js
@@ -186,100 +186,4 @@ UNL_Search.doQuery = function (form) {
 	return false;
 };
 
-UNL_Search.showHCard = function (ele, href) {
-	var uid = href.substr(href.lastIndexOf("=") + 1);
-	
-	var cacheData = this.hcardCache.get(uid)
-	if (cacheData) {
-		this.buildHCard(cacheData, ele);
-	} else {
-		var http = new XMLHTTP();
-		
-		http.open("GET", "http://directory.unl.edu/hcards/" + uid, true);
-		var pointer = this;
-		http.onreadystatechange = function() {
-			if (http.readyState == 4) {
-				if (http.status == 200) {
-					var data = http.responseText;
-					
-					pointer.hcardCache.save(uid, data);
-					pointer.buildHCard(data, ele);
-				} else {
-					// Error loading file!
-				}
-			}
-		};
-		
-		http.send(null);
-	}
-	
-	return false;
-};
 
-UNL_Search.buildHCard = function (hcardText, ele) {
-	_b.DOM.remE("peoplePopup");
-	this.killHCardTimeout();
-				
-	var div = _b.DOM.cE("div", {id:"peoplePopup", className:"hcardPopup"});
-	
-	var hcorner = _b.DOM.cE("div", {className:"as_corner"});
-	var hbar = _b.DOM.cE("div", {className:"as_bar"});
-	var header = _b.DOM.cE("div", {className:"as_header"});
-	header.appendChild(hcorner);
-	header.appendChild(hbar);
-	div.appendChild(header);
-	
-	var ul = _b.DOM.cE("ul");
-	var theCard = _b.DOM.cE("li");
-	theCard.innerHTML = hcardText;
-	
-	ul.appendChild(theCard);
-	div.appendChild(ul);
-	
-	var fcorner = _b.DOM.cE("div", {className:"as_corner"});
-	var fbar = _b.DOM.cE("div", {className:"as_bar"});
-	var footer = _b.DOM.cE("div", {className:"as_footer"});
-	footer.appendChild(fcorner);
-	footer.appendChild(fbar);
-	div.appendChild(footer);
-	
-	var pos = _b.DOM.getPos(ele);
-	
-	div.style.left = (pos.x) + "px";
-	div.style.top = (pos.y + ele.offsetHeight) + "px";
-	
-	div.style.visibility = "hidden";
-	
-	document.getElementsByTagName("body")[0].appendChild(div);
-					
-	div.style.left = (pos.x - div.offsetWidth + 5) + "px";
-	div.style.top = (pos.y + ele.offsetHeight / 2 - div.offsetHeight / 2) + "px";
-	
-	div.style.visibility = "visible";
-	
-	div.onmouseover  = function(){ UNL_Search.killHCardTimeout() };
-	div.onmouseout   = function(){ UNL_Search.resetHCardTimeout() };
-	
-	this.hcardTimeout = setTimeout(function() { UNL_Search.clearHCard() }, 5000);
-};
-
-//Sets up a fader to remove the hcard popup
-UNL_Search.clearHCard = function () {
-	this.killHCardTimeout();
-	
-	var popup = _b.DOM.gE("peoplePopup");
-	if (popup) {
-		var fade = new _b.Fader(popup,1,0,250, function() { _b.DOM.remE("peoplePopup") });
-	}
-};
-
-//Stops the timer for the removal of the hcard popup
-UNL_Search.killHCardTimeout = function () {
-	clearTimeout(this.hcardTimeout);
-};
-
-//Starts a new timer for the removal of the hcard popup
-UNL_Search.resetHCardTimeout = function () {
-	clearTimeout(this.hcardTimeout);
-	this.hcardTimeout = setTimeout(function () { UNL_Search.clearHCard() }, 500);
-};
-- 
GitLab