summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-06 11:33:24 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2017-04-07 15:44:00 +0200
commit0dc13d098fbd0cd7106ab99f0ed617827e89d72b (patch)
treef9418e64332657b88ba1b86227192c61b8493630 /core
parentc7b1a48da7df6c1f38df48caf2f2771d14956b30 (diff)
downloadnextcloud-server-0dc13d098fbd0cd7106ab99f0ed617827e89d72b.tar.gz
nextcloud-server-0dc13d098fbd0cd7106ab99f0ed617827e89d72b.zip
reset password field properties before we hide it
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core')
-rw-r--r--core/js/sharedialogshareelistview.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 0ec14b30152..555ca7fcded 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -515,15 +515,21 @@
var shareId = li.data('share-id');
var passwordContainerClass = '.passwordContainer-' + this.cid + '-' + shareId;
var passwordContainer = $(passwordContainerClass);
+ var loading = this.$el.find(passwordContainerClass + ' .icon-loading-small');
var inputClass = '#passwordField-' + this.cid + '-' + shareId;
var passwordField = $(inputClass);
var state = element.prop('checked');
- passwordContainer.toggleClass('hidden', !state);
if (!state) {
this.model.updateShare(shareId, {password: ''});
passwordField.attr('value', '');
+ passwordField.removeClass('error');
+ passwordField.tooltip('hide');
+ loading.addClass('hidden');
passwordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);
+ // We first need to reset the password field before we hide it
+ passwordContainer.toggleClass('hidden', !state);
} else {
+ passwordContainer.toggleClass('hidden', !state);
passwordField = '#passwordField-' + this.cid + '-' + shareId;
this.$(passwordField).focus();
}