aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-07-29 08:15:53 -0700
committerBjörn Schießle <bjoern@schiessle.org>2013-07-29 08:15:53 -0700
commit7f9795cc3d632577e392c7fbd07f39f70bf39773 (patch)
treeab3b6885e4a33173dde6502ff98edf0e6ee6d413 /apps/files/js
parent954b5d9019263b8d11cd61c858942f9eee78421d (diff)
parent4a9f5f64dabb47163d934324bfeee595d8a51789 (diff)
downloadnextcloud-server-7f9795cc3d632577e392c7fbd07f39f70bf39773.tar.gz
nextcloud-server-7f9795cc3d632577e392c7fbd07f39f70bf39773.zip
Merge pull request #4203 from owncloud/trashbin_improvements
Trashbin improvements
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js1
-rw-r--r--apps/files/js/files.js10
2 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 04a9fb91649..b858e2580ee 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -392,6 +392,7 @@ var FileList={
files.removeClass('selected');
});
procesSelection();
+ checkTrashStatus();
} else {
$.each(files,function(index,file) {
var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash");
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 98fc53b71a9..3fad3fae7d3 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -121,7 +121,7 @@ $(document).ready(function() {
});
// Show trash bin
- $('#trash a').live('click', function() {
+ $('#trash').on('click', function() {
window.location=OC.filePath('files_trashbin', '', 'index.php');
});
@@ -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