update ajax notifications in menu.tpl

pull/2731/head
Alex Aragón 7 years ago
parent 45d0ce1e31
commit a08ec978ec
  1. 5
      main/template/default/layout/menu.tpl

@ -3,11 +3,12 @@
<script>
$(document).ready(function () {
$.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_message', function(data) {
if (data === '0') {
var countNotifications = (data.ms_friends + data.ms_groups + data.ms_inbox);
if (countNotifications === 0 ) {
$("#count_message_li").addClass('hidden');
} else {
$("#count_message_li").removeClass('hidden');
$("#count_message").append(data);
$("#count_message").append(countNotifications);
}
});
});

Loading…
Cancel
Save