summaryrefslogtreecommitdiffstats
path: root/files/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-30 14:42:58 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-30 14:44:22 +0200
commit78d41a03e074c708d5f6082fd299bdbb3d545f73 (patch)
tree1e654bcb63184f7c937699024d64c79b31dc88b0 /files/js
parent95ec75b919f58fb55e561789d8a54d59312c7e19 (diff)
downloadnextcloud-server-78d41a03e074c708d5f6082fd299bdbb3d545f73.tar.gz
nextcloud-server-78d41a03e074c708d5f6082fd299bdbb3d545f73.zip
automatically hide show/hide the empty folder message
Diffstat (limited to 'files/js')
-rw-r--r--files/js/filelist.js6
-rw-r--r--files/js/files.js4
2 files changed, 10 insertions, 0 deletions
diff --git a/files/js/filelist.js b/files/js/filelist.js
index c3a2522fb6a..862fb1797a6 100644
--- a/files/js/filelist.js
+++ b/files/js/filelist.js
@@ -66,6 +66,10 @@ FileList={
remove:function(name){
$('tr[data-file="'+name+'"] td.filename').draggable('destroy');
$('tr[data-file="'+name+'"]').remove();
+ if($('tr[data-file]').length==0){
+ $('#emptyfolder').show();
+ $('.file_upload_filename').addClass('highlight');
+ }
},
insertElement:function(name,type,element){
//find the correct spot to insert the file or folder
@@ -93,6 +97,8 @@ FileList={
}else{
$('#fileList').append(element);
}
+ $('#emptyfolder').hide();
+ $('.file_upload_filename').removeClass('highlight');
},
loadingDone:function(name){
$('tr[data-file="'+name+'"]').data('loading',false);
diff --git a/files/js/files.js b/files/js/files.js
index d3f91fe9a2f..7005502d942 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -1,4 +1,8 @@
$(document).ready(function() {
+ if($('tr[data-file]').length==0){
+ $('.file_upload_filename').addClass('highlight');
+ }
+
$('#file_action_panel').attr('activeAction', false);
//drag/drop of files