}
var option = convertValueToObj(item.id);
var icon = (option.entity_type === 'civicrm_mailing') ? 'fa-envelope' : 'fa-users';
}
var option = convertValueToObj(item.id);
var icon = (option.entity_type === 'civicrm_mailing') ? 'fa-envelope' : 'fa-users';
var spanClass = (option.mode == 'exclude') ? 'crmMailing-exclude' : 'crmMailing-include';
if (option.entity_type != 'civicrm_mailing' && isMandatory(option.entity_id)) {
spanClass = 'crmMailing-mandatory';
}
var spanClass = (option.mode == 'exclude') ? 'crmMailing-exclude' : 'crmMailing-include';
if (option.entity_type != 'civicrm_mailing' && isMandatory(option.entity_id)) {
spanClass = 'crmMailing-mandatory';
}
- CRM.api3('Group', 'getlist', { params: { id: { IN: gids }, options: { limit: 0 } }, extra: ["is_hidden"] } ).then(
+ CRM.api3('Group', 'getlist', { params: { id: { IN: gids }, options: { limit: 0 } }, extra: ["is_hidden"] }).then(
function(glist) {
CRM.api3('Mailing', 'getlist', { params: { id: { IN: mids }, options: { limit: 0 } } }).then(
function(mlist) {
function(glist) {
CRM.api3('Mailing', 'getlist', { params: { id: { IN: mids }, options: { limit: 0 } } }).then(
function(mlist) {
$(glist.values).each(function (idx, group) {
var key = group.id + ' civicrm_group include';
$(glist.values).each(function (idx, group) {
var key = group.id + ' civicrm_group include';
if (values.indexOf(key) >= 0) {
datamap.push({id: key, text: group.label});
}
if (values.indexOf(key) >= 0) {
datamap.push({id: key, text: group.label});
}
- return { id: obj.id + ' ' + rcpAjaxState.entity + ' ' + rcpAjaxState.type,
- text: obj.label };
+ return { id: obj.id + ' ' + rcpAjaxState.entity + ' ' + rcpAjaxState.type, text: obj.label,
+ is_smart: (!_.isEmpty(obj.extra.saved_search_id)) };