From 90f2d6c7c3379ae2b2a7b25fe8be38e58ea8d739 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Mon, 31 Oct 2011 10:54:37 +0000 Subject: [PATCH] [*] BO : optimization Upgrader and Admin Home git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9745 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/themes/template/home/content.tpl | 69 ++++++++++++++++++++-- classes/Upgrader.php | 64 ++++++++++++++------ controllers/admin/AdminHomeController.php | 59 ++++++++++++++---- 3 files changed, 155 insertions(+), 37 deletions(-) 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='Dashboard'}


{if $upgrade} +
{if $upgrade->need_upgrade}

{l s ='New PrestaShop version available'} : {l s ='Download'} {$upgrade->version_name} !

{/if} +
{else}

{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() {