mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
add confirm logic when delete share link
This commit is contained in:
@@ -115,6 +115,8 @@ define([
|
||||
'submit #send-download-link-form': 'sendDownloadLink',
|
||||
'click #cancel-share-download-link': 'cancelShareDownloadLink',
|
||||
'click #delete-download-link': 'deleteDownloadLink',
|
||||
'click #delete-download-link-confirm': 'deleteDownloadLinkConfirm',
|
||||
'click #delete-download-link-cancel': 'deleteDownloadLinkCancel',
|
||||
'click #generate-download-link-form .generate-random-password': 'generateRandomDownloadPassword',
|
||||
'keydown #generate-download-link-form .generate-random-password': 'generateRandomDownloadPassword',
|
||||
'click #generate-download-link-form .show-or-hide-password': 'showOrHideDownloadPassword',
|
||||
@@ -560,6 +562,13 @@ define([
|
||||
},
|
||||
|
||||
deleteDownloadLink: function() {
|
||||
$('#delete-download-link').addClass('hide');
|
||||
$('#delete-download-link-msg').removeClass('hide');
|
||||
$('#delete-download-link-confirm').removeClass('hide');
|
||||
$('#delete-download-link-cancel').removeClass('hide');
|
||||
},
|
||||
|
||||
deleteDownloadLinkConfirm: function() {
|
||||
var _this = this;
|
||||
$.ajax({
|
||||
url: Common.getUrl({
|
||||
@@ -573,10 +582,20 @@ define([
|
||||
success: function(data) {
|
||||
_this.$('#generate-download-link-form').removeClass('hide');
|
||||
_this.$('#download-link-operations').addClass('hide');
|
||||
},
|
||||
complete: function() {
|
||||
_this.deleteDownloadLinkCancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
deleteDownloadLinkCancel: function() {
|
||||
$('#delete-download-link').removeClass('hide');
|
||||
$('#delete-download-link-msg').addClass('hide');
|
||||
$('#delete-download-link-confirm').addClass('hide');
|
||||
$('#delete-download-link-cancel').addClass('hide');
|
||||
},
|
||||
|
||||
uploadLinkPanelInit: function() {
|
||||
var $panel = $('#dir-upload-link-share');
|
||||
var $loadingTip = this.$('.loading-tip').show();
|
||||
|
Reference in New Issue
Block a user