sync
[Pman.Admin] / Pman.Dialog.AdminEnumMerge.bjs
1 {
2  "name" : "Pman.Dialog.AdminEnumMerge",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Admin/Pman.Dialog.AdminEnumMerge.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "0b3e4317865feb6f0224397600b7cafc" : "Merge Core Enum",
10   "03e956f1dca2b4d525df03cb1899cb6f" : "Merge with",
11   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
12   "e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
13  },
14  "items" : [
15   {
16    "listeners" : {
17     "show" : "function (_self)\n{\n    _this.merge.focus();\n}"
18    },
19    "modal" : true,
20    "collapsible" : false,
21    "background" : true,
22    "title" : "Merge Core Enum",
23    "xtype" : "LayoutDialog",
24    "width" : 400,
25    "$ xns" : "Roo",
26    "closable" : false,
27    "resizable" : false,
28    "height" : 150,
29    "items" : [
30     {
31      "xtype" : "LayoutRegion",
32      "$ xns" : "Roo",
33      "titlebar" : false,
34      "* prop" : "center"
35     },
36     {
37      "fitToFrame" : true,
38      "background" : true,
39      "region" : "center",
40      "xtype" : "ContentPanel",
41      "$ xns" : "Roo",
42      "items" : [
43       {
44        "listeners" : {
45         "|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",
46         "|rendered" : "function (form)\n{\n   _this.form = form;\n}"
47        },
48        "$ url" : "baseURL + '/Roo/core_enum.php'",
49        "xtype" : "Form",
50        "method" : "POST",
51        "style" : "margin: 5px",
52        "$ xns" : "Roo.form",
53        "items" : [
54         {
55          "listeners" : {
56           "render" : "function (_self)\n{\n    _this.merge = this;\n}"
57          },
58          "alwaysQuery" : true,
59          "Number pageSize" : 50,
60          "Boolean allowBlank" : false,
61          "triggerAction" : "all",
62          "fieldLabel" : "Merge with",
63          "forceSelection" : true,
64          "selectOnFocus" : true,
65          "xtype" : "ComboBox",
66          "minChars" : 2,
67          "hiddenName" : "_merge_id",
68          "displayField" : "display_name",
69          "valueField" : "id",
70          "editable" : true,
71          "Number listWidth" : 250,
72          "width" : 250,
73          "$ xns" : "Roo.form",
74          "name" : "merge_display_name",
75          "queryParam" : "query[search]",
76          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
77          "items" : [
78           {
79            "listeners" : {
80             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    o.params.active = 1;\n    o.params.etype = _this.data.etype;\n    o.params['!id'] = _this.data.id;\n    \n}\n"
81            },
82            "xtype" : "Store",
83            "remoteSort" : true,
84            "$ xns" : "Roo.data",
85            "$ sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
86            "* prop" : "store",
87            "items" : [
88             {
89              "$ url" : "baseURL + '/Roo/Core_enum.php'",
90              "xtype" : "HttpProxy",
91              "method" : "GET",
92              "$ xns" : "Roo.data",
93              "* prop" : "proxy"
94             },
95             {
96              "id" : "id",
97              "root" : "data",
98              "xtype" : "JsonReader",
99              "$ xns" : "Roo.data",
100              "$ fields" : "[\n    {\n        \"name\":\"id\",\n        \"type\":\"int\"\n    },\n    {\n        \"name\":\"display_name\",\n        \"type\":\"string\"\n    }\n]",
101              "* prop" : "reader",
102              "totalProperty" : "total"
103             }
104            ]
105           }
106          ]
107         },
108         {
109          "xtype" : "Hidden",
110          "$ xns" : "Roo.form",
111          "name" : "id"
112         }
113        ]
114       }
115      ]
116     },
117     {
118      "listeners" : {
119       "|click" : "function() {\n    _this.form.reset();\n    _this.dialog.hide();\n}"
120      },
121      "text" : "Cancel",
122      "xtype" : "Button",
123      "$ xns" : "Roo",
124      "* prop" : "buttons[]"
125     },
126     {
127      "listeners" : {
128       "|click" : "function() \n{\n    if(typeof(_this.data._confirm) != 'undefined' && _this.data._confirm * 1 == 1){\n        Roo.MessageBox.confirm(\n            \"Confirm\", \n            \"Are you sure '\" + _this.data.display_name + \"' Merge with '\" + _this.form.findField('_merge_id').getRawValue() + \"'\", \n            function(res) {\n                if(res != 'yes') {\n                    return;\n                }\n                \n                _this.form.doAction('submit');\n                return;\n            }\n        );\n        \n        return;\n    }\n    _this.form.doAction('submit');\n    \n}"
129      },
130      "text" : "OK",
131      "xtype" : "Button",
132      "$ xns" : "Roo",
133      "* prop" : "buttons[]"
134     }
135    ]
136   }
137  ]
138 }