summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-09-27 17:59:56 +0200
committerRobin Appelman <robin@icewind.nl>2017-09-27 17:59:56 +0200
commit2b7c489d75efa065d03978967b48a175e0019754 (patch)
tree97338f262123ce76593e2040a797a10100f41efc /apps/files_external
parenta90b046a17356f806fe17c5bbdf121985d38a9ad (diff)
downloadnextcloud-server-2b7c489d75efa065d03978967b48a175e0019754.tar.gz
nextcloud-server-2b7c489d75efa065d03978967b48a175e0019754.zip
ask for confirmation when deleting an external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/js/settings.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 30074ab179a..0003dbf0f75 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -1129,14 +1129,21 @@ MountConfigListView.prototype = _.extend({
return;
}
var storage = new this._storageConfigClass(configId);
- this.updateStatus($tr, StorageConfig.Status.IN_PROGRESS);
- storage.destroy({
- success: function() {
- $tr.remove();
- },
- error: function() {
- self.updateStatus($tr, StorageConfig.Status.ERROR);
+ 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 () {
+ $tr.remove();
+ },
+ error: function () {
+ self.updateStatus($tr, StorageConfig.Status.ERROR);
+ }
+ });
}
});
},