sync
[roojs1] / examples / bootstrap / cards.js.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('cards');
6
7 cards.js = new Roo.XComponent({
8
9  _strings : {
10   '9e727fdd3aec8274f46685441900280d' :"Project",
11   '6a58f977f2b623b695a340766f2a6843' :"Select Project",
12   '1243daf593fa297e07ab03bf06d925af' :"Searching...",
13   'cd81f9f55969c822377f076017bb3484' :"Cards",
14   '24f27bda5dd2c488aa9bc7700ba98c34' :"Select Projects"
15  },
16  _named_strings : {
17   'project_id_name_emptyText' : '6a58f977f2b623b695a340766f2a6843' /* Select Project */ ,
18   'project_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
19   'project_id_name_qtip' : '24f27bda5dd2c488aa9bc7700ba98c34' /* Select Projects */ ,
20   'project_id_name_fieldLabel' : '9e727fdd3aec8274f46685441900280d' /* Project */ 
21  },
22
23   part     :  ["bootstrap", "js" ],
24   order    : '001-cards.js',
25   region   : 'center',
26   parent   : false,
27   name     : "unnamed module",
28   disabled : false, 
29   permname : '', 
30   _tree : function(_data)
31   {
32    var _this = this;
33    var MODULE = this;
34    return {
35    xtype : 'Content',
36    autoScroll : true,
37    cardRow : false,
38    fitToFrame : true,
39    loadCards : function() {
40    
41       
42        if (this.cardRow == false) {
43            this.cardRow = this.addxtype({
44                xtype : 'CardRow',
45                xns : Pman.Tab.Cards
46            });
47        }
48        this.cardRow.load();
49        (function() { 
50            _this.content.cardRow.updateHeight(_this.content.el.getHeight()); 
51        }).defer(100);
52    
53    
54     },
55    region : 'center',
56    title : _this._strings['cd81f9f55969c822377f076017bb3484'] /* Cards */,
57    listeners : {
58     activate : function (_self)
59      {
60          this.loadCards();
61      },
62     render : function (_self)
63      {
64          _this.content  = this;
65      },
66     resize : function (_self, width, height)
67      {
68           this.cardRow.updateHeight(height);
69      }
70    },
71    xns : Roo.bootstrap.panel,
72    '|xns' : 'Roo.bootstrap.panel',
73    toolbar : {
74     xtype : 'NavSimplebar',
75     xns : Roo.bootstrap,
76     '|xns' : 'Roo.bootstrap',
77     items  : [
78      {
79       xtype : 'NavGroup',
80       xns : Roo.bootstrap,
81       '|xns' : 'Roo.bootstrap',
82       items  : [
83        {
84         xtype : 'NavItem',
85         xns : Roo.bootstrap,
86         '|xns' : 'Roo.bootstrap',
87         items  : [
88          {
89           xtype : 'Element',
90           xns : Roo.bootstrap,
91           '|xns' : 'Roo.bootstrap',
92           items  : [
93            {
94             xtype : 'ComboBox',
95             allowBlank : false,
96             displayField : 'name',
97             editable : false,
98             emptyText : _this._strings['6a58f977f2b623b695a340766f2a6843'] /* Select Project */,
99             fieldLabel : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
100             forceSelection : true,
101             hiddenName : 'project_id',
102             listWidth : 400,
103             loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
104             md : 5,
105             minChars : 2,
106             name : 'project_id_name',
107             pageSize : 100,
108             qtip : _this._strings['24f27bda5dd2c488aa9bc7700ba98c34'] /* Select Projects */,
109             queryParam : 'query[name]',
110             selectOnFocus : true,
111             tpl : '<a class=\"dropdown-item\" href=\"#\"> {name} </a>',
112             triggerAction : 'all',
113             typeAhead : true,
114             valueField : 'id',
115             listeners : {
116              render : function (_self)
117               {
118                   _this.projectSel  = this;
119               },
120              select : function (combo, record, index)
121               {
122                   _this.content.loadCards();
123               }
124             },
125             xns : Roo.bootstrap,
126             '|xns' : 'Roo.bootstrap',
127             store : {
128              xtype : 'Store',
129              remoteSort : true,
130              sortInfo : { direction : 'ASC', field: 'name' },
131              listeners : {
132               beforeload : function (_self, o){
133                    o.params = o.params || {};
134                    // set more here
135                }
136              },
137              xns : Roo.data,
138              '|xns' : 'Roo.data',
139              proxy : {
140               xtype : 'HttpProxy',
141               method : 'GET',
142               url : baseURL + '/Roo/core_project',
143               xns : Roo.data,
144               '|xns' : 'Roo.data'
145              },
146              reader : {
147               xtype : 'JsonReader',
148               fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
149               id : 'id',
150               root : 'data',
151               totalProperty : 'total',
152               xns : Roo.data,
153               '|xns' : 'Roo.data'
154              }
155             }
156            }
157           ]
158          }
159         ]
160        }
161       ]
162      }
163     ]
164    }
165   };  }
166 });