#toggle was removed

This commit is contained in:
Fabian Rodriguez 2014-01-11 17:59:15 -02:00 committed by Florian Staudacher
parent 4042e50289
commit 97ede99c0f

View file

@ -13,7 +13,15 @@
});
if( ! $.browser.msie ) {
self.badgeLink.toggle(self.showDropdown, self.hideDropdown);
self.badge.on('click', self.badgeLink, function(evt){
evt.preventDefault();
evt.stopPropagation();
if (self.dropdownShowing()){
self.hideDropdown();
} else {
self.showDropdown();
}
});
}
self.dropdown.click(function(evt) {
@ -32,9 +40,7 @@
return this.dropdown.css("display") === "block";
};
this.showDropdown = function(evt) {
evt.preventDefault();
this.showDropdown = function() {
self.ajaxLoader.show();
self.badge.addClass("active");
self.dropdown.css("display", "block");
@ -42,9 +48,7 @@
self.getNotifications();
};
this.hideDropdown = function(evt) {
evt.preventDefault();
this.hideDropdown = function() {
self.badge.removeClass("active");
self.dropdown.css("display", "none");
};