Add notifications for Sones that are rescued.
[Sone.git] / src / main / resources / templates / include / head.html
index 41c7971..0f46054 100644 (file)
        </script>
 
        <script language="javascript">
-               /* convert all “follow”, “unfollow”, “block”, and “unblock” links to something nicer. */
+               /* convert all “follow”, “unfollow”, “lock”, and “unlock” links to something nicer. */
                $(document).ready(function() {
                        $("#sone .follow").submit(function() {
                                var followElement = this;
                                });
                                return false;
                        });
+                       $("#sone .lock").submit(function() {
+                               var lockElement = this;
+                               $.getJSON("ajax/lockSone.ajax", { "sone" : getSoneId(this), "formPassword" : getFormPassword() }, function() {
+                                       $(lockElement).addClass("hidden");
+                                       $(lockElement).parent().find(".unlock").removeClass("hidden");
+                               });
+                               return false;
+                       });
+                       $("#sone .unlock").submit(function() {
+                               var unlockElement = this;
+                               $.getJSON("ajax/unlockSone.ajax", { "sone" : getSoneId(this), "formPassword" : getFormPassword() }, function() {
+                                       $(unlockElement).addClass("hidden");
+                                       $(unlockElement).parent().find(".lock").removeClass("hidden");
+                               });
+                               return false;
+                       });
                });
        </script>
 
 
        <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="notification-area">
 
                        <form id="notification-dismiss-template" class="hidden dismiss" action="dismissNotification.html" method="post">