aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-16 20:14:07 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-16 20:14:07 +0000
commitcd2a7a108abb3273479612b5fd78a5a1e1ae6587 (patch)
tree84402ff28eb9a11c73e042c91bc9b10c62f186c0
parent35f682f5ef6263e5cb5e0b06b77dd3b77177925d (diff)
downloadelgg-cd2a7a108abb3273479612b5fd78a5a1e1ae6587.tar.gz
elgg-cd2a7a108abb3273479612b5fd78a5a1e1ae6587.tar.bz2
avatar menu in IE, z-index bug work-around
git-svn-id: https://code.elgg.org/elgg/trunk@1976 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/profile/views/default/profile/css.php1
-rw-r--r--mod/profile/views/default/profile/javascript.php14
2 files changed, 10 insertions, 5 deletions
diff --git a/mod/profile/views/default/profile/css.php b/mod/profile/views/default/profile/css.php
index 63dcabf50..234d6fb39 100644
--- a/mod/profile/views/default/profile/css.php
+++ b/mod/profile/views/default/profile/css.php
@@ -24,7 +24,6 @@
}
.usericon div.sub_menu {
- /* z-index:9999; */
display:none;
position:absolute;
padding:2px;
diff --git a/mod/profile/views/default/profile/javascript.php b/mod/profile/views/default/profile/javascript.php
index 78cfb396c..24bf20689 100644
--- a/mod/profile/views/default/profile/javascript.php
+++ b/mod/profile/views/default/profile/javascript.php
@@ -18,12 +18,15 @@
?>
+var submenuLayer = 1000;
+
function setup_avatar_menu() {
// avatar image menu link
$("div.usericon img").mouseover(function() {
// find nested avatar_menu_button and show
$(this.parentNode.parentNode).children("[class=avatar_menu_button]").show();
+ //$(this.parentNode.parentNode).css("z-index", submenuLayer);
})
.mouseout(function() {
if($(this).parent().parent().find("div.sub_menu").css('display')!="block"){
@@ -62,12 +65,13 @@ function setup_avatar_menu() {
.fadeIn('normal');
}
- // fix for z-index / jquery bug
- //$(this).css("z-index", parseInt( new Date().getTime()/100000000 ));
- //avatar.css("z-index", parseInt( new Date().getTime()/100000000 ));
+ // fix for ie z-index bug
//submenu.css("z-index", parseInt( new Date().getTime()/100000000 ));
- //alert("submenu z-index = " +submenu.css("z-index"));
+ avatar.css("z-index", submenuLayer);
+ submenu.css("z-index", submenuLayer+1);
+
+ submenuLayer++;
// change arrow to 'on' state
$(this).attr('src','<?php echo $vars['url']; ?>_graphics/avatar_menu_arrow_open.gif');
@@ -77,6 +81,8 @@ function setup_avatar_menu() {
$("div.sub_menu:visible").not(submenu).hide();
$(".usericon img.arrow").not(this).attr('src','<?php echo $vars['url']; ?>_graphics/avatar_menu_arrow.gif');
$(".avatar_menu_button").not(this).hide();
+
+ //alert("submenuLayer = " +submenu.css("z-index"));
})
// hover arrow each time mouseover enters arrow graphic (eg. when menu is already shown)
.mouseover(function() { $(this).attr('src','<?php echo $vars['url']; ?>_graphics/avatar_menu_arrow_hover.gif'); })