PHP8
[Pman.BAdmin] / Pman.Tab.BAdminCompany.bjs
1 {
2  "name" : "Pman.Tab.BAdminCompany",
3  "parent" : "Pman.Tab.BAdmin",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Tab.BAdminCompany.bjs",
6  "permname" : "",
7  "modOrder" : "002",
8  "strings" : {
9   "ce8ae9da5b7cd6c3df2929543a9af92d" : "Email",
10   "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
11   "edefbda3a2bdd979e42d8944b7325b79" : "Companies",
12   "b80bb7740288fda1f201890375a60c8f" : "id",
13   "fc6f97505d89fe9277965c126744647a" : "No Companies found",
14   "694e249c3a9503141fa5ce3fb71d5477" : "<i class=\"fa fa-edit\"></i> Edit",
15   "155ca6a755e25c15ad7ce45e2f638f10" : "Displaying Companies{0} - {1} of {2}",
16   "fd5293a712d172f5c556a83c62d44bd6" : "<i class=\"fa fa-plus\"></i> Add",
17   "ed807858fcb68abdd180481f1fcba5c5" : "<i class=\"fa fa-trash\"></i> Delete",
18   "f78e208016407d8756c29673558ac14d" : "Company List",
19   "a1fa27779242b4902f7ae3bdd5c6d508" : "Type",
20   "9c9745a343efeacc9efe9b7222b27afb" : "Ref#",
21   "49ee3087348e8d44e1feda1917443987" : "Name",
22   "2e006b735fbd916d8ab26978ae6714d4" : "Tel",
23   "dd7bf230fde8d4836917806aff6a6b27" : "Address",
24   "9810aa2b9f44401be4bf73188ef2b67d" : "Fax"
25  },
26  "named_strings" : {
27   "footer_displayMsg" : "155ca6a755e25c15ad7ce45e2f638f10",
28   "footer_emptyMsg" : "fc6f97505d89fe9277965c126744647a"
29  },
30  "items" : [
31   {
32    "xtype" : "Nest",
33    "$ xns" : "Roo.bootstrap.panel",
34    "String region" : "center",
35    "String title" : "Companies",
36    "Boolean background" : false,
37    "items" : [
38     {
39      "xtype" : "Border",
40      "$ xns" : "Roo.bootstrap.layout",
41      "* prop" : "layout",
42      "items" : [
43       {
44        "String tabPosition" : "top",
45        "xtype" : "Region",
46        "$ xns" : "Roo.bootstrap.layout",
47        "* prop" : "center"
48       },
49       {
50        "listeners" : {
51         "activate" : "function (_self)\n{\n    _this.edit_btn.hide();\n    _this.delete_btn.hide();\n    \n    if (_this.table) {\n        _this.table.footer.onClick('first');\n    }\n}",
52         "render" : "function (_self)\n{\n    _this.grid = _self;\n}"
53        },
54        "xtype" : "Grid",
55        "Boolean fitToFrame" : true,
56        "$ xns" : "Roo.bootstrap.panel",
57        "String region" : "center",
58        "String title" : "Company List",
59        "Boolean closable" : false,
60        "items" : [
61         {
62          "xtype" : "NavSimplebar",
63          "$ xns" : "Roo.bootstrap",
64          "* prop" : "toolbar",
65          "items" : [
66           {
67            "xtype" : "NavGroup",
68            "$ xns" : "Roo.bootstrap",
69            "items" : [
70             {
71              "xtype" : "NavItem",
72              "$ xns" : "Roo.bootstrap",
73              "items" : [
74               {
75                "xtype" : "Element",
76                "$ xns" : "Roo.bootstrap",
77                "items" : [
78                 {
79                  "String cls" : "roo-toolbar",
80                  "xtype" : "Row",
81                  "$ xns" : "Roo.bootstrap",
82                  "items" : [
83                   {
84                    "Number md" : 12,
85                    "xtype" : "Column",
86                    "$ xns" : "Roo.bootstrap",
87                    "items" : [
88                     {
89                      "listeners" : {
90                       "click" : "function (_self, e)\n{\n    Pman.Dialog.BAdminCompany.show({}, function() {\n        if (_this.table) {\n            _this.table.footer.onClick('first');\n        }\n    }); \n}"
91                      },
92                      "String cls" : "roo-toolbar-button",
93                      "String weight" : "default",
94                      "xtype" : "Button",
95                      "$ xns" : "Roo.bootstrap",
96                      "String html" : "<i class=\"fa fa-plus\"></i> Add"
97                     },
98                     {
99                      "listeners" : {
100                       "render" : "function (_self)\n{\n    _this.edit_btn = this;\n    \n    this.hide();\n}",
101                       "click" : "function (_self, e)\n{\n    var s = _this.table.getSelectionModel().getSelected();\n        \n    if (!s || s.data.id * 1 < 1)  {\n        Roo.bootstrap.MessageBox.alert(\"Error\", 'Please select a company');\n        return;\n    }\n    \n    Pman.Dialog.BAdminCompany.show({\n        id : s.data.id\n    }, function() {\n        if (_this.table) {\n            _this.table.footer.onClick('refresh');\n        }\n    });\n    \n    \n}"
102                      },
103                      "String cls" : "roo-toolbar-button",
104                      "String weight" : "default",
105                      "xtype" : "Button",
106                      "$ xns" : "Roo.bootstrap",
107                      "String html" : "<i class=\"fa fa-edit\"></i> Edit"
108                     },
109                     {
110                      "listeners" : {
111                       "render" : "function (_self)\n{\n    _this.delete_btn = this;\n    \n    this.hide();\n}",
112                       "click" : "function (_self, e)\n{\n    Pman.genericDelete(_this.grid, 'core_company'); \n}"
113                      },
114                      "String cls" : "roo-toolbar-button",
115                      "String weight" : "primary",
116                      "xtype" : "Button",
117                      "$ xns" : "Roo.bootstrap",
118                      "String html" : "<i class=\"fa fa-trash\"></i> Delete"
119                     }
120                    ]
121                   }
122                  ]
123                 }
124                ]
125               }
126              ]
127             }
128            ]
129           }
130          ]
131         },
132         {
133          "listeners" : {
134           "rowdblclick" : "function (_self, el, rowIndex, e)\n{\n    var s = _this.table.store.getAt(rowIndex);\n    \n    if(!s || s.data.id * 1 < 1){\n        return;\n    }\n    \n    Pman.Dialog.BAdminCompany.show({\n        id : s.data.id\n    }, function() {\n        if (_this.table) {\n            _this.table.footer.onClick('refresh');\n        }\n    });\n}",
135           "render" : "function (_self)\n{\n    _this.table = this;\n}",
136           "rowclick" : "function (_self, el, rowIndex, e)\n{\n    (function(){\n        \n        _this.edit_btn.hide();\n        _this.delete_btn.hide();\n        \n        var s = _this.table.getSelectionModel().getSelected();\n        \n        if (!s || s.data.id * 1 < 1)  {\n            return;\n        }\n        \n        _this.edit_btn.show();\n        _this.delete_btn.show();\n        \n    }).defer(100);\n    \n}"
137          },
138          "String cls" : "table-fixed",
139          "boolean striped" : false,
140          "boolean hover" : true,
141          "xtype" : "Table",
142          "Boolean rowSelection" : true,
143          "$ xns" : "Roo.bootstrap",
144          "Boolean loadMask" : true,
145          "* prop" : "grid",
146          "items" : [
147           {
148            "Boolean singleSelect" : true,
149            "xtype" : "RowSelectionModel",
150            "$ xns" : "Roo.bootstrap.Table",
151            "* prop" : "sm"
152           },
153           {
154            "listeners" : {
155             "beforeload" : "function (_self, options)\n{\n     if (!Pman.buildCompleted) {\n        return false;\n    }\n    \n    options.params = options.params || {};\n}",
156             "load" : "function (_self, records, options)\n{\n    _this.delete_btn.hide();\n    _this.edit_btn.hide();\n}"
157            },
158            "boolean hover" : true,
159            "boolean striped" : true,
160            "xtype" : "Store",
161            "Boolean rowSelection" : true,
162            "$ xns" : "Roo.data",
163            "Boolean loadMask" : true,
164            "* prop" : "store",
165            "items" : [
166             {
167              "xtype" : "JsonReader",
168              "String root" : "data",
169              "$ xns" : "Roo.data",
170              "String id" : "id",
171              "* prop" : "reader",
172              "String totalProperty" : "total"
173             },
174             {
175              "listeners" : {
176               "load" : "function (This, o, arg)\n{\n    _this.table.footer.onClick('first');\n}"
177              },
178              "xtype" : "HttpProxy",
179              "$ xns" : "Roo.data",
180              "String method" : "GET",
181              "* prop" : "proxy",
182              "$ String url" : "baseURL + '/Roo/core_company'"
183             }
184            ]
185           },
186           {
187            "String header" : "Type",
188            "String cursor" : "pointer",
189            "String dataIndex" : "comptype",
190            "Number md" : 1,
191            "xtype" : "ColumnModel",
192            "Number xs" : 1,
193            "$ xns" : "Roo.grid",
194            "$ renderer" : "function (v,x ,r) {\n    //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);\n    return v;\n}",
195            "Boolean sortable" : true,
196            "* prop" : "cm[]",
197            "Number sm" : 1
198           },
199           {
200            "String header" : "Ref#",
201            "String cursor" : "pointer",
202            "String dataIndex" : "code",
203            "xtype" : "ColumnModel",
204            "$ xns" : "Roo.grid",
205            "$ renderer" : "function(v) { return String.format('{0}', v); }",
206            "Boolean sortable" : true,
207            "* prop" : "cm[]",
208            "Boolean hidden" : true
209           },
210           {
211            "String header" : "Name",
212            "String cursor" : "pointer",
213            "String dataIndex" : "name",
214            "Number md" : 2,
215            "xtype" : "ColumnModel",
216            "Number xs" : 2,
217            "$ xns" : "Roo.grid",
218            "$ renderer" : "function(v,x,r) {\n    return String.format(r.data.comptype == 'OWNER' ? '<B>{0}</B>' : '{0}',v);    \n}",
219            "Boolean sortable" : true,
220            "* prop" : "cm[]",
221            "Number sm" : 2
222           },
223           {
224            "String header" : "Tel",
225            "String cursor" : "pointer",
226            "String dataIndex" : "tel",
227            "Number md" : 1,
228            "xtype" : "ColumnModel",
229            "Number xs" : 1,
230            "$ xns" : "Roo.grid",
231            "$ renderer" : "function(v) { return String.format('{0}', v); }",
232            "* prop" : "cm[]",
233            "Number sm" : 1
234           },
235           {
236            "String header" : "Fax",
237            "String cursor" : "pointer",
238            "String dataIndex" : "fax",
239            "Number md" : 1,
240            "xtype" : "ColumnModel",
241            "Number xs" : 1,
242            "$ xns" : "Roo.grid",
243            "$ renderer" : "function(v) { return String.format('{0}', v); }",
244            "* prop" : "cm[]",
245            "Number sm" : 1
246           },
247           {
248            "String header" : "Email",
249            "String cursor" : "pointer",
250            "String dataIndex" : "email",
251            "Number md" : 2,
252            "xtype" : "ColumnModel",
253            "Number xs" : 2,
254            "$ xns" : "Roo.grid",
255            "$ renderer" : "function (v) {\n        return (v.length && v.indexOf('@') > 0 ) ? \n            String.format('<a href=\"mailto:{0}\">{0}</a>',v) : v;\n            \n    }",
256            "Boolean sortable" : true,
257            "* prop" : "cm[]",
258            "Number sm" : 2
259           },
260           {
261            "String header" : "Address",
262            "String cursor" : "pointer",
263            "String dataIndex" : "address",
264            "Number md" : 5,
265            "xtype" : "ColumnModel",
266            "Number xs" : 5,
267            "$ xns" : "Roo.grid",
268            "$ renderer" : "function(v) { return String.format('{0}', v); }",
269            "Boolean sortable" : true,
270            "* prop" : "cm[]",
271            "Number sm" : 5
272           },
273           {
274            "String header" : "Remarks",
275            "String cursor" : "pointer",
276            "String dataIndex" : "remarks",
277            "Number width" : 200,
278            "xtype" : "ColumnModel",
279            "$ xns" : "Roo.grid",
280            "$ renderer" : "function(v) { return String.format('{0}', v); }",
281            "* prop" : "cm[]",
282            "Boolean hidden" : true
283           },
284           {
285            "String header" : "id",
286            "String cursor" : "pointer",
287            "String dataIndex" : "id",
288            "Number width" : 50,
289            "xtype" : "ColumnModel",
290            "$ xns" : "Roo.grid",
291            "$ renderer" : "function(v) { return String.format('{0}', v); }",
292            "Boolean sortable" : true,
293            "* prop" : "cm[]",
294            "Boolean hidden" : true
295           },
296           {
297            "listeners" : {
298             "render" : "function (_self)\n{\n    _this.footer = _self;\n}"
299            },
300            "Number pageSize" : 25,
301            "String displayMsg" : "Displaying Companies{0} - {1} of {2}",
302            "Boolean displayInfo" : false,
303            "xtype" : "PagingToolbar",
304            "String emptyMsg" : "No Companies found",
305            "$ xns" : "Roo.bootstrap",
306            "* prop" : "footer",
307            "string name" : "footer"
308           }
309          ]
310         }
311        ]
312       }
313      ]
314     }
315    ]
316   }
317  ]
318 }