git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11376 b9a71923-0436-4b27-9f14-aed3839534dd

This commit is contained in:
lBrieu
2011-12-19 16:04:47 +00:00
parent 772147a6ee
commit 1e47744868
+10 -8
View File
@@ -93,20 +93,22 @@ function getPush(refresh)
// Add messages notifications to the list // Add messages notifications to the list
html = ""; html = "";
nb_notifs = 0; nb_notifs = 0;
$.each(json.message, function(property, value) { $.each(json.customer_message, function(property, value) {
html += "<li>" + new_msg + "<br />" + from_msg + "<strong>" + value.customer_name + "</strong><br />" + excerpt_msg + "<strong>" + value.message_customer + "</strong><br /><a href=\"index.php?tab=AdminOrders&token=" + token_admin_orders + "&vieworder&id_order=" + parseInt(value.id_order) + "\">" + see_msg + "</a></li>"; html += "<li>" + new_msg + "<br />" + from_msg + "<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminCustomerThreads&token=" + token_admin_customer_threads + "&viewcustomer_thread&id_customer_thread=" + parseInt(value.id_customer_thread) + "\">" + see_msg + "</a></li>";
}); });
if (html != "") if (html != "")
{ {
$("#list_messages_notif").prev("p").hide();
$("#list_messages_notif").empty().append(html); $("#list_customer_messages_notif").prev("p").hide();
nb_notifs = $("#list_messages_notif li").length; $("#list_customer_messages_notif").empty().append(html);
$("#messages_notif_value").text(nb_notifs); nb_notifs = $("#list_customer_messages_notif li").length;
$("#messages_notif_number_wrapper").show(); $("#customer_messages_notif_value").text(nb_notifs);
$("#customer_messages_notif_number_wrapper").show();
} }
else else
{ {
$("#messages_notif_number_wrapper").hide(); $("#customer_messages_notif_number_wrapper").hide();
} }
} }
if(refresh) if(refresh)