From a00cff7c0543a8860b839a0bf345478e99bc6c18 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Fri, 26 Jul 2013 11:13:43 +0200 Subject: disable "deleted files" button if trash bin is empty --- apps/files/js/files.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 98fc53b71a9..55280edde42 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -121,10 +121,10 @@ $(document).ready(function() { }); // Show trash bin - $('#trash a').live('click', function() { + $('#trash').on('click', function() { window.location=OC.filePath('files_trashbin', '', 'index.php'); }); - + var lastChecked; // Sets the file link behaviour : @@ -845,3 +845,11 @@ function getUniqueName(name){ } return name; } + +function checkTrashStatus() { + $.post(OC.filePath('files_trashbin', 'ajax', 'isEmpty.php'), function(result){ + if (result.data.isEmpty === false) { + $("input[type=button][id=trash]").removeAttr("disabled"); + } + }); +} \ No newline at end of file -- cgit v1.2.3 From 4a9f5f64dabb47163d934324bfeee595d8a51789 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 29 Jul 2013 17:15:20 +0200 Subject: remove whitespaces --- apps/files/js/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 55280edde42..3fad3fae7d3 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -124,7 +124,7 @@ $(document).ready(function() { $('#trash').on('click', function() { window.location=OC.filePath('files_trashbin', '', 'index.php'); }); - + var lastChecked; // Sets the file link behaviour : -- cgit v1.2.3