diff --git a/APPL/CHAT/ChatterClose.asp b/APPL/CHAT/ChatClose.asp similarity index 85% rename from APPL/CHAT/ChatterClose.asp rename to APPL/CHAT/ChatClose.asp index ec7bd2dfe6..e0841a542e 100644 --- a/APPL/CHAT/ChatterClose.asp +++ b/APPL/CHAT/ChatClose.asp @@ -16,7 +16,7 @@ var JSON_Result = true; <% -var acceptchannelId = getQParam("channelId"); +var acceptchannelId = getFParam("channelId"); var chat_queue = JSON.parse(Application(chat_queue_name) || "{}"); if (acceptchannelId in chat_queue.accepting) @@ -27,7 +27,7 @@ Application.Lock(); Application(chat_queue_name) = JSON.stringify(chat_queue); Application.UnLock(); -result = { status: "OK" }; +result = {}; Response.Write(JSON.stringify(result)); diff --git a/APPL/CHAT/ChatQueueAlive.asp b/APPL/CHAT/ChatQueueAlive.asp index 7c9cf83833..4bd50a8f79 100644 --- a/APPL/CHAT/ChatQueueAlive.asp +++ b/APPL/CHAT/ChatQueueAlive.asp @@ -16,16 +16,20 @@ var JSON_Result = true; <% var wantchannelId = getQParam("channelId"); - var chat_queue = JSON.parse(Application(chat_queue_name) || "{}"); if (wantchannelId in chat_queue.wanting) +{ chat_queue.wanting[wantchannelId].alive = new Date().getTime(); -Application.Lock(); -Application(chat_queue_name) = JSON.stringify(chat_queue); -Application.UnLock(); - -result = chat_queue; + Application.Lock(); + Application(chat_queue_name) = JSON.stringify(chat_queue); + Application.UnLock(); +} +var result = {hasChatOnline: 0}; +for (var ch in chat_queue.accepting) +{ + result.hasChatOnline++; +} Response.Write(JSON.stringify(result)); diff --git a/APPL/CHAT/ChatterAccept.asp b/APPL/CHAT/ChatterAccept.asp index 4f708f8e00..7b99b683d9 100644 --- a/APPL/CHAT/ChatterAccept.asp +++ b/APPL/CHAT/ChatterAccept.asp @@ -44,6 +44,7 @@ Application.UnLock(); FcltMgr.startEdit(window); // maakt hem hot var acceptchannelId = "<%=acceptchannelId%>"; var dis_key = <%=dis_key%>; + function accept_chat(x, y) { var wantId = $(this).data("wantid"); @@ -53,6 +54,7 @@ Application.UnLock(); FcltMgr.openDetail( "appl/chat/Chatter.asp?chatsendid=" + wantId + "&prs_key=" + prs_key + "&message=" + escape(message) + "&accept=1&naam=" + naam, L("lcl_chatter_incoming").format(naam)); view_queue(); // op de achtergrond blijven refreshen } + async function show_queue(data) { //$("#chatqueue").html("