Fix affix for issue and merge request with image in description

This commit is contained in:
Dmitriy Zaporozhets 2015-02-25 20:00:28 -08:00
parent e993b59b7d
commit c254cb03d8
2 changed files with 12 additions and 10 deletions

View file

@ -16,8 +16,9 @@ class @Issue
updateTaskState
)
$('.issuable-affix').affix offset:
top: ->
@top = $('.issue-details').outerHeight(true) + 25
bottom: ->
@bottom = $('.footer').outerHeight(true)
$('.issue-details').waitForImages ->
$('.issuable-affix').affix offset:
top: ->
@top = $('.issue-details').outerHeight(true) + 25
bottom: ->
@bottom = $('.footer').outerHeight(true)

View file

@ -20,11 +20,12 @@ class @MergeRequest
if $("a.btn-close").length
$("li.task-list-item input:checkbox").prop("disabled", false)
$('.issuable-affix').affix offset:
top: ->
@top = $('.merge-request-details').outerHeight(true) + 70
bottom: ->
@bottom = $('.footer').outerHeight(true)
$('.merge-request-details').waitForImages ->
$('.issuable-affix').affix offset:
top: ->
@top = $('.merge-request-details').outerHeight(true) + 91
bottom: ->
@bottom = $('.footer').outerHeight(true)
# Local jQuery finder
$: (selector) ->