summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-03-01 10:07:18 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-03-04 09:06:57 -0500
commit61ce134fa9c7fa8cd769a13a15309eaccce77371 (patch)
treee73537693e65b7c1da019bee101a8943da8dc54e
parentcabb61719d11fcfd6e9ae93b0c0227df8a3c5bdd (diff)
downloadgitlab-ce-61ce134fa9c7fa8cd769a13a15309eaccce77371.tar.gz
Small outside aside shrink sidebar button for mobile only.
-rw-r--r--app/assets/javascripts/application.js.coffee13
-rw-r--r--app/views/projects/issues/show.html.haml2
2 files changed, 14 insertions, 1 deletions
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: "#" }
- &laquo;
+ =icon('angle-double-left')
.issue-meta
%strong.identifier