From 4f5fc5f8af060bdb88261d52e0ad0917cd0d02cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 13 Mar 2014 16:28:40 +0100 Subject: [PATCH] Feature #2746: Fix host/cluster remove button in placement section of the template wizard --- src/sunstone/public/js/plugins/templates-tab.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index d1217f2ddf..90b4610634 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -3215,7 +3215,8 @@ function add_schedulingTab(dialog) { return true; }); - $("span.fa.fa-times", $('div#selected_hosts_template', dialog)).live( "click", function() { + $(document).off("click", 'div#selected_hosts_template span.fa.fa-times'); + $(document).on("click", 'div#selected_hosts_template span.fa.fa-times', function() { $(this).parent().remove(); var id = $(this).parent().attr("ID"); @@ -3299,7 +3300,8 @@ function add_schedulingTab(dialog) { return true; }); - $( "#selected_clusters_template span.fa.fa-times" , dialog).live( "click", function() { + $(document).off("click", 'div#selected_clusters_template span.fa.fa-times'); + $(document).on("click", 'div#selected_clusters_template span.fa.fa-times', function() { $(this).parent().remove(); var id = $(this).parent().attr("ID");