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