Pman.Dialog.AdminGenericName.bjs
[Pman.Admin] / Pman.Dialog.AdminGenericName.bjs
1 {
2     "id": "roo-file-151",
3     "name": "Pman.Dialog.AdminGenericName",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminGenericName.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 120,
12             "resizable": false,
13             "title": "Edit",
14             "width": 400,
15             "xtype": "LayoutDialog",
16             "|xns": "Roo",
17             "items": [
18                 {
19                     "|xns": "Roo",
20                     "xtype": "LayoutRegion",
21                     "*prop": "center"
22                 },
23                 {
24                     "region": "center",
25                     "xtype": "ContentPanel",
26                     "|xns": "Roo",
27                     "items": [
28                         {
29                             "listeners": {
30                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       this.url = baseURL + '/Roo/' + _this.data._table;\n       _this.dialog.setTitle(_this.data._title);\n       this.load({ \n            method: 'GET', \n            params: { '_id' : _this.data.id },\n            url : this.url\n        });\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
31                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
32                             },
33                             "method": "POST",
34                             "style": "margin:10px;",
35                             "xtype": "Form",
36                             "|url": "baseURL + '/Roo/core_company_type.php'",
37                             "|xns": "Roo.form",
38                             "items": [
39                                 {
40                                     "fieldLabel": "Name",
41                                     "name": "name",
42                                     "width": 200,
43                                     "|xns": "Roo.form",
44                                     "xtype": "TextField"
45                                 },
46                                 {
47                                     "name": "id",
48                                     "|xns": "Roo.form",
49                                     "xtype": "Hidden"
50                                 }
51                             ]
52                         }
53                     ]
54                 },
55                 {
56                     "listeners": {
57                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
58                     },
59                     "*prop": "buttons[]",
60                     "text": "Cancel",
61                     "xtype": "Button",
62                     "|xns": "Roo"
63                 },
64                 {
65                     "listeners": {
66                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n     this.url = baseURL + '/Roo/' + _this.data._table;\n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
67                     },
68                     "*prop": "buttons[]",
69                     "text": "Save",
70                     "xtype": "Button",
71                     "|xns": "Roo"
72                 }
73             ]
74         }
75     ],
76     "permname": "",
77     "modOrder": "001"
78 }