added confirm dialog for delete gift link + some js code refactoring