diff --git a/admin-dev/themes/template/home/content.tpl b/admin-dev/themes/template/home/content.tpl index 43ac4fbde..9b81d7400 100644 --- a/admin-dev/themes/template/home/content.tpl +++ b/admin-dev/themes/template/home/content.tpl @@ -27,9 +27,11 @@
{l s ='Update notification unavailable'}
@@ -51,11 +53,28 @@ $(document).ready(function() { if ($(this).is(':checked')) { $.ajax({ - type: 'POST', - async: true, - url: 'ajax.php?toggleScreencast', + type : 'POST', + data : { + ajax : '1', + controller : 'AdminHome', + token : '{$token}', + id_employee : '{$employee->id}', + action : 'hideScreencast', + }, + url: 'ajax-tab.php', + dataType : 'json', success: function(data) { + if(!data) + alert("TECHNICAL ERROR - no return status found"); + else if(data.status != "ok") + alert("TECHNICAL ERROR: "+data.msg); + $('#adminpresentation').slideUp('slow'); + + }, + error: function(data, textStatus, errorThrown) + { + alert("TECHNICAL ERROR: "+data); } }); } @@ -88,6 +107,41 @@ $(document).ready(function() {