$activityLinks[$url] = $label;
}
- $this->add('select', 'add_activity_type_id', '', $activityLinks, FALSE, array('class' => 'crm-select2 crm-action-menu action-icon-plus twenty'));
+ $this->add('select', 'add_activity_type_id', '', $activityLinks, FALSE, array('class' => 'crm-select2 crm-action-menu fa-calendar-check-o twenty'));
if ($this->_hasAccessToAllCases) {
$this->add('select', 'report_id', '',
array('' => ts('Activity Audit')) + $reports,
FALSE,
- array('class' => 'crm-select2 crm-action-menu action-icon-clipboard')
+ array('class' => 'crm-select2 crm-action-menu fa-list-alt')
);
$this->add('select', 'timeline_id', '',
array('' => ts('Add Timeline')) + $reports,
FALSE,
- array('class' => 'crm-select2 crm-action-menu action-icon-play')
+ array('class' => 'crm-select2 crm-action-menu fa-list-ol')
);
}
$this->addElement('submit', $this->getButtonName('next'), ' ', array('class' => 'hiddenElement'));
$msg = ts('Add to a group');
}
- $this->addField('group_id', array('class' => 'crm-action-menu action-icon-plus', 'placeholder' => $msg, 'options' => $groupSelect));
+ $this->addField('group_id', array('class' => 'crm-action-menu fa-plus', 'placeholder' => $msg, 'options' => $groupSelect));
$this->addButtons(array(
array(
public function addTaskMenu($tasks) {
if (is_array($tasks) && !empty($tasks)) {
$tasks = array('' => ts('Actions')) + $tasks;
- $this->add('select', 'task', NULL, $tasks, FALSE, array('class' => 'crm-select2 crm-action-menu huge crm-search-result-actions'));
+ $this->add('select', 'task', NULL, $tasks, FALSE, array('class' => 'crm-select2 crm-action-menu fa-check-circle-o huge crm-search-result-actions'));
$this->add('submit', $this->_actionButtonName, ts('Go'), array('class' => 'hiddenElement crm-search-go-button'));
// Radio to choose "All items" or "Selected items only"
$this->addElement('select', 'groups', ts('Group'),
array('' => ts('Add Contacts to Group')) +
CRM_Core_PseudoConstant::nestedGroup(),
- array('class' => 'crm-select2 crm-action-menu action-icon-plus huge')
+ array('class' => 'crm-select2 crm-action-menu fa-plus huge')
);
$this->assign('group', TRUE);
}
crmCaseType.directive('crmAddName', function() {
return {
restrict: 'AE',
- template: '<input class="add-activity crm-action-menu action-icon-plus" type="hidden" />',
+ template: '<input class="add-activity crm-action-menu fa-plus" type="hidden" />',
link: function(scope, element, attrs) {
/// Format list of options for select2's "data"
var getFormattedOptions = function() {
<div>
<select
name="preview_test_group"
- ui-jq="select2"
+ ui-jq="crmSelect2"
ui-options="{dropdownAutoWidth : true, allowClear: true, placeholder: ts('Select Group')}"
ng-model="testGroup.gid"
ng-options="group.id as group.title for group in crmMailingConst.groupNames|orderBy:'title'"
- class="crm-action-menu action-icon-mail-closed"
+ class="crm-action-menu fa-envelope-o"
>
<option value=""></option>
</select>
},
template: '<input type="text" class="crmMailingToken" />',
link: function(scope, element, attrs, crmUiIdCtrl) {
- $(element).addClass('crm-action-menu action-icon-token').select2({
+ $(element).addClass('crm-action-menu fa-code').crmSelect2({
width: "12em",
dropdownAutoWidth: true,
data: CRM.crmMailing.mailTokens,
.crm-container .crm-action-menu .select2-default span.select2-chosen {
color: #2786C2;
}
-.crm-container .crm-action-menu .select2-default span.select2-chosen:before {
- background: url("../i/icons/jquery-ui-2786C2.png") no-repeat scroll -64px -112px;
- content: "";
- display: inline-block;
- height: 16px;
- width: 16px;
- margin-right: 3px;
- position: relative;
- top: 3px;
-}
-.crm-container .crm-action-menu.action-icon-plus .select2-default span.select2-chosen:before {
- background-position: 0 -192px;
-}
-.crm-container .crm-action-menu.action-icon-play .select2-default span.select2-chosen:before {
- background-position: -48px -192px;
-}
-.crm-container .crm-action-menu.action-icon-clipboard .select2-default span.select2-chosen:before {
- background-position: -160px -128px;
-}
-.crm-container .crm-action-menu.action-icon-token .select2-default span.select2-chosen:before {
- background-position: -144px 0;
-}
-.crm-container .crm-action-menu.action-icon-mail-closed .select2-default span.select2-chosen:before {
- background-position: -80px -96px;
-}
/* Restore this property otherwise our css overrides it */
.select2-search input {
box-sizing: border-box;
return $(this).each(function () {
var
$el = $(this),
+ iconClass,
settings = {allowClear: !$el.hasClass('required')};
// quickform doesn't support optgroups so here's a hack :(
$('option[value^=crm_optgroup]', this).each(function () {
// add disabled property for option values
$('option[value^=crm_disabled_opt]', this).attr('disabled', 'disabled');
+ // Placeholder icon
+ if ($el.is('[class*=fa-]')) {
+ iconClass = $el.attr('class').match(/(fa-\S*)/)[1];
+ $el.removeClass(iconClass);
+ }
+
// Defaults for single-selects
if ($el.is('select:not([multiple])')) {
settings.minimumResultsForSearch = 10;
$el.addClass('crm-ajax-select');
}
$el.select2(settings);
+ if (iconClass) {
+ window.setTimeout(function() {
+ $el.select2('container').find('span.select2-chosen').prepend('<i class="crm-i ' + iconClass + '"></i> ');
+ }, 10);
+ }
});
};
{/if}
{if $as_select} {* on 3.2, the activities can be either a drop down select (on the activity tab) or a list (on the action menu) *}
-<select name="other_activity" class="crm-form-select crm-select2 crm-action-menu action-icon-plus">
+<select name="other_activity" class="crm-form-select crm-select2 crm-action-menu fa-plus">
<option value="">{ts}New Activity{/ts}</option>
{foreach from=$activityTypes key=k item=link}
<option value="{$urls.$k}">{$link}</option>
// Initialize token selector widgets
var form = $('form.{/literal}{$form.formClass}{literal}');
$('input.crm-token-selector', form)
- .addClass('crm-action-menu action-icon-token')
+ .addClass('crm-action-menu fa-code')
.change(insertToken)
.crmSelect2({
data: form.data('tokens'),