ask for confirmation when deleting an external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a90b046a17
commit
2b7c489d75
|
@ -1129,16 +1129,23 @@ MountConfigListView.prototype = _.extend({
|
|||
return;
|
||||
}
|
||||
var storage = new this._storageConfigClass(configId);
|
||||
|
||||
OC.dialogs.confirm(t('files_external', 'Are you sure you want to delete this external storage', {
|
||||
storage: this.mountPoint
|
||||
}), t('files_external', 'Delete storage?'), function(confirm) {
|
||||
if (confirm) {
|
||||
this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
|
||||
|
||||
storage.destroy({
|
||||
success: function() {
|
||||
success: function () {
|
||||
$tr.remove();
|
||||
},
|
||||
error: function() {
|
||||
error: function () {
|
||||
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue