Initialize Rails-specific code only if Rails' UJS is defined
Disentangle modal and data attributes, add dataConfirmModal.confirm() call
Use onConfirm instead of onSuccess
Move focus code in modal initialization