From b0351d0df6ae7fef2a461706542410a7e7ecea35 Mon Sep 17 00:00:00 2001
From: ashwinishinde
Date: Fri, 8 May 2015 16:26:10 +0530
Subject: Subject:Update notification count
Description:
1) update notification count after visit.
2) remove notification item from list after visted.
---
static/website/templates/notifications.html | 17 +++++++++++++++++
static/website/templates/notify.html | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
(limited to 'static')
diff --git a/static/website/templates/notifications.html b/static/website/templates/notifications.html
index aa3adce..35c30a3 100644
--- a/static/website/templates/notifications.html
+++ b/static/website/templates/notifications.html
@@ -28,6 +28,23 @@
}
});
});
+
+ $(".rmc").click(function() {
+ $(this).parent(".notification").slideUp();
+
+ var notification_id = $(this).data("nid");
+ $.ajax({
+ url: "/ajax-notification-remove/",
+ type: "POST",
+ data: {
+ notification_id: notification_id
+ },
+ success: function(data) {
+ console.log(data);
+
+ }
+ });
+ });
});
{% endblock %}
diff --git a/static/website/templates/notify.html b/static/website/templates/notify.html
index 2ea55c5..9e048be 100644
--- a/static/website/templates/notify.html
+++ b/static/website/templates/notify.html
@@ -2,12 +2,12 @@
{% if notification.cid != 0 and notification.aid != 0 %}
- New Comment on "{{ question.title }}"
+ New Comment on "{{ question.title }}"
{% elif notification.cid == 0 %}
- New Answer on "{{ question.title }}"
+ New Answer on "{{ question.title }}"
{% endif %}
--
cgit