Pman.Tab.BAdminCoreEnum.bjs
[Pman.BAdmin] / Pman.Tab.BAdminCoreEnum.bjs
1 {
2  "name" : "Pman.Tab.BAdminCoreEnum",
3  "parent" : "Pman.Tab.BAdmin",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Tab.BAdminCoreEnum.bjs",
6  "permname" : "",
7  "modOrder" : "005",
8  "strings" : {
9   "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
10   "2df80d5febcde0c10a66818488622b7c" : "Pulldown Options",
11   "aba9f7d7443652e858969bfc280690b1" : "Manage Groups ",
12   "7dce122004969d56ae2e0245cb754d35" : "Edit",
13   "01abfc750a0c942167651c40d088531d" : "#",
14   "dae8ace18bdcbcc6ae5aece263e14fe8" : "Options",
15   "f2d346b1bb7c1c85ab6f7f21e3666b9f" : "Types",
16   "4d1c8263ba1036754f8db14a98f9f006" : "Reload",
17   "49ee3087348e8d44e1feda1917443987" : "Name",
18   "f2a6c498fb90ee345d997f888fce3b18" : "Delete"
19  },
20  "items" : [
21   {
22    "xtype" : "Nest",
23    "$ xns" : "Roo.bootstrap.panel",
24    "String title" : "Pulldown Options",
25    "Boolean background" : true,
26    "items" : [
27     {
28      "xtype" : "Border",
29      "$ xns" : "Roo.bootstrap.layout",
30      "* prop" : "layout",
31      "items" : [
32       {
33        "String tabPosition" : "top",
34        "xtype" : "Region",
35        "Boolean hideTabs" : true,
36        "$ xns" : "Roo.bootstrap.layout",
37        "* prop" : "center"
38       },
39       {
40        "String tabPosition" : "top",
41        "Number width" : 350,
42        "xtype" : "Region",
43        "Boolean hideTabs" : true,
44        "$ xns" : "Roo.bootstrap.layout",
45        "* prop" : "west",
46        "Boolean split" : true
47       },
48       {
49        "listeners" : {
50         "activate" : "function (_self)\n{\n    if(_this.type_grid) {\n        _this.type_grid.footer.onClick('first');\n    }\n}",
51         "render" : "function (_self)\n{\n    _this.type_panel = _self; \n}"
52        },
53        "Boolean fitContainer" : true,
54        "xtype" : "Grid",
55        "Boolean fitToFrame" : true,
56        "String region" : "west",
57        "$ xns" : "Roo.bootstrap.panel",
58        "String title" : "Types",
59        "Boolean background" : false,
60        "Boolean closable" : false,
61        "items" : [
62         {
63          "xtype" : "NavSimplebar",
64          "$ xns" : "Roo.bootstrap",
65          "* prop" : "toolbar",
66          "items" : [
67           {
68            "xtype" : "NavGroup",
69            "$ xns" : "Roo.bootstrap",
70            "items" : [
71             {
72              "xtype" : "NavItem",
73              "$ xns" : "Roo.bootstrap",
74              "items" : [
75               {
76                "listeners" : {
77                 "click" : "function (_self, e)\n{\n    Pman.Dialog.BAdminStaff.show({ \n        id : 0,\n        company_id : Pman.Login.authUser.company_id\n    }, function(res) {\n    \n        if(res.length_oath_key * 1 < 1){\n            _this.member_grid.footer.onClick('first');\n            return;\n        }\n        \n        Pman.Dialog.BAdminStaffTwoFactorQRCode.show({\n            id : res.id\n        }, function(res){\n            _this.member_grid.footer.onClick('first');\n        });\n    }); \n\n}"
78                },
79                "String weight" : "primary",
80                "xtype" : "Button",
81                "$ xns" : "Roo.bootstrap",
82                "String html" : "Add",
83                "String style" : "margin: 10px;",
84                "String glyphicon" : "plus"
85               }
86              ]
87             }
88            ]
89           }
90          ]
91         },
92         {
93          "listeners" : {
94           "render" : "function (_self)\n{\n    _this.type_grid = _self; \n   \n}"
95          },
96          "String cls" : "table-fixed",
97          "Boolean cellSelection" : true,
98          "boolean hover" : true,
99          "boolean striped" : false,
100          "xtype" : "Table",
101          "boolean responsive" : true,
102          "Boolean rowSelection" : true,
103          "$ xns" : "Roo.bootstrap",
104          "Boolean loadMask" : true,
105          "* prop" : "grid",
106          "items" : [
107           {
108            "listeners" : {
109             "selectionchange" : "function (_self)\n{\n    _this.option_grid.store.load({});\n}"
110            },
111            "Boolean singleSelect" : true,
112            "xtype" : "RowSelectionModel",
113            "$ xns" : "Roo.bootstrap.Table",
114            "* prop" : "sm"
115           },
116           {
117            "listeners" : {
118             "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    \n    o.params['query[empty_etype]'] = 1;\n    \n}"
119            },
120            "$ Object sortInfo" : "{ field : 'display_name', direction: 'ASC' }",
121            "xtype" : "Store",
122            "boolean remoteSort" : true,
123            "$ xns" : "Roo.data",
124            "* prop" : "store",
125            "items" : [
126             {
127              "$ Array fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'etype',\n        'type': 'string'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'display_name',\n        'type': 'string'\n    },\n    {\n        'name': 'active',\n        'type': 'int'\n    },\n    {\n        'name': 'seqid',\n        'type': 'int'\n    }\n]",
128              "xtype" : "JsonReader",
129              "String root" : "data",
130              "$ xns" : "Roo.data",
131              "String id" : "id",
132              "* prop" : "reader",
133              "String totalProperty" : "total"
134             },
135             {
136              "$ url" : "baseURL + '/Roo/core_enum.php'",
137              "xtype" : "HttpProxy",
138              "$ xns" : "Roo.data",
139              "String method" : "GET",
140              "* prop" : "proxy"
141             }
142            ]
143           },
144           {
145            "String header" : "Name",
146            "String dataIndex" : "display_name",
147            "xtype" : "ColumnModel",
148            "Number xs" : 12,
149            "$ xns" : "Roo.grid",
150            "$ renderer" : "function(v,x,r) { \n    return String.format('<span tooltip=\"{1}\">{0}</span>', v, r.data.name); \n}",
151            "Boolean sortable" : true,
152            "* prop" : "cm[]"
153           },
154           {
155            "Number pageSize" : 25,
156            "Boolean displayInfo" : false,
157            "xtype" : "PagingToolbar",
158            "$ xns" : "Roo.bootstrap",
159            "* prop" : "footer",
160            "string name" : "footer"
161           }
162          ]
163         }
164        ]
165       },
166       {
167        "listeners" : {
168         "activate" : "function (_self)\n{\n    if (_this.option_grid) {\n        _this.option_grid.store.load({});\n//        _this.option_grid.footer.onClick('first');\n    }\n}",
169         "render" : "function (_self)\n{\n    _this.option_panel = _self;\n}"
170        },
171        "Boolean fitContainer" : true,
172        "xtype" : "Grid",
173        "Boolean fitToFrame" : true,
174        "String region" : "center",
175        "$ xns" : "Roo.bootstrap.panel",
176        "String title" : "Options",
177        "Boolean background" : false,
178        "items" : [
179         {
180          "xtype" : "NavSimplebar",
181          "$ xns" : "Roo.bootstrap",
182          "* prop" : "toolbar",
183          "items" : [
184           {
185            "xtype" : "NavGroup",
186            "$ xns" : "Roo.bootstrap",
187            "items" : [
188             {
189              "Boolean preventDefault" : true,
190              "xtype" : "NavSidebarItem",
191              "$ xns" : "Roo.bootstrap",
192              "String html" : "Manage Groups ",
193              "String glyphicon" : "menu-hamburger",
194              "items" : [
195               {
196                "xtype" : "Menu",
197                "$ xns" : "Roo.bootstrap",
198                "* prop" : "menu",
199                "items" : [
200                 {
201                  "listeners" : {
202                   "click" : "function (_self, e)\n{\n    Pman.Dialog.BAdminGroups.show({ id : 0 }, function(res){\n        _this.group_grid.store.load({});\n    });\n}"
203                  },
204                  "Boolean preventDefault" : true,
205                  "xtype" : "MenuItem",
206                  "String fa" : "fa fa-plus",
207                  "$ xns" : "Roo.bootstrap",
208                  "Boolean isContainer" : false,
209                  "String html" : "Add"
210                 },
211                 {
212                  "listeners" : {
213                   "click" : "function (_self, e)\n{\n    var sel = _this.group_grid.getSelectionModel().getSelected();\n    \n    if(!sel){\n        Roo.bootstrap.MessageBox.alert('Error', 'Please select a group');\n        return;\n    }\n    \n    if(sel.data.id * 1 < 1){\n        Roo.bootstrap.MessageBox.alert('Error', 'The selected group is not editable');\n        return;\n    }\n    \n    Pman.Dialog.BAdminGroups.show({ id : sel.data.id }, function(res){\n        _this.group_grid.store.load({});\n    });\n}"
214                  },
215                  "Boolean preventDefault" : true,
216                  "xtype" : "MenuItem",
217                  "String fa" : "fa fa-pencil",
218                  "$ xns" : "Roo.bootstrap",
219                  "Boolean isContainer" : false,
220                  "String html" : "Edit"
221                 },
222                 {
223                  "listeners" : {
224                   "click" : "function (_self, e)\n{\n    var sel = _this.group_grid.getSelectionModel().getSelected();\n    \n    if(!sel){\n        Roo.bootstrap.MessageBox.alert('Error', 'Please select a group');\n        return;\n    }\n    \n    if(sel.data.id * 1 < 1){\n        Roo.bootstrap.MessageBox.alert('Error', 'The selected group is not editable');\n        return;\n    }\n    \n    var deleteIt = function()\n    {\n        new Pman.Request({\n            url: baseURL + '/Roo/Core_group',\n            method: 'POST',\n            params: {\n                _delete : sel.data.id\n            },\n            success: function(res){\n                _this.group_grid.store.load({});\n                return;\n            }\n        });\n    }\n    \n    Roo.bootstrap.MessageBox.confirm('Confirm', 'Are you sure to delete the group?',function(ret) {\n        \n        if(ret == 'no'){\n            return;\n        }\n        \n        deleteIt();\n        \n     }, this);\n    \n    \n}"
225                  },
226                  "Boolean preventDefault" : true,
227                  "xtype" : "MenuItem",
228                  "String fa" : "fa fa-trash",
229                  "$ xns" : "Roo.bootstrap",
230                  "Boolean isContainer" : false,
231                  "String html" : "Delete"
232                 },
233                 {
234                  "listeners" : {
235                   "click" : "function (_self, e)\n{\n    _this.group_grid.store.load({});\n}"
236                  },
237                  "Boolean preventDefault" : true,
238                  "xtype" : "MenuItem",
239                  "String fa" : "fa fa-refresh",
240                  "$ xns" : "Roo.bootstrap",
241                  "Boolean isContainer" : false,
242                  "String html" : "Reload"
243                 }
244                ]
245               }
246              ]
247             }
248            ]
249           }
250          ]
251         },
252         {
253          "listeners" : {
254           "render" : "function (_self)\n{\n    _this.option_grid = _self; \n\n}"
255          },
256          "String cls" : "table-fixed",
257          "Boolean footerShow" : false,
258          "boolean hover" : true,
259          "boolean striped" : true,
260          "xtype" : "Table",
261          "boolean responsive" : true,
262          "Boolean rowSelection" : true,
263          "$ xns" : "Roo.bootstrap",
264          "Boolean loadMask" : true,
265          "* prop" : "grid",
266          "items" : [
267           {
268            "Boolean singleSelect" : true,
269            "xtype" : "RowSelectionModel",
270            "$ xns" : "Roo.bootstrap.Table",
271            "* prop" : "sm"
272           },
273           {
274            "listeners" : {
275             "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    \n    var sel = _this.type_grid.getSelectionModel().getSelected();\n    \n    if(!sel || sel.data.id * 1 < 1 || !sel.data.name.length){\n        this.removeAll();\n        return false;\n    }\n    \n    o.params.etype = sel.data.name;\n    \n}"
276            },
277            "xtype" : "Store",
278            "boolean remoteSort" : true,
279            "$ xns" : "Roo.data",
280            "$ sortinfo" : "{ field : 'display_name', direction: 'ASC' }",
281            "* prop" : "store",
282            "items" : [
283             {
284              "$ Array fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'etype',\n        'type': 'string'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'display_name',\n        'type': 'string'\n    },\n    {\n        'name': 'active',\n        'type': 'int'\n    },\n    {\n        'name': 'seqid',\n        'type': 'int'\n    }\n]",
285              "xtype" : "JsonReader",
286              "String root" : "data",
287              "$ xns" : "Roo.data",
288              "String id" : "id",
289              "* prop" : "reader",
290              "String totalProperty" : "total"
291             },
292             {
293              "$ url" : "baseURL + '/Roo/core_enum.php'",
294              "xtype" : "HttpProxy",
295              "$ xns" : "Roo.data",
296              "String method" : "GET",
297              "* prop" : "proxy"
298             }
299            ]
300           },
301           {
302            "String header" : "#",
303            "Number md" : 12,
304            "String dataIndex" : "id",
305            "xtype" : "ColumnModel",
306            "Number xs" : 12,
307            "$ xns" : "Roo.grid",
308            "$ renderer" : "function(v,x,r) { \n    return String.format('{0}', v ? v : '');\n}",
309            "Boolean sortable" : false,
310            "* prop" : "cm[]",
311            "Number sm" : 12
312           },
313           {
314            "String header" : "Name",
315            "String dataIndex" : "name",
316            "Number md" : 12,
317            "xtype" : "ColumnModel",
318            "Number xs" : 12,
319            "$ xns" : "Roo.grid",
320            "$ renderer" : "function(v,x,r) { \n    return String.format('{0}', v ? v : '');\n}",
321            "Boolean sortable" : false,
322            "* prop" : "cm[]",
323            "Number sm" : 12
324           }
325          ]
326         }
327        ]
328       }
329      ]
330     }
331    ]
332   }
333  ]
334 }