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