Fixe le comportement du chat

This commit is contained in:
2017-03-16 17:13:47 +01:00
parent 1eaa0021cb
commit 5a4f654978

View File

@ -46,11 +46,16 @@
<script src="~/api/signalr/hubs"></script>
<!--SignalR script to update the chat page and send messages.-->
<script>
$(function () {
var pvuis;
var audio = new Audio('/sounds/bell.mp3');
// This optional function html-encodes messages for display in the page.
function htmlEncode(value) {
var encodedValue = $('<div />').text(value).html();
return encodedValue;
}
var setPrivate = function (li) {
console.log("here I am");
$("#sendmessagebox").addClass("hidden");
@ -95,6 +100,7 @@
);
};
$(document).ready(function(){
// Reference the auto-generated proxy for the hub.
var chat = $.connection.chatHub;
// Create a function that the hub can call back to display messages.
@ -216,15 +222,7 @@
}, 3000); // Re-start connection after 3 seconds
});
});
$(window).unload(function () { chat.server.abort(); });
});
// This optional function html-encodes messages for display in the page.
function htmlEncode(value) {
var encodedValue = $('<div />').text(value).html();
return encodedValue;
}
</script>