diff --git a/files/css/files.css b/files/css/files.css index 578d5df174b..c81960f5e48 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -6,6 +6,7 @@ #fileSelector, #file_upload_submit, #file_newfolder_submit { display:none; } .file_upload_filename, #file_newfolder_name { background-repeat:no-repeat; background-position:0.5em 0; padding-left:2em; } .file_upload_filename { background-image:url("../img/file.png"); font-weight:bold; }.file_upload_start { opacity:0;filter:alpha(opacity = 0); } +input.highlight{ background-color:#ffc100; border:#dda600 1px solid; } #file_newfolder_name { background-image:url("../img/folder.png"); font-weight:bold; width:11em; } .file_upload_start, .file_upload_filename { position:absolute; top:0px; left:0px; width:11em; font-size:0.9em; } 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 diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 40586664328..8f55440fe48 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,5 +1,5 @@ - Nothing in here. Upload something!'; - foreach($_['files'] as $file): + >Nothing in here. Upload something! +