]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated display and position of likes lists. Added js to dismiss list if a click...
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Jun 2010 09:42:36 +0000 (09:42 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 8 Jun 2010 09:42:36 +0000 (09:42 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6392 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/css.php
views/default/css_ie.php
views/default/js/initialise_elgg.php

index 082a60b1560303e5b6c27b67b3fe93aa76d875d4..151360d735f3cd90592a298c7ab12ac733ec098c 100644 (file)
@@ -1526,6 +1526,9 @@ a.action_button:focus {
 .likes_list_holder .elgg_likes_user .entity_listing_info {
        width:305px;
 }
+.entity_listing .elgg_likes_user .entity_metadata {
+       min-width:20px !important;
+}
 .elgg_likes_user .entity_listing_icon {
        margin:3px 0 4px 2px;
 }
index f2b3575bbd912f6ad615a5858fce81119349f14b..9d0dcdea16aec693520164fa68f6559db302d13a 100644 (file)
@@ -37,7 +37,7 @@
        text-align:center;
        float:left;
        top:-1px;
-       right:auto; 
+       right:auto;
 }
 #elgg_topbar_contents a.privatemessages.new  {padding:0 0 0 20px;}
 #elgg_topbar_contents a.privatemessages:hover {background-position:left 2px;}
index 2e8d663f78f219fd26b7ebce27385e6430ca89f1..6b7a318e7d4a6af9b4e53a6116ae211fcebe33d1 100644 (file)
@@ -56,12 +56,24 @@ $(document).ready(function () {
        // user likes
        $(".likes_list_button").click(function(event) { 
                if ($(this).next(".likes_list").css('display') == 'none') {     // show list
+                       // hide any other currently viewable likes lists
+                       $('.likes_list').fadeOut();
+                       
                        var topPosition = - $(this).next(".likes_list").height();
                        topPosition10 = topPosition + 10 + "px";
-                       topPosition = topPosition + "px";
+                       topPosition = topPosition - 5 + "px";
                        $('.likes_list').css('top',topPosition10);
-                       $('.likes_list').css('left', -$('.likes_list').width()+40);
+                       $('.likes_list').css('left', -$('.likes_list').width()+110);
                        $(this).next(".likes_list").animate({opacity: "toggle", top: topPosition}, 500);
+                       
+                       // set up cancel for a click outside the likes list
+                       $(document).click(function(event) {             
+                                       var target = $(event.target);
+                                       if (target.parents(".likes_list_holder").length == 0) {                         
+                                               $(".likes_list").fadeOut();
+                                       }
+                       });
+                       
                } else { // hide list
                        var topPosition = - $(this).next(".likes_list").height() + 5;
                        $(this).next(".likes_list").animate({opacity: "toggle", top: topPosition}, 500);
@@ -70,6 +82,8 @@ $(document).ready(function () {
 
 }); /* end document ready function */
 
+
+
 // display & hide elgg system messages
 function elgg_system_message() {
        $("#elgg_system_message").animate({opacity: 0.9}, 1000);