Browse Source

Fix sharedialog failure handler

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
tags/v15.0.0beta1
John Molakvoæ (skjnldsv) 5 years ago
parent
commit
a3bf860be7
No account linked to committer's email address
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      core/js/sharedialoglinkshareview.js

+ 13
- 1
core/js/sharedialoglinkshareview.js View File

@@ -251,11 +251,23 @@
}
},
error: function() {
// empty function to override the default Dialog warning
}
})).fail(function(response) {
// password failure? Show error
self.password = ''
if (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) {
$input = self.$el.find('.pending #enforcedPassText')
$input.tooltip('destroy');
$input.attr('title', response.responseJSON.ocs.meta.message);
$input.tooltip({placement: 'bottom', trigger: 'manual'});
$input.tooltip('show');
} else {
OC.Notification.showTemporary(t('core', 'Unable to create a link share'));
$loading.addClass('hidden');
$li.find('.icon').removeClass('hidden');
}
})).then(function(response) {
}).then(function(response) {
// resolve before success
newShareId = response.ocs.data.id
});

Loading…
Cancel
Save