Pman.Dialog.MTrackBulkChange.bjs
[Pman.MTrack] / Pman.Dialog.MTrackBulkChange.bjs
1 {
2  "name" : "Pman.Dialog.MTrackBulkChange",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Dialog.MTrackBulkChange.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "672caf27f5363dc833bda5099775e891" : "Developer",
10   "9e727fdd3aec8274f46685441900280d" : "Project",
11   "6c768695a8efb18436d5b7b4374cdb45" : "Select core_enum",
12   "ec53a8c4f07baed5d8825072c89799be" : "Status",
13   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
14   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
15   "b18d852fa0d2465fe38b05b96dd5b736" : "Bulk Update",
16   "502996d9790340c5fd7b86a5b93b1c9f" : "Priority",
17   "3cc5fe396ec583c6d9f38f80a06674a4" : "Select prioirty",
18   "24f27bda5dd2c488aa9bc7700ba98c34" : "Select Projects",
19   "340c2ee497b85d5954b01c64de7f44f6" : "Select Person",
20   "9aadb017cc5b335be77ba090d5029259" : "Select status",
21   "06933067aafd48425d67bcb01bba5cb6" : "Update"
22  },
23  "items" : [
24   {
25    "modal" : true,
26    "collapsible" : false,
27    "title" : "Bulk Update",
28    "xtype" : "LayoutDialog",
29    "width" : 500,
30    "$ xns" : "Roo",
31    "closable" : false,
32    "resizable" : false,
33    "height" : 300,
34    "items" : [
35     {
36      "xtype" : "LayoutRegion",
37      "$ xns" : "Roo",
38      "* prop" : "center"
39     },
40     {
41      "region" : "center",
42      "xtype" : "ContentPanel",
43      "$ xns" : "Roo",
44      "items" : [
45       {
46        "listeners" : {
47         "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n    \n        _this.form.setValues(_this.data);\n        \n       //_this.dialog.el.mask(\"Loading\");\n       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       return;\n    }\n    if (action.type == 'load') {\n \n        return;\n    }\n    if (action.type =='submit') {\n        return;\n        // not used here..\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}\n",
48         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
49        },
50        "$ url" : "baseURL + '/Roo/mtrack_ticket.php'",
51        "xtype" : "Form",
52        "method" : "POST",
53        "style" : "margin:10px;",
54        "$ xns" : "Roo.form",
55        "items" : [
56         {
57          "listWidth" : 400,
58          "triggerAction" : "all",
59          "forceSelection" : true,
60          "selectOnFocus" : true,
61          "fieldLabel" : "Project",
62          "pageSize" : 20,
63          "xtype" : "ComboBox",
64          "emptyText" : "Select Projects",
65          "minChars" : 2,
66          "valueField" : "id",
67          "displayField" : "name",
68          "hiddenName" : "project_id",
69          "allowBlank" : false,
70          "typeAhead" : true,
71          "editable" : false,
72          "$ xns" : "Roo.form",
73          "width" : 300,
74          "qtip" : "Select Projects",
75          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
76          "queryParam" : "query[name]",
77          "name" : "project_id_name",
78          "loadingText" : "Searching...",
79          "items" : [
80           {
81            "listeners" : {
82             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
83            },
84            "xtype" : "Store",
85            "remoteSort" : true,
86            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
87            "$ xns" : "Roo.data",
88            "* prop" : "store",
89            "items" : [
90             {
91              "$ url" : "baseURL + '/Roo/Projects.php'",
92              "method" : "GET",
93              "xtype" : "HttpProxy",
94              "$ xns" : "Roo.data",
95              "* prop" : "proxy"
96             },
97             {
98              "id" : "id",
99              "root" : "data",
100              "xtype" : "JsonReader",
101              "$ xns" : "Roo.data",
102              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
103              "* prop" : "reader",
104              "totalProperty" : "total"
105             }
106            ]
107           }
108          ]
109         },
110         {
111          "listWidth" : 400,
112          "triggerAction" : "all",
113          "fieldLabel" : "Priority",
114          "forceSelection" : true,
115          "selectOnFocus" : true,
116          "pageSize" : 20,
117          "displayField" : "display_name",
118          "emptyText" : "Select prioirty",
119          "hiddenName" : "priority_id",
120          "minChars" : 2,
121          "valueField" : "id",
122          "xtype" : "ComboBox",
123          "allowBlank" : false,
124          "typeAhead" : true,
125          "editable" : false,
126          "width" : 300,
127          "$ xns" : "Roo.form",
128          "name" : "priority_id_display_name",
129          "qtip" : "Select core_enum",
130          "queryParam" : "query[etype]",
131          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
132          "loadingText" : "Searching...",
133          "items" : [
134           {
135            "listeners" : {
136             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params.etype = 'priority';\n}\n"
137            },
138            "xtype" : "Store",
139            "remoteSort" : true,
140            "$ sortInfo" : "{ direction : 'ASC', field: 'seqid' }",
141            "$ xns" : "Roo.data",
142            "* prop" : "store",
143            "items" : [
144             {
145              "$ url" : "baseURL + '/Roo/core_enum.php'",
146              "method" : "GET",
147              "xtype" : "HttpProxy",
148              "$ xns" : "Roo.data",
149              "* prop" : "proxy"
150             },
151             {
152              "id" : "id",
153              "root" : "data",
154              "xtype" : "JsonReader",
155              "$ xns" : "Roo.data",
156              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]",
157              "* prop" : "reader",
158              "totalProperty" : "total"
159             }
160            ]
161           }
162          ]
163         },
164         {
165          "alwaysQuery" : true,
166          "listWidth" : 400,
167          "triggerAction" : "all",
168          "fieldLabel" : "Status",
169          "forceSelection" : true,
170          "selectOnFocus" : true,
171          "pageSize" : 20,
172          "displayField" : "display_name",
173          "emptyText" : "Status",
174          "hiddenName" : "status",
175          "minChars" : 2,
176          "valueField" : "id",
177          "xtype" : "ComboBox",
178          "allowBlank" : false,
179          "typeAhead" : true,
180          "editable" : false,
181          "width" : 300,
182          "$ xns" : "Roo.form",
183          "name" : "status_display_name",
184          "qtip" : "Select status",
185          "queryParam" : "query[etype]",
186          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> </div>",
187          "loadingText" : "Searching...",
188          "items" : [
189           {
190            "listeners" : {
191             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    \n    o.params['query[ticket_change]'] = _this.data.ids;\n\n}\n"
192            },
193            "xtype" : "Store",
194            "remoteSort" : true,
195            "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
196            "$ xns" : "Roo.data",
197            "* prop" : "store",
198            "items" : [
199             {
200              "$ url" : "baseURL + '/Roo/core_enum.php'",
201              "method" : "GET",
202              "xtype" : "HttpProxy",
203              "$ xns" : "Roo.data",
204              "* prop" : "proxy"
205             },
206             {
207              "id" : "id",
208              "root" : "data",
209              "xtype" : "JsonReader",
210              "$ xns" : "Roo.data",
211              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"etype\",\"type\":\"string\"}]",
212              "* prop" : "reader",
213              "totalProperty" : "total"
214             }
215            ]
216           }
217          ]
218         },
219         {
220          "listWidth" : 400,
221          "triggerAction" : "all",
222          "fieldLabel" : "Developer",
223          "forceSelection" : true,
224          "selectOnFocus" : true,
225          "pageSize" : 20,
226          "displayField" : "name",
227          "emptyText" : "Select Person",
228          "hiddenName" : "developer_id",
229          "minChars" : 2,
230          "valueField" : "id",
231          "xtype" : "ComboBox",
232          "allowBlank" : false,
233          "typeAhead" : true,
234          "editable" : false,
235          "width" : 300,
236          "$ xns" : "Roo.form",
237          "name" : "developer_id_name",
238          "qtip" : "Select Person",
239          "queryParam" : "query[name]",
240          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> {email} </div>",
241          "loadingText" : "Searching...",
242          "items" : [
243           {
244            "listeners" : {
245             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n    o.params['query[project_id]'] = _this.data.project_id;\n    o.params['query[role]'] = 'DEVELOPER';\n}\n"
246            },
247            "xtype" : "Store",
248            "remoteSort" : true,
249            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
250            "$ xns" : "Roo.data",
251            "* prop" : "store",
252            "items" : [
253             {
254              "$ url" : "baseURL + '/Roo/Person.php'",
255              "method" : "GET",
256              "xtype" : "HttpProxy",
257              "$ xns" : "Roo.data",
258              "* prop" : "proxy"
259             },
260             {
261              "id" : "id",
262              "root" : "data",
263              "xtype" : "JsonReader",
264              "$ xns" : "Roo.data",
265              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
266              "* prop" : "reader",
267              "totalProperty" : "total"
268             }
269            ]
270           }
271          ]
272         }
273        ]
274       }
275      ]
276     },
277     {
278      "listeners" : {
279       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
280      },
281      "text" : "Cancel",
282      "xtype" : "Button",
283      "$ xns" : "Roo",
284      "* prop" : "buttons[]"
285     },
286     {
287      "listeners" : {
288       "click" : "function (_self, e)\n{\n    // do some checks?\n    var params = _this.form.getValues();\n    params._bulk_update = _this.data.ids;\n  \n    Pman.Request({\n        url : baseURL + '/Roo/mtrack_ticket',\n        method : 'POST',\n        params : params,\n        mask: 'updating',\n        success : function(res) {\n            _this.dialog.hide();\n            _this.callback(res);\n        }\n     });\n\n     \n    //_this.form.doAction(\"submit\");\n\n}"
289      },
290      "text" : "Update",
291      "xtype" : "Button",
292      "$ xns" : "Roo",
293      "* prop" : "buttons[]"
294     }
295    ]
296   }
297  ]
298 }