1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

use 'POST' instead of 'GET' for some requests, and modified 'share' in repo, file view

This commit is contained in:
llj
2015-10-19 15:04:37 +08:00
parent 54f76e77e5
commit 0dc31715d4
16 changed files with 108 additions and 166 deletions

View File

@@ -363,13 +363,14 @@ define([
}
});
_this = this;
var _this = this;
$(document).click(function(e) {
_this.closePopup(e, $('#user-info-popup'), $('#my-info'));
});
},
initNoticePopup: function() {
var _this = this;
var msg_ct = $("#msg-count");
// for login page, and pages without 'header' such as 'file view' page.
@@ -427,7 +428,9 @@ define([
var link_href = $(this).attr('href');
$.ajax({
url: _this.getUrl({name: 'set_notice_seen_by_id'}) + '?notice_id=' + encodeURIComponent(notice_id),
dataType:'json',
type: 'POST',
dataType: 'json',
beforeSend: _this.prepareCSRFToken,
success: function(data) {
location.href = link_href;
},
@@ -468,7 +471,9 @@ define([
// set all unread notice to be read
$.ajax({
url: _this.getUrl({name: 'set_notices_seen'}),
type: 'POST',
dataType: 'json',
beforeSend: _this.prepareCSRFToken,
success: function() {
$('.num', msg_ct).html(0).addClass('hide');
document.title = orig_doc_title;