" + new_order_msg + "
"; html += "" + order_number_msg + " #" + parseInt(value.id_order) + "
"; html += "" + total_msg + " " + value.total_paid + "
"; html += "" + from_msg + " " + value.customer_name + "
"; //html += "" + see_order_msg + "
"; html += "1 minute ago"; html += ""; }); if (html != "") { //$("#list_orders_notif").prev("p").hide(); $("#list_orders_notif").empty().append(html); nb_notifs = $("#list_orders_notif").length; $("#orders_notif_value").text(nb_notifs); $("#orders_notif_number_wrapper").show(); } else { $("#orders_notif_number_wrapper").hide(); } // Add customers notifications to the list html = ""; nb_notifs = 0; $.each(json.customer, function(property, value) { html += ""; html += ""; html += ""; //html += "" + new_customer_msg + "
"; html += "" + customer_name_msg + " #" + value.customer_name + "
"; //html += "" + see_customer_msg + "
"; html += "1 minute ago"; html += ""; }); if (html != "") { //$("#list_customers_notif").prev("p").hide(); $("#list_customers_notif").empty().append(html); nb_notifs = $("#list_customers_notif").length; $("#customers_notif_value").text(nb_notifs); $("#customers_notif_number_wrapper").show(); } else { $("#customers_notif_number_wrapper").hide(); } // Add messages notifications to the list html = ""; nb_notifs = 0; $.each(json.customer_message, function(property, value) { html += ""; html += ""; html += ""; //html += "" + new_msg + "
"; html += "" + from_msg + " " + value.customer_name + "
"; //html += "" + see_msg + "
"; html += "1 minute ago"; html += ""; }); if (html != "") { $("#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 { $("#customer_messages_notif_number_wrapper").hide(); } } if(refresh) setTimeout("getPush(1)",60000); }); }