CRM-13863 - Change action-items to opt-in rather than opt-out of popups
authorColeman Watts <coleman@civicrm.org>
Sun, 16 Mar 2014 01:10:55 +0000 (21:10 -0400)
committerColeman Watts <coleman@civicrm.org>
Sun, 16 Mar 2014 01:33:35 +0000 (21:33 -0400)
18 files changed:
CRM/Campaign/BAO/Survey.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Core/Action.php
css/civicrm.css
js/crm.ajax.js
templates/CRM/Admin/Page/PdfFormats.tpl
templates/CRM/Campaign/Form/addCampaignToComponent.tpl
templates/CRM/Contact/Page/View/GroupContact.tpl
templates/CRM/Contact/Page/View/Note.tpl
templates/CRM/Contribute/Page/PaymentInfo.tpl
templates/CRM/Contribute/Page/Tab.tpl
templates/CRM/Event/Form/ParticipantFeeSelection.tpl
templates/CRM/Event/Page/Tab.tpl
templates/CRM/Member/Page/Tab.tpl
templates/CRM/Pledge/Page/Tab.tpl
tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php
tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php
tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php

index 318df3dbe246554e5f616a604709379a7dcba8e1..3c95542163458ae40190b2c5449f073b3536f465 100644 (file)
@@ -818,7 +818,7 @@ INNER JOIN  civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a
         $urlPath = CRM_Utils_System::url(CRM_Core_Action::replace($link['url'], $ids),
           CRM_Core_Action::replace($link['qs'], $ids)
         );
-        $menuLinks[] = sprintf('<a href="%s" class="action-item" title="%s">%s</a>',
+        $menuLinks[] = sprintf('<a href="%s" class="action-item crm-hover-button" title="%s">%s</a>',
           $urlPath,
           CRM_Utils_Array::value('title', $link),
           $link['title']
@@ -830,7 +830,7 @@ INNER JOIN  civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a
       $allLinks = '';
       CRM_Utils_String::append($allLinks, '</li><li>', $menuLinks);
       $allLinks = "$extraULName <ul id='panel_{$extraLinksName}_xx' class='panel'><li>{$allLinks}</li></ul>";
-      $menuLinks = "<span class='btn-slide' id={$extraLinksName}_xx>{$allLinks}</span>";
+      $menuLinks = "<span class='btn-slide crm-hover-button' id={$extraLinksName}_xx>{$allLinks}</span>";
     }
 
     return $menuLinks;
index 3648974ebed70929660020287c45ab3361db02d4..3674a11923fe1b6f1a20faa13435a7f43bc9863e 100644 (file)
@@ -628,7 +628,7 @@ LEFT JOIN  civicrm_email ce ON ( ce.contact_id=c.id AND ce.is_primary = 1 )
 
       // do check for view.
       if (array_key_exists('view', $hasPermissions)) {
-        $contactLinks['rows'][$i]['view'] = '<a class="action-item action-item-first" href="' . CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $dao->id) . '" target="_blank">' . ts('View') . '</a>';
+        $contactLinks['rows'][$i]['view'] = '<a class="action-item" href="' . CRM_Utils_System::url('civicrm/contact/view', 'reset=1&cid=' . $dao->id) . '" target="_blank">' . ts('View') . '</a>';
         if (!$contactLinks['msg']) {
           $contactLinks['msg'] = 'view';
         }
index 3e6edc7bfb620366be29264f15acf642866ccaa7..987d08e33e33c026d784bc7b68ae5de92bd8c2e9 100644 (file)
@@ -231,8 +231,7 @@ class CRM_Core_Action {
 
     $url = array();
 
-    $firstLink = TRUE;
-    foreach ($seqLinks as $link) {
+    foreach ($seqLinks as $i => $link) {
       if (!$mask || !array_key_exists('bit', $link) || ($mask & $link['bit'])) {
         $extra = isset($link['extra']) ? self::replace($link['extra'], $values) : NULL;
 
@@ -247,46 +246,40 @@ class CRM_Core_Action {
           $urlPath = CRM_Utils_Array::value('url', $link, '#');
         }
 
-        $classes = 'action-item';
-        if ($firstLink) {
-          $firstLink = FALSE;
-          $classes .= " action-item-first";
-        }
+        $classes = 'action-item crm-hover-button';
         if (isset($link['ref'])) {
           $classes .= ' ' . strtolower($link['ref']);
         }
 
         //get the user specified classes in.
         if (isset($link['class'])) {
-          $className = $link['class'];
-          if (is_array($className)) {
-            $className = implode(' ', $className);
-          }
+          $className = is_array($link['class']) ? implode(' ', $link['class']) : $link['class'];
           $classes .= ' ' . strtolower($className);
         }
 
-        $linkClasses = 'class="' . $classes . '"';
-
         if ($urlPath !== '#' && $frontend) {
           $extra .= ' target="_blank"';
         }
-        $url[] = sprintf('<a href="%s" %s title="%s" ' . $extra . '>%s</a>',
+        // Hack to make delete dialogs smaller
+        if (strpos($urlPath, '/delete') || strpos($urlPath, 'action=delete')) {
+          $classes .= " small-popup";
+        }
+        $url[] = sprintf('<a href="%s" class="%s" %s' . $extra . '>%s</a>',
           $urlPath,
-          $linkClasses,
-          CRM_Utils_Array::value('title', $link),
+          $classes,
+          !empty($link['title']) ? "title='{$link['title']}' " : '',
           $link['name']
         );
       }
     }
 
 
-    $result = '';
     $mainLinks = $url;
     if ($enclosedAllInSingleUL) {
       $allLinks = '';
       CRM_Utils_String::append($allLinks, '</li><li>', $mainLinks);
       $allLinks = "{$extraULName}<ul class='panel'><li>{$allLinks}</li></ul>";
-      $result = "<span class='btn-slide'>{$allLinks}</span>";
+      $result = "<span class='btn-slide crm-hover-button'>{$allLinks}</span>";
     }
     else {
       $extra = '';
@@ -299,7 +292,7 @@ class CRM_Core_Action {
       $resultLinks = '';
       CRM_Utils_String::append($resultLinks, '', $mainLinks);
       if ($extra) {
-        $result = "<span>{$resultLinks}</span><span class='btn-slide'>{$extra}</span>";
+        $result = "<span>{$resultLinks}</span><span class='btn-slide crm-hover-button'>{$extra}</span>";
       }
       else {
         $result = "<span>{$resultLinks}</span>";
index add263391fd06805c5621adc9134672fce850bee..b80a01f604fe2b84d0dd0a469319feb7bd8b43ee 100644 (file)
@@ -1635,8 +1635,6 @@ editor specific classes
 
 /* Styles for Action Items &  Action Link pop-up */
 .crm-container .action-item {
-  padding: 0px 5px;
-  border-left: 1px solid #CCC;
   white-space: nowrap;
 }
 .crm-container .action-item-wrap {
@@ -1644,10 +1642,6 @@ editor specific classes
   border-left: 1px solid #CCC;
   white-space: normal;
 }
-.crm-container .action-item-first {
-  border-left: none;
-  /* last action item should not have right hand border */}
-
 
 /* theming for panel and context menus */
 .crm-container td ul.panel li {
@@ -1694,17 +1688,24 @@ editor specific classes
 
 .crm-container .btn-slide {
   text-align: left;
-  text-decoration: none;
-  border: none;
   cursor: pointer;
   position: relative;
-  padding: 0px 14px 0 5px;
-  background: url("../i/TreePlus.gif") no-repeat right 1px;
   white-space: nowrap;
-  z-index: 2;
+  padding-right: 15px !important;
+}
+.crm-container .btn-slide:after {
+  content: "";
+  display: block;
+  height: 15px;
+  position: absolute;
+  right: 2px;
+  top: 3px;
+  width: 15px;
+  background: url("../i/TreePlus.gif") no-repeat right 1px;
 }
 
-.crm-container .btn-slide-active {
+
+.crm-container .btn-slide-active .panel {
   z-index: 10;
 }
 
@@ -2655,6 +2656,13 @@ div.grippie {
   padding: 1px 2px 1px 0;
   opacity: .7;
 }
+.crm-container a.crm-hover-button.action-item,
+.crm-container .crm-hover-button.btn-slide {
+  font-size: .9em;
+  padding: 3px 5px;
+  opacity: 1;
+  border: 1px solid transparent;
+}
 .crm-container .crm-accordion-header .crm-hover-button {
   opacity: 1;
   position: relative;
index 34ca8dc65c0be59e52d1165a1a9dc05ebabfafa3..4050f12f82dc3f6bf63e8b5ade17909281981adb 100644 (file)
     // Create new dialog
     if (settings.dialog) {
       // HACK: jQuery UI doesn't support relative height
-      if (settings.dialog.height && settings.dialog.height.indexOf('%') > 0) {
+      if (typeof settings.dialog.height === 'string' && settings.dialog.height.indexOf('%') > 0) {
         settings.dialog.height = parseInt($(window).height() * (parseFloat(settings.dialog.height)/100), 10);
       }
       $('<div id="'+ settings.target.substring(1) +'"><div class="crm-loading-element">' + ts('Loading') + '...</div></div>').dialog(settings.dialog);
     if (!CRM.config.ajaxPopupsEnabled || !url || url.charAt(0) === '#' || $el.attr('onclick') || $el.hasClass('no-popup')) {
       return;
     }
-    // Sized based on css class with hack to make delete dialogs smaller
-    if ($el.hasClass('small-popup') || url.indexOf('/delete') > 0 || url.indexOf('action=delete') > 0) {
+    // Sized based on css class
+    if ($el.hasClass('small-popup')) {
       settings.dialog.width = 400;
       settings.dialog.height = 300;
     }
     });
     return false;
   };
+
+  $(function($) {
+    $('body').on('click', 'a.crm-popup', CRM.popup);
+  });
+
 }(jQuery, CRM));
index 437e4d17d848c08334db736db59266ba92c6c8c6..e01ad6382ac44ce33fc4835dd32fe6597460fb70 100644 (file)
@@ -63,7 +63,7 @@
 {else}
     <div class="messages status no-popup">
       <div class="icon inform-icon"></div>
-        {capture assign=link}href="{crmURL q="action=add&reset=1"}" class="action-item action-item-first"{/capture}
+        {capture assign=link}href="{crmURL q="action=add&reset=1"}" class="action-item"{/capture}
         {ts 1=$link}There are no PDF Page Formats configured. You can <a %1>add one</a>.{/ts}
     </div>
 {/if}
index 39ac4e3a942d590b3e3284971ce8da6f4cb35e8f..20481ac0b7bbbf2e6dc5c9baecf1cbbe9d2b71cc 100644 (file)
@@ -34,7 +34,7 @@
             <div class="status">
             {ts}There are currently no active Campaigns.{/ts}
             {if $campaignInfo.addCampaignURL}
-              {capture assign="link"}href="{$campaignInfo.addCampaignURL}" class="action-item action-item-first"{/capture}
+              {capture assign="link"}href="{$campaignInfo.addCampaignURL}" class="action-item"{/capture}
               {ts 1=$link}If you want to associate this record with a campaign, you can <a %1>create a campaign here</a>.{/ts}
             {/if} {help id="id-campaign_id" file="CRM/Campaign/Form/addCampaignToComponent.hlp"}
             </div>
index f17dea5e80421b33c9be56d28d2d6858b9c7f695..3b0221a759c1ba1261c3796483023db98f68fad5 100644 (file)
@@ -63,7 +63,7 @@
             <td>{$row.in_date|crmDate}</td>
             <td>
               {if $permission EQ 'edit'}
-                <a class="action-item action-item-first" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
+                <a class="action-item" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
                   {ts}Remove{/ts}</a>
                 <a class="action-item" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (remove contact AND delete their record of having been in this group).{/ts}">
                   {ts}Delete{/ts}</a>
             <td>{$row.pending_date|crmDate}</td>
             <td>
               {if $permission EQ 'edit'}
-                <a class="action-item action-item-first" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
+                <a class="action-item" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
                   {ts}Remove{/ts}</a>
                 <a class="action-item" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (this group will no longer be listed under Pending Groups){/ts}">
                   {ts}Delete{/ts}</a>
             <td>{$row.date_added|crmDate}</td>
             <td>{$row.out_date|crmDate}</td>
             <td>{if $permission EQ 'edit'}
-                <a class="action-item action-item-first" href="#Added" title="{ts 1=$displayName 2=$row.title}Add %1 back into %2?{/ts}">
+                <a class="action-item" href="#Added" title="{ts 1=$displayName 2=$row.title}Add %1 back into %2?{/ts}">
                   {ts}Rejoin Group{/ts}</a>
               <a class="action-item" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (this group will no longer be listed under Past Groups).{/ts}">
                 {ts}Delete{/ts}</a>{/if}
index 61e9d350782911ce57e41f046ecd8aedf441cd24..76d8323b0c4c9020f17007ab10a94c984d977f5d 100644 (file)
 {elseif ($action eq 16)}
    <div class="messages status no-popup">
         <div class="icon inform-icon"></div>
-        {capture assign=link}class="action-item action-item-first" accesskey="N" href="{crmURL p='civicrm/contact/view/note' q="cid=`$contactId`&action=add"}"{/capture}
+        {capture assign=link}class="action-item" accesskey="N" href="{crmURL p='civicrm/contact/view/note' q="cid=`$contactId`&action=add"}"{/capture}
         {ts 1=$link}There are no Notes for this contact. You can <a %1>add one</a>.{/ts}
    </div>
 {/if}
index c953dbde2e3e99c27dba8f1bcfb34b43684113aa..8886c9ec50483af5d955dc2f7688954f253b752f 100644 (file)
@@ -56,7 +56,7 @@ cj(function($){
     <td>{$paymentInfo.total|crmMoney}</td>
     <td class='right'>
       {if $paymentInfo.paid > 0}
-        <a class="crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>{$paymentInfo.paid|crmMoney}<br/><span class="crm-hover-button">&raquo; view payments</span></a>
+        <a class="action-item medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>{$paymentInfo.paid|crmMoney}<br/><span class="crm-hover-button">&raquo; view payments</span></a>
       {/if}
     </td>
     <td class='right'>{$paymentInfo.balance|crmMoney}</td>
index b946e5d1ff309c0de98d1a9e34a4b23e9d0356bc..9d83c47c0db8f3dcd8743fd164171e502f0c8c44 100644 (file)
         <div id="help">
             {if $permission EQ 'edit'}
               {capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=contribution"}{/capture}
-              {capture assign=link}class="action-item action-item-first" href="{$newContribURL}"{/capture}
+              {capture assign=link}class="action-item" href="{$newContribURL}"{/capture}
               {ts 1=$link}Click <a %1>Record Contribution</a> to record a new contribution received from this contact.{/ts}
                 {if $newCredit}
                   {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=contribution&mode=live"}{/capture}
-                  {capture assign=link}class="action-item action-item-first" href="{$newCreditURL}"{/capture}
+                  {capture assign=link}class="action-item" href="{$newCreditURL}"{/capture}
                   {ts 1=$link}Click <a %1>Submit Credit Card Contribution</a> to process a new contribution on behalf of the contributor using their credit card.{/ts}
                 {/if}
             {else}
index 31383cad3eeeeb72537d32e2870c7acb86c361b2..1bfa53a18e757d20d28d94ec07037b49c951c3a1 100644 (file)
@@ -129,7 +129,7 @@ cj(function(){
          <div class='crm-section'> 
          <div class='label'>{ts}Updated Fee(s){/ts}</div><div id="pricevalue" class='content updated-fee'></div>
          <div class='label'>{ts}Total Paid{/ts}</div>
-         <div class='content'><a class="crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&action=browse&cid=`$contactId`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'>{$paymentInfo.paid|crmMoney}<br/><span class="crm-hover-button">&raquo; view payments</span></a>
+         <div class='content'><a class="action-item medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&action=browse&cid=`$contactId`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'>{$paymentInfo.paid|crmMoney}<br/><span class="crm-hover-button">&raquo; view payments</span></a>
          </div>
          <div class='label'><strong>{ts}Balance Owed{/ts}</strong></div><div class='content'><strong id='balance-fee'></strong></div>
           </div>
index 9d6d8a02143bd0b49fed12379c4eb46f4f8c2d9b..9284f503d73b5fdd488ada226f02f356f121b523 100644 (file)
 
     <div id="help">
         <p>{ts 1=$displayName}This page lists all event registrations for %1 since inception.{/ts}
-        {capture assign="link"}class="action-item action-item-first" href="{$newEventURL}"{/capture}
+        {capture assign="link"}class="action-item" href="{$newEventURL}"{/capture}
         {if $permission EQ 'edit'}{ts 1=$link}Click <a %1>Add Event Registration</a> to register this contact for an event.{/ts}{/if}
         {if $accessContribution and $newCredit}
             {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/participant" q="reset=1&action=add&cid=`$contactId`&context=participant&mode=live"}{/capture}
-            {capture assign="link"}class="action-item action-item-first" href="{$newCreditURL}"{/capture}
+            {capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture}
             {ts 1=$link}Click <a %1>Submit Credit Card Event Registration</a> to process a new New Registration on behalf of the participant using their credit card.{/ts}
         {/if}
         </p>
index 2b6bdd7d0a942835db78b4a590290083280db376..c2b11233f8212101a1504b186cf9c4e4e0caf043 100644 (file)
     {if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
         <div id="help">
             {if $permission EQ 'edit'}
-              {capture assign="link"}class="action-item action-item-first" href="{$newURL}"{/capture}
+              {capture assign="link"}class="action-item" href="{$newURL}"{/capture}
               {ts 1=$link}Click <a %1>Add Membership</a> to record a new membership.{/ts}
               {if $newCredit}
                 {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture}
-                {capture assign="link"}class="action-item action-item-first" href="{$newCreditURL}"{/capture}
+                {capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture}
                 {ts 1=$link}Click <a %1>Submit Credit Card Membership</a> to process a Membership on behalf of the member using their credit card.{/ts}
                 {/if}
             {else}
index 7eb58b67677e5fa1b7abe1ac9f20b4bac4993330..08e37392217088469c5de0001920f23227d3dfb3 100644 (file)
@@ -33,7 +33,7 @@
     {ts 1=$displayName}Pledges received from %1 since inception.{/ts}
     {if $permission EQ 'edit'}
      {capture assign=newContribURL}{crmURL p="civicrm/contact/view/pledge" q="reset=1&action=add&cid=`$contactId`&context=pledge"}{/capture}
-     {capture assign=link}class="action-item action-item-first" href="{$newContribURL}"{/capture}
+     {capture assign=link}class="action-item" href="{$newContribURL}"{/capture}
      {ts 1=$link}Click <a %1>Add Pledge</a> to record a new pledge received from this contact.{/ts}
     {/if}
 </div>
index ba6dc754f21b28d4db4a5b943203fc2614a5d6da..5e2ccee53ff5bbf7aec2b2ee2b36010d71e2140f 100644 (file)
@@ -88,8 +88,8 @@ class WebTest_Contribute_OfflineRecurContributionTest extends CiviSeleniumTestCa
     $this->click('contribution_test');
     $this->click('_qf_Search_refresh');
 
-    $this->waitForElementPresent('css=#contributionSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#contributionSearch table tbody tr td span a.action-item-first');
+    $this->waitForElementPresent('css=#contributionSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#contributionSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent('_qf_ContributionView_cancel-bottom');
 
     // View Recurring Contribution Record
index 3adef593bf2882e43130c0fd8201241cfcd938c5..e953d1740564ced36f84ec7e98805f79dae16d6e 100644 (file)
@@ -129,8 +129,8 @@ class WebTest_Contribute_OnlineRecurContributionTest extends CiviSeleniumTestCas
     $this->click("contribution_test");
     $this->click("_qf_Search_refresh");
 
-    $this->waitForElementPresent('css=#contributionSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#contributionSearch table tbody tr td span a.action-item-first');
+    $this->waitForElementPresent('css=#contributionSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#contributionSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
 
     // View Recurring Contribution Record
index 8d0baf415e6fa2517abbc96bfc10993ae9c6bf86..2e3a16379e71884378391c80b04346b92527d5b1 100644 (file)
@@ -132,8 +132,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$firstName $lastName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record
@@ -187,8 +187,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$firstName $lastName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record
@@ -297,8 +297,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$firstName $lastName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     $membershipCreatedId = $this->urlArg('id');
@@ -335,8 +335,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$firstName $lastName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     $membershipRenewedId = $this->urlArg('id');
@@ -529,8 +529,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$organisationName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record
@@ -550,8 +550,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$lastName, $firstName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record
@@ -618,8 +618,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$organisationName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record
@@ -638,8 +638,8 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->openCiviPage("member/search", "reset=1", "member_end_date_high");
 
     $this->type("sort_name", "$lastName, $firstName");
-    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item-first');
-    $this->click('css=#memberSearch table tbody tr td span a.action-item-first');
+    $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child');
+    $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child');
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     //View Membership Record