aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/PM.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-31 21:44:51 +0700
committerGravatar Ugnich Anton2014-01-31 21:44:51 +0700
commitab78d170650106d1d1113282598b6d8270ef2e76 (patch)
tree4ee839ab0d00cc4cec8ec55e94929cedd782302f /src/java/com/juick/http/www/PM.java
parentcd7016bd09dd1fc21f375765d5cc510a1ad0656b (diff)
Russian as default
Diffstat (limited to 'src/java/com/juick/http/www/PM.java')
-rw-r--r--src/java/com/juick/http/www/PM.java32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java
index ec51d44c..6d8e04ba 100644
--- a/src/java/com/juick/http/www/PM.java
+++ b/src/java/com/juick/http/www/PM.java
@@ -27,8 +27,6 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.util.ArrayList;
-import java.util.Locale;
-import java.util.ResourceBundle;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -40,10 +38,6 @@ import javax.servlet.http.HttpServletResponse;
public class PM {
protected void doGetInbox(Connection sql, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException {
- Locale locale = request.getLocale();
- ResourceBundle rbg = ResourceBundle.getBundle("Global", locale);
- ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale);
-
/*
int paramBefore = 0;
String paramBeforeStr = request.getParameter("before");
@@ -62,9 +56,9 @@ public class PM {
PrintWriter out = response.getWriter();
try {
PageTemplates.pageHead(out, title, null);
- PageTemplates.pageNavigation(out, locale, visitor, null);
+ PageTemplates.pageNavigation(out, visitor, null);
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor);
out.println("<section id=\"content\">");
@@ -79,11 +73,11 @@ public class PM {
out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\" alt=\"" + msg.User.UName + "\"/></a></div>");
out.println(" <div class=\"msg-cont\">");
out.println(" <div class=\"msg-header\"><a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:</div>");
- out.println(" <div class=\"msg-ts\"><a href=\"#\" onclick=\"return false\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"#\" onclick=\"return false\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString) + "</a></div>");
out.println(" <div class=\"msg-txt\">" + txt + "</div>");
out.println(" <form action=\"/pm/send\" method=\"POST\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"uname\" value=\"" + msg.User.UName + "\"/>");
- out.println(" <div class=\"msg-comment\"><div class=\"ta-wrapper\"><textarea name=\"body\" rows=\"1\" class=\"replypm\" placeholder=\"" + rbg.getString("Reply") + "\" onkeypress=\"postformListener(this.form,event)\"></textarea></div></div>");
+ out.println(" <div class=\"msg-comment\"><div class=\"ta-wrapper\"><textarea name=\"body\" rows=\"1\" class=\"replypm\" placeholder=\"Написать ответ\" onkeypress=\"postformListener(this.form,event)\"></textarea></div></div>");
out.println(" </form>");
out.println(" </div>");
@@ -101,8 +95,8 @@ public class PM {
out.println("</section>");
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- PageTemplates.pageDialogTemplate(out, locale);
+ PageTemplates.pageFooter(request, out, visitor, true);
+ PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -110,10 +104,6 @@ public class PM {
}
protected void doGetSent(Connection sql, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException {
- Locale locale = request.getLocale();
- ResourceBundle rbg = ResourceBundle.getBundle("Global", locale);
- ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale);
-
/*
int paramBefore = 0;
String paramBeforeStr = request.getParameter("before");
@@ -137,9 +127,9 @@ public class PM {
PrintWriter out = response.getWriter();
try {
PageTemplates.pageHead(out, title, null);
- PageTemplates.pageNavigation(out, locale, visitor, null);
+ PageTemplates.pageNavigation(out, visitor, null);
- PageTemplates.pageHomeColumn(out, sql, visitor, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor);
out.println("<section id=\"content\">");
@@ -162,7 +152,7 @@ public class PM {
out.println(" <div class=\"msg-avatar\"><img src=\"//i.juick.com/a/" + visitor.UID + ".png\"/></div>");
out.println(" <div class=\"msg-cont\">");
out.println(" <div class=\"msg-header\">→ <a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:</div>");
- out.println(" <div class=\"msg-ts\"><a href=\"#\" onclick=\"return false\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"#\" onclick=\"return false\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString) + "</a></div>");
out.println(" <div class=\"msg-txt\">" + txt + "</div>");
out.println(" </div>");
out.println(" </li>");
@@ -179,8 +169,8 @@ public class PM {
out.println("</section>");
- PageTemplates.pageFooter(request, out, locale, visitor, true);
- PageTemplates.pageDialogTemplate(out, locale);
+ PageTemplates.pageFooter(request, out, visitor, true);
+ PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();