From 17c90bd1c50d1a63852eb060a29a2299a8288c3e Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 10 Oct 2011 09:32:50 +0200 Subject: [PATCH] use new Ox.formatDuration() --- pandora/0xdb.json | 2 +- static/js/pandora/UI.js | 1 + static/js/pandora/ui/clipList.js | 4 ++-- static/js/pandora/ui/item.js | 3 ++- static/js/pandora/ui/status.js | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pandora/0xdb.json b/pandora/0xdb.json index 400cf51f..4b6e2618 100644 --- a/pandora/0xdb.json +++ b/pandora/0xdb.json @@ -273,7 +273,7 @@ "title": "Duration", "type": "float", "columnWidth": 90, - "format": {"type": "duration", "args": [0, "short"]} + "format": {"type": "duration", "args": []} }, { "id": "resolution", diff --git a/static/js/pandora/UI.js b/static/js/pandora/UI.js index 723148d3..8af068cf 100644 --- a/static/js/pandora/UI.js +++ b/static/js/pandora/UI.js @@ -112,6 +112,7 @@ pandora.UI = (function() { }); }); }); + pandora.URL.update(Object.keys( !pandora.$ui.appPanel ? args : trigger )); diff --git a/static/js/pandora/ui/clipList.js b/static/js/pandora/ui/clipList.js index 7eb33ee7..b2aeaec5 100644 --- a/static/js/pandora/ui/clipList.js +++ b/static/js/pandora/ui/clipList.js @@ -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 diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js index 89d16008..9c4f2f8b 100644 --- a/static/js/pandora/ui/item.js +++ b/static/js/pandora/ui/item.js @@ -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 diff --git a/static/js/pandora/ui/status.js b/static/js/pandora/ui/status.js index 1fe9c61f..0367e10b 100644 --- a/static/js/pandora/ui/status.js +++ b/static/js/pandora/ui/status.js @@ -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(', ');