aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www
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
parent52c8d049af6c0963b63dd1e70f66128527a7cba5 (diff)
message number dialog
Diffstat (limited to 'src/java/com/juick/http/www')
-rw-r--r--src/java/com/juick/http/www/Blogs.java1
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java28
-rw-r--r--src/java/com/juick/http/www/User.java4
-rw-r--r--src/java/com/juick/http/www/UserThread.java10
4 files changed, 36 insertions, 7 deletions
diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java
index 1bb308c5..3260a2cb 100644
--- a/src/java/com/juick/http/www/Blogs.java
+++ b/src/java/com/juick/http/www/Blogs.java
@@ -189,6 +189,7 @@ public class Blogs {
out.println("</div>"); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
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>");
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index de0375f3..d8c179b5 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -126,6 +126,7 @@ public class User {
out.println("</div>");
out.println("</div>"); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -156,6 +157,7 @@ public class User {
out.println("</div>");
out.println("</div>");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -206,6 +208,7 @@ public class User {
out.println("</div>");
out.println("</div>");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -256,6 +259,7 @@ public class User {
out.println("</div>");
out.println("</div>");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index a0bb3a86..5beb6b61 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -79,6 +79,7 @@ public class UserThread {
out.println("</div>");
out.println("</div>"); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -106,6 +107,9 @@ public class UserThread {
tags += " *friends";
break;
case -2:
+ tags += " *friends";
+ break;
+ case -3:
tags += " *private";
break;
}
@@ -113,7 +117,7 @@ public class UserThread {
out.println("<ul>");
out.println(" <li id=\"msg-" + mid + "\" class=\"msg msgthread\">");
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\">" + PageTemplates.formatJSLocalTime(msg.TimestampString) + "</div>");
+ out.println(" <div class=\"msg-ts\">" + PageTemplates.formatJSLocalTime(msg.TimestampString) + "<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 && msg.Place.pid > 0) {
out.println(" <div class=\"msg-place\">" + msg.Place.name + "</div>");
@@ -292,7 +296,7 @@ public class UserThread {
}
}
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.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a><a href=\"#\" onclick=\"showMessageLinksDialog(" + msg.MID + "," + msg.RID + "); 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>:</div>");
out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>");
if (msg.VisitorCanComment) {
@@ -331,7 +335,7 @@ public class UserThread {
}
}
out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.User.UName + "/\"><img src=\"//i.juick.com/a/" + msg.User.UID + ".png\"></a></div>");
- out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString, locale) + "</a><a href=\"#\" onclick=\"showMessageLinksDialog(" + msg.MID + "," + msg.RID + "); 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>:</div>");
out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>");
out.print(" <div class=\"msg-links\">/" + msg.RID);