1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

update rm ajax

This commit is contained in:
lian
2017-02-07 16:03:46 +08:00
parent 9848514e7d
commit 7c1c1e2977
9 changed files with 27 additions and 22 deletions

View File

@@ -100,13 +100,15 @@ define([
var notice_id = $el.closest('.unread').data('id');
var link_href = $el.attr('href');
$.ajax({
// set unread notice to be read
url: Common.getUrl({name: 'notification'}),
type: 'PUT',
dataType: 'json',
data:{'notice_id': encodeURIComponent(notice_id)},
data:{'notice_id': notice_id},
beforeSend: Common.prepareCSRFToken,
success: function(data) {
location.href = link_href;
$el.closest('.unread').removeClass('unread').addClass('read');
},
error: function() {
location.href = link_href;