diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-13 16:46:40 -0500 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-01-13 16:46:40 -0500 |
commit | 46b56fc7ecf7251195dcdba961c3b103664fdd73 (patch) | |
tree | 9cbf0f880ea056c31f8e2fa661c0593905055814 | |
parent | 1202355703b9357e85fffa308a25c86576f7bfa0 (diff) | |
download | gitlab-ce-46b56fc7ecf7251195dcdba961c3b103664fdd73.tar.gz |
initial fix
-rw-r--r-- | app/assets/javascripts/issuable_context.js.coffee | 11 | ||||
-rw-r--r-- | app/assets/javascripts/issue.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request.js.coffee | 5 |
3 files changed, 12 insertions, 5 deletions
diff --git a/app/assets/javascripts/issuable_context.js.coffee b/app/assets/javascripts/issuable_context.js.coffee index 02232698bc2..bcc3e52bf9b 100644 --- a/app/assets/javascripts/issuable_context.js.coffee +++ b/app/assets/javascripts/issuable_context.js.coffee @@ -15,7 +15,16 @@ class @IssuableContext $(@).width($(@).outerWidth()) .on 'affixed-top.bs.affix affixed-bottom.bs.affix', -> $(@).width('') - + $discussion = $('.issuable-discussion') + $sidebar = $('.issuable-sidebar') + discussionHeight = $discussion.height() + sidebarHeight = $sidebar.height() + console.log(sidebarHeight,discussionHeight) + if sidebarHeight > discussionHeight + $discussion.height(sidebarHeight + 50) + console.log('fixing issues') + return + # No affix if discussion is smaller than sidebar $('.issuable-affix').affix offset: top: -> @top = ($('.issuable-affix').offset().top - 70) diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee index 0d26c58a81d..2297061a605 100644 --- a/app/assets/javascripts/issue.js.coffee +++ b/app/assets/javascripts/issue.js.coffee @@ -6,7 +6,6 @@ class @Issue constructor: -> # Prevent duplicate event bindings @disableTaskList() - if $('a.btn-close').length @initTaskList() @initIssueBtnEventListeners() diff --git a/app/assets/javascripts/merge_request.js.coffee b/app/assets/javascripts/merge_request.js.coffee index ed0bf2b3f48..d4fd4ed6003 100644 --- a/app/assets/javascripts/merge_request.js.coffee +++ b/app/assets/javascripts/merge_request.js.coffee @@ -50,11 +50,10 @@ class @MergeRequest $this = $(this) if $this.data('submitted') return - e.preventDefault() - e.stopImmediatePropagation() shouldSubmit = $this.hasClass('btn-comment') - console.log("shouldSubmit") if shouldSubmit + e.preventDefault() + e.stopImmediatePropagation() _this.submitNoteForm($this.closest('form'),$this) submitNoteForm: (form, $button) => |