From 52f88dbb3c2e81e1b658b95ff91236db1a1fe03a Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 16 Dec 2012 12:01:39 +0700 Subject: message number dialog --- src/java/com/juick/http/www/Blogs.java | 1 + src/java/com/juick/http/www/PageTemplates.java | 28 ++++++++++++++++++++++---- src/java/com/juick/http/www/User.java | 4 ++++ src/java/com/juick/http/www/UserThread.java | 10 ++++++--- 4 files changed, 36 insertions(+), 7 deletions(-) (limited to 'src/java/com/juick/http') 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(""); // 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(""); out.println(""); out.println(" " + title + ""); - out.println(" "); + out.println(" "); out.println(" "); out.println(" "); out.println(" "); - out.println(" "); + out.println(" "); 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("
"); + out.println("
" + rb.getString("(Dialog) Link to message") + ":"); + out.println("
"); + out.println(rb.getString("(Dialog) Message number") + ":"); + out.println("
"); + out.println(rb.getString("(Dialog) Share") + ":"); + out.println(""); + out.println("
"); + } + public static void pageFooter(HttpServletRequest request, PrintWriter out, Locale loc, com.juick.User visitor) { ResourceBundle rb = ResourceBundle.getBundle("Global", loc); out.println("
"); @@ -293,7 +310,7 @@ public class PageTemplates { ArrayList blUIDs = new ArrayList(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("
  • "); out.println("
    \""
    "); - out.println(" "); + out.println(" "); out.println(" "); if (msg.Place != null) { out.println("
    " + msg.Place.name + "
    "); 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("
  • "); out.println("
    "); // topwrapper + PageTemplates.pageDialogTemplate(out, locale); PageTemplates.pageFooter(request, out, locale, visitor); } finally { out.close(); @@ -156,6 +157,7 @@ public class User { out.println(""); out.println(""); + PageTemplates.pageDialogTemplate(out, locale); PageTemplates.pageFooter(request, out, locale, visitor); } finally { out.close(); @@ -206,6 +208,7 @@ public class User { out.println(""); out.println(""); + PageTemplates.pageDialogTemplate(out, locale); PageTemplates.pageFooter(request, out, locale, visitor); } finally { out.close(); @@ -256,6 +259,7 @@ public class User { out.println(""); out.println(""); + 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(""); out.println(""); // 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("