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