mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
use 'POST' instead of 'GET' for some requests, and modified 'share' in repo, file view
This commit is contained in:
@@ -36,20 +36,23 @@ define([
|
||||
removeShare: function() {
|
||||
var el = this.$el;
|
||||
var lib_name = this.model.get('name');
|
||||
Common.ajaxGet({
|
||||
get_url: Common.getUrl({
|
||||
$.ajax({
|
||||
url: Common.getUrl({
|
||||
name: 'ajax_unset_inner_pub_repo',
|
||||
repo_id: this.model.get('id')
|
||||
}),
|
||||
type: 'POST',
|
||||
data: {
|
||||
'permission': this.model.get('permission')
|
||||
},
|
||||
after_op_success: function () {
|
||||
beforeSend: Common.prepareCSRFToken,
|
||||
dataType: 'json',
|
||||
success: function () {
|
||||
el.remove();
|
||||
var msg = gettext('Successfully unshared {placeholder}').replace('{placeholder}', '<span class="op-target">' + Common.HTMLescape(lib_name) + '</span>');
|
||||
Common.feedback(msg, 'success', Common.SUCCESS_TIMOUT);
|
||||
},
|
||||
after_op_error: function(xhr) {
|
||||
error: function(xhr) {
|
||||
Common.ajaxErrorHandler(xhr);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user