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