Merge pull request #234 from warpc/233-fix_user_menu
[Fix #233] fix users menu toggle
This commit is contained in:
commit
90cf0b0ce8
|
@ -1,44 +1,34 @@
|
|||
$(document).ready(function() {
|
||||
var dropbox = $("#droplist");
|
||||
|
||||
var droplist = function() {
|
||||
$user_menu.slideToggle("slow");
|
||||
}
|
||||
|
||||
function loadMessages() {
|
||||
function loadMessages() {
|
||||
$("#messages-new").fadeOut("slow");
|
||||
$("#new-messages").delay(700).fadeIn("slow");
|
||||
}
|
||||
function loadOldMessages() {
|
||||
$("#old-messages").fadeIn("slow");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$user_menu = $('#droplist');
|
||||
$user_menu.die('click');
|
||||
function loadOldMessages() {
|
||||
$("#old-messages").fadeIn("slow");
|
||||
}
|
||||
|
||||
$(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 = 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() {
|
||||
if ($user_menu.is(":hidden")) {
|
||||
droplist();
|
||||
}
|
||||
dropbox.slideToggle("slow");
|
||||
});
|
||||
|
||||
$('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();
|
||||
}
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue