From 2ff2e1dbb8ee0fefde945553e3b5c1df84cfabda Mon Sep 17 00:00:00 2001 From: j000 Date: Thu, 27 Jun 2013 02:55:10 +0200 Subject: [PATCH] Update sidebars.js Right sidebar tweaks. --- js/sidebars.js | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/js/sidebars.js b/js/sidebars.js index 0e4d3f9..e03eb8b 100755 --- a/js/sidebars.js +++ b/js/sidebars.js @@ -124,12 +124,22 @@ if (timeout_r) { clearTimeout(timeout_r); } + var sbarWidthR = $("#sb-right") + .width(), + sbarWidthL = $("#sb-left") + .width(); $('#editor-region') .animate({ - 'margin-right': '200px' + 'margin-right': sbarWidthR+'px', + 'width': ($('body') + .outerWidth() - sbarWidthL - sbarWidthR) + 'px' }, 300, 'easeOutQuart', function(){ _this.isRigthSidebarOpen = true; }); + $('#tab-close') + .animate({ + 'margin-right': (sbarWidthR-10)+'px' + }, 300, 'easeOutQuart'); $(this) .animate({ 'right': '0px' @@ -149,7 +159,7 @@ .width(); if (!codiad.sidebars.leftLock) { sbarWidthL = 10; - } + } $('#editor-region') .animate({ 'margin-right': sbarWidthR+'px', @@ -158,6 +168,10 @@ }, 300, 'easeOutQuart', function(){ _this.isRigthSidebarOpen = true; }); + $('#tab-close') + .animate({ + 'margin-right': (sbarWidthR-10)+'px' + }, 300, 'easeOutQuart'); $(this) .animate({ 'right': '0px' @@ -177,7 +191,7 @@ .width(); if (!codiad.sidebars.leftLock) { sbarWidthL = 10; - } + } $('#editor-region') .animate({ 'margin-right': '10px', @@ -186,6 +200,10 @@ }, 300, 'easeOutQuart', function(){ _this.isRigthSidebarOpen = false; }); + $('#tab-close') + .animate({ + 'margin-right': 0+'px' + }, 300, 'easeOutQuart'); } }, this), 500)); });