From 51b55d53206ec8731611e6a36bf8d7e3317a451a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 12 Feb 2016 14:01:15 +0100 Subject: Provide proper feedback when creating a share in the webUI Fixes #22304 Creating a share is not instant (especially not for federated shares) so we should show that something is happening in the webUI properly. --- core/js/sharedialogview.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'core/js/sharedialogview.js') diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 4cebf7962e8..02e0e673caa 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -233,8 +233,18 @@ _onSelectRecipient: function(e, s) { e.preventDefault(); - $(e.target).val(''); - this.model.addShare(s.item.value); + $(e.target).attr('disabled', true) + .val(s.item.label); + var $loading = this.$el.find('.shareWithLoading'); + $loading.removeClass('hidden') + .addClass('inlineblock'); + + this.model.addShare(s.item.value, {success: function() { + $(e.target).val('') + .attr('disabled', false); + $loading.addClass('hidden') + .removeClass('inlineblock'); + }}); }, _toggleLoading: function(state) { -- cgit v1.2.3