[*] BO : Shows more details for each notification
This commit is contained in:
1 parent
a146e8da1a
commit
fbd186dffa
1 file changed
+22
-19
+22
-19
@@ -76,8 +76,9 @@ echo '
|
|||||||
// Add orders notifications to the list
|
// Add orders notifications to the list
|
||||||
html = "";
|
html = "";
|
||||||
nb_notifs = 0;
|
nb_notifs = 0;
|
||||||
|
console.log(json);
|
||||||
$.each(json.order, function(property, value) {
|
$.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 != "")
|
if (html != "")
|
||||||
{
|
{
|
||||||
@@ -95,6 +96,7 @@ echo '
|
|||||||
// Add customers notifications to the list
|
// Add customers notifications to the list
|
||||||
html = "";
|
html = "";
|
||||||
nb_notifs = 0;
|
nb_notifs = 0;
|
||||||
|
console.log(json);
|
||||||
$.each(json.customer, function(property, value) {
|
$.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>";
|
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
|
// Add messages notifications to the list
|
||||||
html = "";
|
html = "";
|
||||||
nb_notifs = 0;
|
nb_notifs = 0;
|
||||||
|
console.log(json);
|
||||||
$.each(json.message, function(property, value) {
|
$.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>";
|
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 wrapper_id = "";
|
||||||
var type = new Array();
|
var type = new Array();
|
||||||
|
|
||||||
$(".notifs").live("click", function(){
|
// $(".notifs").live("click", function(){
|
||||||
wrapper_id = $(this).attr("id");
|
// wrapper_id = $(this).attr("id");
|
||||||
type = wrapper_id.split("s_notif")
|
// type = wrapper_id.split("s_notif")
|
||||||
$.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) {
|
// $.post("ajax.php",{"updateElementEmployee" : "1", "updateElementEmployeeType" : type[0]}, function(data) {
|
||||||
if(data)
|
// if(data)
|
||||||
{
|
// {
|
||||||
if(!$("#" + wrapper_id + "_wrapper").is(":visible"))
|
// if(!$("#" + wrapper_id + "_wrapper").is(":visible"))
|
||||||
{
|
// {
|
||||||
$(".notifs_wrapper").hide();
|
// $(".notifs_wrapper").hide();
|
||||||
$("#" + wrapper_id + "_number_wrapper").hide();
|
// $("#" + wrapper_id + "_number_wrapper").hide();
|
||||||
$("#" + wrapper_id + "_wrapper").show();
|
// $("#" + wrapper_id + "_wrapper").show();
|
||||||
}else
|
// }else
|
||||||
{
|
// {
|
||||||
$("#" + wrapper_id + "_wrapper").hide();
|
// $("#" + wrapper_id + "_wrapper").hide();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
$("#main").click(function(){
|
$("#main").click(function(){
|
||||||
$(".notifs_wrapper").hide();
|
$(".notifs_wrapper").hide();
|
||||||
|
|||||||
Reference in new issue
Block a user