From c137f9c5acdb896a04569c5276cc53eaa68a5b2b Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Tue, 18 Mar 2014 06:11:00 +0700 Subject: Login dialog in javascript --- src/java/com/juick/http/www/UserThread.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/java/com/juick/http/www/UserThread.java') diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 8496fbe4..6b42d4a1 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -260,9 +260,9 @@ public class UserThread { out.println(""); @@ -273,7 +273,7 @@ public class UserThread { } } - public static void printTree(PrintWriter out, ArrayList replies, int ReplyTo, int margin, boolean hidden) { + public static void printTree(PrintWriter out, ArrayList replies, com.juick.User visitor, int ReplyTo, int margin, boolean hidden) { if (margin > 240) { margin = 240; } @@ -302,6 +302,8 @@ public class UserThread { if (msg.VisitorCanComment) { out.println(" "); out.println("
"); + } else if (visitor == null) { + out.println(" "); } int childs = msg.getChildsCount(); @@ -313,15 +315,15 @@ public class UserThread { out.println(" "); if (ReplyTo == 0 && childs > 1 && replies.size() > 10) { - printTree(out, msg.childs, msg.RID, margin + 20, true); + printTree(out, msg.childs, visitor, msg.RID, margin + 20, true); } else if (childs > 0) { - printTree(out, msg.childs, msg.RID, margin + 20, hidden); + printTree(out, msg.childs, visitor, msg.RID, margin + 20, hidden); } } } } - public static void printList(PrintWriter out, ArrayList replies) { + public static void printList(PrintWriter out, ArrayList replies, com.juick.User visitor) { for (int i = 0; i < replies.size(); i++) { com.juick.Message msg = replies.get(i); @@ -342,6 +344,8 @@ public class UserThread { if (msg.VisitorCanComment) { out.println(" · Ответить"); out.println("
"); + } else if (visitor == null) { + out.println(" "); } out.println(" "); out.println(" "); -- cgit v1.2.3