info view, right column: make capability icons act as links
This commit is contained in:
parent
5e4068114f
commit
2df5a83d8f
1 changed files with 19 additions and 1 deletions
|
@ -858,9 +858,27 @@ pandora.ui.infoView = function(data) {
|
||||||
type: 'image'
|
type: 'image'
|
||||||
})
|
})
|
||||||
.addClass('OxColor OxColorGradient')
|
.addClass('OxColor OxColorGradient')
|
||||||
.css({background: $element.css('background')})
|
.css({
|
||||||
|
background: $element.css('background'),
|
||||||
|
cursor: hasCapability ? 'pointer' : 'default'
|
||||||
|
})
|
||||||
.css('margin' + (canEdit ? 'Left' : 'Right'), '4px')
|
.css('margin' + (canEdit ? 'Left' : 'Right'), '4px')
|
||||||
.data({OxColor: $element.data('OxColor')})
|
.data({OxColor: $element.data('OxColor')})
|
||||||
|
.bindEvent({
|
||||||
|
click: function() {
|
||||||
|
if (hasCapability) {
|
||||||
|
if (capability.name == 'canSeeItem') {
|
||||||
|
$data.animate({scrollTop: 0}, 250);
|
||||||
|
} else if (capability.name == 'canPlayClips') {
|
||||||
|
pandora.UI.set({itemView: 'clips'});
|
||||||
|
} else if (capability.name == 'canPlayVideo') {
|
||||||
|
pandora.UI.set({itemView: ui.videoView});
|
||||||
|
} else if (capability.name == 'canDownloadVideo') {
|
||||||
|
document.location.href = '/' + ui.item + '/torrent/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.appendTo($line);
|
.appendTo($line);
|
||||||
});
|
});
|
||||||
if (!canEdit) {
|
if (!canEdit) {
|
||||||
|
|
Loading…
Reference in a new issue