From 19645950acb1864b07bf8acd3e771593eb007e46 Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Tue, 14 Oct 2014 13:44:08 -0400
Subject: [PATCH] Duplicate ids in list-entry dropdowns fix.

---
 .../templates/RecordDriver/SolrDefault/list-entry.phtml     | 6 ++++--
 .../templates/RecordDriver/SolrDefault/list-entry.phtml     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/themes/bootstrap/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/bootstrap/templates/RecordDriver/SolrDefault/list-entry.phtml
index ce14222bcbc..965bbb80e5d 100644
--- a/themes/bootstrap/templates/RecordDriver/SolrDefault/list-entry.phtml
+++ b/themes/bootstrap/templates/RecordDriver/SolrDefault/list-entry.phtml
@@ -175,12 +175,14 @@
           ? $this->url('myresearch-favorites')
           : $this->url('userList', array('id' => $list_id));
       $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&amp;source=' . urlencode($source);
+
+      $dLabel = 'delete-label-' . preg_replace('[\W]','-',$id);
     ?>
     <div class="dropdown">
-      <i class="icon-trash"></i> <a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="<?=$deleteUrlGet ?>">
+      <i class="icon-trash"></i> <a class="dropdown-toggle" id="<?=$dLabel ?>" role="button" data-toggle="dropdown" data-target="#" href="<?=$deleteUrlGet ?>">
         <?=$this->transEsc('Delete') ?>
       </a>
-      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+      <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel ?>">
         <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeHtmlAttr($id) ?>','source':'<?=$this->escapeHtmlAttr($source) ?>','confirm':true},function(){location.reload(true)})" title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li>
         <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li>
       </ul>
diff --git a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
index 8840dc3e6ec..090950abf40 100644
--- a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
+++ b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
@@ -175,12 +175,14 @@
           ? $this->url('myresearch-favorites')
           : $this->url('userList', array('id' => $list_id));
       $deleteUrlGet = $deleteUrl . '?delete=' . urlencode($id) . '&amp;source=' . urlencode($source);
+
+      $dLabel = 'delete-label-' . preg_replace('[\W]','-',$id);
     ?>
     <div class="dropdown">
-      <i class="fa fa-trash-o"></i> <a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="<?=$deleteUrlGet ?>">
+      <i class="fa fa-trash-o"></i> <a class="dropdown-toggle" id="<?=$dLabel ?>" role="button" data-toggle="dropdown" data-target="#" href="<?=$deleteUrlGet ?>">
         <?=$this->transEsc('Delete') ?>
       </a>
-      <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+      <ul class="dropdown-menu" role="menu" aria-labelledby="<?=$dLabel ?>">
         <li><a onClick="$.post('<?=$deleteUrl?>', {'delete':'<?=$this->escapeHtmlAttr($id) ?>','source':'<?=$this->escapeHtmlAttr($source) ?>','confirm':true},function(){location.reload(true)})" title="<?=$this->transEsc('confirm_delete_brief')?>"><?=$this->transEsc('confirm_dialog_yes')?></a></li>
         <li><a><?=$this->transEsc('confirm_dialog_no')?></a></li>
       </ul>
-- 
GitLab