fix #7861 - add multiline combobox MultiLineTag
[roojs1] / examples / bootstrap4 / multiLineTag.js
1 Roo.example = Roo.example || {};
2
3 Roo.example.multiLineTag = new Roo.XComponent({
4     part     :  ["example","multiLineTag"],
5     order    : '001-viewpanel',
6     region   : '',
7     parent   : false,
8     name     : "unnamed module",
9     disabled : false, 
10     permname : '', 
11     _tree : function()
12     {   
13
14         return {
15             xtype: 'Body',
16             xns: Roo.bootstrap,
17             items : [
18                  {
19                     xtype: 'Container',
20                     xns: Roo.bootstrap,
21                     items : [
22                         {
23                             xtype: 'Row',
24                             xns: Roo.bootstrap,
25                             items : [
26                                 { 
27                                     xtype: 'Form',
28                                     xns: Roo.bootstrap,
29                                     items : [
30                                         {
31                                             xtype: 'MultiLineTag',
32                                             xns: Roo.bootstrap.form,
33                                             displayField : 'name',
34                                             valueField : 'name',
35                                             placeholder : 'Corporate, CSR, ESG Product',
36                                             queryParam : 'query[name]',
37                                             url : 'http://localhost/web.MediaOutreach.publisher/index.local.php/Roo/Core_company',
38                                             fields : [
39                                                 {
40                                                     'name' : 'id',
41                                                     'type' : 'int'
42                                                 },
43                                                 {
44                                                     'name' : 'name',
45                                                     'type' : 'string'
46                                                 }
47                                             ],
48                                             fieldLabel : 'Type of news:<br>(PR Campaign Intelligence)',
49                                             labelWidth : 0,
50                                             listeners : {
51                                                 render : function(_self) {
52                                                     window.qwer = _self;
53                                                 },
54                                                 beforeload : function(_self, store, options) {
55                                                     options.params = options.params || {};
56                                                     options.params._clients = 1;
57                                                 },
58                                                 change : function(_self, newValue, oldValue) {
59                                                     Roo.log(_self.getValue());
60                                                 }
61                                             }
62                                         } 
63                                     ]
64                                 }
65                             ]
66                         }
67                     ]
68                  },
69                   
70             ]
71         };
72     }
73 });