aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/NewMessage.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-22 16:51:43 +0300
committerGravatar Vitaly Takmazov2016-07-27 13:52:02 +0300
commitd3454e70a5855164d17c563fe15e8674b5a5ae2e (patch)
treefda0c9da5e44de736f0215b3d6c63872329b0544 /juick-www/src/main/java/com/juick/www/NewMessage.java
parentdbc48e0d220107ac0887d21f2144665f4eea5aab (diff)
* drop jQuery dependency
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/NewMessage.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/NewMessage.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/juick-www/src/main/java/com/juick/www/NewMessage.java b/juick-www/src/main/java/com/juick/www/NewMessage.java
index a179fac8..c6a1aae8 100644
--- a/juick-www/src/main/java/com/juick/www/NewMessage.java
+++ b/juick-www/src/main/java/com/juick/www/NewMessage.java
@@ -60,10 +60,11 @@ public class NewMessage {
this.imgDir = imgDir;
}
- protected void doGetNewMessage(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response, com.juick.User visitor) throws ServletException, IOException {
+ protected void doGetNewMessage(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response,
+ com.juick.User visitor) throws ServletException, IOException {
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
- PageTemplates.pageHead(out, "Написать", "<script src=\"//maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAVVtPtxkw4soCEHg44FsNChRB4OFYjAXt73He16Zkp6a_0tPs2RTU6i6UlcMs4QvPBYvIY8rWvcxqOg\" type=\"text/javascript\"></script>"
+ PageTemplates.pageHead(out, visitor, "Написать", "<script src=\"//maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAVVtPtxkw4soCEHg44FsNChRB4OFYjAXt73He16Zkp6a_0tPs2RTU6i6UlcMs4QvPBYvIY8rWvcxqOg\" type=\"text/javascript\"></script>"
+ "<script src=\"//static.juick.com/mc.js\" type=\"text/javascript\" defer=\"defer\"></script>"
+ "<script src=\"//static.juick.com/maps.js?2010111500\" type=\"text/javascript\" defer=\"defer\"></script>"
+ "<script src=\"//static.juick.com/post3.js\" type=\"text/javascript\" defer=\"defer\"></script>");
@@ -250,7 +251,7 @@ public class NewMessage {
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
- PageTemplates.pageHead(out, "Сообщение опубликовано", null);
+ PageTemplates.pageHead(out, visitor, "Сообщение опубликовано", null);
PageTemplates.pageNavigation(out, visitor, null);
PageTemplates.pageHomeColumn(out, sql, visitor);
@@ -277,14 +278,14 @@ public class NewMessage {
out.println("<h1>Сообщение опубликовано</h1>");
out.println("<p>Поделитесь своим новым постом в социальных сетях:</p>");
if (CrosspostQueries.getTwitterTokens(sql, visitor.getUID()).isPresent()) {
- out.println("<p><a href=\"https://twitter.com/intent/tweet?text=" + URLEncoder.encode(sharetwi, "utf-8") + "\" onclick=\"return openSocialWindow(this)\" class=\"ico32-twi sharenew\">Отправить в Twitter</a></p>");
+ out.println("<p class=\"social\"><a href=\"https://twitter.com/intent/tweet?text=" + URLEncoder.encode(sharetwi, "utf-8") + "\" class=\"ico32-twi sharenew\">Отправить в Twitter</a></p>");
}
- out.println("<p><a href=\"http://www.livejournal.com/update.bml?subject=" + URLEncoder.encode(hashtags, "utf-8") + "&event=" + sharelj + "&prop_taglist=" + URLEncoder.encode(tagscomma, "utf-8") + "\" target=\"_blank\" class=\"ico32-lj sharenew\">Отправить в LiveJournal</a></p>");
- out.println("<p><a href=\"https://vk.com/share.php?url=" + url + "\" onclick=\"return openSocialWindow(this)\" class=\"ico32-vk sharenew\">Отправить в ВКонтакте</a></p>");
+ out.println("<p class=\"social\"><a href=\"http://www.livejournal.com/update.bml?subject=" + URLEncoder.encode(hashtags, "utf-8") + "&event=" + sharelj + "&prop_taglist=" + URLEncoder.encode(tagscomma, "utf-8") + "\" target=\"_blank\" class=\"ico32-lj sharenew\">Отправить в LiveJournal</a></p>");
+ out.println("<p class=\"social\"><a href=\"https://vk.com/share.php?url=" + url + "\" class=\"ico32-vk sharenew\">Отправить в ВКонтакте</a></p>");
if (CrosspostQueries.getFacebookToken(sql, visitor.getUID()).isPresent()) {
- out.println("<p><a href=\"https://www.facebook.com/sharer/sharer.php?u=" + url + "\" onclick=\"return openSocialWindow(this)\" class=\"ico32-fb sharenew\">Отправить в Facebook</a></p>");
+ out.println("<p class=\"social\"><a href=\"https://www.facebook.com/sharer/sharer.php?u=" + url + "\" class=\"ico32-fb sharenew\">Отправить в Facebook</a></p>");
}
- out.println("<p><a href=\"https://plus.google.com/share?url=" + url + "\" onclick=\"return openSocialWindow(this)\" class=\"ico32-gp sharenew\">Отправить в Google+</a></p>");
+ out.println("<p class=\"social\"><a href=\"https://plus.google.com/share?url=" + url + "\" class=\"ico32-gp sharenew\">Отправить в Google+</a></p>");
out.println("<p>Ссылка на сообщение: <a href=\"http://juick.com/" + mid + "\">http://juick.com/" + mid + "</a></p>");
out.println("</section>");