From a8de757bfdb8e068d5a649141055744e69456d67 Mon Sep 17 00:00:00 2001 From: Hugo Soucy Date: Tue, 17 Mar 2015 14:33:54 -0400 Subject: [PATCH] Ajout de la fonction closeSidebar(). --- app/assets/js/scripts.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/assets/js/scripts.js b/app/assets/js/scripts.js index aa2724e..e00113b 100644 --- a/app/assets/js/scripts.js +++ b/app/assets/js/scripts.js @@ -18,8 +18,8 @@ var AdagiosUI = (function() { tablet: 959 }; - var test = function(str) { - console.log(str); + var test = function() { + console.log(); }; var syncBkgCheckbox = function() { @@ -31,11 +31,18 @@ var AdagiosUI = (function() { .css('background-color', activeHostCell_bkgColor); }; + var closeSidebar = function() { + $('.sidebar__close').on('click', function() { + $('.topbar__toggle-sidebar').find('.topbar__button').trigger('click'); + }); + }; + return { state: state, test: test, mquery: mquery, - syncBkgCheckbox : syncBkgCheckbox + syncBkgCheckbox : syncBkgCheckbox, + closeSidebar : closeSidebar }; })();