Commit 81ff63d6 authored by Phil Hughes's avatar Phil Hughes

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

parent 090f2344
...@@ -22,3 +22,7 @@ class @Issue ...@@ -22,3 +22,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('')
...@@ -26,6 +26,10 @@ class @MergeRequest ...@@ -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) ->
...@@ -164,4 +168,3 @@ class @MergeRequest ...@@ -164,4 +168,3 @@ class @MergeRequest
else else
setTimeout(merge_request.mergeInProgress, 3000) setTimeout(merge_request.mergeInProgress, 3000)
dataType: 'json' dataType: 'json'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment