Pman.Dialog.AdminEnumMerge.bjs
[Pman.Admin] / Pman.Dialog.AdminEnumMerge.bjs
1 {
2  "name" : "Pman.Dialog.AdminEnumMerge",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/edward/gitlive/Pman.Admin/Pman.Dialog.AdminEnumMerge.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "0b3e4317865feb6f0224397600b7cafc" : "Merge Core Enum",
10   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
11   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
12  },
13  "items" : [
14   {
15    "modal" : true,
16    "collapsible" : false,
17    "background" : true,
18    "title" : "Merge Core Enum",
19    "xtype" : "LayoutDialog",
20    "width" : 400,
21    "$ xns" : "Roo",
22    "closable" : false,
23    "resizable" : false,
24    "height" : 150,
25    "items" : [
26     {
27      "xtype" : "LayoutRegion",
28      "$ xns" : "Roo",
29      "titlebar" : false,
30      "* prop" : "center"
31     },
32     {
33      "fitToFrame" : true,
34      "background" : true,
35      "region" : "center",
36      "xtype" : "ContentPanel",
37      "$ xns" : "Roo",
38      "items" : [
39       {
40        "listeners" : {
41         "|actioncomplete" : "function (_self, action)\n{\n  if (action.type == 'setdata') {\n\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type == 'submit' ) {\n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n\n        if (_this.callback) {\n           _this.callback.call(_this, action.result.data);\n        }\n        _this.form.reset();\n    }\n}\n",
42         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
43        },
44        "$ url" : "baseURL + '/Roo/core_enum.php'",
45        "xtype" : "Form",
46        "method" : "POST",
47        "style" : "margin: 5px",
48        "$ xns" : "Roo.form",
49        "items" : [
50         {
51          "alwaysQuery" : true,
52          "Number pageSize" : 50,
53          "triggerAction" : "all",
54          "fieldLabel" : "Merge with",
55          "forceSelection" : true,
56          "selectOnFocus" : true,
57          "xtype" : "ComboBox",
58          "minChars" : 2,
59          "hiddenName" : "industry_id",
60          "displayField" : "display_name",
61          "valueField" : "id",
62          "editable" : true,
63          "Number listWidth" : 400,
64          "width" : 300,
65          "$ xns" : "Roo.form",
66          "name" : "industry_id_display_name",
67          "queryParam" : "query[search]",
68          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
69          "items" : [
70           {
71            "listeners" : {
72             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    o.params.active = 1;\n    o.params.etype = 'EuroCham.Industry';\n}\n"
73            },
74            "xtype" : "Store",
75            "remoteSort" : true,
76            "$ xns" : "Roo.data",
77            "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
78            "* prop" : "store",
79            "items" : [
80             {
81              "$ url" : "baseURL + '/Roo/Core_enum.php'",
82              "xtype" : "HttpProxy",
83              "method" : "GET",
84              "$ xns" : "Roo.data",
85              "* prop" : "proxy"
86             },
87             {
88              "id" : "id",
89              "root" : "data",
90              "xtype" : "JsonReader",
91              "$ xns" : "Roo.data",
92              "$ fields" : "[\n    {\n        \"name\":\"name\",\n        \"type\":\"string\"\n    },\n    {\n        \"name\":\"display_name\",\n        \"type\":\"string\"\n    }\n]",
93              "* prop" : "reader",
94              "totalProperty" : "total"
95             }
96            ]
97           }
98          ]
99         },
100         {
101          "xtype" : "Hidden",
102          "$ xns" : "Roo.form",
103          "name" : "id"
104         }
105        ]
106       }
107      ]
108     },
109     {
110      "listeners" : {
111       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
112      },
113      "text" : "Cancel",
114      "xtype" : "Button",
115      "$ xns" : "Roo",
116      "* prop" : "buttons[]"
117     },
118     {
119      "listeners" : {
120       "|click" : "function() {\n\n    var name =     _this.form.findField('name').getValue();\n    name = name.toUpperCase().replace(/[^A-Z]+/g, '');\n    if (!name.length) {\n        Roo.MessageBox.alert(\"Error\",\"Please fill in a valid name\");\n        return;\n    }\n    _this.form.findField('name').setValue(name);\n \n    _this.form.doAction('submit');\n    \n}"
121      },
122      "text" : "OK",
123      "xtype" : "Button",
124      "$ xns" : "Roo",
125      "* prop" : "buttons[]"
126     }
127    ]
128   }
129  ]
130 }