mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 19:05:16 +00:00
[share link] improvement for 'delete confirm' & 'show expiration date'
This commit is contained in:
parent
37ed51bd4a
commit
9ee2c2bcb2
@ -1257,7 +1257,6 @@
|
||||
<div id="download-link-operations" class="hide">
|
||||
<dl>
|
||||
<dt>{% trans "Link: " %}</dt>
|
||||
<dt class="share-link-expire-date-info hide"></dt>
|
||||
<dd id="download-link">
|
||||
<span class="link-placeholder"></span>
|
||||
<input type="text" readonly="readonly" value="" class="shared-link hide" />
|
||||
@ -1265,24 +1264,25 @@
|
||||
</dd>
|
||||
<% if (!is_dir) { %>
|
||||
<dt>{% trans "Direct Download Link: " %}</dt>
|
||||
<dt class="share-link-expire-date-info hide"></dt>
|
||||
<dd id="direct-dl-link">
|
||||
<span class="link-placeholder"></span>
|
||||
<input type="text" readonly="readonly" value="" class="shared-link hide" />
|
||||
<span class="shared-link-copy-icon icon-copy" title="{% trans "Copy" %}"></span>
|
||||
</dd>
|
||||
<% } %>
|
||||
<dt id="share-link-expire-date-label" class="hide">{% trans "Expiration Date: " %}</dt>
|
||||
<dd id="share-link-expire-date" class="hide"></dd>
|
||||
</dl>
|
||||
{% if user.permissions.can_send_share_link_mail %}
|
||||
<button id="send-download-link">{% trans 'Send' %}</button>
|
||||
{% endif %}
|
||||
<p id="delete-download-link-msg" class="error hide">
|
||||
<span>{% trans "Are you sure to remove the share link?"%}</span><br />
|
||||
<span>{% trans "If the share link is removed, no one will be able to access the file any more with the link."%}</span><br />
|
||||
</p>
|
||||
<button id="delete-download-link">{% trans 'Delete' %}</button>
|
||||
<button id="delete-download-link-confirm" class="hide">{% trans 'Yes' %}</button>
|
||||
<button id="delete-download-link-cancel" class="hide">{% trans 'No' %}</button>
|
||||
<div id="delete-download-link-confirm" class="alert alert-warning hide">
|
||||
<h4 class="alert-heading">{% trans "Are you sure you want to remove the share link?"%}</h4>
|
||||
<p style="margin-bottom:1rem;">{% trans "If the share link is removed, no one will be able to access it any more."%}</p>
|
||||
<button id="delete-download-link-yes">{% trans 'Yes' %}</button>
|
||||
<button id="delete-download-link-cancel">{% trans 'No' %}</button>
|
||||
</div>
|
||||
<form id="send-download-link-form" action="" class="hide">
|
||||
<label for="email">{% trans "Send to:"%}</label><br />
|
||||
<input type="text" class="input" name="email" placeholder="{% trans "Emails, separated by ','"%}" title="{% trans "Emails, separated by ','"%}" id="email" /><br />
|
||||
|
@ -44,8 +44,8 @@ define([
|
||||
|
||||
var _this = this;
|
||||
|
||||
var popupTitle = gettext("Are you sure to remove the share link?");
|
||||
var popupContent = gettext("If the share link is removed, no one will be able to access the file any more with the link.");
|
||||
var popupTitle = gettext("Are you sure you want to remove the share link?");
|
||||
var popupContent = gettext("If the share link is removed, no one will be able to access it any more.");
|
||||
var yesCallback = function() {
|
||||
$.ajax({
|
||||
url: Common.getUrl({
|
||||
|
@ -116,7 +116,7 @@ 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-yes': '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',
|
||||
@ -190,8 +190,8 @@ define([
|
||||
} else {
|
||||
if (link_data.expire_date) {
|
||||
var expire_date = Moment(link_data.expire_date).format('YYYY-MM-DD');
|
||||
var info = gettext("This share link will be expired at %s").replace('%s', expire_date);
|
||||
this.$('.share-link-expire-date-info').html(info).removeClass('hide');
|
||||
this.$('#share-link-expire-date').html(expire_date).removeClass('hide');
|
||||
this.$('#share-link-expire-date-label').removeClass('hide');
|
||||
}
|
||||
this.$('#send-download-link').removeClass('hide');
|
||||
this.$('#download-link-operations .shared-link-copy-icon').removeClass('hide');
|
||||
@ -569,9 +569,7 @@ 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() {
|
||||
@ -591,16 +589,16 @@ define([
|
||||
},
|
||||
complete: function() {
|
||||
_this.deleteDownloadLinkCancel();
|
||||
_this.$('.share-link-expire-date-info').html('').addClass('hide')
|
||||
_this.$('#share-link-expire-date-label').addClass('hide');
|
||||
_this.$('#share-link-expire-date').html('').addClass('hide');
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user