* jQuery object representing the notification.
*/
function ajaxifyNotification(notification) {
- notification.find("form.dismiss").submit(function() {
+ notification.find("form").submit(function() {
return false;
});
notification.find("input[name=returnPage]").val($.url.attr("relative"));
notification.find(".short-text").removeClass("hidden");
notification.find(".text").addClass("hidden");
}
+ notification.find("form.mark-as-read button").click(function() {
+ $.getJSON("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": $(":input[name=type]", this.form).val(), "id": $(":input[name=id]", this.form).val()});
+ });
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. */