diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-06 11:33:24 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-07 15:44:00 +0200 |
commit | 0dc13d098fbd0cd7106ab99f0ed617827e89d72b (patch) | |
tree | f9418e64332657b88ba1b86227192c61b8493630 /core | |
parent | c7b1a48da7df6c1f38df48caf2f2771d14956b30 (diff) | |
download | nextcloud-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.js | 8 |
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(); } |