Skip to content

Commit

Permalink
Merge pull request #1 from greenpeace-cee/gp-3676
Browse files Browse the repository at this point in the history
GP-3676. Replace icons
  • Loading branch information
pfigel authored Oct 10, 2019
2 parents d1e5a10 + d1070f5 commit 5039b93
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
21 changes: 16 additions & 5 deletions css/campaign.css
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,18 @@ linegraph .axis line {
/* alter display of parent and child groups in Manage Groups selector */
/* from civicrm.css: #crm-container .crm-group-parent td.crm-group-name { */
#crm-container td.crm-campaign-name {
padding-left: 20px;
padding-left: 30px;
text-indent: -20px;
}

/* from civicrm.css: #crm-container .crm-group-child td.crm-group-name.level_2 { */
#crm-container td.crm-campaign-name.level_2 {
padding-left: 40px;
padding-left: 50px;
text-indent: -20px;
}
/* from civicrm.css: #crm-container .crm-group-child td.crm-group-name.level_3 { */
#crm-container td.crm-campaign-name.level_3 {
padding-left: 60px;
padding-left: 70px;
text-indent: -20px;
}
/* from civicrm.css: #crm-container .crm-group-name span.crm-editable-enabled { */
Expand All @@ -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 All @@ -194,5 +205,5 @@ linegraph .axis line {
}

.crm-create-new-list-inner, .crm-create-new-list-inner ul {
width: 160px!important;
}
width: 160px !important;
}
Binary file removed images/campaign-icon-child_20x20.png
Binary file not shown.
Binary file removed images/campaign-icon-other_20x20.png
Binary file not shown.
Binary file removed images/campaign-icon-parent_20x20.png
Binary file not shown.
Binary file removed images/campaign-icon-root_20x20.png
Binary file not shown.
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 5039b93

Please sign in to comment.