aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/sharedialoglinkshareview.js
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2016-04-13 17:32:00 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-04-19 11:37:23 +0200
commite7f07ba02eb51a09b23e8bdfe3e137521133565d (patch)
tree19fab1232c8ce63673c39874b907a9b4fef4d143 /core/js/sharedialoglinkshareview.js
parent7186975e35d03312f46b27d808a98f7bc6064078 (diff)
downloadnextcloud-server-e7f07ba02eb51a09b23e8bdfe3e137521133565d.tar.gz
nextcloud-server-e7f07ba02eb51a09b23e8bdfe3e137521133565d.zip
extract mail view for sending share invitations
fixes #22947
Diffstat (limited to 'core/js/sharedialoglinkshareview.js')
-rw-r--r--core/js/sharedialoglinkshareview.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 1d158ccec16..2fc6f657b02 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -40,12 +40,6 @@
'<label for="sharingDialogAllowPublicUpload-{{cid}}">{{publicUploadLabel}}</label>' +
'</div>' +
' {{/if}}' +
- ' {{#if mailPublicNotificationEnabled}}' +
- '<form id="emailPrivateLink" class="emailPrivateLinkForm">' +
- ' <input id="email" class="emailField" value="" placeholder="{{mailPrivatePlaceholder}}" type="text" />' +
- ' <input id="emailButton" class="emailButton" type="submit" value="{{mailButtonText}}" />' +
- '</form>' +
- ' {{/if}}' +
'{{else}}' +
// FIXME: this doesn't belong in this view
'{{#if noSharingPlaceholder}}<input id="shareWith-{{cid}}" class="shareWithField" type="text" placeholder="{{noSharingPlaceholder}}" disabled="disabled"/>{{/if}}' +
@@ -76,7 +70,6 @@
showLink: true,
events: {
- 'submit .emailPrivateLinkForm': '_onEmailPrivateLink',
'focusout input.linkPassText': 'onPasswordEntered',
'keyup input.linkPassText': 'onPasswordKeyUp',
'click .linkCheckbox': 'onLinkCheckBoxChange',
@@ -112,7 +105,6 @@
_.bindAll(
this,
- '_onEmailPrivateLink',
'onLinkCheckBoxChange',
'onPasswordEntered',
'onPasswordKeyUp',
@@ -218,34 +210,6 @@
});
},
- _onEmailPrivateLink: function(event) {
- event.preventDefault();
-
- var $emailField = this.$el.find('.emailField');
- var $emailButton = this.$el.find('.emailButton');
- var email = $emailField.val();
- if (email !== '') {
- $emailField.prop('disabled', true);
- $emailButton.prop('disabled', true);
- $emailField.val(t('core', 'Sending ...'));
- this.model.sendEmailPrivateLink(email).done(function() {
- $emailField.css('font-weight', 'bold').val(t('core','Email sent'));
- setTimeout(function() {
- $emailField.val('');
- $emailField.css('font-weight', 'normal');
- $emailField.prop('disabled', false);
- $emailButton.prop('disabled', false);
- }, 2000);
- }).fail(function() {
- $emailField.val(email);
- $emailField.css('font-weight', 'normal');
- $emailField.prop('disabled', false);
- $emailButton.prop('disabled', false);
- });
- }
- return false;
- },
-
render: function() {
var linkShareTemplate = this.template();
var resharingAllowed = this.model.sharePermissionPossible();
@@ -299,39 +263,6 @@
mailButtonText: t('core', 'Send')
}));
- var $emailField = this.$el.find('.emailField');
- if (isLinkShare && $emailField.length !== 0) {
- $emailField.autocomplete({
- minLength: 1,
- source: function (search, response) {
- $.get(
- OC.generateUrl('core/ajax/share.php'), {
- fetch: 'getShareWithEmail',
- search: search.term
- }, function(result) {
- if (result.status == 'success' && result.data.length > 0) {
- response(result.data);
- }
- });
- },
- select: function( event, item ) {
- $emailField.val(item.item.email);
- return false;
- }
- })
- .data("ui-autocomplete")._renderItem = function( ul, item ) {
- return $('<li>')
- .append('<a>' + escapeHTML(item.displayname) + "<br>" + escapeHTML(item.email) + '</a>' )
- .appendTo( ul );
- };
- }
-
- // TODO drop with IE8 drop
- if($('html').hasClass('ie8')) {
- this.$el.find('#linkPassText').removeAttr('placeholder');
- this.$el.find('#linkPassText').val('');
- }
-
this.delegateEvents();
return this;