2015-09-11 14:41:01 +05:30
|
|
|
#= require jquery.waitforimages
|
|
|
|
|
|
|
|
class @IssuableContext
|
|
|
|
constructor: ->
|
|
|
|
new UsersSelect()
|
|
|
|
$('select.select2').select2({width: 'resolve', dropdownAutoWidth: true})
|
|
|
|
|
2015-12-23 02:04:40 +05:30
|
|
|
$(".issuable-sidebar .inline-update").on "change", "select", ->
|
2015-09-11 14:41:01 +05:30
|
|
|
$(this).submit()
|
2015-12-23 02:04:40 +05:30
|
|
|
$(".issuable-sidebar .inline-update").on "change", ".js-assignee", ->
|
2015-09-11 14:41:01 +05:30
|
|
|
$(this).submit()
|
|
|
|
|
|
|
|
$('.issuable-details').waitForImages ->
|
2015-09-25 12:07:36 +05:30
|
|
|
$('.issuable-affix').on 'affix.bs.affix', ->
|
|
|
|
$(@).width($(@).outerWidth())
|
|
|
|
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
|
|
|
|
$(@).width('')
|
|
|
|
|
2015-09-11 14:41:01 +05:30
|
|
|
$('.issuable-affix').affix offset:
|
|
|
|
top: ->
|
|
|
|
@top = ($('.issuable-affix').offset().top - 70)
|
|
|
|
bottom: ->
|
|
|
|
@bottom = $('.footer').outerHeight(true)
|
2015-12-23 02:04:40 +05:30
|
|
|
|
|
|
|
$(".edit-link").click (e) ->
|
|
|
|
block = $(@).parents('.block')
|
|
|
|
block.find('.selectbox').show()
|
|
|
|
block.find('.value').hide()
|
|
|
|
block.find('.js-select2').select2("open")
|