php7 fixes
[Pman.Builder] / Pman.Dialog.BuilderProp.bjs
1 {
2     "id": "roo-file-190",
3     "name": "Pman.Dialog.BuilderProp",
4     "parent": "",
5     "title": "",
6     "path": "/home/edward/gitlive/Pman.Builder/Pman.Dialog.BuilderProp.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "show": "function (_self)\n{\n   _this.grid.ds.load({});\n}"
11             },
12             "closable": false,
13             "collapsible": false,
14             "height": 600,
15             "modal": true,
16             "resizable": false,
17             "title": "Add Property",
18             "width": 600,
19             "xtype": "LayoutDialog",
20             "|xns": "Roo",
21             "items": [
22                 {
23                     "|xns": "Roo",
24                     "xtype": "LayoutRegion",
25                     "*prop": "center"
26                 },
27                 {
28                     "listeners": {
29                         "|activate": "function() {\n    _this.panel = this;\n    //if (_this.grid) {\n    //    _this.grid.ds.load({});\n    //}\n}"
30                     },
31                     "fitContainer": true,
32                     "fitToframe": true,
33                     "region": "center",
34                     "title": "Props",
35                     "xtype": "GridPanel",
36                     "|xns": "Roo",
37                     "items": [
38                         {
39                             "listeners": {
40                                 "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n   // if (_this.panel.active) {\n     //  this.footer.onClick('first');\n   // }\n}",
41                                 "|rowdblclick": "function (_self, rowIndex, e)\n{\n     \n     _this.callback(this.getDataSource().getAt(rowIndex).data.name);\n     _this.dialog.hide(); \n}\n"
42                             },
43                             "*prop": "grid",
44                             "autoExpandColumn": "desc",
45                             "loadMask": true,
46                             "xtype": "Grid",
47                             "|xns": "Roo.grid",
48                             "items": [
49                                 {
50                                     "listeners": {
51                                         "beforeload": "function (_self, options)\n{\n    // we should cache this!!!\n    options.params = options.params || {};\n    options.params.xtype = _this.data.xtype;\n    options.params.xns = _this.data.xns;\n    options.params.list = _this.data.list;    \n}"
52                                     },
53                                     "*prop": "dataSource",
54                                     "remoteSort": false,
55                                     "xtype": "Store",
56                                     "|sortInfo": "{ field : 'name', direction: 'ASC' }",
57                                     "|xns": "Roo.data",
58                                     "items": [
59                                         {
60                                             "*prop": "proxy",
61                                             "method": "GET",
62                                             "xtype": "HttpProxy",
63                                             "|url": "baseURL + '/Builder/Palette/Prop.php'",
64                                             "|xns": "Roo.data"
65                                         },
66                                         {
67                                             "*prop": "reader",
68                                             "id": "id",
69                                             "root": "data",
70                                             "totalProperty": "total",
71                                             "xtype": "JsonReader",
72                                             "|fields": "[\n    'name',\n    'desc'\n]",
73                                             "|xns": "Roo.data"
74                                         }
75                                     ]
76                                 },
77                                 {
78                                     "*prop": "colModel[]",
79                                     "dataIndex": "name",
80                                     "header": "name",
81                                     "width": 175,
82                                     "xtype": "ColumnModel",
83                                     "|renderer": "function(v) { return String.format('{0}', v ? v : ''); }",
84                                     "|xns": "Roo.grid"
85                                 },
86                                 {
87                                     "*prop": "colModel[]",
88                                     "dataIndex": "desc",
89                                     "header": "Description",
90                                     "width": 200,
91                                     "xtype": "ColumnModel",
92                                     "|renderer": "function(v) { return String.format('{0}', v); }",
93                                     "|xns": "Roo.grid"
94                                 }
95                             ]
96                         }
97                     ]
98                 },
99                 {
100                     "listeners": {
101                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
102                     },
103                     "*prop": "buttons[]",
104                     "text": "Cancel",
105                     "xtype": "Button",
106                     "|xns": "Roo"
107                 },
108                 {
109                     "listeners": {
110                         "click": "function (_self, e)\n{\n    // do some checks?\n     var sel = _this.grid.getSelectionModel().getSelected();\n    if (!sel) {\n        Roo.MessageBox.alert(\"Error\", \"Select a property\");\n    }\n    \n    _this.callback(sel.data.name);\n   _this.dialog.hide();\n \n\n}"
111                     },
112                     "*prop": "buttons[]",
113                     "text": "Add",
114                     "xtype": "Button",
115                     "|xns": "Roo"
116                 }
117             ]
118         }
119     ],
120     "permname": "",
121     "modOrder": "001"
122 }