From ab6c7a230fd800b85702bfed8e8c935739dae899 Mon Sep 17 00:00:00 2001 From: Nishant Dalmia Date: Wed, 14 Jun 2017 09:30:20 +0530 Subject: [PATCH] Migration .live to .on - web ui --- .../queue_priority/server/views/priorities.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/resque/plugins/queue_priority/server/views/priorities.erb b/lib/resque/plugins/queue_priority/server/views/priorities.erb index c435712..9958941 100644 --- a/lib/resque/plugins/queue_priority/server/views/priorities.erb +++ b/lib/resque/plugins/queue_priority/server/views/priorities.erb @@ -36,10 +36,10 @@ } jQuery(function($) { - $("input").live("keypress", markDirty); - $("input[type=checkbox]").live("click", markDirty); + $("body").on("keypress", "input", markDirty); + $("body").on("click", "input[type=checkbox]", markDirty); - $("a.add").live("click", function(e) { + $("body").on("click", "a.add", function(e) { e.preventDefault(); var $table = $("table.priorities"); var $newRow = $table.find("tr.line:first").clone(); @@ -49,14 +49,14 @@ markDirty(); }); - $("a.remove").live("click", function(e) { + $("body").on("click", "a.remove", function(e) { e.preventDefault(); var $link = $(this); $link.parents("tr").remove(); markDirty(); }); - $("a.up").live("click", function(e) { + $("body").on("click", "a.up", function(e) { e.preventDefault(); var $link = $(this); var $row = $link.parents("tr"); @@ -64,7 +64,7 @@ markDirty(); }); - $("a.down").live("click", function(e) { + $("body").on("click", "a.down", function(e) { e.preventDefault(); var $link = $(this); var $row = $link.parents("tr");