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 $("#sone .post").each(function() {
36 postId = $(this).attr("id");
37 enhanceDeletePostButton("#sone .post#" + postId + " > .inner-part > .status-line .delete button", postId);
39 $("#sone .post#" + postId + " .reply").each(function() {
40 replyId = $(this).attr("id");
41 (function(postId, reply, replyId) {
42 reply.find(".delete button").each(function() {
43 enhanceDeleteReplyButton("#sone .post#" + postId + " .reply#" + replyId + " .delete button", replyId);
45 })(postId, $(this), replyId);
52 <script language="javascript">
53 /* hides all replies but the latest two. */
54 $(document).ready(function() {
55 $("#sone .post .replies").each(function() {
56 allReplies = $(this).find(".reply");
57 if (allReplies.length > 2) {
58 for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) {
59 $(allReplies[replyIndex]).addClass("hidden");
61 clickToShowElement = $("<div></div>").addClass("click-to-show");
62 (function(clickToShowElement, allReplies) {
63 getTranslation("WebInterface.ClickToShow.Replies", function(text) {
64 clickToShowElement.text(text);
66 clickToShowElement.click(function() {
67 allReplies.removeClass("hidden");
68 clickToShowElement.addClass("hidden");
70 })(clickToShowElement, allReplies);
71 $(allReplies[0]).before(clickToShowElement);
77 <script language="javascript">
78 /* convert all “follow”, “unfollow”, “block”, and “unblock” links to something nicer. */
79 $(document).ready(function() {
80 $("#sone .follow").submit(function() {
81 var followElement = this;
82 $.getJSON("ajax/followSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
83 $(followElement).addClass("hidden");
84 $(followElement).parent().find(".unfollow").removeClass("hidden");
88 $("#sone .unfollow").submit(function() {
89 var unfollowElement = this;
90 $.getJSON("ajax/unfollowSone.ajax", { "sone": getSoneId(this), "formPassword": getFormPassword() }, function() {
91 $(unfollowElement).addClass("hidden");
92 $(unfollowElement).parent().find(".follow").removeClass("hidden");
99 <script language="javascript">
100 /* convert all “like” buttons to javascript functions. */
101 $(document).ready(function() {
102 $("#sone .post > .inner-part > .status-line .like").submit(function() {
103 likePost(getPostId(this));
106 $("#sone .post > .inner-part > .status-line .unlike").submit(function() {
107 unlikePost(getPostId(this));
110 $("#sone .post .reply .status-line .like").submit(function() {
111 likeReply(getReplyId(this));
114 $("#sone .post .reply .status-line .unlike").submit(function() {
115 unlikeReply(getReplyId(this));
123 <%if !webInterface.core.identityManager.connected>
124 <div id="plugin-warning">
125 <%= Warning.PluginNotConnected.Text|l10n|html|replace needle="{link}" replacement="<a href=\"/plugins/\">"|replace needle="{/link}" replacement="</a>">
129 <div id="profile" class="<%ifnull currentSone>offline<%else>online<%/if>">
130 <a class="picture" href="index.html">
131 <%ifnull !currentSone>
132 <img src="/WoT/GetIdenticon?identity=<% currentSone.id|html>&width=80&height=80" width="80" height="80" alt="Profile Avatar" />
134 <img src="images/sone.png" width="80" height="80" alt="Sone is offline" />
137 <%ifnull ! currentSone>
139 <% currentSone|store key=sone>
140 <%include include/viewSone.html>
141 <%include include/updateStatus.html>