mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 19:29:56 +00:00
[share links] removed links with ajax
This commit is contained in:
@@ -102,14 +102,22 @@ $(".view-link").click(function() {
|
|||||||
.modal({focus:false});
|
.modal({focus:false});
|
||||||
$('#shared-link').prev().remove();
|
$('#shared-link').prev().remove();
|
||||||
});
|
});
|
||||||
// rm shared_link
|
|
||||||
$('.rm-link').click(function() {
|
// rm download/upload link
|
||||||
location.href = '{% url 'remove_shared_link' %}?t=' + $(this).attr('data-token');
|
$('.rm-link, .rm-upload-link').click(function() {
|
||||||
});
|
var _this = $(this);
|
||||||
// rm shared_upload_link
|
$.ajax({
|
||||||
$('.rm-upload-link').click(function() {
|
url: $(this).hasClass('rm-link') ? '{% url 'ajax_remove_shared_link' %}' : '{% url 'ajax_remove_shared_upload_link' %}',
|
||||||
location.href = '{% url 'remove_shared_upload_link' %}?t=' + $(this).attr('data-token');
|
data: {'t': $(this).attr('data-token')},
|
||||||
|
cache: false,
|
||||||
|
dataType: 'json',
|
||||||
|
success: function() {
|
||||||
|
_this.closest('tr').remove();
|
||||||
|
},
|
||||||
|
error: ajaxErrorHandler
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#shared-link').click(function() {
|
$('#shared-link').click(function() {
|
||||||
$(this).select();
|
$(this).select();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user