aboutsummaryrefslogtreecommitdiff
path: root/src/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
parent52c8d049af6c0963b63dd1e70f66128527a7cba5 (diff)
message number dialog
Diffstat (limited to 'src/java')
-rw-r--r--src/java/Global.properties3
-rw-r--r--src/java/Global_ru.properties3
-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
6 files changed, 42 insertions, 7 deletions
diff --git a/src/java/Global.properties b/src/java/Global.properties
index 164b57a2..706e258f 100644
--- a/src/java/Global.properties
+++ b/src/java/Global.properties
@@ -24,3 +24,6 @@ Block\ user=Block user
Send\ private\ message=Send private message
Recommend\ message=Recommend message
in\ reply\ to=in reply to
+(Dialog)\ Link\ to\ message=Permanent link to this message
+(Dialog)\ Message\ number=Message number
+(Dialog)\ Share=Share in social networks
diff --git a/src/java/Global_ru.properties b/src/java/Global_ru.properties
index b98693da..a7c7e9d5 100644
--- a/src/java/Global_ru.properties
+++ b/src/java/Global_ru.properties
@@ -24,3 +24,6 @@ Block\ user=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u
Send\ private\ message=\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
Recommend\ message=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
in\ reply\ to=\u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430
+(Dialog)\ Link\ to\ message=\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
+(Dialog)\ Message\ number=\u041d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f
+(Dialog)\ Share=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445
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);