[refs #233] fix users menu toggle

This commit is contained in:
Alexander Machehin 2012-02-29 12:40:21 +06:00
parent 9860624a0d
commit c9067da374
1 changed files with 29 additions and 39 deletions

View File

@ -1,44 +1,34 @@
$(document).ready(function() {
var dropbox = $("#droplist");
var droplist = function() {
$user_menu.slideToggle("slow");
}
function loadMessages() {
$("#messages-new").fadeOut("slow");
$("#new-messages").delay(700).fadeIn("slow");
}
function loadMessages() {
$("#messages-new").fadeOut("slow");
$("#new-messages").delay(700).fadeIn("slow");
}
function loadOldMessages() {
$("#old-messages").fadeIn("slow");
}
function loadOldMessages() {
$("#old-messages").fadeIn("slow");
}
$(document).ready(function(){
$user_menu = $('#droplist');
$user_menu.die('click');
$('div.information > div.user').live('click', function() {
if ($user_menu.is(":hidden")) {
droplist();
}
});
$('div.information > div.profile > a').live('click', function(e) {
e.preventDefault();
});
});
$(document).click(function(e) {
if (!$user_menu.is(":hidden") && ($(e.target).parent().attr('id') != $user_menu.attr('id'))) {
droplist();
$(document).click(function() {
var dl = dropbox.css("height");
var dl2 = dropbox.css("display");
if ((dl2 == "block")&&(dl == "91px")) {
dropbox.slideUp("slow");
}
});
});
function showActivity(elem) {
$("#activity-bottom"+elem).slideToggle("slow");
var img = $("#expand" + elem).attr("src");
if (img == "assets/expand-gray.png") {
$("#expand" + elem).attr("src","assets/expand-gray2.png");
} else {
$("#expand" + elem).attr("src","assets/expand-gray.png");
}
}
function showActivity(elem) {
$("#activity-bottom"+elem).slideToggle("slow");
var img = document.getElementById("expand" + elem).className;
if (img == "expand-gray-down") {
document.getElementById("expand" + elem).className = "expand-gray-up";
} else {
document.getElementById("expand" + elem).className = "expand-gray-down";
}
}
$('div.information > div.user').live('click', function() {
dropbox.slideToggle("slow");
});
});