diff --git a/static/js/cacheDialog.js b/static/js/cacheDialog.js index 97cc47ab..1b7b770c 100644 --- a/static/js/cacheDialog.js +++ b/static/js/cacheDialog.js @@ -87,7 +87,16 @@ pandora.ui.cacheDialog = function() { } }), - $statusbar = Ox.Bar({size: 16}), + $status = $('
') + .css({ + width: '100%', + marginTop: '2px', + fontSize: '9px', + textAlign: 'center', + textOverflow: 'ellipsis' + }), + + $statusbar = Ox.Bar({size: 16}).append($status), $panel = Ox.SplitPanel({ elements: [ @@ -319,8 +328,18 @@ pandora.ui.cacheDialog = function() { $list.value(file.id, 'progress', file.progress); } }); + updateStatus(); }); } + function updateStatus() { + navigator.webkitPersistentStorage.queryUsageAndQuota(function(usage, quota) { + $status.html( + Ox.formatValue(usage, 'B', true) + ' of ' + Ox.formatValue(quota, 'B', true) + ); + + }) + + } return that;