[*] BO : Shows more details for each notification
This commit is contained in:
@@ -76,8 +76,9 @@ echo '
|
||||
// Add orders notifications to the list
|
||||
html = "";
|
||||
nb_notifs = 0;
|
||||
console.log(json);
|
||||
$.each(json.order, function(property, value) {
|
||||
html += "<li>'.translate("A new order has been made on your shop.").'<br /><a href=\"index.php?tab=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">'.translate("Click here to see that order").'</a></li>";
|
||||
html += "<li>'.translate("A new order has been made on your shop : ").'<br />'.translate("Order number : ").'<strong>#" + parseInt(value.id_order) + "</strong><br />'.translate("Total : ").'<strong>" + parseInt(value.total_paid_real) + "</strong><br />'.translate("From : ").'<strong>" + value.customer_name + "</strong><br /><a href=\"index.php?tab=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">'.translate("Click here to see that order").'</a></li>";
|
||||
});
|
||||
if (html != "")
|
||||
{
|
||||
@@ -95,6 +96,7 @@ echo '
|
||||
// Add customers notifications to the list
|
||||
html = "";
|
||||
nb_notifs = 0;
|
||||
console.log(json);
|
||||
$.each(json.customer, function(property, value) {
|
||||
html += "<li>'.translate("A new customer registered on your shop.").'<br /><a href=\"index.php?tab=AdminCustomers&token='.Tools::getAdminTokenLite('AdminCustomers').'&viewcustomer&id_customer=" + parseInt(value.id_customer) + "\">'.translate("Click here to see that customer").'</a></li>";
|
||||
});
|
||||
@@ -114,6 +116,7 @@ echo '
|
||||
// Add messages notifications to the list
|
||||
html = "";
|
||||
nb_notifs = 0;
|
||||
console.log(json);
|
||||
$.each(json.message, function(property, value) {
|
||||
html += "<li>'.translate("A new message posted on your shop.").'<br /><a href=\"index.php?tab=AdminOrders&token='.Tools::getAdminTokenLite('AdminOrders').'&vieworder&id_order=" + parseInt(value.id_order) + "\">'.translate("Click here to see that message").'</a></li>";
|
||||
});
|
||||
@@ -155,24 +158,24 @@ echo ' var html = "";
|
||||
var wrapper_id = "";
|
||||
var type = new Array();
|
||||
|
||||
$(".notifs").live("click", function(){
|
||||
wrapper_id = $(this).attr("id");
|
||||
type = wrapper_id.split("s_notif")
|
||||
$.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) {
|
||||
if(data)
|
||||
{
|
||||
if(!$("#" + wrapper_id + "_wrapper").is(":visible"))
|
||||
{
|
||||
$(".notifs_wrapper").hide();
|
||||
$("#" + wrapper_id + "_number_wrapper").hide();
|
||||
$("#" + wrapper_id + "_wrapper").show();
|
||||
}else
|
||||
{
|
||||
$("#" + wrapper_id + "_wrapper").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
// $(".notifs").live("click", function(){
|
||||
// wrapper_id = $(this).attr("id");
|
||||
// type = wrapper_id.split("s_notif")
|
||||
// $.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) {
|
||||
// if(data)
|
||||
// {
|
||||
// if(!$("#" + wrapper_id + "_wrapper").is(":visible"))
|
||||
// {
|
||||
// $(".notifs_wrapper").hide();
|
||||
// $("#" + wrapper_id + "_number_wrapper").hide();
|
||||
// $("#" + wrapper_id + "_wrapper").show();
|
||||
// }else
|
||||
// {
|
||||
// $("#" + wrapper_id + "_wrapper").hide();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
$("#main").click(function(){
|
||||
$(".notifs_wrapper").hide();
|
||||
|
||||
Reference in New Issue
Block a user