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