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,14 +1129,21 @@ MountConfigListView.prototype = _.extend({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var storage = new this._storageConfigClass(configId);
|
var storage = new this._storageConfigClass(configId);
|
||||||
this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
|
|
||||||
|
|
||||||
storage.destroy({
|
OC.dialogs.confirm(t('files_external', 'Are you sure you want to delete this external storage', {
|
||||||
success: function() {
|
storage: this.mountPoint
|
||||||
$tr.remove();
|
}), t('files_external', 'Delete storage?'), function(confirm) {
|
||||||
},
|
if (confirm) {
|
||||||
error: function() {
|
this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
|
||||||
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
|
||||||
|
storage.destroy({
|
||||||
|
success: function () {
|
||||||
|
$tr.remove();
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
self.updateStatus($tr, StorageConfig.Status.ERROR);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue