aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/PageTemplates.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-12-16 12:01:39 +0700
committerGravatar Ugnich Anton2012-12-16 12:01:39 +0700
commit52f88dbb3c2e81e1b658b95ff91236db1a1fe03a (patch)
treef3cde3e04f175fd079416bdfc5d93bd43595c0f4 /src/java/com/juick/http/www/PageTemplates.java
parent52c8d049af6c0963b63dd1e70f66128527a7cba5 (diff)
message number dialog
Diffstat (limited to 'src/java/com/juick/http/www/PageTemplates.java')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 2ec42e42..10b372a0 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -55,11 +55,11 @@ public class PageTemplates {
out.println("<html>");
out.println("<head>");
out.println(" <title>" + title + "</title>");
- out.println(" <link rel=\"stylesheet\" href=\"//static.juick.com/style3.2012110404.css\"/>");
+ out.println(" <link rel=\"stylesheet\" href=\"//static.juick.com/style3.2012111100.css\"/>");
out.println(" <link rel=\"icon\" type=\"image/png\" href=\"//static.juick.com/favicon.png\"/>");
out.println(" <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\" defer=\"defer\"></script>");
out.println(" <script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\" defer=\"defer\" async=\"async\"></script>");
- out.println(" <script type=\"text/javascript\" src=\"//static.juick.com/scripts3.2012110400.js\" defer=\"defer\"></script>");
+ out.println(" <script type=\"text/javascript\" src=\"//static.juick.com/scripts3.2012111101.js\" defer=\"defer\"></script>");
if (headers != null) {
out.println(headers);
}
@@ -146,6 +146,23 @@ public class PageTemplates {
out.println();
}
+ public static void pageDialogTemplate(PrintWriter out, Locale locale) {
+ ResourceBundle rb = ResourceBundle.getBundle("Global", locale);
+ out.println("<div id=\"dialogb\" onclick=\"$('#dialogb').hide();$('#dialogw').hide()\"></div>");
+ out.println("<div id=\"dialogw\">" + rb.getString("(Dialog) Link to message") + ":");
+ out.println("<div id=\"dialogl\"></div>");
+ out.println(rb.getString("(Dialog) Message number") + ":");
+ out.println("<div id=\"dialogn\"></div>");
+ out.println(rb.getString("(Dialog) Share") + ":");
+ 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, Locale loc, com.juick.User visitor) {
ResourceBundle rb = ResourceBundle.getBundle("Global", loc);
out.println("<div id=\"fwrapper\"><div id=\"footer\">");
@@ -293,7 +310,7 @@ public class PageTemplates {
ArrayList<Integer> blUIDs = new ArrayList<Integer>(20);
if (visitor != null) {
- for (int i = 0; i < mids.size(); i++) {
+ for (int i = 0; i < msgs.size(); i++) {
blUIDs.add(msgs.get(i).User.UID);
}
blUIDs = UserQueries.checkBL(sql, visitor.UID, blUIDs);
@@ -314,13 +331,16 @@ public class PageTemplates {
tags += " *friends";
break;
case -2:
+ tags += " *friends";
+ break;
+ case -3:
tags += " *private";
break;
}
out.println(" <li id=\"msg-" + msg.MID + "\" class=\"msg\">");
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-ts\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\" title=\"" + msg.TimestampString + " GMT\">" + formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.User.UName + "/" + msg.MID + "\" title=\"" + msg.TimestampString + " GMT\">" + formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a><a href=\"#\" onclick=\"showMessageLinksDialog(" + msg.MID + "); return false\" class=\"msg-menu\"><img src=\"http://static.juick.com/message-menu-icon.png\"></a></div>");
out.println(" <div class=\"msg-header\"><a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:" + tags + "</div>");
if (msg.Place != null) {
out.println(" <div class=\"msg-place\">" + msg.Place.name + "</div>");