/* Sone Main CSS File */
/* first, override some fproxy rules. */
-#sone .post .reply div,#sone .post .time,#sone .post .delete,#sone .post .show-reply-form
- {
- font-size: inherit;
+#sone .post .reply div,#sone .post .time,#sone .post .delete,#sone .post .show-reply-form, input[type=text], textarea {
+ font: inherit;
+}
+
+input[type=text], textarea {
+ font-size: 90%;
}
#sone form {
}
#sone #home-sone {
+ margin-top: 1ex;
margin-left: 80px;
padding-left: 1ex;
}
+#sone #update-status label {
+ display: none;
+}
+
+#sone #update-status input[type=text] {
+ width: 45em;
+}
+
+#sone #update-status textarea {
+ border: solid 1px #ccc;
+ width: 45em;
+ height: 4em;
+}
+
+#sone #update-status button {
+ float: right;
+}
+
#sone .nice-name {
font-weight: bold;
}
padding: 0.5ex;
}
-#sone .post .create-reply.light button {
- display: none;
+#sone .post .create-reply input[type=text] {
+ width: 50em;
+}
+
+#sone .post .create-reply textarea {
+ width: 50em;
+ height: 4em;
+}
+
+#sone .post .create-reply button {
+ float: right;
}
#sone .sone {
function registerInputTextareaSwap(inputSelector, defaultText) {
$(inputSelector).each(function() {
- $(this).focus(function() {
- if ($(this).hasClass("default")) {
- $(this).removeClass("default").val("");
- }
- }).blur(function() {
+ textarea = $("<textarea name=\"text\"></textarea>").blur(function() {
if ($(this).val() == "") {
- $(this).val(defaultText).addClass("default");
- }
- }).addClass("default").val(defaultText);
- var inputField = $(this);
- $(this.form).submit(function() {
- if (inputField.hasClass("default")) {
- inputField.val("");
+ $(this).hide();
+ $(this).data("inputField").show().removeAttr("disabled");
}
- });
+ }).hide().data("inputField", $(this));
+ $(this).after(textarea);
+ (function(inputField, textarea) {
+ $(inputField).focus(function() {
+ $(this).hide().attr("disabled", "disabled");
+ textarea.show().focus();
+ }).addClass("default").val(defaultText);
+ $(inputField.form).submit(function() {
+ if (textarea.val() == "") {
+ return false;
+ }
+ $(inputField).val(textarea.val());
+ });
+ })(this, textarea);
});
}
-<div id="update-status">
- <form action="createPost.html" method="post">
- <input type="hidden" name="formPassword" value="<% formPassword|html>" />
- <input type="hidden" name="returnPage" value="<% request.uri|html>" />
- <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
- <input class="status-input" name="text" value="" />
- <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
- </form>
-</div>
+<form id="update-status" action="createPost.html" method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+ <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+ <label for="text"><%= Page.Index.Label.Text|l10n|html></label>
+ <input type="text" class="status-input" name="text" value="" />
+ <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
+</form>