Pman.Dialog.CmsLanguagePick.bjs
[Pman.Cms] / Pman.Dialog.CmsLanguagePick.bjs
1 {
2     "id": "roo-file-290",
3     "name": "Pman.Dialog.CmsLanguagePick",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsLanguagePick.bjs",
7     "items": [
8         {
9             "closable": false,
10             "collapsible": false,
11             "height": 120,
12             "modal": true,
13             "resizable": false,
14             "title": "Select a Language",
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.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",
32                                 "|rendered": "function (form)\n{\n    _this.form= form;\n}\n"
33                             },
34                             "method": "GET",
35                             "style": "margin:10px;",
36                             "xtype": "Form",
37                             "|url": "baseURL + '/Roo/INGORE.php'",
38                             "|xns": "Roo.form",
39                             "items": [
40                                 {
41                                     "allowBlank": false,
42                                     "alwaysQuery": true,
43                                     "displayField": "title",
44                                     "editable": false,
45                                     "fieldLabel": "Language",
46                                     "hiddenName": "lang",
47                                     "listWidth": 200,
48                                     "name": "language_name",
49                                     "triggerAction": "all",
50                                     "valueField": "code",
51                                     "width": 200,
52                                     "xtype": "ComboBox",
53                                     "|xns": "Roo.form",
54                                     "items": [
55                                         {
56                                             "|xns": "Roo.data",
57                                             "xtype": "Store",
58                                             "*prop": "store",
59                                             "items": [
60                                                 {
61                                                     "*prop": "proxy",
62                                                     "method": "GET",
63                                                     "xtype": "HttpProxy",
64                                                     "|url": "baseURL + '/I18N/Language.php'",
65                                                     "|xns": "Roo.data"
66                                                 },
67                                                 {
68                                                     "*prop": "reader",
69                                                     "id": "code",
70                                                     "root": "data",
71                                                     "totalProperty": "total",
72                                                     "xtype": "JsonReader",
73                                                     "|fields": "[\n    {\n        'name': 'code',\n        'type': 'string'\n    },\n    {\n        'name': 'title',\n        'type': 'string'\n    }\n]",
74                                                     "|xns": "Roo.data"
75                                                 }
76                                             ]
77                                         }
78                                     ]
79                                 }
80                             ]
81                         }
82                     ]
83                 },
84                 {
85                     "listeners": {
86                         "click": "function (_self, e)\n{\n    _this.dialog.hide();\n}"
87                     },
88                     "*prop": "buttons[]",
89                     "text": "Cancel",
90                     "xtype": "Button",
91                     "|xns": "Roo"
92                 },
93                 {
94                     "listeners": {
95                         "click": "function (_self, e)\n{\n    // do some checks?\n     \n    var lang=  this.form.findField('language').getValue();\n    if (!lang.length) {\n    \n        Roo.MessageBox.alert(\"Error\", \"Select language\");\n        return;\n    \n    }\n    _this.dialog.hide();\n    _this.callback(lang);\n    \n\n}"
96                     },
97                     "*prop": "buttons[]",
98                     "text": "OK",
99                     "xtype": "Button",
100                     "|xns": "Roo"
101                 }
102             ]
103         }
104     ],
105     "permname": "",
106     "modOrder": "001"
107 }