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          "alwaysQuery" : true,
61          "listWidth" : 400,
62          "triggerAction" : "all",
63          "fieldLabel" : "Merge with",
64          "forceSelection" : true,
65          "selectOnFocus" : true,
66          "pageSize" : 20,
67          "displayField" : "name",
68          "emptyText" : "Select Item to Merge With",
69          "hiddenName" : "_merge_id",
70          "minChars" : 2,
71          "valueField" : "id",
72          "xtype" : "ComboBox",
73          "allowBlank" : false,
74          "typeAhead" : true,
75          "width" : 250,
76          "$ xns" : "Roo.form",
77          "name" : "_merge_id_name",
78          "qtip" : "Select Item to Merge With",
79          "queryParam" : "query[search_begins]",
80          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> {name}</div>",
81          "loadingText" : "Searching...",
82          "items" : [
83           {
84            "listeners" : {
85             "|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"
86            },
87            "xtype" : "Store",
88            "remoteSort" : true,
89            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
90            "$ xns" : "Roo.data",
91            "* prop" : "store",
92            "items" : [
93             {
94              "$ url" : "baseURL + '/Roo/Core_enum'",
95              "xtype" : "HttpProxy",
96              "method" : "GET",
97              "$ xns" : "Roo.data",
98              "* prop" : "proxy"
99             },
100             {
101              "id" : "id",
102              "root" : "data",
103              "xtype" : "JsonReader",
104              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
105              "$ xns" : "Roo.data",
106              "* prop" : "reader",
107              "totalProperty" : "total"
108             }
109            ]
110           }
111          ]
112         },
113         {
114          "xtype" : "Hidden",
115          "$ xns" : "Roo.form",
116          "name" : "etype"
117         },
118         {
119          "xtype" : "Hidden",
120          "$ xns" : "Roo.form",
121          "name" : "id"
122         }
123        ]
124       }
125      ]
126     },
127     {
128      "listeners" : {
129       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
130      },
131      "text" : "Cancel",
132      "xtype" : "Button",
133      "$ xns" : "Roo",
134      "* prop" : "buttons[]"
135     },
136     {
137      "listeners" : {
138       "click" : "function (_self, e)\n{\n     \n    _this.form.doAction(\"submit\");\n\n}"
139      },
140      "text" : "Merge",
141      "xtype" : "Button",
142      "$ xns" : "Roo",
143      "* prop" : "buttons[]"
144     }
145    ]
146   }
147  ]
148 }