issuable_context.js.coffee 748 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#= require jquery.waitforimages

class @IssuableContext
  constructor: ->
    new UsersSelect()
    $('select.select2').select2({width: 'resolve', dropdownAutoWidth: true})

    $(".context .inline-update").on "change", "select", ->
      $(this).submit()
    $(".context .inline-update").on "change", ".js-assignee", ->
      $(this).submit()

    $('.issuable-details').waitForImages ->
R
Robert Speicher 已提交
14 15 16 17 18
      $('.issuable-affix').on 'affix.bs.affix', ->
        $(@).width($(@).outerWidth())
      .on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
        $(@).width('')

19 20 21 22 23
      $('.issuable-affix').affix offset:
        top: ->
          @top = ($('.issuable-affix').offset().top - 70)
        bottom: ->
          @bottom = $('.footer').outerHeight(true)