diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-12-26 13:35:22 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-12-26 13:35:22 -0500 |
commit | 30a07e95737e3bed7be1d418c49fa9b60e160e7b (patch) | |
tree | 94259d871cbb696eaa50dd2b0b30f0ad145e5c85 /apps/files_external/js/settings.js | |
parent | a0e47a2c67f0fe5ff3ed07174e0922dae67707dc (diff) | |
download | nextcloud-server-30a07e95737e3bed7be1d418c49fa9b60e160e7b.tar.gz nextcloud-server-30a07e95737e3bed7be1d418c49fa9b60e160e7b.zip |
Save configuration after paste events and 2 seconds after typing
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r-- | apps/files_external/js/settings.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index a3abcfebb8b..f2a08ed6dfb 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -157,8 +157,23 @@ $(document).ready(function() { return defaultMountPoint+append; } - $('#externalStorage td').live('change', function() { - OC.MountConfig.saveStorage($(this).parent()); + $('#externalStorage td').live('paste', function() { + var tr = $(this).parent(); + setTimeout(function() { + OC.MountConfig.saveStorage(tr); + }, 20); + }); + + var timer; + + $('#externalStorage td').live('keyup', function() { + clearTimeout(timer); + var tr = $(this).parent(); + if ($(this).val) { + timer = setTimeout(function() { + OC.MountConfig.saveStorage(tr); + }, 2000); + } }); $('td.remove>img').live('click', function() { |