1 <div id="sone" class="<%ifnull ! currentSone>online<%else>offline<%/if>">
3 <div id="formPassword"><% formPassword|html></div>
5 <script src="javascript/jquery-1.4.2.js" language="javascript"></script>
6 <script src="javascript/sone.js" language="javascript"></script>
8 <script language="javascript">
9 /* this initializes the status update input field. */
10 $(document).ready(function() {
11 registerInputTextareaSwap("#sone #update-status .status-input", "WebInterface.DefaultText.StatusUpdate", "text", false, false);
15 <script language="javascript">
16 /* these functions are necessary for updating Sone statuses. */
17 $(document).ready(function() {
18 $("#sone .sone").each(function() {
19 watchSone($(this).find(".id").text());
24 <script language="javascript">
25 /* this initializes all reply input fields. */
26 $(document).ready(function() {
27 registerInputTextareaSwap("#sone input.reply-input", "WebInterface.DefaultText.Reply", "text", false, false);
32 <script language="javascript">
33 /* replace all “delete” buttons with javascript. */
34 $(document).ready(function() {
35 getTranslation("WebInterface.Confirmation.DeletePostButton", function(text) {
36 deletePostText = text;
37 getTranslation("WebInterface.Confirmation.DeleteReplyButton", function(text) {
38 deleteReplyText = text;
39 $("#sone .post").each(function() {
40 postId = $(this).attr("id");
41 enhanceDeletePostButton("#sone .post#" + postId + " > .inner-part > .status-line .delete button", postId, deletePostText);
43 $("#sone .post#" + postId + " .reply").each(function() {
44 replyId = $(this).attr("id");
45 (function(postId, reply, replyId) {
46 reply.find(".delete button").each(function() {
47 enhanceDeleteReplyButton("#sone .post#" + postId + " .reply#" + replyId + " .delete button", replyId, deleteReplyText);
49 })(postId, $(this), replyId);
58 <script language="javascript">
59 /* hides all replies but the latest two. */
60 $(document).ready(function() {
61 getTranslation("WebInterface.ClickToShow.Replies", function(text) {
62 $("#sone .post .replies").each(function() {
63 allReplies = $(this).find(".reply");
64 if (allReplies.length > 2) {
66 for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) {
67 $(allReplies[replyIndex]).addClass("hidden");
68 newHidden |= $(allReplies[replyIndex]).hasClass("new");
70 clickToShowElement = $("<div></div>").addClass("click-to-show");
72 clickToShowElement.addClass("new");
74 (function(clickToShowElement, allReplies, text) {
75 clickToShowElement.text(text);
76 clickToShowElement.click(function() {
77 allReplies.removeClass("hidden");
78 clickToShowElement.addClass("hidden");
80 })(clickToShowElement, allReplies, text);
81 $(allReplies[0]).before(clickToShowElement);
88 <script language="javascript">
89 /* convert all “follow”, “unfollow”, “block”, and “unblock” links to something nicer. */
90 $(document).ready(function() {
91 $("#sone .follow").submit(function() {
92 var followElement = this;
93 $.getJSON("ajax/followSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
94 $(followElement).addClass("hidden");
95 $(followElement).parent().find(".unfollow").removeClass("hidden");
99 $("#sone .unfollow").submit(function() {
100 var unfollowElement = this;
101 $.getJSON("ajax/unfollowSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
102 $(unfollowElement).addClass("hidden");
103 $(unfollowElement).parent().find(".follow").removeClass("hidden");
110 <script language="javascript">
111 /* convert all “like” buttons to javascript functions. */
112 $(document).ready(function() {
113 $("#sone .post > .inner-part > .status-line .like").submit(function() {
114 likePost(getPostId(this));
117 $("#sone .post > .inner-part > .status-line .unlike").submit(function() {
118 unlikePost(getPostId(this));
121 $("#sone .post .reply .status-line .like").submit(function() {
122 likeReply(getReplyId(this));
125 $("#sone .post .reply .status-line .unlike").submit(function() {
126 unlikeReply(getReplyId(this));
134 <%if !webInterface.core.identityManager.connected>
135 <div id="plugin-warning">
136 <%= Warning.PluginNotConnected.Text|l10n|html|replace needle="{link}" replacement="<a href=\"/plugins/\">"|replace needle="{/link}" replacement="</a>">
140 <div id="profile" class="<%ifnull currentSone>offline<%else>online<%/if>">
141 <a class="picture" href="index.html">
142 <%ifnull !currentSone>
143 <img src="/WoT/GetIdenticon?identity=<% currentSone.id|html>&width=80&height=80" width="80" height="80" alt="Profile Avatar" />
145 <img src="images/sone.png" width="80" height="80" alt="Sone is offline" />
148 <%ifnull ! currentSone>
150 <% currentSone|store key=sone>
151 <%include include/viewSone.html>
152 <%include include/updateStatus.html>