Pman.js
[Pman.Core] / Pman.Dialog.CoreProject.bjs
1 {
2  "name" : "Pman.Dialog.CoreProject",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.Core/Pman.Dialog.CoreProject.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "99b344c8ae43e3e7213862b8f35c4e51" : "Select Company",
10   "231bc72756b5e6de492aaaa1577f61b1" : "Remarks",
11   "577d7068826de925ea2aec01dbadf5e4" : "Client",
12   "ca528d836417871a349312db705a1951" : "Open date",
13   "ddb016a244ff2b895e69d25fb3b5f780" : "Edit / Create Projects",
14   "b5b20a9df20ea61c1cc0485f5e83891e" : "Select Project Type",
15   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
16   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
17   "9675747b5ab12d05f18518761e68a533" : "Select Companies",
18   "ac848fa228f49ba2b8a5fbd76596817d" : "Team",
19   "24f9e53eb92c0995d04433c1f7a4c9c0" : "File location",
20   "d1847fa47ea6bc047b413947463262ab" : "Enter Project Name",
21   "340c2ee497b85d5954b01c64de7f44f6" : "Select Person",
22   "1a11b1adc359c03db0ca798a00e2632c" : "Opened",
23   "8e3a42158ee70b67cf55b33e2789a9e5" : "Project Name",
24   "ca0dbad92a874b2f69b549293387925e" : "Code",
25   "245fe794333c2b0d5c513129b346b93f" : "Project Type",
26   "ab83ccde6764ca581702f38d79834615" : "Select Team",
27   "c9cc8cce247e49bae79f15173ce97354" : "Save",
28   "223aad18ce30620a724d8a97021ce26e" : "Open by"
29  },
30  "named_strings" : {
31   "name_qtip" : "d1847fa47ea6bc047b413947463262ab",
32   "client_id_name_emptyText" : "99b344c8ae43e3e7213862b8f35c4e51",
33   "client_id_name_fieldLabel" : "577d7068826de925ea2aec01dbadf5e4",
34   "type_desc_emptyText" : "b5b20a9df20ea61c1cc0485f5e83891e",
35   "type_desc_fieldLabel" : "245fe794333c2b0d5c513129b346b93f",
36   "type_desc_qtip" : "b5b20a9df20ea61c1cc0485f5e83891e",
37   "client_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
38   "code_fieldLabel" : "ca0dbad92a874b2f69b549293387925e",
39   "open_by_name_qtip" : "340c2ee497b85d5954b01c64de7f44f6",
40   "name_fieldLabel" : "8e3a42158ee70b67cf55b33e2789a9e5",
41   "team_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
42   "remarks_fieldLabel" : "231bc72756b5e6de492aaaa1577f61b1",
43   "open_by_name_emptyText" : "340c2ee497b85d5954b01c64de7f44f6",
44   "open_by_name_fieldLabel" : "223aad18ce30620a724d8a97021ce26e",
45   "team_id_name_fieldLabel" : "ac848fa228f49ba2b8a5fbd76596817d",
46   "open_date_fieldLabel" : "ca528d836417871a349312db705a1951",
47   "team_id_name_qtip" : "ab83ccde6764ca581702f38d79834615",
48   "team_id_name_emptyText" : "ab83ccde6764ca581702f38d79834615",
49   "file_location_fieldLabel" : "24f9e53eb92c0995d04433c1f7a4c9c0",
50   "open_by_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
51   "type_desc_loadingText" : "1243daf593fa297e07ab03bf06d925af",
52   "client_id_name_qtip" : "9675747b5ab12d05f18518761e68a533"
53  },
54  "items" : [
55   {
56    "Boolean modal" : true,
57    "collapsible" : false,
58    "xtype" : "LayoutDialog",
59    "title" : "Edit / Create Projects",
60    "width" : 470,
61    "$ xns" : "Roo",
62    "closable" : false,
63    "resizable" : false,
64    "height" : 450,
65    "items" : [
66     {
67      "xtype" : "LayoutRegion",
68      "$ xns" : "Roo",
69      "* prop" : "center"
70     },
71     {
72      "region" : "center",
73      "xtype" : "ContentPanel",
74      "$ xns" : "Roo",
75      "items" : [
76       {
77        "listeners" : {
78         "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n       //_this.dialog.el.mask(\"Loading\");\n       if (_this.data.id) {\n           this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n       }\n       return;\n    }\n    if (action.type == 'load') {\n        \n        return;\n    }\n    if (action.type =='submit') {\n    \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",
79         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
80        },
81        "$ url" : "baseURL + '/Roo/core_project'",
82        "method" : "POST",
83        "xtype" : "Form",
84        "style" : "margin:10px;",
85        "$ xns" : "Roo.form",
86        "items" : [
87         {
88          "fieldLabel" : "Code",
89          "xtype" : "TextField",
90          "width" : 150,
91          "$ xns" : "Roo.form",
92          "name" : "code"
93         },
94         {
95          "fieldLabel" : "Project Name",
96          "xtype" : "TextField",
97          "width" : 300,
98          "$ xns" : "Roo.form",
99          "qtip" : "Enter Project Name",
100          "name" : "name"
101         },
102         {
103          "listWidth" : 400,
104          "triggerAction" : "all",
105          "fieldLabel" : "Project Type",
106          "forceSelection" : true,
107          "selectOnFocus" : true,
108          "pageSize" : 20,
109          "displayField" : "desc",
110          "emptyText" : "Select Project Type",
111          "hiddenName" : "type",
112          "minChars" : 2,
113          "valueField" : "code",
114          "xtype" : "ComboBox",
115          "allowBlank" : false,
116          "typeAhead" : true,
117          "editable" : false,
118          "width" : 200,
119          "$ xns" : "Roo.form",
120          "name" : "type_desc",
121          "qtip" : "Select Project Type",
122          "queryParam" : "query[name]",
123          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{desc}</b> </div>",
124          "loadingText" : "Searching...",
125          "items" : [
126           {
127            "xtype" : "SimpleStore",
128            "$ data" : "[ [  'U' , \"Project (Unconfirmed)\" ],\n[  'P' , \"Project\" ],\n[  'C' , \"Project (Closed)\" ],\n[  'N' , \"Non-Project\" ],\n[  'X' , \"Non-Project (Closed)\" ]\n]",
129            "$ fields" : " [ 'code', 'desc' ]",
130            "$ xns" : "Roo.data",
131            "* prop" : "store"
132           }
133          ]
134         },
135         {
136          "listeners" : {
137           "add" : "function (combo)\n{\n Pman.Dialog.Companies.show( {  id: 0 },  function(data) {\n            _this.form.setValues({ \n                client_id : data.id,\n                client_id_name : data.name\n            });\n        }); \n}"
138          },
139          "listWidth" : 400,
140          "triggerAction" : "all",
141          "fieldLabel" : "Client",
142          "forceSelection" : true,
143          "selectOnFocus" : true,
144          "pageSize" : 20,
145          "displayField" : "name",
146          "emptyText" : "Select Company",
147          "hiddenName" : "client_id",
148          "minChars" : 2,
149          "valueField" : "id",
150          "xtype" : "ComboBox",
151          "allowBlank" : false,
152          "typeAhead" : true,
153          "editable" : false,
154          "width" : 300,
155          "$ xns" : "Roo.form",
156          "name" : "client_id_name",
157          "qtip" : "Select Companies",
158          "queryParam" : "query[name]",
159          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
160          "loadingText" : "Searching...",
161          "items" : [
162           {
163            "listeners" : {
164             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n   \n    o.params.type = 1;\n    o.params['query[group_pulldown]'] = 1;\n}\n"
165            },
166            "xtype" : "Store",
167            "remoteSort" : true,
168            "$ sortInfo" : "{ direction : 'ASC', field: 'name' }",
169            "$ xns" : "Roo.data",
170            "* prop" : "store",
171            "items" : [
172             {
173              "$ url" : "baseURL + '/Roo/core_company'",
174              "xtype" : "HttpProxy",
175              "method" : "GET",
176              "$ xns" : "Roo.data",
177              "* prop" : "proxy"
178             },
179             {
180              "id" : "id",
181              "root" : "data",
182              "xtype" : "JsonReader",
183              "$ xns" : "Roo.data",
184              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"code\",\"type\":\"string\"}]",
185              "* prop" : "reader",
186              "totalProperty" : "total"
187             }
188            ]
189           }
190          ]
191         },
192         {
193          "listWidth" : 400,
194          "triggerAction" : "all",
195          "fieldLabel" : "Team",
196          "forceSelection" : true,
197          "selectOnFocus" : true,
198          "pageSize" : 20,
199          "displayField" : "name",
200          "emptyText" : "Select Team",
201          "hiddenName" : "team_id",
202          "minChars" : 2,
203          "valueField" : "id",
204          "xtype" : "ComboBox",
205          "allowBlank" : false,
206          "typeAhead" : true,
207          "editable" : false,
208          "width" : 300,
209          "$ xns" : "Roo.form",
210          "name" : "team_id_name",
211          "qtip" : "Select Team",
212          "queryParam" : "query[name]",
213          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
214          "loadingText" : "Searching...",
215          "items" : [
216           {
217            "listeners" : {
218             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
219            },
220            "xtype" : "Store",
221            "remoteSort" : true,
222            "$ xns" : "Roo.data",
223            "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
224            "* prop" : "store",
225            "items" : [
226             {
227              "$ url" : "baseURL + '/Roo/Groups.php'",
228              "xtype" : "HttpProxy",
229              "method" : "GET",
230              "$ xns" : "Roo.data",
231              "* prop" : "proxy"
232             },
233             {
234              "id" : "id",
235              "root" : "data",
236              "xtype" : "JsonReader",
237              "$ xns" : "Roo.data",
238              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
239              "* prop" : "reader",
240              "totalProperty" : "total"
241             }
242            ]
243           }
244          ]
245         },
246         {
247          "fieldLabel" : "File location",
248          "xtype" : "TextField",
249          "width" : 300,
250          "$ xns" : "Roo.form",
251          "name" : "file_location"
252         },
253         {
254          "fieldLabel" : "Remarks",
255          "xtype" : "TextArea",
256          "width" : 300,
257          "$ xns" : "Roo.form",
258          "name" : "remarks",
259          "height" : 100
260         },
261         {
262          "legend" : "Opened",
263          "xtype" : "FieldSet",
264          "$ xns" : "Roo.form",
265          "items" : [
266           {
267            "format" : "d/m/Y",
268            "fieldLabel" : "Open date",
269            "xtype" : "DateField",
270            "width" : 100,
271            "$ xns" : "Roo.form",
272            "altFormats" : "Y-m-d|d/m/Y",
273            "name" : "open_date"
274           },
275           {
276            "listWidth" : 400,
277            "triggerAction" : "all",
278            "forceSelection" : true,
279            "selectOnFocus" : true,
280            "fieldLabel" : "Open by",
281            "pageSize" : 20,
282            "xtype" : "ComboBox",
283            "emptyText" : "Select Person",
284            "minChars" : 2,
285            "valueField" : "id",
286            "displayField" : "name",
287            "hiddenName" : "open_by",
288            "allowBlank" : false,
289            "typeAhead" : true,
290            "editable" : false,
291            "$ xns" : "Roo.form",
292            "width" : 300,
293            "qtip" : "Select Person",
294            "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
295            "queryParam" : "query[name]",
296            "name" : "open_by_name",
297            "loadingText" : "Searching...",
298            "items" : [
299             {
300              "listeners" : {
301               "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
302              },
303              "xtype" : "Store",
304              "remoteSort" : true,
305              "$ xns" : "Roo.data",
306              "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
307              "* prop" : "store",
308              "items" : [
309               {
310                "$ url" : "baseURL + '/Roo/core_person'",
311                "xtype" : "HttpProxy",
312                "method" : "GET",
313                "$ xns" : "Roo.data",
314                "* prop" : "proxy"
315               },
316               {
317                "id" : "id",
318                "root" : "data",
319                "xtype" : "JsonReader",
320                "$ xns" : "Roo.data",
321                "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
322                "* prop" : "reader",
323                "totalProperty" : "total"
324               }
325              ]
326             }
327            ]
328           }
329          ]
330         },
331         {
332          "xtype" : "Hidden",
333          "$ xns" : "Roo.form",
334          "name" : "id"
335         }
336        ]
337       }
338      ]
339     },
340     {
341      "listeners" : {
342       "click" : "function (_self, e)\n{\n    _this.dialog.hide();\n}"
343      },
344      "text" : "Cancel",
345      "xtype" : "Button",
346      "$ xns" : "Roo",
347      "* prop" : "buttons[]"
348     },
349     {
350      "listeners" : {
351       "click" : "function (_self, e)\n{\n    // do some checks?\n     \n    \n \n    _this.form.doAction(\"submit\");\n\n}"
352      },
353      "text" : "Save",
354      "xtype" : "Button",
355      "$ xns" : "Roo",
356      "* prop" : "buttons[]"
357     }
358    ]
359   }
360  ]
361 }