Notification.NewSone.Text=New Sones have been discovered:
Notification.NewPost.ShortText=New posts have been discovered.
Notification.NewPost.Text=New posts have been discovered by the following Sones:
+Notification.NewPost.Button.MarkRead=Mark as read
Notification.NewReply.ShortText=New replies have been discovered.
Notification.NewReply.Text=New replies have been discovered by the following Sones:
Notification.SoneIsBeingRescued.Text=The following Sones are currently being rescued:
margin-left: 1ex;
}
+#sone #notification-area .notification .mark-as-read {
+ float: right;
+}
+
#sone #plugin-warning {
border: solid 0.5em red;
padding: 0.5em;
notification.find("form.dismiss").submit(function() {
return false;
});
+ notification.find("input[name=returnPage]").val($.url.attr("relative"));
+ if (notification.find(".short-text").length > 0) {
+ notification.find(".short-text").removeClass("hidden");
+ notification.find(".text").addClass("hidden");
+ }
notification.find("form.dismiss button").click(function() {
$.getJSON("dismissNotification.ajax", { "formPassword" : getFormPassword(), "notification" : notification.attr("id") }, function(data, textStatus) {
/* dismiss in case of error, too. */
<button type="submit"><%= Notification.Button.Dismiss|l10n|html></button>
</form>
<%/if>
- <% notification>
+ <%include notification request=request>
</div>
<%/foreach>
</div>
-<div class="short-text">
+<div class="short-text hidden">
<%= Notification.NewPost.ShortText|l10n|html>
<a class="link" onclick="showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
</div>
-<div class="text hidden">
+<div class="text">
+ <form class="mark-as-read" action="markAsKnown.html" method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+ <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+ <input type="hidden" name="type" value="post" />
+ <input type="hidden" name="id" value="<%foreach posts post><% post.id|html><%notlast> <%/notlast><%/foreach>" />
+ <button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
+ </form>
<%= Notification.NewPost.Text|l10n|html>
<%foreach posts post>
<a href="viewPost.html?post=<% post.id|html>"><% post.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
-<div class="short-text">
+<div class="short-text hidden">
<%= Notification.NewReply.ShortText|l10n|html>
<a class="link" onclick="showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
</div>
-<div class="text hidden">
+<div class="text">
+ <form class="mark-as-read" action="markAsKnown.html" method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+ <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+ <input type="hidden" name="type" value="reply" />
+ <input type="hidden" name="id" value="<%foreach replies reply><% reply.id|html><%notlast> <%/notlast><%/foreach>" />
+ <button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
+ </form>
<%= Notification.NewReply.Text|l10n|html>
<%foreach replies reply>
<a href="viewPost.html?post=<% reply.post.id|html>"><% reply.sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
-<div class="short-text">
+<div class="short-text hidden">
<%= Notification.NewSone.ShortText|l10n|html>
<a class="link" onclick="showNotificationDetails('<%notification.id|html>'); return false;"><%= Notification.ClickHereToRead|l10n|html></a>
</div>
-<div class="text hidden">
+<div class="text">
+ <form class="mark-as-read" action="markAsKnown.html" method="post">
+ <input type="hidden" name="formPassword" value="<% formPassword|html>" />
+ <input type="hidden" name="returnPage" value="<% request.uri|html>" />
+ <input type="hidden" name="type" value="sone" />
+ <input type="hidden" name="id" value="<%foreach sones sone><% sone.id|html><%notlast> <%/notlast><%/foreach>" />
+ <button type="submit" name="mark-read" value="true"><%= Notification.NewPost.Button.MarkRead|l10n|html></button>
+ </form>
<%= Notification.NewSone.Text|l10n|html>
<%foreach sones sone>
<a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>