aboutsummaryrefslogtreecommitdiff
path: root/web/scripts3.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/scripts3.js')
-rw-r--r--web/scripts3.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/web/scripts3.js b/web/scripts3.js
index 9b16e33ad..3517ee56e 100644
--- a/web/scripts3.js
+++ b/web/scripts3.js
@@ -339,21 +339,14 @@ function showPM(uname) {
currentPMUser=uname;
-/*
- var toppanel=$('#toppanel');
- toppanel.css("display","block");
- toppanel.html("<h1>"+uname+"</h1>");
-
- var bottompanel=$('#bottompanel');
- bottompanel.html("<input type=\"text\" name=\"reply\" id=\"replypmtext\" onkeypress=\"sendPMformListener(this.form,event)\"/><input type=\"button\" value=\">\" id=\"replypmbutton\" onclick=\"return sendPM()\"/>");
- bottompanel.css("display","block");
-*/
+ var sendform=$('<div id="pmreplyform"><input type="text" name="reply" id="pmreplytext" onkeypress="sendPMformListener(this.form,event)"/><input type="button" value=">" id="pmreplybutton" onclick="return sendPM()"/>');
var content=$('#content');
content.empty();
content.append(ul);
+ content.append(sendform);
$(window).scrollTop($(document).height());
- //$('#replypmtext').focus();
+ $('#pmreplytext').focus();
});
return false;
}
@@ -365,8 +358,8 @@ function sendPMformListener(formEl,ev) {
}
function sendPM() {
- var replypmtext=$('#replypmtext');
- var replypmbutton=$('#replypmbutton');
+ var replypmtext=$('#pmreplytext');
+ var replypmbutton=$('#pmreplybutton');
replypmtext.prop('disabled', true);
replypmbutton.prop('disabled', true);
@@ -804,7 +797,9 @@ jQuery.fn.selectText = function(){
/******************************************************************************/
$(document).ready(function() {
- initPMUList();
+ if(typeof lastConversations != 'undefined') {
+ initPMUList();
+ }
var tareply=$('textarea.reply');
tareply.autoResize({