Adds feature: Ajax Close/Open updates discussion automatically
Triggers jQuery event Fixes #5544
This commit is contained in:
parent
fd33b2cdc0
commit
55e031a0d0
2 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,7 @@ class @Issue
|
|||
new Flash(issueFailMessage, 'alert')
|
||||
success: (data, textStatus, jqXHR) ->
|
||||
if data.saved
|
||||
$(document).trigger('issuable:change');
|
||||
if isClose
|
||||
$('a.btn-close').addClass('hidden')
|
||||
$('a.btn-reopen').removeClass('hidden')
|
||||
|
|
|
@ -64,6 +64,8 @@ class @Notes
|
|||
# fetch notes when tab becomes visible
|
||||
$(document).on "visibilitychange", @visibilityChange
|
||||
|
||||
$(document).on "issuable:change", @refresh
|
||||
|
||||
cleanBinding: ->
|
||||
$(document).off "ajax:success", ".js-main-target-form"
|
||||
$(document).off "ajax:success", ".js-discussion-note-form"
|
||||
|
|
Loading…
Reference in a new issue