use new Ox.formatDuration()

This commit is contained in:
rolux 2011-10-10 09:32:50 +02:00
parent c6c1c9b15b
commit 17c90bd1c5
5 changed files with 8 additions and 6 deletions

View file

@ -273,7 +273,7 @@
"title": "Duration",
"type": "float",
"columnWidth": 90,
"format": {"type": "duration", "args": [0, "short"]}
"format": {"type": "duration", "args": []}
},
{
"id": "resolution",

View file

@ -112,6 +112,7 @@ pandora.UI = (function() {
});
});
});
pandora.URL.update(Object.keys(
!pandora.$ui.appPanel ? args : trigger
));

View file

@ -24,8 +24,8 @@ pandora.ui.clipList = function(videoRatio) {
url = '/' + data.id.split('/')[0] + '/' + height + 'p' + data['in'] + '.jpg';
sortKey = sort[0].key;
if (['text', 'position', 'duration'].indexOf(sortKey) > -1) {
info = Ox.formatDuration(data['in'], 'short') + ' - '
+ Ox.formatDuration(data.out, 'short');
info = Ox.formatDuration(data['in']) + ' - '
+ Ox.formatDuration(data.out);
} else {
format = pandora.getSortKeyData(sortKey).format;
info = format

View file

@ -94,7 +94,8 @@ pandora.ui.item = function() {
return {
height: height,
id: data['id'],
info: Ox.formatDuration(data['in'], 'short') +' - '+ Ox.formatDuration(data['out'], 'short'),
info: Ox.formatDuration(data['in']) + ' - '
+ Ox.formatDuration(data['out']),
title: data.value,
url: url,
width: width

View file

@ -2,9 +2,9 @@
pandora.ui.status = function(key, data) {
var that = Ox.toTitleCase(key) + ': ' + [
Ox.formatNumber(data.items) + ' '+ (data.items != 1 ? pandora.site.itemName.plural : pandora.site.itemName.singular),
Ox.formatDuration(data.runtime, 'medium'),
Ox.formatDuration(data.runtime, 'short'),
data.files + ' file' + (data.files != 1 ? 's' : ''),
Ox.formatDuration(data.duration, 'short'),
Ox.formatDuration(data.duration),
Ox.formatValue(data.size, 'B'),
Ox.formatValue(data.pixels, 'px')
].join(', ');