summaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-03-22 14:32:26 +0100
committerRobin Appelman <robin@icewind.nl>2017-03-22 14:32:26 +0100
commit11ee0b14bba1d9a88d1d49072771ba7bc8273f51 (patch)
tree5003217eebf6966e9a014e1008fc390c19128d52 /apps/files_external/js
parent11c4875190aced582f23b2041664972a3769008f (diff)
downloadnextcloud-server-11ee0b14bba1d9a88d1d49072771ba7bc8273f51.tar.gz
nextcloud-server-11ee0b14bba1d9a88d1d49072771ba7bc8273f51.zip
replace autosave with a save button for external storage configuration
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/settings.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 0270b7a6957..976c0c00b89 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -719,6 +719,10 @@ MountConfigListView.prototype = _.extend({
self.deleteStorageConfig($(this).closest('tr'));
});
+ this.$el.on('click', 'td.save>img', function () {
+ self.saveStorageConfig($(this).closest('tr'));
+ });
+
this.$el.on('click', 'td.mountOptionsToggle>img', function() {
self._showMountOptionsDropdown($(this).closest('tr'));
});
@@ -737,13 +741,6 @@ MountConfigListView.prototype = _.extend({
highlightInput($target);
var $tr = $target.closest('tr');
this.updateStatus($tr, null);
-
- var timer = $tr.data('save-timer');
- clearTimeout(timer);
- timer = setTimeout(function() {
- self.saveStorageConfig($tr, null, timer);
- }, 2000);
- $tr.data('save-timer', timer);
},
_onSelectBackend: function(event) {
@@ -813,8 +810,7 @@ MountConfigListView.prototype = _.extend({
$tr.data('storageConfig', storageConfig);
$tr.show();
- $tr.find('td').last().attr('class', 'remove');
- $tr.find('td.mountOptionsToggle').removeClass('hidden');
+ $tr.find('td.mountOptionsToggle, td.save, td.remove').removeClass('hidden');
$tr.find('td').last().removeAttr('style');
$tr.removeAttr('id');
$tr.find('select#selectBackend');