"name" : "Pman.Dialog.AdminEnumMerge",
"parent" : "",
"title" : "",
- "path" : "/home/edward/gitlive/Pman.Admin/Pman.Dialog.AdminEnumMerge.bjs",
+ "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Admin/Pman.Dialog.AdminEnumMerge.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
"0b3e4317865feb6f0224397600b7cafc" : "Merge Core Enum",
- "cfcd208495d565ef66e7dff9f98764da" : "0",
- "c4ca4238a0b923820dcc509a6f75849b" : "1",
+ "03e956f1dca2b4d525df03cb1899cb6f" : "Merge with",
"ea4788705e6873b424c65e91c2846b19" : "Cancel",
"e0aa021e21dddbd6d8cecec71e9cf564" : "OK"
},
"items" : [
{
"listeners" : {
- "show" : "function (_self)\n{\n \n}"
+ "show" : "function (_self)\n{\n _this.merge.focus();\n}"
},
"modal" : true,
"collapsible" : false,
"items" : [
{
"listeners" : {
- "|actioncomplete" : "function (_self, action)\n{\n if (action.type == 'setdata') {\n\n if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){\n Roo.MessageBox.alert('Error', 'Missing etype');\n _this.dialog.hide();\n return;\n }\n \n if(typeof(_this.data.title) != 'undefined' && _this.data.title.length){\n _this.dialog.setTitle(_this.data.title);\n }\n \n if(_this.data.id){\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }}); \n }\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",
+ "|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",
"|rendered" : "function (form)\n{\n _this.form = form;\n}"
},
"$ url" : "baseURL + '/Roo/core_enum.php'",
"style" : "margin: 5px",
"$ xns" : "Roo.form",
"items" : [
- {
- "fieldLabel" : "Name",
- "hidden" : true,
- "xtype" : "TextField",
- "allowBlank" : false,
- "actionMode" : "fieldEl",
- "width" : 200,
- "$ xns" : "Roo.form",
- "name" : "name"
- },
{
"listeners" : {
- "keyup" : "function (_self, e)\n{\n _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n \n}"
+ "render" : "function (_self)\n{\n _this.merge = this;\n}"
},
- "fieldLabel" : "Display Name",
- "xtype" : "TextField",
- "allowBlank" : false,
- "width" : 200,
- "$ xns" : "Roo.form",
- "name" : "display_name"
- },
- {
- "String actionMode" : "fieldEl",
- "Boolean checked" : true,
- "fieldLabel" : "Active",
- "inputValue" : 1,
- "hidden" : true,
- "value" : 1,
- "xtype" : "Checkbox",
- "valueOff" : 0,
- "$ xns" : "Roo.form",
- "name" : "active"
- },
- {
- "xtype" : "Hidden",
- "$ xns" : "Roo.form",
- "name" : "etype"
- },
- {
- "xtype" : "Hidden",
- "value" : 0,
+ "alwaysQuery" : true,
+ "Number pageSize" : 50,
+ "Boolean allowBlank" : false,
+ "triggerAction" : "all",
+ "fieldLabel" : "Merge with",
+ "forceSelection" : true,
+ "selectOnFocus" : true,
+ "xtype" : "ComboBox",
+ "minChars" : 2,
+ "hiddenName" : "_merge_id",
+ "displayField" : "display_name",
+ "valueField" : "id",
+ "editable" : true,
+ "Number listWidth" : 250,
+ "width" : 250,
"$ xns" : "Roo.form",
- "name" : "seqid"
+ "name" : "merge_display_name",
+ "queryParam" : "query[search]",
+ "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
+ "items" : [
+ {
+ "listeners" : {
+ "|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"
+ },
+ "xtype" : "Store",
+ "remoteSort" : true,
+ "$ xns" : "Roo.data",
+ "$ sortInfo" : "{ direction : 'ASC', field: 'display_name' }",
+ "* prop" : "store",
+ "items" : [
+ {
+ "$ url" : "baseURL + '/Roo/Core_enum.php'",
+ "xtype" : "HttpProxy",
+ "method" : "GET",
+ "$ xns" : "Roo.data",
+ "* prop" : "proxy"
+ },
+ {
+ "id" : "id",
+ "root" : "data",
+ "xtype" : "JsonReader",
+ "$ xns" : "Roo.data",
+ "$ fields" : "[\n {\n \"name\":\"id\",\n \"type\":\"int\"\n },\n {\n \"name\":\"display_name\",\n \"type\":\"string\"\n }\n]",
+ "* prop" : "reader",
+ "totalProperty" : "total"
+ }
+ ]
+ }
+ ]
},
{
"xtype" : "Hidden",
},
{
"listeners" : {
- "|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}"
+ "|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}"
},
"text" : "OK",
"xtype" : "Button",