diff options
author | 2013-09-08 16:59:47 +0700 | |
---|---|---|
committer | 2013-09-08 16:59:47 +0700 | |
commit | f284025bba8c1812d9093e266428dc670258d673 (patch) | |
tree | 166fe4d39d162a4405ab8ced4cc63768fcc35120 /src/java/com/juick | |
parent | 02fa30624211b46c8f2adcd0c459ffeb1c35a743 (diff) |
dev
Diffstat (limited to 'src/java/com/juick')
-rw-r--r-- | src/java/com/juick/http/www/Dev.java | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/java/com/juick/http/www/Dev.java b/src/java/com/juick/http/www/Dev.java index 480491e0..cfd54aea 100644 --- a/src/java/com/juick/http/www/Dev.java +++ b/src/java/com/juick/http/www/Dev.java @@ -17,11 +17,12 @@ */ package com.juick.http.www; +import com.juick.json.Users; +import com.juick.server.PMQueries; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; -import java.util.Locale; -import java.util.ResourceBundle; +import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -51,13 +52,33 @@ public class Dev { out.println("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>"); out.println("<script type=\"text/javascript\" src=\"//static.juick.com/scripts4.js\"></script>"); out.println("<title>Juick</title>"); + out.println("<link id=\"favicon\" rel=\"icon\" href=\"//i.juick.com/favicon.png\"/>"); out.println("</head>"); out.flush(); out.println("<body>"); + out.println("<div id=\"toppanel\"></div>"); + out.println("<div id=\"content\"></div>"); + out.println("<div id=\"bottompanel\"></div>"); + out.println("<div id=\"sidepanel\">"); + out.println(" <ul id=\"groupslist\">"); + out.println(" <li><a href=\"#\" onclick=\"return showMessages('')\">All messages</a></li>"); + out.println(" </ul>"); + out.println(" <hr/>"); + out.println(" <ul id=\"pmulist\"></ul>"); + out.println("</div>"); + + ArrayList<com.juick.User> lastconv = PMQueries.getPMLastConversationsUsers(sql, visitor.UID, 10); + String lastConvJSON = Users.arrayToString(lastconv); + out.println("<script type=\"text/javascript\">"); out.println("var hash='" + Utils.getCookie(request, "hash") + "';"); out.println("var user_id=" + visitor.UID + ";"); + out.println("var lastConversations=" + lastConvJSON + ";"); + out.println("$(document).ready(function() {"); + out.println(" initPMUList(lastConversations);"); + out.println(" initWS();"); + out.println("});"); out.println("</script>"); out.println("</body></html>"); |