view my pv
This commit is contained in:
@ -65,11 +65,13 @@
|
|||||||
$("#sendpvbox").removeClass("hidden");
|
$("#sendpvbox").removeClass("hidden");
|
||||||
pvuis = { CXs: $(li).data("cxids"), UserName: $(li).data("name")};
|
pvuis = { CXs: $(li).data("cxids"), UserName: $(li).data("name")};
|
||||||
$('#sendpvdest').html(pvuis.UserName)
|
$('#sendpvdest').html(pvuis.UserName)
|
||||||
|
$('#pv').focus();
|
||||||
}
|
}
|
||||||
var setPublic = function()
|
var setPublic = function()
|
||||||
{
|
{
|
||||||
$("#sendmessagebox").removeClass("hidden");
|
$("#sendmessagebox").removeClass("hidden");
|
||||||
$("#sendpvbox").addClass("hidden");
|
$("#sendpvbox").addClass("hidden");
|
||||||
|
$('#message').focus();
|
||||||
}
|
}
|
||||||
$('#pubChan').css('cursor','pointer');
|
$('#pubChan').css('cursor','pointer');
|
||||||
$('#pubChan').click(setPublic);
|
$('#pubChan').click(setPublic);
|
||||||
@ -175,9 +177,17 @@ $('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
|||||||
// Clear text box and reset focus for next comment.
|
// Clear text box and reset focus for next comment.
|
||||||
$('#message').val('')
|
$('#message').val('')
|
||||||
};
|
};
|
||||||
|
var sendPV = function () {
|
||||||
// Set initial focus to message input box.
|
var msg = $('#pv').val();
|
||||||
$('#message').focus();
|
// Call the Send method on the hub.
|
||||||
|
$.each(pvuis.CXs,function () {
|
||||||
|
chat.server.sendPV( this, msg);
|
||||||
|
});
|
||||||
|
$('#discussion').append('<li class="pv">' + htmlEncode(pvuis.UserName)
|
||||||
|
+ '<< ' + htmlEncode(msg) + '</li>');
|
||||||
|
// Clear text box and reset focus for next comment.
|
||||||
|
$('#pv').val('');
|
||||||
|
}
|
||||||
|
|
||||||
@if (!ViewBag.IsAuthenticated) {
|
@if (!ViewBag.IsAuthenticated) {
|
||||||
// Get the user name and store it to prepend to messages.
|
// Get the user name and store it to prepend to messages.
|
||||||
@ -198,14 +208,14 @@ $('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
|||||||
sendMessage()
|
sendMessage()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$( "#pv" ).keydown(function( event ) {
|
||||||
|
if ( event.which == 13 ) {
|
||||||
|
sendPV()
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#sendpv').click(function () {
|
$('#sendpv').click(function () {
|
||||||
|
|
||||||
// Call the Send method on the hub.
|
// Call the Send method on the hub.
|
||||||
$.each(pvuis.CXs,function () {
|
SendPV().focus();
|
||||||
chat.server.sendPV( this, $('#pv').val());
|
|
||||||
});
|
|
||||||
// Clear text box and reset focus for next comment.
|
|
||||||
$('#pv').val('').focus();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
getUsers();
|
getUsers();
|
||||||
|
Reference in New Issue
Block a user