Add WoT identicons as avatars.
[Sone.git] / src / main / resources / templates / include / head.html
index 16c9391..19a5f38 100644 (file)
@@ -34,7 +34,7 @@
                $(document).ready(function() {
                        $("#sone .post").each(function() {
                                postId = $(this).attr("id");
-                               enhanceDeletePostButton("#sone .post#" + postId + " > .status-line .delete button", postId);
+                               enhanceDeletePostButton("#sone .post#" + postId + " > .inner-part > .status-line .delete button", postId);
                                (function(postId) {
                                        $("#sone .post#" + postId + " .reply").each(function() {
                                                replyId = $(this).attr("id");
                                });
                                return false;
                        });
+                       $("#sone .blacklist").submit(function() {
+                               var blacklistElement = this;
+                               $.getJSON("ajax/blacklistSone.ajax", { "sone" : getSoneId(this), "formPassword" : getFormPassword() }, function() {
+                                       $(getSoneElement(blacklistElement)).slideUp();
+                               });
+                               return false;
+                       });
+                       $("#sone .unblacklist").submit(function() {
+                               var unblacklistElement = this;
+                               $.getJSON("ajax/unblacklistSone.ajax", { "sone" : getSoneId(this), "formPassword" : getFormPassword() }, function() {
+                                       $(getSoneElement(unblacklistElement)).slideUp();
+                               });
+                               return false;
+                       });
                });
        </script>
 
        <script language="javascript">
                /* convert all “like” buttons to javascript functions. */
                $(document).ready(function() {
-                       $("#sone .post > .status-line .like").submit(function() {
+                       $("#sone .post > .inner-part > .status-line .like").submit(function() {
                                likePost(getPostId(this));
                                return false;
                        });
-                       $("#sone .post > .status-line .unlike").submit(function() {
+                       $("#sone .post > .inner-part > .status-line .unlike").submit(function() {
                                unlikePost(getPostId(this));
                                return false;
                        });
 
        <div id="main">
 
+               <%if !webInterface.core.identityManager.connected>
+                       <div id="plugin-warning">
+                               <%= Warning.PluginNotConnected.Text|l10n|html|replace needle="{link}" replacement="<a href=\"/plugins/\">"|replace needle="{/link}" replacement="</a>">
+                       </div>
+               <%/if>
+
                <div id="profile" class="<%ifnull currentSone>offline<%else>online<%/if>">
                        <a class="picture" href="index.html">&nbsp;</a>
                        <%ifnull ! currentSone>