summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/issuable_context.js.coffee11
-rw-r--r--app/assets/javascripts/issue.js.coffee1
-rw-r--r--app/assets/javascripts/merge_request.js.coffee5
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) =>