diff options
author | Ugnich Anton | 2013-10-24 21:10:51 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-10-24 21:10:51 +0700 |
commit | d91993206614320bfea5b72b0a486b0adb9b965a (patch) | |
tree | 2c71e292f7e4c7ad01ffcb1221fa6cebb9d43b1a | |
parent | 23ed8e10c1ced621413f116d3a324a2758949ec8 (diff) |
PM reply form; bugfixes.
-rw-r--r-- | src/java/Blogs.properties | 1 | ||||
-rw-r--r-- | src/java/Blogs_ru.properties | 1 | ||||
-rw-r--r-- | src/java/Global.properties | 3 | ||||
-rw-r--r-- | src/java/Global_ru.properties | 3 | ||||
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 5 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 4 | ||||
-rw-r--r-- | web/scripts3.js | 21 | ||||
-rw-r--r-- | web/style3.css | 10 |
8 files changed, 24 insertions, 24 deletions
diff --git a/src/java/Blogs.properties b/src/java/Blogs.properties index d5c6fd26..22ce41d5 100644 --- a/src/java/Blogs.properties +++ b/src/java/Blogs.properties @@ -12,3 +12,4 @@ Recommended=Recommended All\ messages=All messages Popular=Popular With\ photos=With photos +LoginToReadMore=Sign in to read more diff --git a/src/java/Blogs_ru.properties b/src/java/Blogs_ru.properties index b42f32f5..afcea809 100644 --- a/src/java/Blogs_ru.properties +++ b/src/java/Blogs_ru.properties @@ -12,3 +12,4 @@ Recommended=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u All\ messages=\u0412\u0441\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f Popular=\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 With\ photos=\u0421 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043c\u0438 +LoginToReadMore=\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 diff --git a/src/java/Global.properties b/src/java/Global.properties index afb765df..dfc159c2 100644 --- a/src/java/Global.properties +++ b/src/java/Global.properties @@ -28,5 +28,4 @@ Recommend\ message=Recommend message in\ reply\ to=in reply to (Dialog)\ Link\ to\ message=Permanent link to this message (Dialog)\ Message\ number=Message number -(Dialog)\ Share=Share in social networks -LoginToReadMore=Sign in to read more +(Dialog)\ Share=Share in social networks
\ No newline at end of file diff --git a/src/java/Global_ru.properties b/src/java/Global_ru.properties index 84b12e5c..cae0a5e6 100644 --- a/src/java/Global_ru.properties +++ b/src/java/Global_ru.properties @@ -28,5 +28,4 @@ Recommend\ message=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\ in\ reply\ to=\u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 (Dialog)\ Link\ to\ message=\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 (Dialog)\ Message\ number=\u041d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f -(Dialog)\ Share=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 -LoginToReadMore=\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435 +(Dialog)\ Share=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445
\ No newline at end of file diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index dae573ca..d2500993 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -85,9 +85,10 @@ public class Home { out.println("<script type=\"text/javascript\">"); out.println("var hash='" + Utils.getCookie(request, "hash") + "';"); out.println("var user_id=" + visitor.UID + ";"); + out.println("var user_name='" + visitor.UName + "';"); out.println("var lastConversations=" + lastConvJSON + ";"); - out.println("</script>"); - + out.println("</script>"); + out.println("<div id=\"topwrapper\">"); out.println("<div id=\"wrapper\">"); out.println("<div id=\"content\">"); diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 3e08cd97..93eda04d 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -50,10 +50,10 @@ public class PageTemplates { out.println("<!DOCTYPE html>"); out.print("<html>"); out.print("<head>"); - out.print("<link rel=\"stylesheet\" href=\"/style.2013102403.css\"/>"); + out.print("<link rel=\"stylesheet\" href=\"/style.2013102404.css\"/>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\" defer=\"defer\"></script>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>"); - out.print("<script type=\"text/javascript\" src=\"/scripts.2013102401.js\" defer=\"defer\"></script>"); + out.print("<script type=\"text/javascript\" src=\"/scripts.2013102404.js\" defer=\"defer\"></script>"); if (headers != null) { out.print(headers); } 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({ diff --git a/web/style3.css b/web/style3.css index 211c759c..1a2c15c1 100644 --- a/web/style3.css +++ b/web/style3.css @@ -9,11 +9,11 @@ hr { height: 1px; background: #CCC; margin: 10px 0; } pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; } .u { text-decoration: underline; } -#header { width: 880px; } -#topwrapper { width: 860px; } +#header { width: 890px; } +#topwrapper { width: 870px; } #content, #footer { width: 600px; } #header, #topwrapper, #footer { margin: 0 auto; } -#content { margin: 15px 0 0 260px; } +#content { margin: 15px 0 0 270px; } /********/ @@ -97,6 +97,10 @@ blockquote { border-left: 1px dashed #CCC; margin: 10px 0 10px 10px; padding-lef .pm-in { width: 85%; background: #FFF; } .pm-out { margin-left: 15%; background: #DFD; } +#pmreplyform { margin-top: 20px; background: #DDDDD5; padding: 5px 0; text-align: center; } +#pmreplytext { border: 1px solid #999; padding: 4px 5px; width: 515px; margin: 15px 5px 15px 0; } +#pmreplybutton { border: 1px solid #999; padding: 3px 0; width: 35px; background: #CCCCC5} + /********/ #column { width: 230px; top: 0; padding-top: 10px; overflow: hidden; } |