From 2df5a83d8fa3c97d8fab55fec337b7998a7b44d9 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 8 Jul 2013 15:33:04 +0000 Subject: [PATCH] info view, right column: make capability icons act as links --- static/js/pandora/infoView.0xdb.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/infoView.0xdb.js b/static/js/pandora/infoView.0xdb.js index 9d938b31..ee024610 100644 --- a/static/js/pandora/infoView.0xdb.js +++ b/static/js/pandora/infoView.0xdb.js @@ -858,9 +858,27 @@ pandora.ui.infoView = function(data) { type: 'image' }) .addClass('OxColor OxColorGradient') - .css({background: $element.css('background')}) + .css({ + background: $element.css('background'), + cursor: hasCapability ? 'pointer' : 'default' + }) .css('margin' + (canEdit ? 'Left' : 'Right'), '4px') .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); }); if (!canEdit) {