summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-30 11:08:04 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-30 11:08:04 +0200
commit67609699bc4430287a35b676dd63968adeca1bd3 (patch)
tree99c93d10f9a45a1a757e2e29b79ab5044767ad7d /core
parent750f19340fc39e5ba03a18fa97a5e2e470e965a1 (diff)
parent8def1383c8bfaad55cf7917af275b23977236323 (diff)
downloadnextcloud-server-67609699bc4430287a35b676dd63968adeca1bd3.tar.gz
nextcloud-server-67609699bc4430287a35b676dd63968adeca1bd3.zip
Merge pull request #19443 from owncloud/sharedialog-passworderror
Fix share link password error
Diffstat (limited to 'core')
-rw-r--r--core/js/sharedialoglinkshareview.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index cb9325231dd..3d8fb461461 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -144,17 +144,33 @@
},
onPasswordEntered: function() {
- var password = this.$el.find('#linkPassText').val();
+ var self = this;
+ var $loading = this.$el.find('#linkPass .icon-loading-small');
+ if (!$loading.hasClass('hidden')) {
+ // still in process
+ return;
+ }
+ var $input = this.$el.find('#linkPassText');
+ $input.removeClass('error');
+ var password = $input.val();
if(password === '') {
return;
}
- this.$el.find('#linkPass .icon-loading-small')
+ $loading
.removeClass('hidden')
.addClass('inlineblock');
this.model.setPassword(password);
- this.model.saveLinkShare();
+ this.model.saveLinkShare({}, {
+ error: function(model, msg) {
+ $loading.removeClass('inlineblock').addClass('hidden');
+ $input.addClass('error');
+ $input.attr('title', msg);
+ $input.tooltip({placement: 'bottom', trigger: 'manual'});
+ $input.tooltip('show');
+ }
+ });
},
onAllowPublicUploadChange: function() {