1 <%include include/head.html>
3 <script language="javascript">
4 /* register input field/textarea swap. */
5 $(document).ready(function() {
6 registerInputTextareaSwap("#sone input.createpost", "What are you doing?");
7 registerInputTextareaSwap("#sone input.reply-input", "Write a Reply…");
9 /* hide all the “create reply” forms until a link is clicked. */
10 $("#sone .post").each(function() {
11 postId = $(this).attr("id");
12 commentElement = (function(postId) {
13 var commentElement = $("<div>Comment</div>").addClass("show-reply-form").click(function() {
14 replyElement = $("#sone .post#" + postId + " .create-reply");
15 replyElement.removeClass("hidden");
16 replyElement.removeClass("light");
17 (function(replyElement) {
18 replyElement.find("input.reply-input").blur(function() {
19 if ($(this).hasClass("default")) {
20 replyElement.addClass("light");
23 replyElement.removeClass("light");
26 replyElement.find("input.reply-input").focus();
28 return commentElement;
30 $(this).find(".create-reply").addClass("hidden");
31 $(this).find(".status-line .time").each(function() {
32 $(this).after(commentElement.clone(true));
38 <h1><%= Page.Index.Page.Title|l10n|insert needle="{sone}" key=currentSone.name|html></h1>
41 <form action="createPost.html" method="post">
43 <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
44 <input class="createpost" name="text" />
47 <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
52 <h1><%= Page.Index.PostList.Title|l10n|html></h1>
56 <%include include/viewPost.html>
58 <div><%= Page.Index.PostList.Text.NoPostYet|l10n|html></div>
62 <h1><%= Page.Index.AddSone.Title|l10n|html></h1>
64 <div><%= Page.Index.AddSone.Description|l10n|html></div>
66 <form action="addSone.html" method="post">
67 <input type="hidden" name="formPassword" value="<% formPassword|html>" />
68 <input id="addsone" type="text" name="request-uri" />
69 <button type="submit"><%= Page.Index.AddSone.Button.Add|l10n|html></button>
72 <%include include/tail.html>