Skip to content

Instantly share code, notes, and snippets.

@stevenbristol
Created July 18, 2012 12:11
Show Gist options
  • Save stevenbristol/3135828 to your computer and use it in GitHub Desktop.
Save stevenbristol/3135828 to your computer and use it in GitHub Desktop.
$.rails.showConfirmDialog = (link) ->
okButton =
type: 'btn btn-primary'
text: 'Ok'
click: (noty) -> $.rails.confirmed(link); noty.close()
cancelButton =
type: 'btn btn-danger'
text: 'Cancel'
click: (noty) -> noty.close()
noty
text: link.attr('data-confirm')
buttons: [okButton, cancelButton]
closable: false
timeout: false
modal: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment