diff options
author | VicDeo <dubiniuk@owncloud.com> | 2013-10-30 12:11:01 -0700 |
---|---|---|
committer | VicDeo <dubiniuk@owncloud.com> | 2013-10-30 12:11:01 -0700 |
commit | 257084444b062758ac9f56eb9eb0845d62fe6e9c (patch) | |
tree | 0be058f5e7f20559b4eb556e3e7a88d7f601bd71 /apps | |
parent | cdb3c746327619009c1af10b2adbd610cb140ccc (diff) | |
parent | aeac3186ee52fcadf57b34fc307f5441041cb43d (diff) | |
download | nextcloud-server-257084444b062758ac9f56eb9eb0845d62fe6e9c.tar.gz nextcloud-server-257084444b062758ac9f56eb9eb0845d62fe6e9c.zip |
Merge pull request #5628 from owncloud/files-fixsummary
Fixed summary visibility check
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index c33a06bbdc3..02dfa16a224 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -593,18 +593,19 @@ var FileList={ var fileSize = '<td class="filesize">'+humanFileSize(totalSize)+'</td>'; } - $('#fileList').append('<tr class="summary"><td><span class="info">'+info+'</span></td>'+fileSize+'<td></td></tr>'); + var $summary = $('<tr class="summary"><td><span class="info">'+info+'</span></td>'+fileSize+'<td></td></tr>'); + $('#fileList').append($summary); - var $dirInfo = $('.summary .dirinfo'); - var $fileInfo = $('.summary .fileinfo'); - var $connector = $('.summary .connector'); + var $dirInfo = $summary.find('.dirinfo'); + var $fileInfo = $summary.find('.fileinfo'); + var $connector = $summary.find('.connector'); // Show only what's necessary, e.g.: no files: don't show "0 files" - if ($dirInfo.html().charAt(0) === "0") { + if (totalDirs === 0) { $dirInfo.hide(); $connector.hide(); } - if ($fileInfo.html().charAt(0) === "0") { + if (totalFiles === 0) { $fileInfo.hide(); $connector.hide(); } |