mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Merge branch 'bugfix/jschatz/sidebar-issues/minimize-on-diff' into 'master'
Shrink on diff view * Shrinks when navigating to diff view. * Shrinks when refreshing on diff view. * Expandable at anytime.  See merge request !2735
This commit is contained in:
@@ -210,7 +210,7 @@ $ ->
|
||||
$this = $(this)
|
||||
$this.attr 'value', $this.val()
|
||||
return
|
||||
|
||||
|
||||
$(document)
|
||||
.off 'keyup', 'input[type="search"]'
|
||||
.on 'keyup', 'input[type="search"]' , (e) ->
|
||||
@@ -253,7 +253,7 @@ $ ->
|
||||
$('.page-with-sidebar')
|
||||
.removeClass('right-sidebar-collapsed')
|
||||
.addClass('right-sidebar-expanded')
|
||||
$.cookie("collapsed_gutter",
|
||||
$.cookie("collapsed_gutter",
|
||||
$('.right-sidebar')
|
||||
.hasClass('right-sidebar-collapsed'), { path: '/' })
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ class @MergeRequestTabs
|
||||
@loadCommits($target.attr('href'))
|
||||
else if action == 'diffs'
|
||||
@loadDiff($target.attr('href'))
|
||||
@shrinkView()
|
||||
else if action == 'builds'
|
||||
@loadBuilds($target.attr('href'))
|
||||
|
||||
@@ -185,3 +186,14 @@ class @MergeRequestTabs
|
||||
|
||||
expandViewContainer: ->
|
||||
$('.container-fluid').removeClass('container-limited')
|
||||
|
||||
shrinkView: ->
|
||||
$gutterIcon = $('.gutter-toggle i')
|
||||
|
||||
# Wait until listeners are set
|
||||
setTimeout( ->
|
||||
# Only when sidebar is collapsed
|
||||
if $gutterIcon.is('.fa-angle-double-right')
|
||||
$gutterIcon.closest('a').trigger('click')
|
||||
, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user