From efd8ad6696ebc8ff138ad71df4c0c0b788f19b6f Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Fri, 26 Jul 2013 14:54:27 +0200 Subject: found some more places where we can disable buttons while performing a action --- apps/files_trashbin/js/trash.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index 2ced7da44b1..409e3e59d5a 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -8,8 +8,7 @@ $(document).ready(function() { var undeleteAction = $('tr').filterAttr('data-file',filename).children("td.date"); var files = tr.attr('data-file'); undeleteAction[0].innerHTML = undeleteAction[0].innerHTML+spinner; - $(".action").css("display", "none"); - $(":input:checkbox").css("display", "none"); + disableActions(); $.post(OC.filePath('files_trashbin','ajax','undelete.php'), {files:JSON.stringify([files]), dirlisting:tr.attr('data-dirlisting') }, function(result){ @@ -20,8 +19,7 @@ $(document).ready(function() { if (result.status != 'success') { OC.dialogs.alert(result.data.message, t('core', 'Error')); } - $(".action").css("display", "inline"); - $(":input:checkbox").css("display", "inline"); + enableActions(); }); }); @@ -38,7 +36,7 @@ $(document).ready(function() { var newHTML = ''; var files = tr.attr('data-file'); deleteAction[0].outerHTML = newHTML; - + disableActions(); $.post(OC.filePath('files_trashbin','ajax','delete.php'), {files:JSON.stringify([files]), dirlisting:tr.attr('data-dirlisting') }, function(result){ @@ -49,6 +47,7 @@ $(document).ready(function() { if (result.status != 'success') { OC.dialogs.alert(result.data.message, t('core', 'Error')); } + enableActions(); }); }); @@ -102,7 +101,7 @@ $(document).ready(function() { var files=getSelectedFiles('file'); var fileslist = JSON.stringify(files); var dirlisting=getSelectedFiles('dirlisting')[0]; - + disableActions(); for (var i=0; i