From a1c7d42f1b8b41695c6806350b5a24c0d7123138 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 15 Mar 2014 21:10:55 -0400 Subject: [PATCH] CRM-13863 - Change action-items to opt-in rather than opt-out of popups --- CRM/Campaign/BAO/Survey.php | 4 +-- CRM/Contact/BAO/Contact/Utils.php | 2 +- CRM/Core/Action.php | 31 +++++++----------- css/civicrm.css | 32 ++++++++++++------- js/crm.ajax.js | 11 +++++-- templates/CRM/Admin/Page/PdfFormats.tpl | 2 +- .../Campaign/Form/addCampaignToComponent.tpl | 2 +- .../CRM/Contact/Page/View/GroupContact.tpl | 6 ++-- templates/CRM/Contact/Page/View/Note.tpl | 2 +- templates/CRM/Contribute/Page/PaymentInfo.tpl | 2 +- templates/CRM/Contribute/Page/Tab.tpl | 4 +-- .../Event/Form/ParticipantFeeSelection.tpl | 2 +- templates/CRM/Event/Page/Tab.tpl | 4 +-- templates/CRM/Member/Page/Tab.tpl | 4 +-- templates/CRM/Pledge/Page/Tab.tpl | 2 +- .../OfflineRecurContributionTest.php | 4 +-- .../OnlineRecurContributionTest.php | 4 +-- .../Member/OnlineMembershipRenewTest.php | 32 +++++++++---------- 18 files changed, 78 insertions(+), 72 deletions(-) diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 318df3dbe2..3c95542163 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -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('%s', + $menuLinks[] = sprintf('%s', $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, '
  • ', $menuLinks); $allLinks = "$extraULName "; - $menuLinks = "{$allLinks}"; + $menuLinks = "{$allLinks}"; } return $menuLinks; diff --git a/CRM/Contact/BAO/Contact/Utils.php b/CRM/Contact/BAO/Contact/Utils.php index 3648974ebe..3674a11923 100644 --- a/CRM/Contact/BAO/Contact/Utils.php +++ b/CRM/Contact/BAO/Contact/Utils.php @@ -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'] = '' . ts('View') . ''; + $contactLinks['rows'][$i]['view'] = '' . ts('View') . ''; if (!$contactLinks['msg']) { $contactLinks['msg'] = 'view'; } diff --git a/CRM/Core/Action.php b/CRM/Core/Action.php index 3e6edc7bfb..987d08e33e 100644 --- a/CRM/Core/Action.php +++ b/CRM/Core/Action.php @@ -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('%s', + // Hack to make delete dialogs smaller + if (strpos($urlPath, '/delete') || strpos($urlPath, 'action=delete')) { + $classes .= " small-popup"; + } + $url[] = sprintf('%s', $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, '
  • ', $mainLinks); $allLinks = "{$extraULName}"; - $result = "{$allLinks}"; + $result = "{$allLinks}"; } else { $extra = ''; @@ -299,7 +292,7 @@ class CRM_Core_Action { $resultLinks = ''; CRM_Utils_String::append($resultLinks, '', $mainLinks); if ($extra) { - $result = "{$resultLinks}{$extra}"; + $result = "{$resultLinks}{$extra}"; } else { $result = "{$resultLinks}"; diff --git a/css/civicrm.css b/css/civicrm.css index add263391f..b80a01f604 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -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; diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 34ca8dc65c..4050f12f82 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -285,7 +285,7 @@ // 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); } $('
    ' + ts('Loading') + '...
    ').dialog(settings.dialog); @@ -416,8 +416,8 @@ 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; } @@ -437,4 +437,9 @@ }); return false; }; + + $(function($) { + $('body').on('click', 'a.crm-popup', CRM.popup); + }); + }(jQuery, CRM)); diff --git a/templates/CRM/Admin/Page/PdfFormats.tpl b/templates/CRM/Admin/Page/PdfFormats.tpl index 437e4d17d8..e01ad6382a 100644 --- a/templates/CRM/Admin/Page/PdfFormats.tpl +++ b/templates/CRM/Admin/Page/PdfFormats.tpl @@ -63,7 +63,7 @@ {else}
    - {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 add one.{/ts}
    {/if} diff --git a/templates/CRM/Campaign/Form/addCampaignToComponent.tpl b/templates/CRM/Campaign/Form/addCampaignToComponent.tpl index 39ac4e3a94..20481ac0b7 100644 --- a/templates/CRM/Campaign/Form/addCampaignToComponent.tpl +++ b/templates/CRM/Campaign/Form/addCampaignToComponent.tpl @@ -34,7 +34,7 @@
    {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 create a campaign here.{/ts} {/if} {help id="id-campaign_id" file="CRM/Campaign/Form/addCampaignToComponent.hlp"}
    diff --git a/templates/CRM/Contact/Page/View/GroupContact.tpl b/templates/CRM/Contact/Page/View/GroupContact.tpl index f17dea5e80..3b0221a759 100644 --- a/templates/CRM/Contact/Page/View/GroupContact.tpl +++ b/templates/CRM/Contact/Page/View/GroupContact.tpl @@ -63,7 +63,7 @@ {$row.in_date|crmDate} {if $permission EQ 'edit'} - + {ts}Remove{/ts} {ts}Delete{/ts} @@ -116,7 +116,7 @@ {$row.pending_date|crmDate} {if $permission EQ 'edit'} - + {ts}Remove{/ts} {ts}Delete{/ts} @@ -154,7 +154,7 @@ {$row.date_added|crmDate} {$row.out_date|crmDate} {if $permission EQ 'edit'} - + {ts}Rejoin Group{/ts} {ts}Delete{/ts}{/if} diff --git a/templates/CRM/Contact/Page/View/Note.tpl b/templates/CRM/Contact/Page/View/Note.tpl index 61e9d35078..76d8323b0c 100644 --- a/templates/CRM/Contact/Page/View/Note.tpl +++ b/templates/CRM/Contact/Page/View/Note.tpl @@ -284,7 +284,7 @@ {elseif ($action eq 16)}
    - {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 add one.{/ts}
    {/if} diff --git a/templates/CRM/Contribute/Page/PaymentInfo.tpl b/templates/CRM/Contribute/Page/PaymentInfo.tpl index c953dbde2e..8886c9ec50 100644 --- a/templates/CRM/Contribute/Page/PaymentInfo.tpl +++ b/templates/CRM/Contribute/Page/PaymentInfo.tpl @@ -56,7 +56,7 @@ cj(function($){ {$paymentInfo.total|crmMoney} {if $paymentInfo.paid > 0} - {$paymentInfo.paid|crmMoney}
    » view payments
    + {$paymentInfo.paid|crmMoney}
    » view payments
    {/if} {$paymentInfo.balance|crmMoney} diff --git a/templates/CRM/Contribute/Page/Tab.tpl b/templates/CRM/Contribute/Page/Tab.tpl index b946e5d1ff..9d83c47c0d 100644 --- a/templates/CRM/Contribute/Page/Tab.tpl +++ b/templates/CRM/Contribute/Page/Tab.tpl @@ -32,11 +32,11 @@
    {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 Record Contribution 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 Submit Credit Card Contribution to process a new contribution on behalf of the contributor using their credit card.{/ts} {/if} {else} diff --git a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl index 31383cad3e..1bfa53a18e 100644 --- a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl +++ b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl @@ -129,7 +129,7 @@ cj(function(){
    {ts}Updated Fee(s){/ts}
    {ts}Total Paid{/ts}
    - diff --git a/templates/CRM/Event/Page/Tab.tpl b/templates/CRM/Event/Page/Tab.tpl index 9d6d8a0214..9284f503d7 100644 --- a/templates/CRM/Event/Page/Tab.tpl +++ b/templates/CRM/Event/Page/Tab.tpl @@ -33,11 +33,11 @@

    {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 Add Event Registration 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 Submit Credit Card Event Registration to process a new New Registration on behalf of the participant using their credit card.{/ts} {/if}

    diff --git a/templates/CRM/Member/Page/Tab.tpl b/templates/CRM/Member/Page/Tab.tpl index 2b6bdd7d0a..c2b11233f8 100644 --- a/templates/CRM/Member/Page/Tab.tpl +++ b/templates/CRM/Member/Page/Tab.tpl @@ -37,11 +37,11 @@ {if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
    {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 Add Membership 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 Submit Credit Card Membership to process a Membership on behalf of the member using their credit card.{/ts} {/if} {else} diff --git a/templates/CRM/Pledge/Page/Tab.tpl b/templates/CRM/Pledge/Page/Tab.tpl index 7eb58b6767..08e3739221 100644 --- a/templates/CRM/Pledge/Page/Tab.tpl +++ b/templates/CRM/Pledge/Page/Tab.tpl @@ -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 Add Pledge to record a new pledge received from this contact.{/ts} {/if}
    diff --git a/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php b/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php index ba6dc754f2..5e2ccee53f 100644 --- a/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php @@ -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 diff --git a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php index 3adef593bf..e953d17405 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php @@ -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 diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php index 8d0baf415e..2e3a16379e 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php @@ -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 -- 2.25.1