debian-mirror-gitlab/app/assets/javascripts/issue.js.coffee

25 lines
898 B
CoffeeScript
Raw Normal View History

2015-04-26 12:48:37 +05:30
class @Issue
2014-09-02 18:07:02 +05:30
constructor: ->
$('.edit-issue.inline-update input[type="submit"]').hide()
2015-04-26 12:48:37 +05:30
$(".context .inline-update").on "change", "select", ->
2014-09-02 18:07:02 +05:30
$(this).submit()
2015-04-26 12:48:37 +05:30
$(".context .inline-update").on "change", "#issue_assignee_id", ->
2014-09-02 18:07:02 +05:30
$(this).submit()
2015-04-26 12:48:37 +05:30
if $("a.btn-close").length
$("li.task-list-item input:checkbox").prop("disabled", false)
$('.task-list-item input:checkbox').off('change')
$('.task-list-item input:checkbox').change('issue', updateTaskState)
$('.issue-details').waitForImages ->
$('.issuable-affix').affix offset:
top: ->
@top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
$('.issuable-affix').on 'affix.bs.affix', ->
$(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('')