X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Ftemplates%2Findex.html;h=c4c251ab31b5111311ba58d77764fe113e1b2aaa;hb=f17746700b861bb3485b839397a6fc073ab0bd93;hp=8cbf77e1026a400c8daf3993a380d5cf84fffe37;hpb=097bb365454bb0471463fc610621deac63679884;p=Sone.git
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 8cbf77e..c4c251a 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -4,18 +4,33 @@
/* register input field/textarea swap. */
$(document).ready(function() {
registerInputTextareaSwap("#sone input.createpost", "What are you doing?");
- registerInputTextareaSwap("#sone input.create-reply", "Write a Replyâ¦");
+ registerInputTextareaSwap("#sone input.reply-input", "Write a Replyâ¦");
/* hide all the âcreate replyâ forms until a link is clicked. */
$("#sone .post").each(function() {
postId = $(this).attr("id");
- (function(postId) {
- commentElement = $("
Comment
").addClass("show-reply-form").click(function() {
- $("#sone .post#" + postId + " .create-reply").removeClass("hidden");
+ commentElement = (function(postId) {
+ var commentElement = $("Comment
").addClass("show-reply-form").click(function() {
+ replyElement = $("#sone .post#" + postId + " .create-reply");
+ replyElement.removeClass("hidden");
+ replyElement.removeClass("light");
+ (function(replyElement) {
+ replyElement.find("input.reply-input").blur(function() {
+ if ($(this).hasClass("default")) {
+ replyElement.addClass("light");
+ }
+ }).focus(function() {
+ replyElement.removeClass("light");
+ });
+ })(replyElement);
+ replyElement.find("input.reply-input").focus();
});
+ return commentElement;
})(postId);
$(this).find(".create-reply").addClass("hidden");
- $(this).find(".status-line .time").after(commentElement);
+ $(this).find(".status-line .time").each(function() {
+ $(this).after(commentElement.clone(true));
+ });
});
});
@@ -43,9 +58,9 @@
<%= Page.Index.PostList.Text.NoPostYet|l10n|html>
<%/foreach>
-
+
<%= Page.Index.AddSone.Title|l10n|html>
-
+
<%= Page.Index.AddSone.Description|l10n|html>