Fix sharedialog failure handler
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
eeeb19079f
commit
a3bf860be7
1 changed files with 13 additions and 1 deletions
|
@ -251,11 +251,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function() {
|
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'));
|
OC.Notification.showTemporary(t('core', 'Unable to create a link share'));
|
||||||
$loading.addClass('hidden');
|
$loading.addClass('hidden');
|
||||||
$li.find('.icon').removeClass('hidden');
|
$li.find('.icon').removeClass('hidden');
|
||||||
}
|
}
|
||||||
})).then(function(response) {
|
}).then(function(response) {
|
||||||
// resolve before success
|
// resolve before success
|
||||||
newShareId = response.ocs.data.id
|
newShareId = response.ocs.data.id
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue