From 5fbc3867f86f59c007da55a423ce3607ae917b8e Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 28 Aug 2013 15:57:29 -0400 Subject: [PATCH] removing default button after pressing. --- .../js/airtime/playouthistory/configuretemplate.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js index 0d1c631ff..5087805c6 100644 --- a/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js +++ b/airtime_mvc/public/js/airtime/playouthistory/configuretemplate.js @@ -149,13 +149,13 @@ var AIRTIME = (function(AIRTIME) { updateTemplate(template_id, false); }); - $templateDiv.on("click", "#template_set_default", function(){ - var template_id = $(this).data("template"); - var url = baseUrl+"Playouthistory/set-template-default/format/json"; + $templateDiv.on("click", "#template_set_default", function() { + var $btn = $(this), + template_id = $btn.data("template"), + url = baseUrl+"Playouthistory/set-template-default/format/json"; - $.post(url, {id: template_id}, function(json) { - var x; - }); + $btn.remove(); + $.post(url, {id: template_id}); }); };