looking for wrong seperator
[Pman.Core] / Pman.Dialog.CoreEnumMerge.bjs
1 {
2  "name" : "Pman.Dialog.CoreEnumMerge",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/benny/gitlive/web.hhyc_membership_system/Pman.Core/Pman.Dialog.CoreEnumMerge.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "8324cdec05065c4bd7d8c5effdf43edf" : "Delete this",
10   "298a183cfe4fddedd4bd17abe8aeb685" : "Merge Pulldown Option",
11   "bf8691517ce00a09186a05cd65863091" : "Select Item to Merge With",
12   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
13   "68be4837f6c739877233e527a996dd00" : "Merge",
14   "266459bee8ed1ca2e0464899e1ef0994" : "And replace with",
15   "ea4788705e6873b424c65e91c2846b19" : "Cancel"
16  },
17  "items" : [
18   {
19    "listeners" : {
20     "show" : "function (_self)\n{\n    if (_this.isBuilder) {\n        _this.data = { id : 2, comptype : 'SUPPLIER' }\n    }\n}"
21    },
22    "modal" : true,
23    "collapsible" : false,
24    "title" : "Merge Pulldown Option",
25    "xtype" : "LayoutDialog",
26    "width" : 450,
27    "$ xns" : "Roo",
28    "closable" : false,
29    "resizable" : false,
30    "height" : 160,
31    "items" : [
32     {
33      "xtype" : "LayoutRegion",
34      "$ xns" : "Roo",
35      "* prop" : "center"
36     },
37     {
38      "region" : "center",
39      "xtype" : "ContentPanel",
40      "$ xns" : "Roo",
41      "items" : [
42       {
43        "listeners" : {
44         "actionfailed" : "function (_self, action)\n{\n \n    Pman.standardActionFailed(_self, action);\n}\n",
45         "actioncomplete" : "function (_self, action)\n{\n\n   if (action.type =='submit') {\n       \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    if (action.type == 'setdata') {\n        \n         var title = _this.data.title  || _this.data.etype;\n        _this.dialog.setTitle(\"Delete selected \" + title + \" and merge data with\");\n        \n\n        if(typeof(_this.data._ids) == \"undefined\"){\n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});  \n            return;\n        }\n        _this.form.findField('_names').setValue(_this.data._names);\n        _this.form.findField('_ids').setValue(_this.data._ids);\n        return;\n    }\n    \n}\n",
46         "rendered" : "function (form)\n{\n   _this.form = form;\n}"
47        },
48        "$ url" : "baseURL + '/Roo/Core_enum.php'",
49        "method" : "POST",
50        "xtype" : "Form",
51        "style" : "margin: 10px;",
52        "$ xns" : "Roo.form",
53        "Number labelWidth" : 120,
54        "items" : [
55         {
56          "String name" : "_names",
57          "Number width" : 250,
58          "Boolean readOnly" : true,
59          "xtype" : "TextField",
60          "String fieldLabel" : "Delete this",
61          "$ xns" : "Roo.form"
62         },
63         {
64          "alwaysQuery" : true,
65          "listWidth" : 400,
66          "triggerAction" : "all",
67          "fieldLabel" : "And replace with",
68          "forceSelection" : true,
69          "selectOnFocus" : true,
70          "pageSize" : 20,
71          "displayField" : "name",
72          "emptyText" : "Select Item to Merge With",
73          "hiddenName" : "_merge_id",
74          "minChars" : 2,
75          "valueField" : "id",
76          "xtype" : "ComboBox",
77          "allowBlank" : false,
78          "typeAhead" : true,
79          "width" : 250,
80          "$ xns" : "Roo.form",
81          "name" : "_merge_id_name",
82          "qtip" : "Select Item to Merge With",
83          "queryParam" : "query[search_begins]",
84          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> {name}</div>",
85          "loadingText" : "Searching...",
86          "items" : [
87           {
88            "listeners" : {
89             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    \n    o.params['etype'] = _this.data.etype;\n    \n    o.params['!id'] = _this.form.findField('id').getValue();\n    // set more here\n}\n"
90            },
91            "xtype" : "Store",
92            "remoteSort" : true,
93            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
94            "$ xns" : "Roo.data",
95            "* prop" : "store",
96            "items" : [
97             {
98              "$ url" : "baseURL + '/Roo/Core_enum'",
99              "xtype" : "HttpProxy",
100              "method" : "GET",
101              "$ xns" : "Roo.data",
102              "* prop" : "proxy"
103             },
104             {
105              "id" : "id",
106              "root" : "data",
107              "xtype" : "JsonReader",
108              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
109              "$ xns" : "Roo.data",
110              "* prop" : "reader",
111              "totalProperty" : "total"
112             }
113            ]
114           }
115          ]
116         },
117         {
118          "xtype" : "Hidden",
119          "$ xns" : "Roo.form",
120          "name" : "etype"
121         },
122         {
123          "xtype" : "Hidden",
124          "$ xns" : "Roo.form",
125          "name" : "_ids"
126         },
127         {
128          "xtype" : "Hidden",
129          "$ xns" : "Roo.form",
130          "name" : "id"
131         }
132        ]
133       }
134      ]
135     },
136     {
137      "listeners" : {
138       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
139      },
140      "text" : "Cancel",
141      "xtype" : "Button",
142      "$ xns" : "Roo",
143      "* prop" : "buttons[]"
144     },
145     {
146      "listeners" : {
147       "click" : "function (_self, e)\n{\n     \n    _this.form.doAction(\"submit\");\n\n}"
148      },
149      "text" : "Merge",
150      "xtype" : "Button",
151      "$ xns" : "Roo",
152      "* prop" : "buttons[]"
153     }
154    ]
155   }
156  ]
157 }