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