examples/bootstrap/dashboard3.bjs
[roojs1] / examples / bootstrap / dashboard3.bjs
1 {
2     "name" : "dashboard3",
3     "parent" : "",
4     "title" : "",
5     "path" : "/home/alan/gitlive/roojs1/examples/bootstrap/dashboard3.bjs",
6     "permname" : "",
7     "modOrder" : "001",
8     "items" : [
9         {
10             "String cls" : "skin-blue",
11             "xtype" : "Body",
12             "$ xns" : "Roo.bootstrap",
13             "items" : [
14                 {
15                     "String cls" : "header",
16                     "tag" : "header",
17                     "xtype" : "Container",
18                     "* xinclude" : "Dashboard.Header1",
19                     "$ xns" : "Roo.bootstrap"
20                 },
21                 {
22                     "String cls" : "wrapper row-offcanvas row-offcanvas-left",
23                     "xtype" : "Container",
24                     "flexy:include" : "Sidebar.html",
25                     "$ xns" : "Roo.bootstrap",
26                     "items" : [
27                         {
28                             "String tag" : "aside",
29                             "String cls" : "left-side sidebar-offcanvas",
30                             "xtype" : "Container",
31                             "* xinclude" : "Dashboard.Sidebar2",
32                             "$ xns" : "Roo.bootstrap"
33                         },
34                         {
35                             "String tag" : "aside",
36                             "String cls" : "right-side",
37                             "xtype" : "Container",
38                             "$ xns" : "Roo.bootstrap",
39                             "items" : [
40                                 {
41                                     "String tag" : "section",
42                                     "String cls" : "content-header",
43                                     "xtype" : "Container",
44                                     "$ xns" : "Roo.bootstrap",
45                                     "items" : [
46                                         {
47                                             "xtype" : "Header",
48                                             "$ xns" : "Roo.bootstrap",
49                                             "String html" : "Dashboard  <small> Control panel </small>"
50                                         }
51                                     ]
52                                 },
53                                 {
54                                     "String tag" : "section",
55                                     "String cls" : "content",
56                                     "xtype" : "Container",
57                                     "$ xns" : "Roo.bootstrap",
58                                     "items" : [
59                                         {
60                                             "xtype" : "Container",
61                                             "$ xns" : "Roo.bootstrap",
62                                             "items" : [
63                                                 {
64                                                     "Number md" : 3,
65                                                     "xtype" : "Column",
66                                                     "Number lg" : 3,
67                                                     "$ xns" : "Roo.bootstrap",
68                                                     "items" : [
69                                                         {
70                                                             "bgcolor" : "",
71                                                             "String cls" : "",
72                                                             "xtype" : "NumberBox",
73                                                             "String headline" : 160,
74                                                             "$ xns" : "Roo.bootstrap.dash",
75                                                             "width" : "col-md-5",
76                                                             "String title" : "New Orders",
77                                                             "String style" : "col-md-3",
78                                                             "height" : 150
79                                                         }
80                                                     ]
81                                                 },
82                                                 {
83                                                     "Number md" : 3,
84                                                     "xtype" : "Column",
85                                                     "Number lg" : 3,
86                                                     "$ xns" : "Roo.bootstrap",
87                                                     "items" : [
88                                                         {
89                                                             "bgcolor" : "green",
90                                                             "String cls" : "",
91                                                             "xtype" : "NumberBox",
92                                                             "String headline" : 150,
93                                                             "$ xns" : "Roo.bootstrap.dash",
94                                                             "width" : "col-md-5",
95                                                             "String title" : "New Orders",
96                                                             "String style" : "col-lg-3",
97                                                             "height" : 150
98                                                         }
99                                                     ]
100                                                 },
101                                                 {
102                                                     "Number md" : 3,
103                                                     "xtype" : "Column",
104                                                     "Number lg" : 3,
105                                                     "$ xns" : "Roo.bootstrap",
106                                                     "items" : [
107                                                         {
108                                                             "bgcolor" : "yellow",
109                                                             "xtype" : "NumberBox",
110                                                             "String headline" : 150,
111                                                             "$ xns" : "Roo.bootstrap.dash",
112                                                             "width" : "col-md-5",
113                                                             "String title" : "New Orders",
114                                                             "String style" : "col-lg-3",
115                                                             "height" : 150
116                                                         }
117                                                     ]
118                                                 },
119                                                 {
120                                                     "Number md" : 3,
121                                                     "Number lg" : 3,
122                                                     "xtype" : "Column",
123                                                     "$ xns" : "Roo.bootstrap",
124                                                     "items" : [
125                                                         {
126                                                             "bgcolor" : "red",
127                                                             "xtype" : "NumberBox",
128                                                             "String headline" : 150,
129                                                             "$ xns" : "Roo.bootstrap.dash",
130                                                             "width" : "",
131                                                             "String title" : "New Orders",
132                                                             "String style" : "col-lg-3",
133                                                             "height" : 150
134                                                         }
135                                                     ]
136                                                 }
137                                             ]
138                                         },
139                                         {
140                                             "xtype" : "Row",
141                                             "$ xns" : "Roo.bootstrap",
142                                             "items" : [
143                                                 {
144                                                     "String cls" : "alert alert-danger alert-dismissable",
145                                                     "xtype" : "Container",
146                                                     "$ xns" : "Roo.bootstrap",
147                                                     "String html" : "<b> Alert </b> test allert"
148                                                 }
149                                             ]
150                                         },
151                                         {
152                                             "xtype" : "Row",
153                                             "$ xns" : "Roo.bootstrap",
154                                             "items" : [
155                                                 {
156                                                     "Number md" : 6,
157                                                     "xtype" : "Column",
158                                                     "Number lg" : 6,
159                                                     "$ xns" : "Roo.bootstrap",
160                                                     "String style" : "",
161                                                     "Number sm" : 12,
162                                                     "items" : [
163                                                         {
164                                                             "listeners" : {
165                                                                 "render" : "function (_self)\n{\n    _this.testbox = _self;\n}"
166                                                             },
167                                                             "xtype" : "TabBox",
168                                                             "$ xns" : "Roo.bootstrap.dash",
169                                                             "String title" : "test 1",
170                                                             "items" : [
171                                                                 {
172                                                                     "xtype" : "TabPane",
173                                                                     "$ xns" : "Roo.bootstrap.dash",
174                                                                     "string title" : "tab 1",
175                                                                     "items" : [
176                                                                         {
177                                                                             "xtype" : "Column",
178                                                                             "$ xns" : "Roo.bootstrap",
179                                                                             "items" : [
180                                                                                 {
181                                                                                     "listeners" : {
182                                                                                         "cellclick" : "function (_self, el, rowIndex, columnIndex, e)\n{\n    \n\n    var cm = this.colModel.getColumnById(this.colModel.getColumnId(columnIndex));\n    if (cm.dataIndex == 'current') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('current', rec.data.current * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n      if (cm.dataIndex == 'aspire') {\n        var rec = _this.listTable.ds.getAt(rowIndex);\n        \n        rec.set('aspire', rec.data.aspire * 1 ? '0' : '1');\n\n        //_this.listTable.ds.fireEvent(\"datachanged\", this);\n        rec.commit();\n        return;\n    }\n\n     \n}",
183                                                                                         "|render" : "function (_self)\n{\n     _this.listTable = _self;\n    (function() { _self.store.load({}); }).defer(100)\n}"
184                                                                                     },
185                                                                                     "xtype" : "Table",
186                                                                                     "Boolean CellSelection" : true,
187                                                                                     "$ xns" : "Roo.bootstrap",
188                                                                                     "Boolean RowSelection" : true,
189                                                                                     "items" : [
190                                                                                         {
191                                                                                             "$ Array data" : "[\n  [ 'A TEST', '1', '0' ],\n  \n    [ 'B test', '1', '0' ],\n      [ 'C test', '1', '0' ],\n    [ 'D test', '1', '0' ]\n]",
192                                                                                             "boolean isLocal" : true,
193                                                                                             "$ Array fields" : "[ 'display_name', 'current', 'aspire' ]",
194                                                                                             "xtype" : "SimpleStore",
195                                                                                             "$ xns" : "Roo.data",
196                                                                                             "* prop" : "store"
197                                                                                         },
198                                                                                         {
199                                                                                             "String header" : "Department",
200                                                                                             "String dataIndex" : "display_name",
201                                                                                             "xtype" : "ColumnModel",
202                                                                                             "$ xns" : "Roo.grid",
203                                                                                             "* prop" : "cm[]"
204                                                                                         },
205                                                                                         {
206                                                                                             "String header" : "Current",
207                                                                                             "String dataIndex" : "current",
208                                                                                             "xtype" : "ColumnModel",
209                                                                                             "$ xns" : "Roo.grid",
210                                                                                             "$ renderer" : "function(v) {  \n\n    var state = v> 0 ?  '-checked' : '';\n\n    return v*1  > 0 ? 'X' : '-';             \n                \n }",
211                                                                                             "* prop" : "cm[]"
212                                                                                         },
213                                                                                         {
214                                                                                             "String header" : "Aspire",
215                                                                                             "String dataIndex" : "aspire",
216                                                                                             "xtype" : "ColumnModel",
217                                                                                             "$ xns" : "Roo.grid",
218                                                                                             "$ renderer" : "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n    return v*1  > 0 ? 'X' : '-';             \n }",
219                                                                                             "* prop" : "cm[]"
220                                                                                         }
221                                                                                     ]
222                                                                                 }
223                                                                             ]
224                                                                         }
225                                                                     ]
226                                                                 },
227                                                                 {
228                                                                     "xtype" : "TabPane",
229                                                                     "$ xns" : "Roo.bootstrap.dash",
230                                                                     "string title" : "tab 2",
231                                                                     "items" : [
232                                                                         {
233                                                                             "xtype" : "Column",
234                                                                             "$ xns" : "Roo.bootstrap",
235                                                                             "String html" : "tab 2 content"
236                                                                         }
237                                                                     ]
238                                                                 }
239                                                             ]
240                                                         }
241                                                     ]
242                                                 },
243                                                 {
244                                                     "Number md" : 6,
245                                                     "Number lg" : 6,
246                                                     "xtype" : "Column",
247                                                     "$ xns" : "Roo.bootstrap",
248                                                     "String style" : "",
249                                                     "Number sm" : 12,
250                                                     "items" : [
251                                                         {
252                                                             "String cls" : "nav-tabs-custom",
253                                                             "xtype" : "Container",
254                                                             "$ xns" : "Roo.bootstrap",
255                                                             "items" : [
256                                                                 {
257                                                                     "xtype" : "Header",
258                                                                     "$ xns" : "Roo.bootstrap",
259                                                                     "String html" : "income",
260                                                                     "String style" : "margin: 10,10,0,0"
261                                                                 }
262                                                             ]
263                                                         }
264                                                     ]
265                                                 }
266                                             ]
267                                         },
268                                         {
269                                             "xtype" : "Row",
270                                             "$ xns" : "Roo.bootstrap",
271                                             "items" : [
272                                                 {
273                                                     "String cls" : "tab-content carousel slide",
274                                                     "Number lg" : 12,
275                                                     "xtype" : "TabGroup",
276                                                     "$ xns" : "Roo.bootstrap",
277                                                     "items" : [
278                                                         {
279                                                             "listeners" : {
280                                                                 "render" : "function (_self)\n{\n_this.tab_second = _self;\n}"
281                                                             },
282                                                             "Boolean active" : true,
283                                                             "String cls" : "item",
284                                                             "xtype" : "TabPanel",
285                                                             "$ xns" : "Roo.bootstrap",
286                                                             "String tabId" : "#second",
287                                                             "String navId" : "#sample1",
288                                                             "items" : [
289                                                                 {
290                                                                     "xtype" : "Header",
291                                                                     "$ xns" : "Roo.bootstrap",
292                                                                     "Number level" : 3,
293                                                                     "String html" : "next tab"
294                                                                 },
295                                                                 {
296                                                                     "String cls" : "carousel-inner",
297                                                                     "xtype" : "Container",
298                                                                     "$ xns" : "Roo.bootstrap",
299                                                                     "String well" : "md",
300                                                                     "String style" : "padding-left:50px;padding-right:50px;",
301                                                                     "items" : [
302                                                                         {
303                                                                             "xtype" : "Row",
304                                                                             "$ xns" : "Roo.bootstrap",
305                                                                             "items" : [
306                                                                                 {
307                                                                                     "Number md" : 6,
308                                                                                     "xtype" : "Column",
309                                                                                     "$ xns" : "Roo.bootstrap",
310                                                                                     "items" : [
311                                                                                         {
312                                                                                             "labelAlign" : "top",
313                                                                                             "fieldLabel" : "Some input",
314                                                                                             "xtype" : "Input",
315                                                                                             "allowBlank" : true,
316                                                                                             "$ xns" : "Roo.bootstrap",
317                                                                                             "name" : "chosen_title"
318                                                                                         }
319                                                                                     ]
320                                                                                 }
321                                                                             ]
322                                                                         }
323                                                                     ]
324                                                                 }
325                                                             ]
326                                                         },
327                                                         {
328                                                             "listeners" : {
329                                                                 "render" : "function (_self)\n{\n_this.tab_first = _self;\n}"
330                                                             },
331                                                             "Boolean active" : false,
332                                                             "String cls" : "item",
333                                                             "xtype" : "TabPanel",
334                                                             "$ xns" : "Roo.bootstrap",
335                                                             "String tabId" : "#first",
336                                                             "String navId" : "#sample1",
337                                                             "items" : [
338                                                                 {
339                                                                     "xtype" : "Header",
340                                                                     "Number level" : 3,
341                                                                     "$ xns" : "Roo.bootstrap",
342                                                                     "String html" : "some title"
343                                                                 },
344                                                                 {
345                                                                     "String cls" : "carousel-inner",
346                                                                     "xtype" : "Container",
347                                                                     "$ xns" : "Roo.bootstrap",
348                                                                     "String well" : "md",
349                                                                     "String style" : "padding-left:50px;padding-right:50px;",
350                                                                     "items" : [
351                                                                         {
352                                                                             "xtype" : "Row",
353                                                                             "$ xns" : "Roo.bootstrap",
354                                                                             "items" : [
355                                                                                 {
356                                                                                     "Number md" : 6,
357                                                                                     "xtype" : "Column",
358                                                                                     "$ xns" : "Roo.bootstrap",
359                                                                                     "items" : [
360                                                                                         {
361                                                                                             "labelAlign" : "top",
362                                                                                             "fieldLabel" : "This is a label",
363                                                                                             "xtype" : "Input",
364                                                                                             "allowBlank" : true,
365                                                                                             "$ xns" : "Roo.bootstrap",
366                                                                                             "name" : "chosen_title"
367                                                                                         }
368                                                                                     ]
369                                                                                 }
370                                                                             ]
371                                                                         }
372                                                                     ]
373                                                                 }
374                                                             ]
375                                                         },
376                                                         {
377                                                             "String cls" : "carousel-control left",
378                                                             "Boolean preventDefault" : true,
379                                                             "xtype" : "Link",
380                                                             "$ xns" : "Roo.bootstrap",
381                                                             "String html" : "<span class=\"glyphicon glyphicon-chevron-left\"></span>"
382                                                         },
383                                                         {
384                                                             "listeners" : {
385                                                                 "click" : "function (e)\n{\n  _this.tab_first.setActive(false);\n_this.tab_second.setActive(true);\n}"
386                                                             },
387                                                             "String cls" : "carousel-control right",
388                                                             "Boolean preventDefault" : true,
389                                                             "xtype" : "Link",
390                                                             "$ xns" : "Roo.bootstrap",
391                                                             "String html" : "<span class=\"glyphicon glyphicon-chevron-right\"></span>"
392                                                         }
393                                                     ]
394                                                 }
395                                             ]
396                                         }
397                                     ]
398                                 }
399                             ]
400                         }
401                     ]
402                 }
403             ]
404         }
405     ]
406 }