Revert "Collapse sidebar with css selector"
This reverts commit 3a5dfd5e94
.
This commit is contained in:
parent
ca6286064e
commit
2e5e3a45eb
|
@ -267,7 +267,7 @@ input[type=text], input[type=password], .badge {
|
||||||
#sidebar {
|
#sidebar {
|
||||||
font-size: normal;
|
font-size: normal;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 0;
|
width: 60%;
|
||||||
}
|
}
|
||||||
#sidebar.in, #sidebar.collapsing {
|
#sidebar.in, #sidebar.collapsing {
|
||||||
-webkit-box-shadow: 0px 0px 120px #000;
|
-webkit-box-shadow: 0px 0px 120px #000;
|
||||||
|
|
|
@ -633,6 +633,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
$rootScope.predicate = $scope.orderbyserver ? 'serverSortKey' : 'number';
|
$rootScope.predicate = $scope.orderbyserver ? 'serverSortKey' : 'number';
|
||||||
|
|
||||||
$scope.setActiveBuffer = function(bufferId, key) {
|
$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);
|
return models.setActiveBuffer(bufferId, key);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue