Use CSS classes instead of javascript for margin

This commit is contained in:
Tor Hveem 2014-02-21 15:35:06 +01:00
commit 056aa3deed
3 changed files with 5 additions and 13 deletions

View file

@ -629,16 +629,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Open and close panels while on mobile devices through swiping
$scope.swipeSidebar = function() {
$scope.showSidebar = !$scope.showSidebar;
// remove or add margin if big screen
if (document.body.clientWidth > mobile_cutoff) {
if($scope.showSidebar) {
$('#bufferlines').css('margin-left','145px');
$('.navbar-fixed-bottom').css('margin-left','145px');
}else{
$('#bufferlines').css('margin-left','0');
$('.navbar-fixed-bottom').css('margin-left','0');
}
}
};
$scope.openNick = function() {