hide empty folder notification when a folder or file got uploaded

This commit is contained in:
Jan-Christoph Borchardt 2011-07-30 12:14:09 +02:00
parent f9ddbc4925
commit 48fb1e2dae
2 changed files with 4 additions and 2 deletions

View File

@ -69,6 +69,7 @@ $(document).ready(function() {
$('#file_newfolder_name').blur(); $('#file_newfolder_name').blur();
});} });}
}); });
$('#emptyfolder').remove();
}); });
$('#file_newfolder_name').click(function(){ $('#file_newfolder_name').click(function(){
@ -181,6 +182,7 @@ $(document).ready(function() {
clone.insertBefore(form); clone.insertBefore(form);
form.hide(); form.hide();
} }
$('#emptyfolder').remove();
}); });
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used) //add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
@ -433,4 +435,4 @@ function getMimeIcon(mime){
mime='file'; mime='file';
} }
return OC.imagePath('core','mimetypes/'+mime+'.png'); return OC.imagePath('core','mimetypes/'+mime+'.png');
} }

View File

@ -1,4 +1,4 @@
<?php if(!$_['files']) echo '<span id="emptyfolder">Nothing in here. Upload something!</span><style>.file_upload_filename { background-color:#ffc100; border:#dda600 1px solid; }</style>'; <?php if(!$_['files']) echo '<span id="emptyfolder">Nothing in here. Upload something!<style>.file_upload_filename { background-color:#ffc100; border:#dda600 1px solid; }</style></span>';
foreach($_['files'] as $file): foreach($_['files'] as $file):
$simple_file_size = simple_file_size($file['size']); $simple_file_size = simple_file_size($file['size']);
$simple_size_color = 200-intval($file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey $simple_size_color = 200-intval($file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey