Save configuration after paste events and 2 seconds after typing

This commit is contained in:
Michael Gapczynski 2012-12-26 13:35:22 -05:00
parent a0e47a2c67
commit 30a07e9573

View file

@ -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() {