Revert "Collapse sidebar with css selector"

This reverts commit 3a5dfd5e94.
This commit is contained in:
David Cormier 2014-02-19 09:53:03 -05:00
commit 2e5e3a45eb
2 changed files with 6 additions and 1 deletions

View file

@ -633,6 +633,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope.predicate = $scope.orderbyserver ? 'serverSortKey' : 'number';
$scope.setActiveBuffer = function(bufferId, key) {
// If we are on mobile we need to collapse the menu on sidebar clicks
// We use 968 px as the cutoff, which should match the value in glowingbear.css
if (document.body.clientWidth < 968) {
document.querySelector('#sidebar').collapse();
}
return models.setActiveBuffer(bufferId, key);
};