BigW Consortium Gitlab

Commit 6748520d by Dmitriy Zaporozhets

Merge branch 'feature/jschatz1/instant-issuable-history' into 'master'

Adds feature: Ajax Close/Open updates discussion automatically Triggers jQuery event <br/> Fixes #5544 See merge request !2610
parents ca171b81 ed8256a2
......@@ -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,9 @@ class @Notes
# fetch notes when tab becomes visible
$(document).on "visibilitychange", @visibilityChange
# when issue status changes, we need to refresh data
$(document).on "issuable:change", @refresh
cleanBinding: ->
$(document).off "ajax:success", ".js-main-target-form"
$(document).off "ajax:success", ".js-discussion-note-form"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment