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 getTranslation("WebInterface.DefaultText.StatusUpdate", function(text) {
12 registerInputTextareaSwap("#sone #update-status .status-input", text, "text", false, false);
17 <script language="javascript">
18 /* these functions are necessary for updating Sone statuses. */
19 $(document).ready(function() {
20 $("#sone .sone").each(function() {
21 watchSone($(this).find(".id").text());
26 <script language="javascript">
27 /* this initializes all reply input fields. */
28 $(document).ready(function() {
29 getTranslation("WebInterface.DefaultText.Reply", function(text) {
30 registerInputTextareaSwap("#sone input.reply-input", text, "text", false, false);
36 <script language="javascript">
37 /* replace all “delete” buttons with javascript. */
38 $(document).ready(function() {
39 getTranslation("WebInterface.Confirmation.DeletePostButton", function(text) {
40 deletePostText = text;
41 getTranslation("WebInterface.Confirmation.DeleteReplyButton", function(text) {
42 deleteReplyText = text;
43 $("#sone .post").each(function() {
44 postId = $(this).attr("id");
45 enhanceDeletePostButton("#sone .post#" + postId + " > .inner-part > .status-line .delete button", postId, deletePostText);
47 $("#sone .post#" + postId + " .reply").each(function() {
48 replyId = $(this).attr("id");
49 (function(postId, reply, replyId) {
50 reply.find(".delete button").each(function() {
51 enhanceDeleteReplyButton("#sone .post#" + postId + " .reply#" + replyId + " .delete button", replyId, deleteReplyText);
53 })(postId, $(this), replyId);
62 <script language="javascript">
63 /* hides all replies but the latest two. */
64 $(document).ready(function() {
65 getTranslation("WebInterface.ClickToShow.Replies", function(text) {
66 $("#sone .post .replies").each(function() {
67 allReplies = $(this).find(".reply");
68 if (allReplies.length > 2) {
70 for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) {
71 $(allReplies[replyIndex]).addClass("hidden");
72 newHidden |= $(allReplies[replyIndex]).hasClass("new");
74 clickToShowElement = $("<div></div>").addClass("click-to-show");
76 clickToShowElement.addClass("new");
78 (function(clickToShowElement, allReplies, text) {
79 clickToShowElement.text(text);
80 clickToShowElement.click(function() {
81 allReplies.removeClass("hidden");
82 clickToShowElement.addClass("hidden");
84 })(clickToShowElement, allReplies, text);
85 $(allReplies[0]).before(clickToShowElement);
92 <script language="javascript">
93 /* convert all “follow”, “unfollow”, “block”, and “unblock” links to something nicer. */
94 $(document).ready(function() {
95 $("#sone .follow").submit(function() {
96 var followElement = this;
97 $.getJSON("ajax/followSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
98 $(followElement).addClass("hidden");
99 $(followElement).parent().find(".unfollow").removeClass("hidden");
103 $("#sone .unfollow").submit(function() {
104 var unfollowElement = this;
105 $.getJSON("ajax/unfollowSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
106 $(unfollowElement).addClass("hidden");
107 $(unfollowElement).parent().find(".follow").removeClass("hidden");
114 <script language="javascript">
115 /* convert all “like” buttons to javascript functions. */
116 $(document).ready(function() {
117 $("#sone .post > .inner-part > .status-line .like").submit(function() {
118 likePost(getPostId(this));
121 $("#sone .post > .inner-part > .status-line .unlike").submit(function() {
122 unlikePost(getPostId(this));
125 $("#sone .post .reply .status-line .like").submit(function() {
126 likeReply(getReplyId(this));
129 $("#sone .post .reply .status-line .unlike").submit(function() {
130 unlikeReply(getReplyId(this));
138 <%if !webInterface.core.identityManager.connected>
139 <div id="plugin-warning">
140 <%= Warning.PluginNotConnected.Text|l10n|html|replace needle="{link}" replacement="<a href=\"/plugins/\">"|replace needle="{/link}" replacement="</a>">
144 <div id="profile" class="<%ifnull currentSone>offline<%else>online<%/if>">
145 <a class="picture" href="index.html">
146 <%ifnull !currentSone>
147 <img src="/WoT/GetIdenticon?identity=<% currentSone.id|html>&width=80&height=80" width="80" height="80" alt="Profile Avatar" />
149 <img src="images/sone.png" width="80" height="80" alt="Sone is offline" />
152 <%ifnull ! currentSone>
154 <% currentSone|store key=sone>
155 <%include include/viewSone.html>
156 <%include include/updateStatus.html>