Skip to content
Snippets Groups Projects
Commit aedc1254 authored by Drew Blessing's avatar Drew Blessing
Browse files

Merge branch 'issue-sidebar-size' into 'master'

Changes the width of sidebar in issues and MRs when affix event fires

Fixes #1320

Width is set when Bootstraps affix event is fired and then removed when it reaches the top or bottom.

See merge request !464
parents 965b92a7 81ff63d6
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
@@ -18,3 +18,7 @@ class @Issue
Loading
@@ -18,3 +18,7 @@ class @Issue
@top = ($('.issuable-affix').offset().top - 70) @top = ($('.issuable-affix').offset().top - 70)
bottom: -> bottom: ->
@bottom = $('.footer').outerHeight(true) @bottom = $('.footer').outerHeight(true)
$('.issuable-affix').on 'affix.bs.affix', ->
$(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('')
Loading
@@ -26,6 +26,10 @@ class @MergeRequest
Loading
@@ -26,6 +26,10 @@ class @MergeRequest
@top = ($('.issuable-affix').offset().top - 70) @top = ($('.issuable-affix').offset().top - 70)
bottom: -> bottom: ->
@bottom = $('.footer').outerHeight(true) @bottom = $('.footer').outerHeight(true)
$('.issuable-affix').on 'affix.bs.affix', ->
$(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('')
   
# Local jQuery finder # Local jQuery finder
$: (selector) -> $: (selector) ->
Loading
@@ -160,4 +164,3 @@ class @MergeRequest
Loading
@@ -160,4 +164,3 @@ class @MergeRequest
else else
setTimeout(merge_request.mergeInProgress, 3000) setTimeout(merge_request.mergeInProgress, 3000)
dataType: 'json' dataType: 'json'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment