Restored original behavior
authorAlexander Ebert <ebert@woltlab.com>
Tue, 16 Aug 2016 18:50:12 +0000 (20:50 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 16 Aug 2016 18:50:21 +0000 (20:50 +0200)
wcfsetup/install/files/js/WCF.User.js

index fe0c1bcaa819b64ed40578e976ee083e4bc48fb7..aa8d0b9cfddf23729ebfbb8a660d0defdd9c9ef5 100644 (file)
@@ -182,38 +182,7 @@ WCF.User.Panel.Abstract = Class.extend({
                        success: $.proxy(this._success, this)
                });
                
-               var timerBlockClick = null;
-               this._triggerElement[0].addEventListener(WCF_CLICK_EVENT, (function(event) {
-                       event.preventDefault();
-                       
-                       if ($.browser.mobile) {
-                               this.toggle();
-                       }
-                       else if ((this._dropdown && this._dropdown.isOpen()) && timerBlockClick === null) {
-                               this.toggle();
-                       }
-               }).bind(this));
-               
-               //this._triggerElement.click($.proxy(this.toggle, this));
-               
-               var timer = null;
-               this._triggerElement.hover(
-                       (function() {
-                               if (this._dropdown === null || !this._dropdown.isOpen()) {
-                                       timer = window.setTimeout((function() {
-                                               timerBlockClick = window.setTimeout(function() {
-                                                       timerBlockClick = null;
-                                               }, 300);
-                                               
-                                               this.toggle(undefined, true);
-                                       }).bind(this), 300);
-                               }
-                       }).bind(this),
-                       function() {
-                               window.clearTimeout(timer);
-                               timer = null;
-                       }
-               );
+               this._triggerElement.click($.proxy(this.toggle, this));
                
                if (this._options.showAllLink) {
                        this._triggerElement.dblclick($.proxy(this._dblClick, this));
@@ -234,10 +203,9 @@ WCF.User.Panel.Abstract = Class.extend({
         * Toggles the interactive dropdown.
         * 
         * @param       {Event?}        event
-        * @param       {boolean?}      openOnly
         * @return      {boolean}
         */
-       toggle: function(event, openOnly) {
+       toggle: function(event) {
                if (event instanceof Event) {
                        event.preventDefault();
                }
@@ -246,10 +214,6 @@ WCF.User.Panel.Abstract = Class.extend({
                        this._dropdown = this._initDropdown();
                }
                
-               if (openOnly === true && this._dropdown.isOpen()) {
-                       return false;
-               }
-               
                if (this._dropdown.toggle()) {
                        if (!this._loadData) {
                                // check if there are outstanding items but there are no outstanding ones in the current list