From f4b4cc3bae254324f5d957d5aadd9f35ec7ffb54 Mon Sep 17 00:00:00 2001
From: Gabriel Albo <gabriel@albo.com.br>
Date: Wed, 4 Mar 2015 13:28:20 -0300
Subject: Alexandre/Albo - Fixing an issue with the custom tags visibility
 toggle not working when the user clicks on the mail list with the sidenav
 expanded.

---
 web-ui/app/js/foundation/off_canvas.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'web-ui/app/js')

diff --git a/web-ui/app/js/foundation/off_canvas.js b/web-ui/app/js/foundation/off_canvas.js
index a7a39bba..805dfab8 100644
--- a/web-ui/app/js/foundation/off_canvas.js
+++ b/web-ui/app/js/foundation/off_canvas.js
@@ -20,8 +20,7 @@ define(['flight/lib/component', 'page/events'], function (defineComponent, event
   return defineComponent(function() {
 
     this.closeSlider = function (ev){
-      ev.preventDefault();
-      $('.exit-off-canvas').click();
+      $('.off-canvas-wrap.content').removeClass('move-right');
       this.toggleTagsVisibility();
     };
 
@@ -32,10 +31,10 @@ define(['flight/lib/component', 'page/events'], function (defineComponent, event
     };
 
     this.toggleTagsVisibility = function () {
-	  if ($('#custom-tag-list').hasClass('expanded')) {
-	    $('#custom-tag-list').removeClass('expanded');
-	  } else {
+	  if ($('.off-canvas-wrap.content').hasClass('move-right')) {
 	    $('#custom-tag-list').addClass('expanded');
+	  } else {
+	    $('#custom-tag-list').removeClass('expanded');
 	  }
     };
 
-- 
cgit v1.2.3