X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=0e3df51f5fd4565cf6bb04d8d196a7ccdc7cec82;hb=61ee54ddb663a3faf4a9c125a07d89dc3940e1f5;hp=d5db8efc61ea8a5795c4405d3aafa7a72ab19db9;hpb=74223530641d7581c7d8f572e98eff1a01946ebd;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index d5db8ef..0e3df51 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -802,6 +802,14 @@ function ajaxifyPost(postElement) { /* hide reply input field. */ $(postElement).find(".create-reply").addClass("hidden"); + + /* show Sone menu when hovering over the avatar. */ + $(postElement).find(".avatar").mouseover(function() { + $(".sone-post-menu", postElement).mouseleave(function() { + $(this).fadeOut(); + }).fadeIn(); + return false; + }); } /** @@ -868,7 +876,11 @@ function ajaxifyNotification(notification) { notification.find(".text").addClass("hidden"); } notification.find("form.mark-as-read button").click(function() { - ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": $(":input[name=type]", this.form).val(), "id": $(":input[name=id]", this.form).val()}); + allIds = $(":input[name=id]", this.form).val().split(" "); + for (index = 0; index < allIds.length; index += 16) { + ids = allIds.slice(index, index + 16).join(" "); + ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": $(":input[name=type]", this.form).val(), "id": ids}); + } }); notification.find("a[class^='link-']").each(function() { linkElement = $(this);