aboutsummaryrefslogtreecommitdiff
path: root/src/java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-03-09 00:03:32 +0700
committerGravatar Ugnich Anton2014-03-09 00:03:32 +0700
commitf99f153619d99cd0ca44de17a22926436160d940 (patch)
treeea62c63ae008e9122d977522e3a94af65829fb4e /src/java
parentd39d1bf69b4de2d8f12d4a7547cd9f7938dc1a52 (diff)
Photos in a lightbox
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/juick/http/www/Discover.java1
-rw-r--r--src/java/com/juick/http/www/Home.java1
-rw-r--r--src/java/com/juick/http/www/PM.java2
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java27
-rw-r--r--src/java/com/juick/http/www/User.java4
-rw-r--r--src/java/com/juick/http/www/UserThread.java1
6 files changed, 7 insertions, 29 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index d80bffdc..747a3947 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -96,7 +96,6 @@ public class Discover {
PageTemplates.pageFooter(request, out, visitor, true);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java
index f7b4ca2a..c3a93107 100644
--- a/src/java/com/juick/http/www/Home.java
+++ b/src/java/com/juick/http/www/Home.java
@@ -144,7 +144,6 @@ public class Home {
PageTemplates.pageFooter(request, out, visitor, true);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java
index 65daf837..2aa0e0f2 100644
--- a/src/java/com/juick/http/www/PM.java
+++ b/src/java/com/juick/http/www/PM.java
@@ -101,7 +101,6 @@ public class PM {
PageTemplates.pageFooter(request, out, visitor, true);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -175,7 +174,6 @@ public class PM {
out.println("</section>");
PageTemplates.pageFooter(request, out, visitor, true);
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index f9cce99e..535ec26f 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -52,9 +52,9 @@ public class PageTemplates {
out.println("<!DOCTYPE html>");
out.print("<html>");
out.print("<head>");
- out.print("<link rel=\"stylesheet\" href=\"/style.2014030800.css\"/>");
+ out.print("<link rel=\"stylesheet\" href=\"/style.2014030803.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=\"/scripts.2014021500.js\" defer=\"defer\"></script>");
+ out.print("<script type=\"text/javascript\" src=\"/scripts.2014030800.js\" defer=\"defer\"></script>");
if (headers != null) {
out.print(headers);
}
@@ -221,22 +221,6 @@ public class PageTemplates {
out.println("<!--/noindex-->");
}
- public static void pageDialogTemplate(PrintWriter out) {
- out.println("<div id=\"dialogb\" onclick=\"$('#dialogb').hide();$('#dialogw').hide()\"></div>");
- out.println("<div id=\"dialogw\">Ссылка на сообщение:");
- out.println("<div id=\"dialogl\" onclick=\"$(this).selectText()\"></div>");
- out.println("Номер сообщения:");
- out.println("<div id=\"dialogn\" onclick=\"$(this).selectText()\"></div>");
- out.println("Поделиться:");
- out.println("<ul>");
- out.println(" <li><a id=\"sharefb\"></a></li>");
- out.println(" <li><a id=\"sharetw\"></a></li>");
- out.println(" <li><a id=\"sharevk\"></a></li>");
- out.println(" <li><a id=\"sharegp\"></a></li>");
- out.println("</ul>");
- out.println("</div>");
- }
-
public static void pageFooter(HttpServletRequest request, PrintWriter out, com.juick.User visitor, boolean sapeon) {
out.println("<div id=\"fwrapper\"><div id=\"footer\">");
out.println(" <div id=\"footer-right\"><a href=\"/settings\" rel=\"nofollow\">Настройки</a> &#183; <a href=\"/help/ru/contacts\" rel=\"nofollow\">Контакты</a> &#183; <a href=\"/help/\" rel=\"nofollow\">Справка</a> &#183; <a href=\"/help/ru/adv\" rel=\"nofollow\">Реклама</a></div>");
@@ -516,11 +500,14 @@ public class PageTemplates {
out.println(" <aside><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\" alt=\"" + msg.User.UName + "\"/></a></aside>");
out.println(" <header class=\"u\">@<a href=\"/" + msg.User.UName + "/\">" + msg.User.UName + "</a>:" + tags + "</header>");
out.println(" <header class=\"t\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\"><time datetime=\"" + msg.TimestampString + "Z\">" + formatDate(msg.TimeAgo, msg.TimestampString) + "</time></a></header>");
+ if (msg.AttachmentType != null) {
+ String fname = msg.MID + "." + msg.AttachmentType;
+ out.println(" <p class=\"ir\"><a href=\"//i.juick.com/photos-512/" + fname + "\" onclick=\"return showPhotoDialog('" + fname + "')\"><img src=\"//i.juick.com/photos-512/" + fname + "\" alt=\"\"/></a></p>");
+ }
out.println(" <p>" + txt + "</p>");
if (msg.AttachmentType != null) {
- out.println(" <p class=\"i\"><a href=\"//i.juick.com/photos-1024/" + msg.MID + "." + msg.AttachmentType + "\"><img src=\"//i.juick.com/photos-512/" + msg.MID + "." + msg.AttachmentType + "\" alt=\"\"/></a></p>");
+ out.println(" <div class=\"irbr\"></div>");
}
-
out.print(" <nav class=\"l\">");
msg.ReadOnly |= blUIDs.contains(msg.User.UID);
if (visitor != null && (msg.ReadOnly == false || visitor.UID == msg.User.UID)) {
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index e969f856..ca5c122f 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -146,7 +146,6 @@ public class User {
PageTemplates.pageFooter(request, out, visitor, true);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -179,7 +178,6 @@ public class User {
PageTemplates.pageFooter(request, out, visitor, false);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -235,7 +233,6 @@ public class User {
PageTemplates.pageFooter(request, out, visitor, false);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -291,7 +288,6 @@ public class User {
PageTemplates.pageFooter(request, out, visitor, false);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index 541af344..80e19bb1 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -82,7 +82,6 @@ public class UserThread {
PageTemplates.pageFooter(request, out, visitor, false);
}
- PageTemplates.pageDialogTemplate(out);
PageTemplates.pageEnd(out);
} finally {
out.close();