From 97471b5c2a079be34aeff099019f219135b9cb2c Mon Sep 17 00:00:00 2001
From: Thomas Tanghus <thomas@tanghus.net>
Date: Fri, 30 Dec 2011 23:39:31 +0100
Subject: Thumbnails was overwriting default style so hover and active didn't
 work. Moved them to the 'a' element instead.

---
 apps/contacts/css/styles.css  | 4 ++--
 apps/contacts/js/interface.js | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

(limited to 'apps')

diff --git a/apps/contacts/css/styles.css b/apps/contacts/css/styles.css
index 53b469e6eed..c890be85824 100644
--- a/apps/contacts/css/styles.css
+++ b/apps/contacts/css/styles.css
@@ -1,5 +1,5 @@
-#contacts { padding-left:5px; padding-top: 5px; background: #fff; }
-#contacts li { padding-left:25px;background:url('../img/person.svg') no-repeat; }
+#contacts { padding-left:2px; padding-top: 5px; background: #fff; }
+#leftcontent a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; }
 #chooseaddressbook {margin-right: 170px; float: right;}
 #contacts_details_name { font-weight:bold;font-size:1.1em;margin-left:25%;}
 #contacts_details_photo { margin:.5em 0em .5em 25%; }
diff --git a/apps/contacts/js/interface.js b/apps/contacts/js/interface.js
index 3190efae3cc..35639ef6cc7 100644
--- a/apps/contacts/js/interface.js
+++ b/apps/contacts/js/interface.js
@@ -113,9 +113,9 @@ Contacts={
 			lazyupdate:function(){
 				//alert('lazyupdate');
 				$('#contacts li').live('inview', function(){
-					if (!$(this).attr('style')) {
+					if (!$(this).find('a').attr('style')) {
 						//alert($(this).data('id') + ' has background: ' + $(this).attr('style'));
-						$(this).css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
+						$(this).find('a').css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
 					}/* else {
 						alert($(this).data('id') + ' has style ' + $(this).attr('style').match('url'));
 					}*/
@@ -301,9 +301,9 @@ $(document).ready(function(){
 				// bottom part of element is visible
 			} else {
 				// whole part of element is visible
-				if (!$(this).attr('style')) {
+				if (!$(this).find('a').attr('style')) {
 					//alert($(this).data('id') + ' has background: ' + $(this).attr('style'));
-					$(this).css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
+					$(this).find('a').css('background','url(thumbnail.php?id='+$(this).data('id')+') no-repeat');
 				}/* else {
 					alert($(this).data('id') + ' has style ' + $(this).attr('style').match('url'));
 				}*/
-- 
cgit v1.2.3