|
|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|