Implemente la notification de connection
Ok coté serveur, et interface web manque le client mobile
This commit is contained in:
parent
eaafeeebbc
commit
dfef2127e0
3 changed files with 58 additions and 42 deletions
|
|
@ -19,6 +19,8 @@
|
|||
</ul>
|
||||
<ul id="private">
|
||||
</ul>
|
||||
<ul id="chatnotifs">
|
||||
</ul>
|
||||
</div>
|
||||
@section scripts {
|
||||
<!--Script references. -->
|
||||
|
|
@ -43,6 +45,11 @@
|
|||
$('#private').append('<li><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>');
|
||||
};
|
||||
chat.client.notify = function (tag, message) {
|
||||
// Add the pv to the page.
|
||||
$('#chatnotifs').append('<li><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(message) + '</li>');
|
||||
};
|
||||
// Get the user name and store it to prepend to messages.
|
||||
$('#displayname').val(prompt('Enter your name:', ''));
|
||||
// Set initial focus to message input box.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue