Pman.Dialog.AdminWatch.bjs
[Pman.Admin] / Pman.Dialog.AdminWatch.bjs
1 {
2     "id": "roo-file-170",
3     "name": "Pman.Dialog.AdminWatch",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminWatch.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 230,
12             "resizable": false,
13             "title": "Edit / Create core_watch",
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                             "|xns": "Roo.form",
30                             "xtype": "Form",
31                             "listeners": {
32                                 "|actioncomplete": "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\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",
33                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
34                             },
35                             "method": "POST",
36                             "style": "margin:10px;",
37                             "|url": "baseURL + '/Roo/core_watch.php'",
38                             "items": [
39                                 {
40                                     "fieldLabel": "Ontable",
41                                     "name": "ontable",
42                                     "width": 200,
43                                     "|xns": "Roo.form",
44                                     "xtype": "TextField"
45                                 },
46                                 {
47                                     "fieldLabel": "Onid",
48                                     "name": "onid",
49                                     "width": 75,
50                                     "|xns": "Roo.form",
51                                     "xtype": "TextField"
52                                 },
53                                 {
54                                     "|xns": "Roo.form",
55                                     "xtype": "ComboBox",
56                                     "allowBlank": "false",
57                                     "editable": "false",
58                                     "emptyText": "Select Person",
59                                     "forceSelection": true,
60                                     "listWidth": 400,
61                                     "loadingText": "Searching...",
62                                     "minChars": 2,
63                                     "pageSize": 20,
64                                     "qtip": "Select Person",
65                                     "selectOnFocus": true,
66                                     "triggerAction": "all",
67                                     "typeAhead": true,
68                                     "width": 300,
69                                     "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
70                                     "queryParam": "query[name]",
71                                     "fieldLabel": "Person",
72                                     "valueField": "id",
73                                     "displayField": "name",
74                                     "hiddenName": "person_id",
75                                     "name": "person_id_name",
76                                     "items": [
77                                         {
78                                             "*prop": "store",
79                                             "xtype": "Store",
80                                             "|xns": "Roo.data",
81                                             "remoteSort": true,
82                                             "|sortInfo": "{ direction : 'ASC', field: 'id' }",
83                                             "listeners": {
84                                                 "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
85                                             },
86                                             "items": [
87                                                 {
88                                                     "*prop": "proxy",
89                                                     "xtype": "HttpProxy",
90                                                     "method": "GET",
91                                                     "|xns": "Roo.data",
92                                                     "|url": "baseURL + '/Roo/Person.php'"
93                                                 },
94                                                 {
95                                                     "*prop": "reader",
96                                                     "xtype": "JsonReader",
97                                                     "|xns": "Roo.data",
98                                                     "id": "id",
99                                                     "root": "data",
100                                                     "totalProperty": "total",
101                                                     "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
102                                                 }
103                                             ]
104                                         }
105                                     ]
106                                 },
107                                 {
108                                     "fieldLabel": "Event",
109                                     "name": "event",
110                                     "width": 200,
111                                     "|xns": "Roo.form",
112                                     "xtype": "TextField"
113                                 },
114                                 {
115                                     "fieldLabel": "Medium",
116                                     "name": "medium",
117                                     "width": 200,
118                                     "|xns": "Roo.form",
119                                     "xtype": "TextField"
120                                 },
121                                 {
122                                     "fieldLabel": "Active",
123                                     "name": "active",
124                                     "width": 75,
125                                     "|xns": "Roo.form",
126                                     "xtype": "TextField"
127                                 },
128                                 {
129                                     "name": "id",
130                                     "|xns": "Roo.form",
131                                     "xtype": "Hidden"
132                                 }
133                             ]
134                         }
135                     ]
136                 },
137                 {
138                     "listeners": {
139                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
140                     },
141                     "*prop": "buttons[]",
142                     "text": "Cancel",
143                     "xtype": "Button",
144                     "|xns": "Roo"
145                 },
146                 {
147                     "listeners": {
148                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    \n    _this.dialog.el.mask(\"Saving\");\n    _this.form.doAction(\"submit\");\n\n}"
149                     },
150                     "*prop": "buttons[]",
151                     "text": "Save",
152                     "xtype": "Button",
153                     "|xns": "Roo"
154                 }
155             ]
156         }
157     ],
158     "permname": "",
159     "modOrder": "001"
160 }