this._triggerElement.addClass('open');
this._container.addClass('open');
- var pageHeader = elById('pageHeader');
- if (pageHeader && pageHeader.classList.contains('searchBarOpen')) {
- pageHeader.classList.remove('searchBarOpen');
- }
+ WCF.System.Event.fireEvent('com.woltlab.wcf.Search', 'close');
this.render();
},
unmatch: function () { _isMobile = false; },
setup: function () { _isMobile = true; }
});
+
+ EventHandler.add('com.woltlab.wcf.Search', 'close', this._closeSearchBar.bind(this));
},
/**
_closeSearchBar: function () {
_pageHeader.classList.remove('searchBarOpen');
-
+ console.debug("yep");
['bottom', 'left', 'right', 'top'].forEach(function(propertyName) {
_searchInputContainer.style.removeProperty(propertyName);
});