Skip to content

Commit

Permalink
Merge pull request #13003 from agh1/obsoleteIcons
Browse files Browse the repository at this point in the history
Replace translation and calendar image icons
  • Loading branch information
colemanw authored Oct 25, 2018
2 parents b7801a4 + 32c5750 commit 1ecd742
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions css/civicrm.css
Original file line number Diff line number Diff line change
Expand Up @@ -2683,12 +2683,15 @@ div.crm-container form {
/* Date plugin */
.crm-container input.dateplugin,
.crm-container input.crm-form-date {
background: white url(../i/cal.gif) no-repeat scroll right center;
padding-right: 16px;
/* so that text doesn't flow on top of icon */
width: 9em;
}

.crm-container input.dateplugin::placeholder,
.crm-container input.crm-form-date::placeholder {
font-family: "FontAwesome";
text-align: right;
}

.crm-container div.batch-update {
overflow: visible;
}
Expand Down
Binary file removed i/cal.gif
Binary file not shown.
Binary file removed i/langs.png
Binary file not shown.
4 changes: 3 additions & 1 deletion js/crm.datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
if (!settings.yearRange && settings.minDate !== null && settings.maxDate !== null) {
settings.yearRange = '' + CRM.utils.formatDate(settings.minDate, 'yy') + ':' + CRM.utils.formatDate(settings.maxDate, 'yy');
}
$dateField.addClass('crm-form-date').datepicker(settings);
// Set placeholder as calendar icon (`fa-calendar` is Unicode f073)
// and add datepicker
$dateField.addClass('crm-form-date').attr({placeholder: '\uF073'}).datepicker(settings);
} else {
$dateField.attr('min', settings.minDate ? CRM.utils.formatDate(settings.minDate, 'yy') : '1000');
$dateField.attr('max', settings.maxDate ? CRM.utils.formatDate(settings.maxDate, 'yy') : '4000');
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Core/I18n/Dialog.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
*}
{if $config->languageLimit|@count >= 2 and $translatePermission }
<a href="{crmURL p='civicrm/i18n' q="reset=1&table=$table&field=$field&id=$id"}" data-field="{$field}" class="crm-hover-button crm-multilingual-edit-button" title="{ts}Languages{/ts}">
<img src="{$config->resourceBase}i/langs.png" style="position:relative; top: 2px;"/>
<i class="crm-i fa-language fa-lg"></i>
</a>
{/if}

0 comments on commit 1ecd742

Please sign in to comment.