From 4f2bd8742ea894d115d69f9836f630f5a6b29b2e Mon Sep 17 00:00:00 2001
From: MakubeX <makubexgb@gmail.com>
Date: Wed, 28 Sep 2011 18:08:20 -0400
Subject: [PATCH] Issue #1046744: Disabled right click on playlist and display
 of URL when hovering over.

---
 includes/jplayer.theme.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/includes/jplayer.theme.inc b/includes/jplayer.theme.inc
index 01eacad..4b21cd2 100644
--- a/includes/jplayer.theme.inc
+++ b/includes/jplayer.theme.inc
@@ -86,6 +86,7 @@ function theme_jplayer_item_list($variables) {
       if ($i == $num_items - 1) {
         $attributes['class'][] = 'last jp-playlist-last';
       }
+      $attributes['oncontextmenu'] = "return false;"; //Custom Code
       $output .= '<li' . drupal_attributes($attributes) . '>' . $data . "</li>\n";
     }
     $output .= "</$type>";
@@ -168,7 +169,7 @@ function jplayer_sort_files($raw_files = array(), $player_id, $type = 'single')
     if (isset($file) && $file['type'] == 'audio') {
       $files[][$file['ext']] = $file['url'];
       $extensions[] = $file['ext'];
-      $playlist[] = l($file['label'], $file['url'], array('attributes' => array('id' => $player_id . '_item_' . $num, 'tabindex' => 1)));
+      $playlist[] = l($file['label'], '#', array('attributes' => array('id' => $player_id . '_item_' . $num, 'tabindex' => 1, 'onclick' => '<?php drupal_goto($file["url"]) ?>;')));  //Custom Code
       $num++;
     }
     elseif (isset($file) && $file['type'] == 'video') {
@@ -177,7 +178,7 @@ function jplayer_sort_files($raw_files = array(), $player_id, $type = 'single')
         $files[]['poster'] = $poster;
       }
       $extensions[] = $file['ext'];
-      $playlist[] = l($file['label'], $file['url'], array('attributes' => array('id' => $player_id . '_item_' . $num, 'tabindex' => 1)));
+      $playlist[] = l($file['label'], '#', array('attributes' => array('id' => $player_id . '_item_' . $num, 'tabindex' => 1, 'onclick' => '<?php drupal_goto($file["url"]) ?>;')));  //Custom Code
       $num++;
     }
   }
-- 
1.7.6.msysgit.0

