From 8ef5d6908bc526377788a419599424386956039e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 11 Apr 2015 23:29:30 +0200 Subject: [PATCH] show number of cached items in status bar. --- static/js/cacheDialog.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/js/cacheDialog.js b/static/js/cacheDialog.js index 3ec3d6ec6..ad651548d 100644 --- a/static/js/cacheDialog.js +++ b/static/js/cacheDialog.js @@ -332,13 +332,15 @@ pandora.ui.cacheDialog = function() { $list.value(file.id, 'size', file.size); } }); - updateStatus(); + updateStatus(files.length); }); } - function updateStatus() { + function updateStatus(items) { navigator.webkitPersistentStorage.queryUsageAndQuota(function(usage, quota) { $status.html( - Ox.formatValue(usage, 'B', true) + ' of ' + Ox.formatValue(quota, 'B', true) + Ox.formatNumber(items) + ' Items - ' + + Ox.formatValue(usage, 'B', true) + + ' of ' + Ox.formatValue(quota, 'B', true) ); })