Fixed issue with sidebar edit links toggling anchor
This caused an issue with the page scrolling from the bottom to the top. Also stopped the dropdown links doing the same.
This commit is contained in:
parent
2011f02b5d
commit
114d3c9846
|
@ -9,21 +9,30 @@ class @IssuableContext
|
||||||
$(".issuable-sidebar .inline-update").on "change", ".js-assignee", ->
|
$(".issuable-sidebar .inline-update").on "change", ".js-assignee", ->
|
||||||
$(this).submit()
|
$(this).submit()
|
||||||
|
|
||||||
$(document).off("click", ".edit-link").on "click",".edit-link", (e) ->
|
$(document)
|
||||||
$block = $(@).parents('.block')
|
.off 'click', '.dropdown-content a'
|
||||||
$selectbox = $block.find('.selectbox')
|
.on 'click', '.dropdown-content a', (e) ->
|
||||||
if $selectbox.is(':visible')
|
e.preventDefault()
|
||||||
$selectbox.hide()
|
|
||||||
$block.find('.value').show()
|
$(document)
|
||||||
else
|
.off 'click', '.edit-link'
|
||||||
$selectbox.show()
|
.on 'click', '.edit-link', (e) ->
|
||||||
$block.find('.value').hide()
|
e.preventDefault()
|
||||||
|
|
||||||
|
$block = $(@).parents('.block')
|
||||||
|
$selectbox = $block.find('.selectbox')
|
||||||
|
if $selectbox.is(':visible')
|
||||||
|
$selectbox.hide()
|
||||||
|
$block.find('.value').show()
|
||||||
|
else
|
||||||
|
$selectbox.show()
|
||||||
|
$block.find('.value').hide()
|
||||||
|
|
||||||
|
if $selectbox.is(':visible')
|
||||||
|
setTimeout ->
|
||||||
|
$block.find('.dropdown-menu-toggle').trigger 'click'
|
||||||
|
, 0
|
||||||
|
|
||||||
if $selectbox.is(':visible')
|
|
||||||
setTimeout (->
|
|
||||||
$block.find('.dropdown-menu-toggle').trigger 'click'
|
|
||||||
), 0
|
|
||||||
|
|
||||||
|
|
||||||
$(".right-sidebar").niceScroll()
|
$(".right-sidebar").niceScroll()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue