Skip to content

Commit

Permalink
Replace old icons to Fontawesome icons on the 'campaign tree' page.
Browse files Browse the repository at this point in the history
  • Loading branch information
awg-github committed Oct 7, 2019
1 parent d1e5a10 commit abb3511
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
11 changes: 11 additions & 0 deletions css/campaign.css
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ linegraph .axis line {
vertical-align: middle;
}

.campaign-fa-icon {
max-width: 20px;
max-height: 20px;
font-size: 20px;
width: 20px;
height: 20px;
overflow: hidden;
vertical-align: middle;
text-indent: 0;
}

#crm-campaign-actions-list {
position: absolute;
display: block;
Expand Down
24 changes: 12 additions & 12 deletions templates/CRM/CampaignTree/Form/Search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,20 @@
}

if ($(nRow).hasClass('crm-campaign-root')) {
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-root" title="{ts}Root Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-root_20x20.png" /></span>{literal}');
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-root" title="{ts}Root Campaign{/ts}"/>' +
'<i class="campaign-fa-icon fa fa-folder" aria-hidden="true"></i></span>{literal}');
}
else if ($(nRow).hasClass('crm-campaign-parent')) {
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-parent" title="{ts}Parent Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-parent_20x20.png" /></span>{literal}');
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-parent" title="{ts}Parent Campaign{/ts}">' +
'<i class="campaign-fa-icon fa fa-sitemap" aria-hidden="true"></i></span>{literal}');
}
else if ($(nRow).hasClass('crm-campaign-child')) {
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-child" title="{ts}Child Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-child_20x20.png" /></span>{literal}');
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-child" title="{ts}Child Campaign{/ts}">' +
'<i class="campaign-fa-icon fa fa-file" aria-hidden="true"></i></span>{literal}');
}
else {
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-other" title="{ts}Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-other_20x20.png" /></span>{literal}');
$(nRow).find('td:first').prepend('{/literal}<span class="campaign-icon-other" title="{ts}Campaign{/ts}">' +
'<i class="campaign-fa-icon fa fa-file-o" aria-hidden="true"></i></span>{literal}');
}
return nRow;
},
Expand Down Expand Up @@ -364,14 +364,14 @@
appendHTML += '<tr id="row_'+ val.id +'_'+parent_id+'" data-entity="campaign" data-id="'+ val.id +'" class="parent_is_' + parent_id + ' crm-row-child ' + val.class.split(',')[1] + '">';
if ( val.is_parent ) {
appendHTML += '<td class="crm-campaign-name ' + levelClass + '">'{/literal} +
'<span class="campaign-icon-parent" title="{ts}Parent Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-parent_20x20.png" /></span>' +
'<span class="campaign-icon-parent" title="{ts}Parent Campaign{/ts}">' +
'<i class="campaign-fa-icon fa fa-sitemap" aria-hidden="true"></i></span>' +
'<span class="collapsed show-children" title="{ts}show child campaigns{/ts}"/></span>{literal}' + val.name + '</td>';
}
else {
appendHTML += '<td class="crm-campaign-name ' + levelClass + '">'{/literal} +
'<span class="campaign-icon-child" title="{ts}Child Campaign{/ts}"/><img class="campaign-icon" src="' +
CRM.vars.campaigntree.baseUrl + '/images/campaign-icon-child_20x20.png" /></span>' +
'<span class="campaign-icon-child" title="{ts}Child Campaign{/ts}">' +
'<i class="campaign-fa-icon fa fa-file" aria-hidden="true"></i></span>' +
'<span class="crm-no-children"></span>{literal}' + val.name + '</td>';
}
appendHTML += '<td class="crm-editable crmf-description" data-type="textarea">' + (val.description || '') + "</td>";
Expand Down

0 comments on commit abb3511

Please sign in to comment.