From d882e5cafee2e805645c7ebb883c48a75f35b7eb Mon Sep 17 00:00:00 2001 From: Mario Visic Date: Thu, 23 Aug 2012 18:49:54 +0800 Subject: [PATCH] Added a prompt when deleting a queue. --- web/assets/javascripts/application.js | 6 ++++++ web/views/queues.slim | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/assets/javascripts/application.js b/web/assets/javascripts/application.js index 77996f70..7f20d44b 100644 --- a/web/assets/javascripts/application.js +++ b/web/assets/javascripts/application.js @@ -49,3 +49,9 @@ $(function() { pollLink.data('polling', !pollLink.data('polling')); }) }); + +$(function() { + $('[data-confirm]').click(function() { + return confirm($(this).attr('data-confirm')); + }); +}); diff --git a/web/views/queues.slim b/web/views/queues.slim index 5b478ff7..1cc7b01b 100644 --- a/web/views/queues.slim +++ b/web/views/queues.slim @@ -13,7 +13,7 @@ h1 Queues td= size td form action="#{root_path}queues/#{queue}" method="post" - input.btn.btn-danger type="submit" name="delete" value="Delete" + input.btn.btn-danger type="submit" name="delete" value="Delete" data-confirm="Are you sure you want to delete the #{queue} queue?" - else p No queues found. a href="#{root_path}" Back