diff options
author | 2013-10-24 21:10:51 +0700 | |
---|---|---|
committer | 2013-10-24 21:10:51 +0700 | |
commit | d91993206614320bfea5b72b0a486b0adb9b965a (patch) | |
tree | 2c71e292f7e4c7ad01ffcb1221fa6cebb9d43b1a /web/scripts3.js | |
parent | 23ed8e10c1ced621413f116d3a324a2758949ec8 (diff) |
PM reply form; bugfixes.
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index 9b16e33a..3517ee56 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({ |