From 21c2dfdace2b3577446c9399123073b75a1835e6 Mon Sep 17 00:00:00 2001 From: Lisa Junger Date: Mon, 2 Feb 2015 14:51:16 +0100 Subject: Correct usage of off-canvas - Issue #242 --- web-ui/app/js/foundation/off_canvas.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/foundation/off_canvas.js b/web-ui/app/js/foundation/off_canvas.js index 59213d28..8dfd75ba 100644 --- a/web-ui/app/js/foundation/off_canvas.js +++ b/web-ui/app/js/foundation/off_canvas.js @@ -19,18 +19,11 @@ define(['flight/lib/component', 'page/events'], function (defineComponent, event return defineComponent(function() { - this.toggleSlider = function (){ - $('.off-canvas-wrap').foundation('offcanvas', 'toggle', 'move-right'); - }; - this.closeSlider = function (){ - if ($('.off-canvas-wrap').attr('class').indexOf('move-right') > -1) { - $('.off-canvas-wrap').foundation('offcanvas', 'toggle', 'move-right'); - } + $('.exit-off-canvas').click(); }; this.after('initialize', function () { - this.on($('.left-off-canvas-toggle'), 'click', this.toggleSlider); this.on($('#middle-pane-container'), 'click', this.closeSlider); this.on($('#right-pane'), 'click', this.closeSlider); }); -- cgit v1.2.3