From 77042884b6b255d29de131e79502b013ef08435b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 15 Mar 2014 22:22:42 -0400 Subject: [PATCH] CRM-13863 - Update hover/popup classes --- CRM/Contact/BAO/Contact.php | 4 ++++ css/civicrm.css | 9 +++++--- js/crm.ajax.js | 4 ++-- templates/CRM/Contact/Page/Inline/Actions.tpl | 2 +- templates/CRM/Contact/Page/View/Note.tpl | 4 ++-- templates/CRM/Contact/Page/View/Summary.js | 21 ++++++++----------- templates/CRM/Contribute/Page/PaymentInfo.tpl | 3 ++- .../Event/Form/ParticipantFeeSelection.tpl | 4 +++- 8 files changed, 29 insertions(+), 22 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index a253462abd..7c50a06284 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -2721,6 +2721,7 @@ AND civicrm_openid.is_primary = 1"; 'title' => ts('Add Contribution'), 'weight' => 5, 'ref' => 'new-contribution', + 'class' => 'huge-popup', 'key' => 'contribution', 'tab' => 'contribute', 'component' => 'CiviContribute', @@ -2736,6 +2737,7 @@ AND civicrm_openid.is_primary = 1"; 'title' => ts('Register for Event'), 'weight' => 10, 'ref' => 'new-participant', + 'class' => 'huge-popup', 'key' => 'participant', 'tab' => 'participant', 'component' => 'CiviEvent', @@ -2771,6 +2773,7 @@ AND civicrm_openid.is_primary = 1"; 'title' => ts('Add Membership'), 'weight' => 20, 'ref' => 'new-membership', + 'class' => 'huge-popup', 'key' => 'membership', 'tab' => 'member', 'component' => 'CiviMember', @@ -2821,6 +2824,7 @@ AND civicrm_openid.is_primary = 1"; 'ref' => 'new-note', 'key' => 'note', 'tab' => 'note', + 'class' => 'medium-popup', 'href' => CRM_Utils_System::url('civicrm/contact/view/note', 'reset=1&action=add' ), diff --git a/css/civicrm.css b/css/civicrm.css index b80a01f604..ecac315632 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2496,7 +2496,8 @@ div.grippie { background-position: -128px -112px; } .crm-container .red-icon, -.crm-container .button:hover .delete-icon { +.crm-container a:hover .icon.delete-icon, +.crm-container span:hover .icon.delete-icon { background-image: url("../i/icons/jquery-ui-8A1F11.png"); } @@ -2647,7 +2648,8 @@ div.grippie { } /* Icon hover-buttons */ -.crm-container .crm-hover-button { +.crm-container .crm-hover-button, +.crm-container a.crm-hover-button { display: inline-block; border: 1px solid transparent; text-decoration: none; @@ -2669,7 +2671,8 @@ div.grippie { top: -4px; } .crm-container .crm-hover-button:hover, -.crm-container .crm-hover-button:active { +.crm-container a.crm-hover-button:hover, +.crm-container a.crm-hover-button:active { background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #ccc)); background-image: -webkit-linear-gradient(center bottom, #eee 0%, #ccc 100%); background-image: -moz-linear-gradient(center bottom, #eee 0%, #ccc 100%); diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 4050f12f82..a19c80e1c5 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -311,7 +311,7 @@ validate: true, refreshAction: ['next_new', 'submit_savenext'], cancelButton: '.cancel.form-submit', - openInline: 'a.open-inline, a.button:not("[href=#], .no-popup")', + openInline: 'a.open-inline, a.button:not("[href=#], .no-popup, .crm-popup")', onCancel: function(event) {}, onError: function(data) { var $el = $(this); @@ -425,7 +425,7 @@ settings.dialog.width = settings.dialog.height = '50%'; } else if ($el.hasClass('huge-popup')) { - settings.dialog.height = '95%'; + settings.dialog.height = '90%'; } var dialog = popup(url, settings); // Trigger events from the dialog on the original link element diff --git a/templates/CRM/Contact/Page/Inline/Actions.tpl b/templates/CRM/Contact/Page/Inline/Actions.tpl index ede72e28e4..efea37e9fd 100644 --- a/templates/CRM/Contact/Page/Inline/Actions.tpl +++ b/templates/CRM/Contact/Page/Inline/Actions.tpl @@ -72,7 +72,7 @@ {foreach from=$actionsMenuList.moreActions item='row'} {if !empty($row.href) or !empty($row.tab)}
  • - {$row.title} + {$row.title}
  • {/if} {/foreach} diff --git a/templates/CRM/Contact/Page/View/Note.tpl b/templates/CRM/Contact/Page/View/Note.tpl index 76d8323b0c..350a713c19 100644 --- a/templates/CRM/Contact/Page/View/Note.tpl +++ b/templates/CRM/Contact/Page/View/Note.tpl @@ -110,7 +110,7 @@ {if $permission EQ 'edit' AND ($action eq 16)}
    {/if} @@ -284,7 +284,7 @@ {elseif ($action eq 16)}
    - {capture assign=link}class="action-item" accesskey="N" href="{crmURL p='civicrm/contact/view/note' q="cid=`$contactId`&action=add"}"{/capture} + {capture assign=link}class="action-item medium-popup" 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/Contact/Page/View/Summary.js b/templates/CRM/Contact/Page/View/Summary.js index 1dbc67e53d..15331c3171 100644 --- a/templates/CRM/Contact/Page/View/Summary.js +++ b/templates/CRM/Contact/Page/View/Summary.js @@ -295,22 +295,19 @@ }) // Handle action links in popup .on('click', '.crm-contact_actions-list a, .crm-contact_activities-list a', function() { - var - tabName = $(this).data('tab') || 'summary', - $tab = $('#tab_' + tabName), - url = $(this).attr('href'); $('#crm-contact-actions-list').hide(); - if (url === '#') { + if ($(this).attr('href') === '#') { + var $tab = $('#tab_' + ($(this).data('tab') || 'summary')); CRM.tabHeader.focus($tab); return false; - } else if (CRM.config.ajaxPopupsEnabled) { - CRM.loadForm(url) - .on('crmFormSuccess', function() { - CRM.tabHeader.resetTab($tab); - CRM.tabHeader.focus($tab); - }); - return false; + } else { + return CRM.popup.call(this); } + }) + .on('crmPopupFormSuccess', '.crm-contact_actions-list a, .crm-contact_activities-list a', function() { + var $tab = $('#tab_' + ($(this).data('tab') || 'summary')); + CRM.tabHeader.resetTab($tab); + CRM.tabHeader.focus($tab); }); $(document) // Actions menu diff --git a/templates/CRM/Contribute/Page/PaymentInfo.tpl b/templates/CRM/Contribute/Page/PaymentInfo.tpl index 8886c9ec50..aef93ef799 100644 --- a/templates/CRM/Contribute/Page/PaymentInfo.tpl +++ b/templates/CRM/Contribute/Page/PaymentInfo.tpl @@ -56,7 +56,8 @@ cj(function($){ {$paymentInfo.total|crmMoney} {if $paymentInfo.paid > 0} - {$paymentInfo.paid|crmMoney}
    » view payments
    + {$paymentInfo.paid|crmMoney}
    + » {ts}view payments{/ts} {/if} {$paymentInfo.balance|crmMoney} diff --git a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl index 1bfa53a18e..29d14cb85f 100644 --- a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl +++ b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl @@ -129,7 +129,9 @@ cj(function(){
    {ts}Updated Fee(s){/ts}
    {ts}Total Paid{/ts}
    -
    {$paymentInfo.paid|crmMoney}
    » view payments
    +
    + {$paymentInfo.paid|crmMoney}
    + » {ts}view payments{/ts}
    {ts}Balance Owed{/ts}
    -- 2.25.1