Converted javascript confirmation dialog to jquery UI dialog (needs style)

This commit is contained in:
Dave St.Germain
2014-02-18 17:17:15 -05:00
parent 481344cbb6
commit fd59de346b
4 changed files with 56 additions and 4 deletions

View File

@@ -400,7 +400,8 @@ class @CombinedOpenEnded
an openended problem
###
confirmation_text = gettext 'Please confirm that you wish to submit your work. You will not be able to make any changes after submitting.'
@save_answer(event) if confirm(confirmation_text)
accessible_confirm confirmation_text, =>
@save_answer(event)
save_answer: (event) =>
@$el.find(@oe_alert_sel).remove()
@@ -507,7 +508,9 @@ class @CombinedOpenEnded
@errors_area.html(@out_of_sync_message)
confirm_reset: (event) =>
@reset(event) if confirm(gettext 'Are you sure you want to remove your previous response to this question?')
message = gettext 'Are you sure you want to remove your previous response to this question?'
accessible_confirm message, =>
@reset(event)
reset: (event) =>
event.preventDefault()