Merge pull request #2090 from ortegacmanuel/comments-on-proposals-topic

Added reference to event on the .on method('ajax:success',...)
This commit is contained in:
Alberto García
2017-10-25 11:08:31 +02:00
committed by GitHub

View File

@@ -25,7 +25,7 @@ App.PreventDoubleSubmission =
unless event.target.id == "new_officing_voter" unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit') buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.disable_buttons(buttons) App.PreventDoubleSubmission.disable_buttons(buttons)
).on('ajax:success', -> ).on('ajax:success', (event) ->
unless event.target.id == "new_officing_voter" unless event.target.id == "new_officing_voter"
buttons = $(this).find(':button, :submit') buttons = $(this).find(':button, :submit')
App.PreventDoubleSubmission.reset_buttons(buttons) App.PreventDoubleSubmission.reset_buttons(buttons)