CRM-16415 Print icons and more
authorAndrew Hunt <andrew@aghstrategies.com>
Thu, 1 Oct 2015 03:48:33 +0000 (23:48 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Tue, 13 Oct 2015 17:21:21 +0000 (13:21 -0400)
----------------------------------------
* CRM-16415: Implement Font Awesome icon font
  https://issues.civicrm.org/jira/browse/CRM-16415

15 files changed:
CRM/Report/Form/Contact/LoggingSummary.php
CRM/Report/Form/Contribute/LoggingSummary.php
js/crm.ajax.js
js/view/crm.designer.js
js/view/crm.profile-selector.js
templates/CRM/Case/Form/Activity.tpl
templates/CRM/Contact/Page/Inline/Actions.tpl
templates/CRM/Contribute/Page/UserDashboard.tpl
templates/CRM/Event/Form/ParticipantFeeSelection.tpl
templates/CRM/Queue/Page/Runner.tpl
templates/CRM/common/drupal.tpl
templates/CRM/common/drupal6.tpl
templates/CRM/common/drupal8.tpl
templates/CRM/common/joomla.tpl
templates/CRM/common/wordpress.tpl

index b3c6ecfea4045ff23e9b1eb89530e3c0517905bb..ada4a90d185ab08709f85d7291fb653037ccd5f9 100644 (file)
@@ -227,7 +227,8 @@ class CRM_Report_Form_Contact_LoggingSummary extends CRM_Logging_ReportSummary {
 
         $url1 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&snippet=4&section=2&layout=overlay", FALSE, TRUE);
         $url2 = CRM_Report_Utils_Report::getNextUrl('logging/contact/detail', "{$q}&section=2", FALSE, TRUE);
-        $row['log_civicrm_entity_log_action'] = "<a href='{$url1}' class='crm-summary-link'><div class='icon ui-icon-zoomin'></div></a>&nbsp;<a title='View details for this update' href='{$url2}'>" . ts('Update') . '</a>';
+        $hoverTitle = ts('View details for this update');
+        $row['log_civicrm_entity_log_action'] = "<a href='{$url1}' class='crm-summary-link'><i class=\"crm-i fa-list-alt\"></i></a>&nbsp;<a title='{$hoverTitle}' href='{$url2}'>" . ts('Update') . '</a>';
       }
 
       $key = $date . '_' .
index cc086a19f7d7b73a5f958a55a1d4cf8b56d9984b..f4f005541247a6f4427b6cc30a1bf5b2c18e370b 100644 (file)
@@ -212,7 +212,7 @@ class CRM_Report_Form_Contribute_LoggingSummary extends CRM_Logging_ReportSummar
         $url = CRM_Report_Utils_Report::getNextUrl('logging/contribute/detail', $q, FALSE, TRUE);
         $row['log_civicrm_contribution_log_action_link'] = $url;
         $row['log_civicrm_contribution_log_action_hover'] = ts('View details for this update');
-        $row['log_civicrm_contribution_log_action'] = '<div class="icon ui-icon-zoomin"></div> ' . ts('Update');
+        $row['log_civicrm_contribution_log_action'] = '<i class="crm-i fa-list-alt"></i> ' . ts('Update');
       }
 
       unset($row['log_civicrm_contribute_log_user_id']);
index 6f0f244553fb3eea19344822cd5fe57f186d73a7..9dc1982e36f4176f52765efb15043b5c4ae2be55 100644 (file)
         .dialog(settings.dialog)
         .parent().find('.ui-dialog-titlebar')
         .append($('<a class="crm-dialog-titlebar-print ui-dialog-titlebar-close" title="'+ts('Print window')+'" target="_blank" style="right:3.8em;"/>')
-          .button({icons: {primary: 'ui-icon-print'}, text: false}));
+          .button({icons: {primary: 'fa-print'}, text: false}));
     }
     // Add handlers to new or existing dialog
     if ($(settings.target).data('uiDialog')) {
         var id = widget.attr('id') + '-unsaved-alert',
           title = widget.dialog('option', 'title'),
           alert = CRM.alert('<p>' + ts('%1 has not been saved.', {1: title}) + '</p><p><a href="#" id="' + id + '">' + ts('Restore') + '</a></p>', ts('Unsaved Changes'), 'alert unsaved-dialog', {expires: 60000});
-        $('#' + id).button({icons: {primary: 'ui-icon-arrowreturnthick-1-w'}}).click(function(e) {
+        $('#' + id).button({icons: {primary: 'fa-undo'}}).click(function(e) {
           widget.attr('data-unsaved-changes', 'false').dialog('open');
           e.preventDefault();
         });
             if ($icon.length) {
               button.icons = {primary: $icon.attr('class')};
             } else {
-              var action = $el.attr('crm-icon') || ($el.hasClass('cancel') ? 'close' : 'check');
-              button.icons = {primary: 'ui-icon-' + action};
+              var action = $el.attr('crm-icon') || ($el.hasClass('cancel') ? 'times' : 'check');
+              button.icons = {primary: 'fa-' + action};
             }
             buttons.push(button);
             added.push(identifier);
           $el.parents(buttonContainers).css({height: 0, padding: 0, margin: 0, overflow: 'hidden'}).find('.crm-button-icon').hide();
         });
         $el.dialog('option', 'buttons', buttons);
+<<<<<<< HEAD
+=======
+
+        // Show done button for non-ajax dialogs (e.g. file downloads)
+        $(this).on('submit', "form[data-no-ajax-submit=true]", function() {
+          $el.dialog('option', 'buttons', [{
+            text: ts('Done'),
+            icons: {primary: 'fa-times'},
+            click: function() {$(this).dialog('close');}
+          }]);
+        });
+>>>>>>> 11e4f91... CRM-16415 Print icons and more
       }
       // Allow a button to prevent ajax submit
       $('input[data-no-ajax-submit=true]').click(function() {
index 0be0f213409a73098de164d06374d7c722da715b..40ff4e062e25447b97f1454db4b42f1b027c24fd 100644 (file)
           if (designerDialog.undoAlert && designerDialog.undoAlert.close) designerDialog.undoAlert.close();
           if (designerDialog.isUfUnsaved) {
             designerDialog.undoAlert = CRM.alert('<p>' + ts('%1 has not been saved.', {1: designerDialog.model.get('title')}) + '</p><a href="#" class="crm-undo">' + ts('Restore') + '</a>', ts('Unsaved Changes'), 'alert', {expires: 60000});
-            $('.ui-notify-message a.crm-undo').button({icons: {primary: 'ui-icon-arrowreturnthick-1-w'}}).click(function(e) {
+            $('.ui-notify-message a.crm-undo').button({icons: {primary: 'fa-undo'}}).click(function(e) {
               e.preventDefault();
               designerDialog.undoState = true;
               designerDialog.$el.dialog('open');
       'click .crm-designer-preview': 'doPreview'
     },
     onRender: function() {
-      this.$('.crm-designer-save').button({icons: {primary: 'ui-icon-check'}}).attr({
+      this.$('.crm-designer-save').button({icons: {primary: 'fa-check'}}).attr({
         disabled: 'disabled',
         style: 'opacity:.5; cursor:default;'
       });
-      this.$('.crm-designer-preview').button({icons: {primary: 'ui-icon-search'}});
+      this.$('.crm-designer-preview').button({icons: {primary: 'fa-television'}});
     },
     initialize: function(options) {
       CRM.designerApp.vent.on('ufUnsaved', this.onUfChanged, this);
       if (!this.previewMode) {
         $('.crm-designer-preview-canvas').html('');
         $('.crm-designer-canvas > *, .crm-designer-palette-region').show();
-        $('.crm-designer-preview').button('option', {icons: {primary: 'ui-icon-search'}}).find('span').text(ts('Preview'));
+        $('.crm-designer-preview').button('option', {icons: {primary: 'fa-television'}}).find('span').text(ts('Preview'));
         return;
       }
       if (this.model.getRel('ufFieldCollection').hasDuplicates()) {
         $dialog.unblock();
         $('.crm-designer-canvas > *, .crm-designer-palette-region').hide();
         $('.crm-designer-preview-canvas').html(data).show().trigger('crmLoad').find(':input').prop('readOnly', true);
-        $('.crm-designer-preview').button('option', {icons: {primary: 'ui-icon-pencil'}}).find('span').text(ts('Edit'));
+        $('.crm-designer-preview').button('option', {icons: {primary: 'fa-pencil'}}).find('span').text(ts('Edit'));
       });
     }
   });
         });
         if (this.model.get('field_name').split('_')[0] == 'custom') {
           this.$('.crm-designer-field-summary > div').append('<button class="crm-designer-edit-custom">' + ts('Edit Custom Field') + '</button>');
-          this.$('button.crm-designer-edit-custom').button({icons: {primary: 'ui-icon-pencil'}}).attr('title', ts('Edit global settings for this custom field.'));
+          this.$('button.crm-designer-edit-custom').button({icons: {primary: 'fa-pencil'}}).attr('title', ts('Edit global settings for this custom field.'));
         }
       }
     },
       });
       var form1 = CRM.loadForm(url)
         .on('crmFormLoad', function() {
-          $(this).prepend('<div class="messages status"><div class="icon inform-icon"></div>' + ts('Note: This will modify the field system-wide, not just in this profile form.') + '</div>');
+          $(this).prepend('<div class="messages status"><i class="crm-i fa-info-circle"></i> ' + ts('Note: This will modify the field system-wide, not just in this profile form.') + '</div>');
         });
     },
     onChangeIsDuplicate: function(model, value, options) {
index 0c1877fee39c69b4aef2d216899cb9bfc6a70efd..5c55405a7e55075f0767c84083702f6b368cfca1 100644 (file)
       var $pane = this.$('.crm-profile-selector-preview-pane');
       if ($preview.hasClass('crm-profile-selector-preview-show')) {
         $preview.removeClass('crm-profile-selector-preview-show');
-        $preview.find('.icon').removeClass('ui-icon-zoomin').addClass('ui-icon-zoomout');
+        $preview.find('.crm-i').removeClass('fa-television').addClass('fa-times');
         $pane.show();
       } else {
         $preview.addClass('crm-profile-selector-preview-show');
-        $preview.find('.icon').removeClass('ui-icon-zoomout').addClass('ui-icon-zoomin');
+        $preview.find('.crm-i').removeClass('fa-times').addClass('fa-television');
         $pane.hide();
       }
     },
index 01a9e163bc56922e79f6c3775fa78ad2a2a5d633..c64081499ab7903c8576301606357026cb782bc7 100644 (file)
@@ -38,7 +38,7 @@
 
   {if $action eq 8 or $action eq 32768 }
   <div class="messages status no-popup">
-    <div class="icon inform-icon"></div> &nbsp;
+    <i class="crm-i fa-info-circle"></i> &nbsp;
     {if $action eq 8}
       {ts 1=$activityTypeName}Click Delete to move this &quot;%1&quot; activity to the Trash.{/ts}
     {else}
                   <td>{$form.assignee_contact_id.html}
                     {if $activityAssigneeNotification}
                       <br />
-                      <span class="description"><span class="icon ui-icon-mail-closed"></span>{ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
+                      <span class="description"><i class="crm-i fa-paper-plane"></i> {ts}A copy of this activity will be emailed to each Assignee.{/ts}</span>
                     {/if}
                   </td>
                 </tr>
index 976dec7f8961c87d2d56ba4257a2978dd4640754..28a7af96cdf54475f0ac3a0fb4bc38c272586d43 100644 (file)
@@ -26,7 +26,7 @@
 {* this template is used for the dropdown menu of the "Actions" button on contacts. *}
 
 <div id="crm-contact-actions-wrapper" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Page_Inline_Actions"{rdelim}'>
-  <a id="crm-contact-actions-link" href="#" class="button"><span><div class="icon ui-icon-arrow-1-se css_right"></div>{ts}Actions{/ts}</span></a>
+  <a id="crm-contact-actions-link" href="#" class="button"><span>{ts}Actions{/ts} <i class="crm-i fa-bars"></i></span></a>
     <div class="ac_results" id="crm-contact-actions-list">
       <div class="crm-contact-actions-list-inner">
         <div class="crm-contact_activities-list">
               <ul class="contact-print">
                   <li class="crm-contact-print">
                      <a class="print" title="{ts}Printer-friendly view of this page.{/ts}" href='{crmURL p='civicrm/contact/view/print' q="reset=1&print=1&cid=$contactId"}'>
-                     <span><div class="icon ui-icon-print"></div>{ts}Print Summary{/ts}</span>
+                     <span><i class="crm-i fa-print"></i> {ts}Print Summary{/ts}</span>
                      </a>
                   </li>
                   <li>
-                        <a class="vcard " title="{ts}vCard record for this contact.{/ts}" href="{crmURL p='civicrm/contact/view/vcard' q="reset=1&cid=$contactId"}"><span><div class="icon ui-icon-extlink"></div>{ts}vCard{/ts}</span>
+                        <a class="vcard " title="{ts}vCard record for this contact.{/ts}" href="{crmURL p='civicrm/contact/view/vcard' q="reset=1&cid=$contactId"}"><span><i class="crm-i fa-list-alt"></i> {ts}vCard{/ts}</span>
                         </a>
                   </li>
                  {if !empty($dashboardURL)}
                    <li class="crm-contact-dashboard">
                       <a href="{$dashboardURL}" class="dashboard " title="{ts}dashboard{/ts}">
-                         <span><div class="icon ui-icon-contact"></div>{ts}Contact Dashboard{/ts}</span>
+                         <span><i class="crm-i fa-tachometer"></i> {ts}Contact Dashboard{/ts}</span>
                        </a>
                    </li>
                  {/if}
                  {if !empty($userRecordUrl)}
                    <li class="crm-contact-user-record">
                       <a href="{$userRecordUrl}" class="user-record " title="{ts}User Record{/ts}">
-                         <span><div class="icon ui-icon-person"></div>{ts}User Record{/ts}</span>
+                         <span><i class="crm-i fa-user"></i> {ts}User Record{/ts}</span>
                       </a>
                    </li>
                  {/if}
                  {if !empty($userAddUrl)}
                    <li class="crm-contact-user-record">
                       <a href="{$userAddUrl}" class="user-record " title="{ts}Create User Record{/ts}">
-                         <span><div class="icon ui-icon-person"></div>{ts}Create User Record{/ts}</span>
+                         <span><i class="crm-i fa-user-plus"></i> {ts}Create User Record{/ts}</span>
                       </a>
                    </li>
               {/if}
index 5189bcee0e9514e2f32881eac77045dead89b349..88cc8c719e64305457e4f89ae8d8ed2df82d78e0 100644 (file)
@@ -59,7 +59,7 @@
                             {if call_user_func(array('CRM_Core_Permission','check'), 'view my invoices') OR call_user_func(array('CRM_Core_Permission','check'), 'access CiviContribute')}
                                 <a class="button no-popup "
                                    href="{crmURL p='civicrm/contribute/invoice' q=$urlParams}">
-                                    <span class="icon ui-icon-print"></span>
+                                    <i class="crm-i fa-print"></i>
                                     {if $row.contribution_status != 'Refunded' && $row.contribution_status != 'Cancelled' }
                                         <span>{ts}Print Invoice{/ts}</span>
                                     {else}
         {/if}
     {/if}
 </div>
-
index a0ab95d2eb00a67149dc9abedb1f925d1be99604..b9c42612b0a90cd759e2b3150f02eccf7b213826 100644 (file)
@@ -103,7 +103,7 @@ CRM.$(function($) {
   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
   {if !$email}
   <div class="messages status no-popup">
-    <div class="icon inform-icon"></div>&nbsp;{ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts}
+    <i class="crm-i fa-info-circle"></i>&nbsp;{ts}You will not be able to send an automatic email receipt for this payment because there is no email address recorded for this contact. If you want a receipt to be sent when this payment is recorded, click Cancel and then click Edit from the Summary tab to add an email address before recording the payment.{/ts}
   </div>
   {/if}
   <table class="form-layout">
@@ -139,7 +139,7 @@ CRM.$(function($) {
          <div class='label'>{ts}Total Paid{/ts}</div>
          <div class='content'>
            {$paymentInfo.paid|crmMoney}<br/>
-           <a class="crm-hover-button action-item crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&action=browse&cid=`$contactId`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'><span class="icon ui-icon-zoomin"></span> {ts}view payments{/ts}</a>
+           <a class="crm-hover-button action-item crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&action=browse&cid=`$contactId`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'><i class="crm-i fa-list-alt"></i> {ts}view payments{/ts}</a>
          </div>
          <div class='label'><strong>{ts}Balance Owed{/ts}</strong></div><div class='content'><strong id='balance-fee'></strong></div>
           </div>
index 5f191a8158a9f855ae8baf109e364147e04145db..e7ade413415e3632a1e6bc8ae3768fa277d4a279 100644 (file)
@@ -124,7 +124,7 @@ CRM.$(function($) {
   if (queueRunnerData.buttons.retry == 1) {
   $("#crm-queue-runner-retry").button({
     text: false,
-    icons: {primary: 'ui-icon-refresh'}
+    icons: {primary: 'fa-refresh'}
   }).click(retryNext);
   } else {
     $("#crm-queue-runner-retry").remove();
@@ -132,7 +132,7 @@ CRM.$(function($) {
   if (queueRunnerData.buttons.skip == 1) {
   $("#crm-queue-runner-skip").button({
     text: false,
-    icons: {primary: 'ui-icon-seek-next'}
+    icons: {primary: 'fa-fast-forward'}
   }).click(skipNext);
   } else {
     $("#crm-queue-runner-skip").remove();
index 8c454a4a67427c4ea7c4182634adeac618e86cde..0da5579632b1ca85c5086651e0264571252eceb6 100644 (file)
 {* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
 <div id="printer-friendly">
 <a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {else}
 {* Printer friendly link/icon. *}
 <div id="printer-friendly">
 <a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {/if}
index fef3b7c85e80625473fdfab69b0dac00158150d3..b434ac2b6656e0a257018c81b779ab91db7cb02f 100644 (file)
 {* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
 <div id="printer-friendly">
 <a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {else}
 {* Printer friendly link/icon. *}
 <div id="printer-friendly">
 <a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {/if}
index 48d880d150c87d5de3d85b96dac497d28d8c8250..c8f672be29e6cbaf551580e4f7c3f569eaa323a7 100644 (file)
 {* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
 <div id="printer-friendly">
 <a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {else}
 {* Printer friendly link/icon. *}
 <div id="printer-friendly">
 <a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {/if}
index cdfceb33583264d94c7211e5d607d97bc8b38a82..8b86e9f4a6be02642a4d2a889aa6e1573eac35f7 100644 (file)
 
 {if $browserPrint}
 {* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
-<div id="printer-friendly"><a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}"><div class="ui-icon ui-icon-print"></div></a></div>
+<div id="printer-friendly"><a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}"><i class="crm-i fa-print"></i></a></div>
 {else}
 {* Printer friendly link/icon. *}
-<div id="printer-friendly"><a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}"><div class="ui-icon ui-icon-print"></div></a></div>
+<div id="printer-friendly"><a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}"><i class="crm-i fa-print"></i></a></div>
 {/if}
 
 {if $pageTitle}
index 1af77ad20932fcb41a5fd20590d710af55fd2e24..b7b58cc50c201354e447de2557b334f0900d42a6 100644 (file)
 {* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *}
 <div id="printer-friendly">
 <a href="#" onclick="window.print(); return false;" title="{ts}Print this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {else}
 {* Printer friendly link/icon. *}
 <div id="printer-friendly">
 <a href="{$printerFriendly}" target='_blank' title="{ts}Printer-friendly view of this page.{/ts}">
-  <div class="ui-icon ui-icon-print"></div>
+  <i class="crm-i fa-print"></i>
 </a>
 </div>
 {/if}
@@ -96,4 +96,3 @@
 {/crmRegion}
 
 </div> {* end crm-container div *}
-