diff --git a/app/templates/js/automation.js b/app/templates/js/automation.js index 0ff1874..4d307e1 100644 --- a/app/templates/js/automation.js +++ b/app/templates/js/automation.js @@ -1,12 +1,11 @@ function restartAutomation(automationId){ console.log("restartingAutomation" + automationId); - event.preventDefault(); $.ajax({ url: 'ajax', type: 'POST', data: { "automation_id" : automationId, - "action": 'restart' + "action": "restart" }, success: function(data){ console.log(data); @@ -17,20 +16,17 @@ function restartAutomation(automationId){ }); } -function toggleAutomation(thisElement, automationId){ +function toggleAutomation(automationId){ console.log("togglingAutomation" + automationId); - event.preventDefault(); $.ajax({ url: 'ajax', type: 'POST', data: { "automation_id" : automationId, - "action": 'deactive' + "action": "deactive" }, success: function(data){ - console.log($('automation-'+automationId)); $('#automation-'+automationId).toggleClass("is-inactive"); - console.log('active'); }, error: function (request, status, error) { console.log("ERROR ", request, error); diff --git a/app/templates/part/automationButton.phtml b/app/templates/part/automationButton.phtml index bdb31ac..2947597 100644 --- a/app/templates/part/automationButton.phtml +++ b/app/templates/part/automationButton.phtml @@ -53,10 +53,10 @@
- echo('b_restart')?> + echo('b_restart')?>
- echo('b_disable')?> + echo('b_disable')?>