Changes the width of sidebar in issues and MRs when affix event fires
This commit is contained in:
parent
090f2344ec
commit
81ff63d684
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||||
@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
|
||||||
else
|
else
|
||||||
setTimeout(merge_request.mergeInProgress, 3000)
|
setTimeout(merge_request.mergeInProgress, 3000)
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue