issue.js.coffee 882 Bytes
Newer Older
1
class @Issue
2 3
  constructor: ->
    $('.edit-issue.inline-update input[type="submit"]').hide()
4
    $(".context .inline-update").on "change", "select", ->
5
      $(this).submit()
6
    $(".context .inline-update").on "change", "#issue_assignee_id", ->
7 8
      $(this).submit()

9 10 11
    if $("a.btn-close").length
      $("li.task-list-item input:checkbox").prop("disabled", false)

12 13 14 15 16 17
    $(".task-list-item input:checkbox").on(
      "click"
      null
      "issue"
      updateTaskState
    )
18

19 20 21
    $('.issue-details').waitForImages ->
      $('.issuable-affix').affix offset:
        top: ->
22
          @top = ($('.issuable-affix').offset().top - 70)
23 24
        bottom: ->
          @bottom = $('.footer').outerHeight(true)
25 26 27 28
      $('.issuable-affix').on 'affix.bs.affix', ->
        $(@).width($(@).outerWidth())
      .on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
        $(@).width('')