php warnings
[Pman.MTrack] / Pman.Tab.MTrackMilestone.bjs
1 {
2  "name" : "Pman.Tab.MTrackMilestone",
3  "parent" : "Pman.Tab.MTrack",
4  "title" : "Pman.Tab.MTrackMilestone",
5  "path" : "/home/alan/gitlive/Pman.MTrack/Pman.Tab.MTrackMilestone.bjs",
6  "permname" : "",
7  "modOrder" : "200",
8  "strings" : {
9   "fa444e1c75f40633fccded45b0870206" : "No mtrack_milestone found",
10   "54e1d44609e3abed11f6e1eb6ae54988" : "Projects",
11   "b8cb81ab43044c454c1e69dbba646b68" : "On-hold",
12   "ec211f7c20af43e742bf2570c3cb84f9" : "Add",
13   "9e727fdd3aec8274f46685441900280d" : "Project",
14   "7dce122004969d56ae2e0245cb754d35" : "Edit",
15   "d5e96f1a04f3dd132b193765eee39b9e" : "Duedate",
16   "c6030af9c753c4081d7ba01420cd0922" : "Displaying mtrack_milestone{0} - {1} of {2}",
17   "1243daf593fa297e07ab03bf06d925af" : "Searching...",
18   "df25de42c84837baf5fa15049a8bc764" : "View:",
19   "5288ef9e03a2b0686856a301272e8e56" : "#Tickets",
20   "24f27bda5dd2c488aa9bc7700ba98c34" : "Select Projects",
21   "0460245609b5dc1fc4e3c72a84f95bb7" : "Startdate",
22   "780c165edced420f2207a4d5983e4bd0" : "Merge With another Milestone",
23   "07ca5050e697392c9ed47e6453f1453f" : "Completed",
24   "4ab658036f4f174205c384b863fed5c2" : "Milestones",
25   "e15e216fc1c639f787b1231ecdfa1bf8" : "HEAD",
26   "f2a6c498fb90ee345d997f888fce3b18" : "Delete",
27   "49ee3087348e8d44e1feda1917443987" : "Name",
28   "b5a7adde1af5c87d7fd797b6245c2a39" : "Description",
29   "db478325306f02298b2980f40223a413" : "#ref"
30  },
31  "named_strings" : {
32   "project_id_name_emptyText" : "24f27bda5dd2c488aa9bc7700ba98c34",
33   "project_id_name_loadingText" : "1243daf593fa297e07ab03bf06d925af",
34   "project_id_name_qtip" : "24f27bda5dd2c488aa9bc7700ba98c34",
35   "project_id_name_fieldLabel" : "54e1d44609e3abed11f6e1eb6ae54988"
36  },
37  "items" : [
38   {
39    "listeners" : {
40     "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
41    },
42    "background" : true,
43    "region" : "center",
44    "fitToframe" : true,
45    "title" : "Milestones",
46    "xtype" : "GridPanel",
47    "fitContainer" : true,
48    "$ xns" : "Roo",
49    "tableName" : "mtrack_milestone",
50    "items" : [
51     {
52      "listeners" : {
53       "|rowdblclick" : "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) { return; }\n    _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n",
54       "|render" : "function() \n{\n    _this.grid = this; \n     _this.dialog = Pman.Dialog.MTrackMilestone;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
55      },
56      "autoExpandColumn" : "description",
57      "xtype" : "Grid",
58      "loadMask" : true,
59      "$ xns" : "Roo.grid",
60      "* prop" : "grid",
61      "items" : [
62       {
63        "listeners" : {
64         "beforeload" : "function (_self, options)\n{\n    options.params._with_active_tickets = 1;\n    if (!_this.viewType) {\n        return false;\n    }\n    options.params._viewtype = _this.viewType.getValue();\n    \n    if (_this.projsel.getValue()) {\n         options.params.project_id = _this.projsel.getValue();\n    }\n    \n    \n}"
65        },
66        "xtype" : "Store",
67        "remoteSort" : true,
68        "$ sortInfo" : "{ field : 'duedate', direction: 'ASC' }",
69        "$ xns" : "Roo.data",
70        "* prop" : "dataSource",
71        "items" : [
72         {
73          "$ url" : "baseURL + '/Roo/mtrack_milestone.php'",
74          "method" : "GET",
75          "xtype" : "HttpProxy",
76          "$ xns" : "Roo.data",
77          "* prop" : "proxy"
78         },
79         {
80          "id" : "id",
81          "root" : "data",
82          "xtype" : "JsonReader",
83          "$ xns" : "Roo.data",
84          "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'description',\n        'type': 'string'\n    },\n    {\n        'name': 'startdate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'duedate',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'completed',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'deleted',\n        'type': 'int'\n    },\n    {\n        'name': 'created',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'int'\n    },\n    {\n        'name': 'project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'deleted_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'deleted_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'deleted_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'updated_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'updated_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'updated_reason',\n        'type': 'string'\n    },\n    {\n        'name': 'created_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'created_ontable',\n        'type': 'string'\n    },\n    {\n        'name': 'created_onid',\n        'type': 'int'\n    },\n    {\n        'name': 'created_changedate',\n        'type': 'date'\n    },\n    {\n        'name': 'created_reason',\n        'type': 'string'\n    }\n]",
85          "* prop" : "reader",
86          "totalProperty" : "total"
87         }
88        ]
89       },
90       {
91        "pageSize" : 100,
92        "xtype" : "PagingToolbar",
93        "emptyMsg" : "No mtrack_milestone found",
94        "$ xns" : "Roo",
95        "displayInfo" : true,
96        "displayMsg" : "Displaying mtrack_milestone{0} - {1} of {2}",
97        "* prop" : "footer"
98       },
99       {
100        "xtype" : "Toolbar",
101        "$ xns" : "Roo",
102        "* prop" : "toolbar",
103        "items" : [
104         {
105          "text" : "View:",
106          "xtype" : "TextItem",
107          "$ xns" : "Roo.Toolbar"
108         },
109         {
110          "listeners" : {
111           "render" : "function (_self)\n{\n   _this.viewType = this;\n}",
112           "beforeselect" : "function (combo, record, index)\n{\n  (function() { _this.grid.footer.onClick('first'); }).defer(100);\n}"
113          },
114          "listWidth" : 200,
115          "triggerAction" : "all",
116          "forceSelection" : true,
117          "displayField" : "val",
118          "hiddenName" : "currency",
119          "value" : "HEAD",
120          "valueField" : "key",
121          "xtype" : "ComboBox",
122          "allowBlank" : false,
123          "editable" : false,
124          "width" : 150,
125          "$ xns" : "Roo.form",
126          "items" : [
127           {
128            "xtype" : "SimpleStore",
129            "$ data" : "[ \n  [ 'HEAD', 'Head Milestones' ],\n  [ 'ACTIVE', 'Active Milestones' ],\n  [ 'ALL', 'All Milestones' ]\n  ]",
130            "$ fields" : "[ 'key' , 'val' ]",
131            "$ xns" : "Roo.data",
132            "* prop" : "store"
133           }
134          ]
135         },
136         {
137          "listeners" : {
138           "render" : "function (_self)\n{\n   _this.projsel = _self;\n}",
139           "beforeselect" : "function (combo, record, index)\n{\n  (function() { _this.grid.footer.onClick('first')}).defer(100);\n}"
140          },
141          "listWidth" : 400,
142          "triggerAction" : "all",
143          "fieldLabel" : "Projects",
144          "forceSelection" : true,
145          "selectOnFocus" : true,
146          "pageSize" : 50,
147          "displayField" : "name",
148          "emptyText" : "Select Projects",
149          "hiddenName" : "project_id",
150          "minChars" : 2,
151          "valueField" : "id",
152          "xtype" : "ComboBox",
153          "allowBlank" : false,
154          "typeAhead" : true,
155          "editable" : false,
156          "width" : 200,
157          "$ xns" : "Roo.form",
158          "name" : "project_id_name",
159          "qtip" : "Select Projects",
160          "queryParam" : "",
161          "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{code}</b> {name}</div>",
162          "loadingText" : "Searching...",
163          "items" : [
164           {
165            "listeners" : {
166             "|beforeload" : "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
167            },
168            "xtype" : "Store",
169            "remoteSort" : true,
170            "$ sortInfo" : "{ direction : 'ASC', field: 'code' }",
171            "$ xns" : "Roo.data",
172            "* prop" : "store",
173            "items" : [
174             {
175              "$ url" : "baseURL + '/Roo/Projects.php'",
176              "method" : "GET",
177              "xtype" : "HttpProxy",
178              "$ xns" : "Roo.data",
179              "* prop" : "proxy"
180             },
181             {
182              "id" : "id",
183              "root" : "data",
184              "xtype" : "JsonReader",
185              "$ xns" : "Roo.data",
186              "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]",
187              "* prop" : "reader",
188              "totalProperty" : "total"
189             }
190            ]
191           }
192          ]
193         },
194         {
195          "xtype" : "Fill",
196          "$ xns" : "Roo.Toolbar"
197         },
198         {
199          "listeners" : {
200           "|click" : "function()\n{\nif (!_this.dialog) { return; }\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
201          },
202          "text" : "Add",
203          "xtype" : "Button",
204          "cls" : "x-btn-text-icon",
205          "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
206          "$ xns" : "Roo.Toolbar"
207         },
208         {
209          "listeners" : {
210           "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n    if (!_this.dialog) { return; }\n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
211          },
212          "text" : "Edit",
213          "xtype" : "Button",
214          "cls" : "x-btn-text-icon",
215          "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
216          "$ xns" : "Roo.Toolbar"
217         },
218         {
219          "listeners" : {
220           "|click" : "function()\n{\n    var s = _this.grid.getSelectionModel().getSelections();\n    if (!s.length || (s.length > 1))  {\n        Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n        return;\n    }\n      \n    Pman.Dialog.MTrackMilestoneMerge.show(s[0].data, function() {\n        Pman.genericDelete(_this, 'mtrack_milestone'); \n    }); \n    \n} \n"
221          },
222          "text" : "Merge With another Milestone",
223          "xtype" : "Button",
224          "cls" : "x-btn-text-icon",
225          "$ icon" : "Roo.rootURL + 'images/default/tree/leaf.gif'",
226          "$ xns" : "Roo.Toolbar"
227         },
228         {
229          "listeners" : {
230           "|click" : "function()\n        {\n        Pman.genericDelete(_this, 'mtrack_milestone'); \n        }\n        "
231          },
232          "text" : "Delete",
233          "xtype" : "Button",
234          "cls" : "x-btn-text-icon",
235          "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
236          "$ xns" : "Roo.Toolbar"
237         }
238        ]
239       },
240       {
241        "xtype" : "ColumnModel",
242        "width" : 50,
243        "header" : "#ref",
244        "$ renderer" : "function(v) { return String.format('{0}', v); }",
245        "$ xns" : "Roo.grid",
246        "* prop" : "colModel[]",
247        "dataIndex" : "id"
248       },
249       {
250        "xtype" : "ColumnModel",
251        "sortable" : true,
252        "header" : "Project",
253        "width" : 150,
254        "$ renderer" : "function(v) { return String.format('{0}', v); }",
255        "$ xns" : "Roo.grid",
256        "* prop" : "colModel[]",
257        "dataIndex" : "project_id_name"
258       },
259       {
260        "xtype" : "ColumnModel",
261        "header" : "#Tickets",
262        "width" : 50,
263        "$ renderer" : "function(v) { return String.format('{0}', v); }",
264        "$ xns" : "Roo.grid",
265        "* prop" : "colModel[]",
266        "dataIndex" : "active_tickets"
267       },
268       {
269        "xtype" : "ColumnModel",
270        "width" : 200,
271        "header" : "Name",
272        "$ renderer" : "function(v) { return String.format('{0}', v); }",
273        "$ xns" : "Roo.grid",
274        "* prop" : "colModel[]",
275        "dataIndex" : "name"
276       },
277       {
278        "xtype" : "ColumnModel",
279        "width" : 200,
280        "header" : "Description",
281        "$ renderer" : "function(v) { return String.format('{0}', v); }",
282        "$ xns" : "Roo.grid",
283        "* prop" : "colModel[]",
284        "dataIndex" : "description"
285       },
286       {
287        "xtype" : "ColumnModel",
288        "sortable" : true,
289        "header" : "Startdate",
290        "width" : 75,
291        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
292        "$ xns" : "Roo.grid",
293        "* prop" : "colModel[]",
294        "dataIndex" : "startdate"
295       },
296       {
297        "xtype" : "ColumnModel",
298        "width" : 75,
299        "header" : "Duedate",
300        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
301        "$ xns" : "Roo.grid",
302        "* prop" : "colModel[]",
303        "dataIndex" : "duedate"
304       },
305       {
306        "xtype" : "ColumnModel",
307        "header" : "On-hold",
308        "width" : 75,
309        "$ renderer" : "function(v) { return String.format('{0}', v ? 'HOLD' : '' ); }",
310        "$ xns" : "Roo.grid",
311        "* prop" : "colModel[]",
312        "dataIndex" : "on_hold"
313       },
314       {
315        "xtype" : "ColumnModel",
316        "width" : 75,
317        "header" : "Completed",
318        "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
319        "$ xns" : "Roo.grid",
320        "* prop" : "colModel[]",
321        "dataIndex" : "completed"
322       }
323      ]
324     }
325    ]
326   }
327  ]
328 }