summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-09-18 21:17:18 +0000
committerRobert Speicher <robert@gitlab.com>2015-09-18 21:17:18 +0000
commit5a8d73243a7b68f2724a6d5f9d482dda24e9dfe4 (patch)
tree3e1bb5b856a84fc297263705dbcea431cf9e8242
parentdfa32123e3c655352481a9b00ecb0f11ea631c0a (diff)
parent68b15af46c1ddc44552252bd097d9748693dda23 (diff)
downloadgitlab-ce-5a8d73243a7b68f2724a6d5f9d482dda24e9dfe4.tar.gz
Merge branch 'rs-issue-2597' into 'master'
Fix IssuableContext javascript We were calling `affix` before the events were bound so they never triggered correctly. Closes #2597 See merge request !1356
-rw-r--r--app/assets/javascripts/issuable_context.js.coffee9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/issuable_context.js.coffee b/app/assets/javascripts/issuable_context.js.coffee
index 176d9cabefa..c4d3e619f5e 100644
--- a/app/assets/javascripts/issuable_context.js.coffee
+++ b/app/assets/javascripts/issuable_context.js.coffee
@@ -11,12 +11,13 @@ class @IssuableContext
$(this).submit()
$('.issuable-details').waitForImages ->
+ $('.issuable-affix').on 'affix.bs.affix', ->
+ $(@).width($(@).outerWidth())
+ .on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
+ $(@).width('')
+
$('.issuable-affix').affix offset:
top: ->
@top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
- $('.issuable-affix').on 'affix.bs.affix', ->
- $(@).width($(@).outerWidth())
- .on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
- $(@).width('')