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.
This commit is contained in:
parent
f8607ac132
commit
51b55d5320
|
@ -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) {
|
||||
|
|
|
@ -183,12 +183,10 @@
|
|||
data: attributes,
|
||||
dataType: 'json'
|
||||
}).done(function() {
|
||||
self.fetch({
|
||||
success: function() {
|
||||
self.fetch().done(function() {
|
||||
if (_.isFunction(options.success)) {
|
||||
options.success(self);
|
||||
}
|
||||
}
|
||||
});
|
||||
}).fail(function(xhr) {
|
||||
var msg = t('core', 'Error');
|
||||
|
|
Loading…
Reference in New Issue