CRM-15789 - Additional button/icon cleanup
authorColeman Watts <coleman@civicrm.org>
Fri, 9 Jan 2015 02:58:20 +0000 (21:58 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 9 Jan 2015 03:02:46 +0000 (22:02 -0500)
17 files changed:
CRM/Contact/Form/Merge.php
CRM/Mailing/Form/Schedule.php
CRM/SMS/Form/Schedule.php
css/crm.designer.css
js/view/crm.designer.js
templates/CRM/Campaign/Page/Campaign.tpl
templates/CRM/Campaign/Page/Petition.tpl
templates/CRM/Campaign/Page/Survey.tpl
templates/CRM/Case/Page/DashBoard.tpl
templates/CRM/Case/Page/DashboardSelector.tpl
templates/CRM/Contact/Form/Merge.tpl
templates/CRM/Contact/Page/DedupeFind.tpl
templates/CRM/Contribute/Page/PaymentInfo.tpl
templates/CRM/Custom/Form/Field.tpl
templates/CRM/Dashlet/Page/CaseDashboard.tpl
templates/CRM/Event/Form/ParticipantFeeSelection.tpl
templates/CRM/Report/Page/Options.tpl

index ae06c8bbfa6710ab94163be996390715a3fbbe6a..383c6491cb2e0ac7dc363a436c1f03c4522d40ea 100644 (file)
@@ -261,47 +261,33 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
   public function buildQuickForm() {
     CRM_Utils_System::setTitle(ts('Merge %1s', array(1 => $this->_contactType)));
-    $name = ts('Merge');
-    if ($this->next) {
-      $name = ts('Merge and Goto Next Pair');
-    }
+    $buttons = array();
+
+    $buttons[] = array(
+      'type' => 'next',
+      'name' => $this->next ? ts('Merge and Goto Next Pair') : ts('Merge'),
+      'isDefault' => TRUE,
+      'icon' => $this->next ? 'circle-triangle-e' : 'check',
+    );
 
     if ($this->next || $this->prev) {
-      $button = array(
-        array(
-          'type' => 'next',
-          'name' => $name,
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'submit',
-          'name' => ts('Merge and Goto Listing'),
-        ),
-        array(
-          'type' => 'done',
-          'name' => ts('Merge and View Result'),
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
+      $buttons[] = array(
+        'type' => 'submit',
+        'name' => ts('Merge and Goto Listing'),
       );
-    }
-    else {
-      $button = array(
-        array(
-          'type' => 'next',
-          'name' => $name,
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
+      $buttons[] = array(
+        'type' => 'done',
+        'name' => ts('Merge and View Result'),
+        'icon' => 'circle-check'
       );
     }
 
-    $this->addButtons($button);
+    $buttons[] = array(
+      'type' => 'cancel',
+      'name' => ts('Cancel'),
+    );
+
+    $this->addButtons($buttons);
     $this->addFormRule(array('CRM_Contact_Form_Merge', 'formRule'), $this);
   }
 
index 17810869f4651b666b07a86e6ecfc7e04f619483..9df12ba0d6371beda33a68143420bef5ceae7e2d 100644 (file)
@@ -242,7 +242,7 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
       CRM_Core_Session::setStatus($status, ts('Mailing Saved'), 'success');
       CRM_Utils_System::redirect($url);
     }
-    if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == '<< Previous') {
+    if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == ts('Previous')) {
       return TRUE;
     }
 
index a75cd67df799377edcec7de217ad4170728305a4..520f3d653a6a864e439d11027155e3f25ca7ad12 100644 (file)
@@ -131,7 +131,7 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form {
       $url = CRM_Utils_System::url('civicrm/mailing/browse/unscheduled', 'scheduled=false&reset=1&sms=1');
       CRM_Utils_System::redirect($url);
     }
-    if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == '<< Previous') {
+    if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == ts('Previous')) {
       return TRUE;
     }
 
index a1d9ff7efe7667e56e3da397538ae8641f04424a..755c1820b38b87aa87355e100a2bc69504b9e8ee 100644 (file)
   font-size: .8em;
 }
 
-.crm-designer .crm-designer-palette-tree span.ui-button-text,
-.crm-designer .crm-designer-edit-custom span.ui-button-text {
+.crm-designer .crm-designer-palette-tree span.ui-button-text {
   padding: 0.4em;
 }
 
index e62167f89538522aa001fdb86312cfd15be8cd5a..51ca8a570652223758d7c39935d08b3b0534075b 100644 (file)
           }
         });
         if (this.model.get('field_name').split('_')[0] == 'custom') {
-          this.$('.crm-designer-field-summary > div').append('<button class="crm-designer-edit-custom">&raquo; ' + ts('Edit Custom Field') + '</button>');
-          this.$('button.crm-designer-edit-custom').button().attr('title', ts('Edit global settings for this custom field.'));
+          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.'));
         }
       }
     },
         reset: 1,
         id: this.model.get('field_name').split('_')[1]
       });
-      var form1 = CRM.loadForm(url, {openInline: '.crm-custom-field-form-block-data_type a'})
+      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>');
-          var $link = $('.action-link a', this);
-          if ($link.length) {
-            $link.detach();
-            var buttons = {};
-            buttons[$link.text()] = function() {
-              var form2 = CRM.loadForm($link.attr('href'), {
-                dialog: {
-                  width: '60%',
-                  height: '70%'
-                }
-              });
-            };
-            $(this).dialog('option', 'buttons', buttons);
-          }
         });
     },
     onChangeIsDuplicate: function(model, value, options) {
index 380819411c07e6f3b46fb9d1674d9b4db4855844..2c0d634b132bef9f47758893792a6a78cfe46dcb 100644 (file)
@@ -26,7 +26,9 @@
 {* this template is used for displaying survey information *}
 {if $campaigns}
   <div class="action-link">
-      <a href="{$addCampaignUrl}" class="button"><span>&raquo; {ts}Add Campaign{/ts}</span></a>
+      <a href="{$addCampaignUrl}" class="button">
+        <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Campaign{/ts}</span>
+      </a>
   </div>
   {include file="CRM/common/enableDisableApi.tpl"}
   <div id="campaignType">
@@ -65,5 +67,7 @@
     </div>
 {/if}
 <div class="action-link">
-   <a href="{$addCampaignUrl}" class="button"><span>&raquo; {ts}Add Campaign{/ts}</span></a>
+  <a href="{$addCampaignUrl}" class="button">
+    <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Campaign{/ts}</span>
+  </a>
 </div>
index c9c2f9c8aeabb209a74a657a7832d452e51cb39d..b075e1817a221845fb2a1859c6e8363e58dc5d85 100644 (file)
@@ -27,7 +27,9 @@
 
 {if $surveys}
   <div class="action-link">
-    <a href="{$addSurveyUrl}" class="button"><span>&raquo; {ts}Add Survey{/ts}</span></a>
+    <a href="{$addSurveyUrl}" class="button">
+      <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Survey{/ts}</span>
+    </a>
   </div>
  {include file="CRM/common/enableDisableApi.tpl"}
  {include file="CRM/common/jsortable.tpl"}
@@ -68,5 +70,7 @@
   </div>
 {/if}
 <div class="action-link">
-   <a href="{$addSurveyUrl}" class="button"><span>&raquo; {ts}Add Survey{/ts}</span></a>
+  <a href="{$addSurveyUrl}" class="button">
+    <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Survey{/ts}</span>
+  </a>
 </div>
index c9c2f9c8aeabb209a74a657a7832d452e51cb39d..b075e1817a221845fb2a1859c6e8363e58dc5d85 100644 (file)
@@ -27,7 +27,9 @@
 
 {if $surveys}
   <div class="action-link">
-    <a href="{$addSurveyUrl}" class="button"><span>&raquo; {ts}Add Survey{/ts}</span></a>
+    <a href="{$addSurveyUrl}" class="button">
+      <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Survey{/ts}</span>
+    </a>
   </div>
  {include file="CRM/common/enableDisableApi.tpl"}
  {include file="CRM/common/jsortable.tpl"}
@@ -68,5 +70,7 @@
   </div>
 {/if}
 <div class="action-link">
-   <a href="{$addSurveyUrl}" class="button"><span>&raquo; {ts}Add Survey{/ts}</span></a>
+  <a href="{$addSurveyUrl}" class="button">
+    <span><div class="icon ui-icon-circle-plus"></div> {ts}Add Survey{/ts}</span>
+  </a>
 </div>
index 67255613044bf6fde2560fb02fbccbfddb954d6e..42f8d5326a0b285d287029b21ca5875570974b2a 100644 (file)
@@ -36,7 +36,7 @@
     {if $newClient and $allowToAddNewCase}
       <a href="{$newCaseURL}" class="button"><span><div class="icon ui-icon-circle-plus"></div> {ts}Add Case{/ts}</span></a>
     {/if}
-    <a class="button no-popup" name="find_my_cases" href="{crmURL p="civicrm/case/search" q="reset=1&case_owner=2&force=1"}"><span>{ts}Find My Cases{/ts}</span></a>
+    <a class="button no-popup" name="find_my_cases" href="{crmURL p="civicrm/case/search" q="reset=1&case_owner=2&force=1"}"><span><div class="icon ui-icon-search"></div> {ts}Find My Cases{/ts}</span></a>
 
     <div class="crm-case-dashboard-switch-view-buttons">
         {if $myCases}
index abcb238a12d130326209aa2521ae54682a8ffba6..3dddbdd597210c732d06fa82310834b66ed4e0ae 100644 (file)
     {elseif $list eq 'recent'}
        <td class="crm-case-case_recent_activity">
    {if $row.case_recent_activity_viewable}
-       <a class="crm-popup" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_recent_activity_id}" title="{ts}View activity{/ts}">{$row.case_recent_activity_type}</a>
+       <a class="action-item crm-hover-button" href="{crmURL p='civicrm/case/activity/view' h=0 q="cid="}{$row.contact_id}&aid={$row.case_recent_activity_id}" title="{ts}View activity{/ts}">{$row.case_recent_activity_type}</a>
     {else}
        {$row.case_recent_activity_type}
     {/if}
-    {if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'}&nbsp;&nbsp;<a href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_recent_activity_id`"}" title="{ts}Edit activity{/ts}"><span class="icon ui-icon-pencil"></span></a>
+    {if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'}&nbsp;&nbsp;<a href="{crmURL p="civicrm/case/activity" q="reset=1&cid=`$row.contact_id`&caseid=`$row.case_id`&action=update&id=`$row.case_recent_activity_id`"}" title="{ts}Edit activity{/ts}" class="crm-hover-button crm-popup"><span class="icon ui-icon-pencil"></span></a>
     {/if}<br />
           {$row.case_recent_activity_date|crmDate}
    </td>
index a1cea1f707f113ad7789952555ffd8423383a235..a82205402f0daccdf666d3c0d73736d9bcef19c4 100644 (file)
 {ts}Click <strong>Merge</strong> to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related activity records (groups, contributions, memberships, etc.).{/ts} {help id="intro"}
 </div>
 
-<div class="crm-submit-buttons">{if $prev}<a href="{$prev}" class="button"><span>{ts}<< Prev{/ts}</span></a>{/if}{include file="CRM/common/formButtons.tpl" location="top"}{if $next}<a href="{$next}" class="button"><span>{ts}Next >>{/ts}</span></a>{/if}</div>
+<div class="crm-submit-buttons">
+  {if $prev}<a href="{$prev}" class="button"><span><div class="icon ui-icon-triangle-1-w"></div> {ts}Prev{/ts}</span></a>{/if}
+  {include file="CRM/common/formButtons.tpl" location="top"}
+  {if $next}<a href="{$next}" class="button"><span><div class="icon ui-icon-triangle-1-e"></div> {ts}Next{/ts}</span></a>{/if}
+</div>
 
 <div class="action-link">
-      <a href="{$flip}">&raquo; {ts}Flip between original and duplicate contacts.{/ts}</a>
+  <a href="{$flip}" class="action-item crm-hover-button">
+    <span class="icon ui-icon-shuffle"></span>
+    {ts}Flip between original and duplicate contacts.{/ts}
+  </a>
 </div>
 
 <div class="action-link">
-       <a id='notDuplicate' href="#" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">&raquo; {ts}Mark this pair as not a duplicate.{/ts}</a>
+  <a id='notDuplicate' href="#" class="action-item crm-hover-button" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">
+    <span class="icon ui-icon-circle-close"></span>
+    {ts}Mark this pair as not a duplicate.{/ts}
+  </a>
 </div>
 
 <table class="row-highlight">
@@ -137,7 +147,10 @@ You will need to manually delete that user (click on the link to open Drupal Use
     {/if}
 </div>
 
-<div class="crm-submit-buttons">{if $prev}<a href="{$prev}" class="button"><span>{ts}<< Prev{/ts}</span></a>{/if}{include file="CRM/common/formButtons.tpl" location="bottom"}{if $next}<a href="{$next}" class="button"><span>{ts}Next >>{/ts}</span></a>{/if}</div>
+<div class="crm-submit-buttons">
+  {if $prev}<a href="{$prev}" class="button"><span><div class="icon ui-icon-triangle-1-w"></div> {ts}Prev{/ts}</span></a>{/if}
+  {include file="CRM/common/formButtons.tpl" location="bottom"}
+  {if $next}<a href="{$next}" class="button"><span><div class="icon ui-icon-triangle-1-e"></div> {ts}Next{/ts}</span></a>{/if}
 </div>
 
 {literal}
index 0c9ffe1981a109c9390fa90c2b5c24a4dd024758..5925afec52f67c9aaccd5826c10505bdac6b5396 100644 (file)
    {else}
       {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&action=renew" a=1}{/capture}
    {/if}
-   <a href="{$backURL}" title="{ts}Refresh List of Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will refresh the duplicates list. Click OK to proceed.{/ts}');" class="button"><span>{ts}Refresh Duplicates{/ts}</span></a>
+   <a href="{$backURL}" title="{ts}Refresh List of Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will refresh the duplicates list. Click OK to proceed.{/ts}');" class="button">
+     <span><div class="icon ui-icon-refresh"></div> {ts}Refresh Duplicates{/ts}</span>
+   </a>
 
    {if $gid}
       {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&gid=`$gid`&action=map" a=1}{/capture}
    {else}
       {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&action=map" a=1}{/capture}
    {/if}
-   <a href="{$backURL}" title="{ts}Batch Merge Duplicate Contacts{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the listed duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button"><span>{ts}Batch Merge Duplicates{/ts}</span></a>
+   <a href="{$backURL}" title="{ts}Batch Merge Duplicate Contacts{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the listed duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button">
+     <span><div class="icon ui-icon-script"></div> {ts}Batch Merge Duplicates{/ts}</span>
+   </a>
 
    {capture assign=backURL}{crmURL p="civicrm/contact/deduperules" q="reset=1" a=1}{/capture}
-  <a href="{$backURL}" class="button crm-button-type-cancel"><span>{ts}Done{/ts}</span></a>
+   <a href="{$backURL}" class="button crm-button-type-cancel">
+     <span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span>
+   </a>
 {/if}
 <div style="clear: both;"></div>
 {else}
index 4de005422080da8f0d81342410ba781fc5d70b43..065f6411e82cb4ece7c1bafebb8b44e59e153ba9 100644 (file)
@@ -63,7 +63,10 @@ CRM.$(function($) {
     <td class='right'>
       {if $paymentInfo.paid > 0}
         {$paymentInfo.paid|crmMoney}<br/>
-        <a class="crm-hover-button crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>&raquo; {ts}view payments{/ts}</a>
+        <a class="crm-hover-button action-item medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>
+          <span class="icon ui-icon-zoomin"></span>
+          {ts}view payments{/ts}
+        </a>
       {/if}
     </td>
     <td class='right'>{$paymentInfo.balance|crmMoney}</td>
index aabcdcdd31d0eba746e284e4efd9a73956609305..d83bb852f602af9378f0ba41fc2cb5968c495fc7 100644 (file)
@@ -151,7 +151,10 @@ function custom_option_html_type( ) {
                 {/if}
     {if $action eq 2 and $changeFieldType}
     <br />
-    ( <a href='{crmURL p="civicrm/admin/custom/group/field/changetype" q="reset=1&id=`$id`"}'>{ts}Change Input Field Type{/ts}</a> )
+    <a class="action-item crm-hover-button" href='{crmURL p="civicrm/admin/custom/group/field/changetype" q="reset=1&id=`$id`"}'>
+      <span class="icon ui-icon-gear"></span>
+      {ts}Change Input Field Type{/ts}
+    </a>
     <div class='clear'></div>
     {/if}
             </td>
@@ -347,6 +350,8 @@ function custom_option_html_type( ) {
 {* Give link to view/edit choice options if in edit mode and html_type is one of the multiple choice types *}
 {if $action eq 2 AND ($form.data_type.value.1.0 eq 'CheckBox' OR ($form.data_type.value.1.0 eq 'Radio' AND $form.data_type.value.0.0 neq 6) OR $form.data_type.value.1.0 eq 'Select' OR ($form.data_type.value.1.0 eq 'Multi-Select' AND $dontShowLink neq 1 ) ) }
     <div class="action-link">
-        <a href="{crmURL p="civicrm/admin/custom/group/field/option" q="reset=1&action=browse&fid=`$id`&gid=`$gid`"}">&raquo; {ts}View / Edit Multiple Choice Options{/ts}</a>
+      <a href="{crmURL p="civicrm/admin/custom/group/field/option" q="reset=1&action=browse&fid=`$id`&gid=`$gid`"}" class="button">
+        <span><div class="icon ui-icon-pencil"></div>{ts}View / Edit Multiple Choice Options{/ts}</span>
+      </a>
     </div>
 {/if}
index ee8df7eff78395e7420f6bb32b9abb78a7e83c45..5e21f8b1e29458c7956382d9ad31cd9e84c2823d 100644 (file)
@@ -33,7 +33,9 @@
    {if $newClient}
     <tr>
       <td>
-        <a href="{$newCaseURL}" class="button"><span>&raquo; {ts}New Case{/ts}</span></a>
+        <a href="{$newCaseURL}" class="button">
+          <span><div class="icon ui-icon-circle-plus"></div> {ts}New Case{/ts}</span>
+        </a>
       </td>
     </tr>
    {/if}
index 1df9f4107f19617cbe14f27666e93bba30a226a0..c4aebbc2f5ceac5bbc41de69725a6a7d23f4aee5 100644 (file)
@@ -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 crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&action=browse&cid=`$contactId`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&context=transaction"}'>&raquo; {ts}view payments{/ts}</a>
+           <a class="crm-hover-button action-item 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>
          </div>
          <div class='label'><strong>{ts}Balance Owed{/ts}</strong></div><div class='content'><strong id='balance-fee'></strong></div>
           </div>
index 7d0d2fc229c2bd576513a326521f7d795d243be8..590cd0440334dab3d81cefe3bd64c94ac2c1a6cd 100644 (file)
@@ -28,7 +28,7 @@
 </div>
 {if $action ne 1 and $action ne 2}
   <div class="action-link">
-    <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
+    <a href="{$newReport}"  id="new"|cat:$GName class="button"><span><div class="icon ui-icon-circle-plus"></div> {ts 1=$GName}Register New %1{/ts}</span></a>
   </div>
   <div class="spacer"></div>
 {/if}
@@ -74,7 +74,7 @@
 
     {if $action ne 1 and $action ne 2}
       <div class="action-link">
-        <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
+        <a href="{$newReport}"  id="new"|cat:$GName class="button"><span><div class="icon ui-icon-circle-plus"> {ts 1=$GName}Register New %1{/ts}</span></a>
       </div>
     {/if}
   </div>