Make javascript alert, confirm and prompt as controller level methods