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             "modal": true,
13             "resizable": false,
14             "title": "Edit",
15             "width": 400,
16             "xtype": "LayoutDialog",
17             "|xns": "Roo",
18             "items": [
19                 {
20                     "|xns": "Roo",
21                     "xtype": "LayoutRegion",
22                     "*prop": "center"
23                 },
24                 {
25                     "region": "center",
26                     "xtype": "ContentPanel",
27                     "|xns": "Roo",
28                     "items": [
29                         {
30                             "listeners": {
31                                 "|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        _this.form.findField('name').focus();\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",
32                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
33                             },
34                             "labelWidth": 50,
35                             "method": "POST",
36                             "style": "margin:10px;",
37                             "xtype": "Form",
38                             "|url": "baseURL + '/Roo/core_company_type.php'",
39                             "|xns": "Roo.form",
40                             "items": [
41                                 {
42                                     "listeners": {
43                                         "specialkey": "function (_self, e)\n{\n    if (e.getKey() == 13) {\n        \n    }\n}"
44                                     },
45                                     "fieldLabel": "Name",
46                                     "name": "name",
47                                     "width": 270,
48                                     "xtype": "TextField",
49                                     "|xns": "Roo.form"
50                                 },
51                                 {
52                                     "name": "id",
53                                     "|xns": "Roo.form",
54                                     "xtype": "Hidden"
55                                 }
56                             ]
57                         }
58                     ]
59                 },
60                 {
61                     "listeners": {
62                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
63                     },
64                     "*prop": "buttons[]",
65                     "text": "Cancel",
66                     "xtype": "Button",
67                     "|xns": "Roo"
68                 },
69                 {
70                     "listeners": {
71                         "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}"
72                     },
73                     "*prop": "buttons[]",
74                     "text": "Save",
75                     "xtype": "Button",
76                     "|xns": "Roo"
77                 }
78             ]
79         }
80     ],
81     "permname": "",
82     "modOrder": "001"
83 }