Merge pull request #19800 from eileenmcnaughton/gettypes
[civicrm-core.git] / ext / search / ang / crmSearchAdmin / displays / searchAdminDisplayList.component.js
CommitLineData
03b55607
CW
1(function(angular, $, _) {
2 "use strict";
3
4 angular.module('crmSearchAdmin').component('searchAdminDisplayList', {
5 bindings: {
6 display: '<',
7 apiEntity: '<',
8 apiParams: '<'
9 },
10 require: {
969245e4 11 parent: '^crmSearchAdminDisplay'
03b55607
CW
12 },
13 templateUrl: '~/crmSearchAdmin/displays/searchAdminDisplayList.html',
a3caaf9e 14 controller: function($scope) {
67d666c6 15 var ts = $scope.ts = CRM.ts('org.civicrm.search'),
03b55607 16 ctrl = this;
03b55607 17
03b55607
CW
18 this.symbols = {
19 ul: [
20 {char: '', label: ts('Default')},
7ff7ebc8
CW
21 {char: 'circle', label: ts('Circles')},
22 {char: 'square', label: ts('Squares')},
23 {char: 'none', label: ts('None')},
03b55607
CW
24 ],
25 ol: [
7ff7ebc8 26 {char: '', label: ts('Default (1. 2. 3.)')},
03b55607 27 {char: 'upper-latin', label: ts('Uppercase (A. B. C.)')},
7ff7ebc8 28 {char: 'lower-latin', label: ts('Lowercase (a. b. c.)')},
03b55607
CW
29 {char: 'upper-roman', label: ts('Roman (I. II. III.)')},
30 ]
31 };
32
33 this.$onInit = function () {
34 if (!ctrl.display.settings) {
35 ctrl.display.settings = {
36 style: 'ul',
37 limit: 20,
38 pager: true
39 };
40 }
daa4e55a 41 ctrl.parent.initColumns({key: true, dataType: true, type: 'field'});
03b55607
CW
42 };
43
44 }
45 });
46
47})(angular, CRM.$, CRM._);