refactored some js to fix confirm-delete handler
Merge branch 'confirm-delete-fix' into dev