fix media status

This commit is contained in:
j 2014-06-10 13:36:11 +02:00
parent e28542578d
commit 284544f733

View file

@ -80,24 +80,25 @@ pandora.ui.mediaView = function(options) {
return ['uploading', 'queued', 'encoding'].indexOf(data.state) == -1;
},
format: function(value, data) {
var opacity = value
|| ['encoding', 'failed', 'queued', 'uploading', 'wanted'].indexOf(data.state) > -1
? 1 : 0;
return $('<img>')
.attr({
src: ['uploading', 'queued', 'encoding', 'failed'].indexOf(data.state) > -1
? Ox.UI.getImageURL('symbol' + {
'uploading': 'Upload',
'queued': 'Data',
src: Ox.UI.getImageURL('symbol' + {
'available': 'Check',
'encoding': 'Sync',
'failed': 'Warning'
'failed': 'Warning',
'queued': 'Data',
'uploading': 'Upload',
'wanted': 'Up',
}[data.state])
: data.wanted
? Ox.UI.getImageURL('symbolUp')
: Ox.UI.getImageURL('symbolCheck')
})
.css({
width: '10px',
height: '10px',
padding: '3px',
opacity: (value || data.wanted) ? 1 : 0
opacity: opacity
});
},
id: 'selected',