info view, right column: change list sort when clicking on values

This commit is contained in:
rolux 2013-07-08 15:08:40 +00:00
parent c24920d968
commit 5e4068114f

View file

@ -574,7 +574,15 @@ pandora.ui.infoView = function(data) {
) )
.append( .append(
Ox.Theme.formatColorPercent(value, 1, true) Ox.Theme.formatColorPercent(value, 1, true)
.css({textAlign: 'right'}) .css({textAlign: 'right', cursor: 'pointer'})
.bind({
click: function() {
pandora.UI.set('listSort', [{
key: key,
operator: pandora.getSortOperator(key)
}]);
}
})
) )
.appendTo($statistics); .appendTo($statistics);
}); });
@ -589,11 +597,19 @@ pandora.ui.infoView = function(data) {
.append(formatKey(itemKey.title, true)) .append(formatKey(itemKey.title, true))
.append( .append(
Ox.Theme.formatColor(null, 'gradient') Ox.Theme.formatColor(null, 'gradient')
.css({textAlign: 'right'}) .css({textAlign: 'right', cursor: 'pointer'})
.html( .html(
Ox['format' + Ox.toTitleCase(itemKey.format.type)] Ox['format' + Ox.toTitleCase(itemKey.format.type)]
.apply(null, [value].concat(itemKey.format.args)) .apply(null, [value].concat(itemKey.format.args))
) )
.bind({
click: function() {
pandora.UI.set('listSort', [{
key: key,
operator: pandora.getSortOperator(key)
}]);
}
})
) )
.appendTo($statistics); .appendTo($statistics);
}); });
@ -607,7 +623,15 @@ pandora.ui.infoView = function(data) {
.append(formatKey(key, true)) .append(formatKey(key, true))
.append( .append(
Ox.Theme.formatColor(value, key == 'volume' ? 'lightness' : key) Ox.Theme.formatColor(value, key == 'volume' ? 'lightness' : key)
.css({textAlign: 'right'}) .css({textAlign: 'right', cursor: 'pointer'})
.bind({
click: function() {
pandora.UI.set('listSort', [{
key: key,
operator: pandora.getSortOperator(key)
}]);
}
})
) )
.appendTo($statistics); .appendTo($statistics);
}); });
@ -623,8 +647,16 @@ pandora.ui.infoView = function(data) {
) )
.append( .append(
Ox.Theme.formatColor(null, 'gradient') Ox.Theme.formatColor(null, 'gradient')
.css({textAlign: 'right'}) .css({textAlign: 'right', cursor: 'pointer'})
.html(Ox.formatNumber(value, 3)) .html(Ox.formatNumber(value, 3))
.bind({
click: function() {
pandora.UI.set('listSort', [{
key: key,
operator: pandora.getSortOperator(key)
}]);
}
})
) )
.appendTo($statistics); .appendTo($statistics);
}); });
@ -999,7 +1031,16 @@ pandora.ui.infoView = function(data) {
} else { } else {
$rightsLevelElement $rightsLevelElement
.css({ .css({
marginBottom: '4px' marginBottom: '4px',
cursor: 'pointer'
})
.bind({
click: function() {
pandora.UI.set('listSort', [{
key: 'rightslevel',
operator: pandora.getSortOperator('rightslevel')
}]);
}
}) })
.appendTo($rightsLevel); .appendTo($rightsLevel);
} }