status
This commit is contained in:
parent
1c33fea5bb
commit
764e992fcc
1 changed files with 19 additions and 9 deletions
|
@ -1,13 +1,23 @@
|
||||||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||||
pandora.ui.status = function(key, data) {
|
pandora.ui.status = function(key, data) {
|
||||||
var that = Ox.toTitleCase(key) + ': ' + [
|
var itemName = data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.singular,
|
||||||
Ox.formatNumber(data.items) + ' '+ (data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.singular),
|
segments = [],
|
||||||
Ox.formatDuration(data.runtime, 'short'),
|
that = Ox.toTitleCase(key) + ': ';
|
||||||
data.files + ' file' + (data.files != 1 ? 's' : ''),
|
if (!pandora.user.ui.item && pandora.user.ui.listView == 'clip') {
|
||||||
Ox.formatDuration(data.duration),
|
itemName = data.items != 1 ? 'Clips' : 'Clip';
|
||||||
Ox.formatValue(data.size, 'B'),
|
}
|
||||||
Ox.formatValue(data.pixels, 'px')
|
|
||||||
].join(', ');
|
segments.push(Ox.formatNumber(data.items) + ' '+ itemName);
|
||||||
return that;
|
if (data.runtime)
|
||||||
|
segments.push(Ox.formatDuration(data.runtime, 'short'));
|
||||||
|
if (data.files)
|
||||||
|
segments.push(data.files + ' file' + (data.files != 1 ? 's' : ''));
|
||||||
|
if (data.duration)
|
||||||
|
segments.push(Ox.formatDuration(data.duration));
|
||||||
|
if (data.size)
|
||||||
|
segments.push(Ox.formatValue(data.size, 'B'));
|
||||||
|
if (data.pixels)
|
||||||
|
segments.push(Ox.formatValue(data.pixels, 'px'));
|
||||||
|
return that + segments.join(', ');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue