aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-07-26 11:13:43 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-07-26 11:14:29 +0200
commita00cff7c0543a8860b839a0bf345478e99bc6c18 (patch)
treea4d256f02dca12026d021db1b46363157c5689da /apps/files/js/files.js
parent96e175ffbf6f209274395309e5b55ed724c5c2da (diff)
downloadnextcloud-server-a00cff7c0543a8860b839a0bf345478e99bc6c18.tar.gz
nextcloud-server-a00cff7c0543a8860b839a0bf345478e99bc6c18.zip
disable "deleted files" button if trash bin is empty
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js12
1 files changed, 10 insertions, 2 deletions
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