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