$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']
$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;
// 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';
}
$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;
$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 = '';
$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>";
/* 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 {
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 {
.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;
}
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;
// 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));
{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}
<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>
<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}
{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}
<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">» 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">» view payments</span></a>
{/if}
</td>
<td class='right'>{$paymentInfo.balance|crmMoney}</td>
<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}
<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">» 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">» 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>
<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>
{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}
{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>
$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
$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
$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
$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
$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');
$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');
$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
$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
$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
$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