PageRenderTime 63ms CodeModel.GetById 35ms RepoModel.GetById 1ms app.codeStats 0ms

/war/niwaruka/member/index.jsp

https://github.com/shinobushiva/Niwaruka
JavaServer Pages | 232 lines | 207 code | 23 blank | 2 comment | 8 complexity | 5964689bd3232b47ba3a047531608f32 MD5 | raw file
  1. <%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
  2. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3. <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
  4. <%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
  5. <%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta charset="utf-8">
  10. <fmt:bundle basename="application" />
  11. <title><fmt:message key="msg.niwaruka" /></title>
  12. <!-- The below script Makes IE understand the new html5 tags are there and applies our CSS to it -->
  13. <!--[if IE]>
  14. <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  15. <![endif]-->
  16. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  17. <meta name="Content-Script-Type" content="text/javascript" />
  18. <meta name="Content-Style-Type" content="text/css" />
  19. <link rel="stylesheet" href="/css/reset.css" />
  20. <link rel="stylesheet"
  21. href="/css/ui-lightness/jquery-ui-1.8.11.custom.css" />
  22. <link rel="stylesheet" href="/css/global.css" />
  23. <link rel="stylesheet" href="/css/style.css" />
  24. <link rel="stylesheet" href="/css/index.css" />
  25. <script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
  26. <script src="/js/niwaruka.utils.js" type="text/javascript"></script>
  27. <script src="/js/niwaruka.member.index.js" type="text/javascript"></script>
  28. <script src="/js/jquery.form.js" type="text/javascript"></script>
  29. <script src="/js/jquery-ui-1.8.11.custom.min.js" type="text/javascript"></script>
  30. <script src="/js/jquery.timer.js" type="text/javascript"></script>
  31. <script src="/js/jquery.inputHintOverlay.js" type="text/javascript"></script>
  32. <script type="text/javascript" src="/_ah/channel/jsapi"></script>
  33. <%@ include file="/shared/i18n.jsp"%>
  34. <script type="text/javascript">
  35. var gUserId = "${userData.key.id}";
  36. $(document).ready(function() {
  37. $('form#tweetForm').inputHintOverlay(5, 7);
  38. });
  39. $(function() {
  40. $('#refreshButton').click(function() {
  41. refresh();
  42. });
  43. refresh();
  44. });
  45. $(function() {
  46. $('#tweetButton').click(function() {
  47. tweet();
  48. });
  49. $('#tweetBox').keydown(function(e) {
  50. if (e.shiftKey && e.keyCode == 13) {
  51. tweet();
  52. return false;
  53. }
  54. });
  55. });
  56. $(document).ready(function() {
  57. // bind 'myForm' and provide a simple callback function
  58. $('#tagsForm').ajaxForm(function() {
  59. //alert("Thank you for your comment!");
  60. });
  61. });
  62. $(document).ready(function() {
  63. var time = 20 * 1000;
  64. $.timer(time, function(timer) {
  65. if (shouldCheck) {
  66. updateCheck();
  67. checkRequests();
  68. }
  69. timer.reset(time);
  70. });
  71. checkRequests();
  72. });
  73. $(function() {
  74. $('#slideDownTab').click(function() {
  75. var sdc = $("#slideDownContent");
  76. if (sdc.is(":hidden")) {
  77. sdc.slideDown("normal");
  78. } else {
  79. sdc.slideUp("normal");
  80. if (sdc.find('li').length == 0) {
  81. $("#slideDown").fadeOut(2000);
  82. }
  83. }
  84. });
  85. });
  86. </script>
  87. <%-- タグの切り替えフォーム用Script --%>
  88. <c:forEach var="e" items="${tags}">
  89. <script type="text/javascript">
  90. $(document).ready(function() {
  91. var id = "#check-${e.key.id}";
  92. $(id).bind("click", function() {
  93. var f = $("#tagsForm");
  94. $.ajax({
  95. type : 'POST',
  96. url : f.attr('action'),
  97. data : f.serialize(),
  98. success : function(json) {
  99. var label = $(id + "-label");
  100. label.toggleClass("tag-toggled");
  101. label.toggleClass("tag-untoggled");
  102. refresh();
  103. }
  104. });
  105. });
  106. });
  107. </script>
  108. </c:forEach>
  109. </head>
  110. <body>
  111. <jsp:include page="/shared/header.jsp">
  112. <jsp:param value="<fmt:message key='msg.home' />" name="name" />
  113. </jsp:include>
  114. <%@ include file="/niwaruka/member/nav.jsp" %>
  115. <%-- 通知ボックス --%>
  116. <div id="slideDown">
  117. <div id="slideDownContentDummy"></div>
  118. <div id="slideDownContent">
  119. <span id="slideDownContentBody"></span>
  120. </div>
  121. <div id="slideDownTab">
  122. <img src="/resources/niwaruka.png" /><span><fmt:message
  123. key="msg.notifications" />
  124. </span>
  125. </div>
  126. </div>
  127. <section>
  128. <article>
  129. <div class="nanishite-niwaruka">
  130. <fmt:message key='msg.how.niwaruka' />
  131. <span id="loading-message" class="loading-message hidden"><fmt:message
  132. key='msg.loading' />
  133. </span>
  134. </div>
  135. <%--タグの切り替えフォーム --%>
  136. <div class="tag-list">
  137. <form id="tagsForm" method="post" action="tagChangeJson">
  138. <c:forEach var="e" items="${enabledTags}">
  139. <input class="hidden-checkbox" id="check-${f:h(e.key.id)}"
  140. type="checkbox" checked="checked" ${f:multibox("tagArray", f:h(e.key.id))}/>
  141. <c:choose>
  142. <c:when test='${fn:startsWith(f:h(e.tag),"#")}'>
  143. <label for="check-${f:h(e.key.id)}"
  144. id="check-${f:h(e.key.id)}-label" class="tag-toggled twitter">${f:h(e.tag)}</label>
  145. </c:when>
  146. <c:when test='${fn:startsWith(f:h(e.access),"sharedTag")}'>
  147. <label for="check-${f:h(e.key.id)}"
  148. id="check-${f:h(e.key.id)}-label" class="tag-toggled shared">${f:h(e.tag)}</label>
  149. </c:when>
  150. <c:when test='${fn:startsWith(f:h(e.access),"secretTag")}'>
  151. <label for="check-${f:h(e.key.id)}"
  152. id="check-${f:h(e.key.id)}-label" class="tag-toggled secret">${f:h(e.tag)}</label>
  153. </c:when>
  154. <c:otherwise>
  155. <label for="check-${f:h(e.key.id)}"
  156. id="check-${f:h(e.key.id)}-label" class="tag-toggled public">${f:h(e.tag)}</label>
  157. </c:otherwise>
  158. </c:choose>
  159. </c:forEach>
  160. <c:forEach var="e" items="${disabledTags}">
  161. <input class="hidden-checkbox" id="check-${f:h(e.key.id)}"
  162. type="checkbox" ${f:multibox("tagArray", f:h(e.key.id))}/>
  163. <c:choose>
  164. <c:when test='${fn:startsWith(f:h(e.tag),"#")}'>
  165. <label for="check-${f:h(e.key.id)}"
  166. id="check-${f:h(e.key.id)}-label" class="tag-untoggled twitter">${f:h(e.tag)}</label>
  167. </c:when>
  168. <c:when test='${fn:startsWith(f:h(e.access),"sharedTag")}'>
  169. <label for="check-${f:h(e.key.id)}"
  170. id="check-${f:h(e.key.id)}-label" class="tag-untoggled shared">${f:h(e.tag)}</label>
  171. </c:when>
  172. <c:when test='${fn:startsWith(f:h(e.access),"secretTag")}'>
  173. <label for="check-${f:h(e.key.id)}"
  174. id="check-${f:h(e.key.id)}-label" class="tag-untoggled secret">${f:h(e.tag)}</label>
  175. </c:when>
  176. <c:otherwise>
  177. <label for="check-${f:h(e.key.id)}"
  178. id="check-${f:h(e.key.id)}-label" class="tag-untoggled public">${f:h(e.tag)}</label>
  179. </c:otherwise>
  180. </c:choose>
  181. </c:forEach>
  182. </form>
  183. </div>
  184. <%-- 発言ボックス --%>
  185. <div class="tweet-box-div">
  186. <form id="tweetForm" action="tweet" method="post">
  187. <textarea id="tweetBox" title="<fmt:message key='msg.what.doing' />" class="tweet-box"
  188. name="tweet"></textarea>
  189. <input id="tweetButton" type="button" value="<fmt:message key='msg.do.niwaruka' />" />
  190. </form>
  191. </div>
  192. </article>
  193. <%--発言リスト及び新規過去の発言取得ボタン --%>
  194. <article>
  195. <hr />
  196. <div id="new-tweets-bar" class="new-tweets-bar hidden"
  197. onclick="refresh();">
  198. <span></span>
  199. </div>
  200. <p id="message"></p>
  201. <div id="older-tweets-bar" class="new-tweets-bar hidden"
  202. onclick="fetchOlderTweets();">
  203. <span><fmt:message key='msg.read.more' /></span>
  204. </div>
  205. </article>
  206. </section>
  207. <%@ include file="/shared/footer.jsp"%>
  208. </body>
  209. </html>