From 1e477448682eb8e8f88700f2e622b9dbd58ee328 Mon Sep 17 00:00:00 2001 From: lBrieu Date: Mon, 19 Dec 2011 16:04:47 +0000 Subject: [PATCH] git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11376 b9a71923-0436-4b27-9f14-aed3839534dd --- js/notifications.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/js/notifications.js b/js/notifications.js index e85e2483e..74a91067d 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -93,20 +93,22 @@ function getPush(refresh) // Add messages notifications to the list html = ""; nb_notifs = 0; - $.each(json.message, function(property, value) { - html += "
  • " + new_msg + "
    " + from_msg + "" + value.customer_name + "
    " + excerpt_msg + "" + value.message_customer + "
    " + see_msg + "
  • "; + $.each(json.customer_message, function(property, value) { + html += "
  • " + new_msg + "
    " + from_msg + "" + value.customer_name + "
    " + see_msg + "
  • "; }); + if (html != "") { - $("#list_messages_notif").prev("p").hide(); - $("#list_messages_notif").empty().append(html); - nb_notifs = $("#list_messages_notif li").length; - $("#messages_notif_value").text(nb_notifs); - $("#messages_notif_number_wrapper").show(); + + $("#list_customer_messages_notif").prev("p").hide(); + $("#list_customer_messages_notif").empty().append(html); + nb_notifs = $("#list_customer_messages_notif li").length; + $("#customer_messages_notif_value").text(nb_notifs); + $("#customer_messages_notif_number_wrapper").show(); } else { - $("#messages_notif_number_wrapper").hide(); + $("#customer_messages_notif_number_wrapper").hide(); } } if(refresh)