From 61ce134fa9c7fa8cd769a13a15309eaccce77371 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 1 Mar 2016 10:07:18 -0500 Subject: Small outside aside shrink sidebar button for mobile only. --- app/assets/javascripts/application.js.coffee | 13 +++++++++++++ app/views/projects/issues/show.html.haml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 570adc27011..4823bb6b7bd 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -231,6 +231,13 @@ $ -> $this = $(this) $thisIcon = $this.find 'i' if $thisIcon.hasClass('fa-angle-double-right') + # It's open -> close it + if bootstrapBreakpoint is 'xs' + # it's the gutter open button outside the aside + if not $this.closest('aside').length + $('aside').addClass('hidden-xs') + + console.log(bootstrapBreakpoint); $thisIcon .removeClass('fa-angle-double-right') .addClass('fa-angle-double-left') @@ -242,6 +249,12 @@ $ -> .removeClass('right-sidebar-expanded') .addClass('right-sidebar-collapsed') else + # It's closed -> open it + if bootstrapBreakpoint is 'xs' + # it's the gutter open button outside the aside + if not $this.closest('aside').length + $('aside').removeClass('hidden-xs') + $thisIcon .removeClass('fa-angle-double-left') .addClass('fa-angle-double-right') diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 3e2557e033b..0c225ee3fe1 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -19,7 +19,7 @@ =icon('circle-o') %a.btn.btn-default.pull-right.hidden-sm.hidden-md.hidden-lg.gutter-toggle{ href: "#" } - « + =icon('angle-double-left') .issue-meta %strong.identifier -- cgit v1.2.1