Page.Index.Title=Your Sone - Sone
Page.Index.Label.Text=Post text:
+Page.Index.Label.Sender=Sender:
Page.Index.Button.Post=Post!
Page.Index.PostList.Title=Post Feed
Page.Index.PostList.Text.NoPostYet=Nobody has written any posts yet. You should probably start it right now!
View.Post.LikeLink=Like
View.Post.UnlikeLink=Unlike
+View.UpdateStatus.Text.ChooseSenderIdentity=Choose the sender identity
+
View.Trust.Tooltip.Trust=Trust this person
View.Trust.Tooltip.Distrust=Assign negative trust to this person
View.Trust.Tooltip.Untrust=Remove your trust assignment for this person
/* this initializes the status update input field. */
getTranslation("WebInterface.DefaultText.StatusUpdate", function(defaultText) {
registerInputTextareaSwap("#sone #update-status .status-input", defaultText, "text", false, false);
+ $("#sone #update-status .select-sender").show();
+ $("#sone #update-status .sender").hide();
+ $("#sone #update-status .select-sender button").click(function() {
+ $("#sone #update-status .sender").show();
+ $("#sone #update-status .select-sender").hide();
+ return false;
+ });
$("#sone #update-status").submit(function() {
if ($(this).find(":input.default:enabled").length > 0) {
return false;
}
- text = $(this).find(":input:enabled").val();
- $.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "text": text }, function(data, textStatus) {
+ sender = $(this).find(":input[name=sender]").val();
+ text = $(this).find(":input[name=text]:enabled").val();
+ $.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "sender": sender, "text": text }, function(data, textStatus) {
if ((data != null) && data.success) {
- loadNewPost(data.postId, getCurrentSoneId());
+ loadNewPost(data.postId, data.sone, data.recipient);
}
});
- $(this).find(":input:enabled").val("").blur();
+ $(this).find(":input[name=sender]").val(getCurrentSoneId());
+ $(this).find(":input[name=text]:enabled").val("").blur();
+ $(this).find(".sender").hide();
+ $(this).find(".select-sender").show();
return false;
});
});
<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>
+ <label for="sender"><%= Page.Index.Label.Sender|l10n|html></label>
+ <div class="sender">
+ <select name="sender" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">
+ <%foreach localSones localSone>
+ <option value="<% localSone.id|html>"<%if localSone.current> selected="selected"<%/if>><% localSone.niceName|html></option>
+ <%/foreach>
+ </select>
+ </div>
+ <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div><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>