mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-08-20 17:28:48 +02:00
* include/functions_html.php, include/functions.php: cleaned source code style. * extensions/extension_uploader.php: fixed the upload enterprise extension. Fixes: #3532208 MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6609 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
49 lines
929 B
JavaScript
49 lines
929 B
JavaScript
function check_new_chats_icon(id_icon) {
|
|
if (new_chat) {
|
|
$("#" + id_icon).pulsate ();
|
|
}
|
|
}
|
|
|
|
function check_new_chats_icon_ajax(id_icon) {
|
|
var exit = false;
|
|
|
|
url_chunks = location.href.split('&');
|
|
$.each(url_chunks, function(key, chunk) {
|
|
if (chunk == 'sec2=operation/users/webchat')
|
|
exit = true;
|
|
return;
|
|
});
|
|
|
|
if (exit) {
|
|
return;
|
|
}
|
|
|
|
old = global_counter_chat;
|
|
get_last_global_counter();
|
|
|
|
if (old < global_counter_chat) {
|
|
$("#" + id_icon).pulsate ();
|
|
}
|
|
|
|
setTimeout("check_new_chats_icon(\"" + id_icon + "\")", 5000);
|
|
}
|
|
|
|
function get_last_global_counter() {
|
|
var parameters = {};
|
|
parameters['page'] = "operation/users/webchat";
|
|
parameters['get_last_global_counter'] = 1;
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: 'ajax.php',
|
|
data: parameters,
|
|
dataType: "json",
|
|
async: false,
|
|
success: function(data) {
|
|
if (data['correct'] == 1) {
|
|
global_counter_chat = data['global_counter'];
|
|
}
|
|
}
|
|
});
|
|
}
|