Browse Source
ask for confirmation when deleting an external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/6676/head
Robin Appelman
8 years ago
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with
14 additions and
7 deletions
-
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); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|