Rename ID of Sone in menu to avoid conflict with page-level Sone ID.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Sep 2011 04:19:53 +0000 (06:19 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 13 Sep 2011 04:19:53 +0000 (06:19 +0200)
src/main/resources/static/javascript/sone.js
src/main/resources/templates/include/soneMenu.html

index ca80b48..f6327e4 100644 (file)
@@ -291,7 +291,7 @@ function getSoneElement(element) {
  * @return The Sone ID
  */
 function getMenuSone(element) {
-       return $(element).closest(".sone-menu").find(".sone-id").text();
+       return $(element).closest(".sone-menu").find(".sone-menu-id").text();
 }
 
 /**
@@ -865,7 +865,7 @@ function ajaxifyPost(postElement) {
                return false;
        });
        (function(postElement) {
-               var soneId = $(".sone-id", postElement).text();
+               var soneId = $(".sone-menu-id", postElement).text();
                $(".sone-post-menu .follow", postElement).click(function() {
                        var followElement = this;
                        ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() {
@@ -995,7 +995,7 @@ function ajaxifyReply(replyElement) {
                return false;
        });
        (function(replyElement) {
-               var soneId = $(".sone-id", replyElement).text();
+               var soneId = $(".sone-menu-id", replyElement).text();
                $(".sone-menu .follow", replyElement).click(function() {
                        var followElement = this;
                        ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() {
index 49237ba..db1e67c 100644 (file)
@@ -1,5 +1,5 @@
 <div class="sone-menu <% class|css|html>">
-       <div class="sone-id hidden"><%sone.id|html></div>
+       <div class="sone-menu-id hidden"><%sone.id|html></div>
        <img class="avatar" src="/WebOfTrust/GetIdenticon?identity=<%sone.id|html>&amp;width=64&height=64" width="64" height="64" alt="Avatar Image" />
        <div class="inner-menu">
                <div>