2 "name" : "Pman.Dialog.XtupleItem",
5 "path" : "/home/edward/gitlive/web.xtuple/Pman/Xtuple/Pman.Dialog.XtupleItem.bjs",
11 "show" : "function (_self)\n{\n _this.dialog.layout.getRegion('center').showPanel(0);\n}"
14 "collapsible" : false,
15 "title" : "Edit / Create item",
16 "xtype" : "LayoutDialog",
24 "alwaysShowTabs" : true,
25 "xtype" : "LayoutRegion",
26 "tabPosition" : "top",
32 "xtype" : "ContentPanel",
38 "|actioncomplete" : "function(_self,action)\n{\n if (action.type == 'setdata') {\n _this.form.findField('item_number').el.dom.readOnly = true;\n _this.form.findField('item_type').disabled = true; \n \n if(_this.data.item_id * 1 > 0){\n \n this.load({ \n method: 'GET', \n params: {\n '_id' : _this.data.item_id,\n '_with_itemsite' : 1,\n '_with_itemcost' : 1,\n '_with_prodcat' : 1 ,\n '_with_salesaccnt' : 1 \n }\n });\n return;\n }\n // if it's new..\n _this.form.findField('item_number').el.dom.readOnly = false;\n _this.form.findField('item_type').disabled = false; \n _this.form.findField('item_salesaccnt').setValue('');\n \n _this.form.findField('item_type').showHide();\n \n return;\n }\n if (action.type == 'load') {\n _this.form.findField('item_type').showHide();\n return;\n }\n if (action.type =='submit') {\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n \n this.load({ \n method: 'GET', \n params: {\n '_id' : action.result.data.item_id,\n '_with_itemsite' : 1,\n '_with_itemcost' : 1,\n '_with_prodcat' : 1 ,\n '_with_salesaccnt' : 1 \n }\n });\n return;\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",
39 "|rendered" : "function (form)\n{\n _this.form= form;\n}\n"
41 "$ url" : "baseURL + '/Roo/item.php'",
42 "style" : "margin:10px;",
50 "xtype" : "TextField",
54 "name" : "item_number"
57 "fieldLabel" : "Description",
58 "xtype" : "TextField",
61 "name" : "item_descrip1"
64 "fieldLabel" : "Description (2)",
65 "xtype" : "TextField",
68 "name" : "item_descrip2"
77 "beforeselect" : "function (combo, record, index)\n{\n (function() { combo.showHide(); }).defer(100);\n}"
80 "triggerAction" : "all",
81 "fieldLabel" : "Type",
82 "displayField" : "fname",
83 "emptyText" : "Select Type",
84 "hiddenName" : "item_type",
85 "valueField" : "ftype",
88 "$ showHide" : "function() {\n\n var it = this.getValue();\n \n var options = [ \n 'item_itemcost_id_itemcost_curr_id',\n 'item_itemcost_id_itemcost_actcost',\n 'item_itemsite_id_itemsite_reorderlevel',\n 'item_itemsite_id_itemsite_leadtime',\n 'item_itemsite_id_itemsite_location_id',\n 'item_itemsite_id_itemsite_loccntrl',\n 'item_itemsite_id_itemsite_stocked',\n 'item_itemsite_id_itemsite_perishable',\n \n 'item_itemsite_id_itemsite_safetystock',\n 'item_itemsite_id_itemsite_controlmethod',\n 'item_itemsite_id_itemsite_plancode_id',\n 'item_itemsite_id_itemsite_costcat_id',\n 'item_itemsite_id_itemsite_active',\n 'item_itemsite_id_itemsite_sold'\n \n ];\n \n var r_req = [ \n 'item_listprice'\n ];\n \n var state = true;\n \n _this.standardCostFieldSet.show();\n _this.itemsiteFieldSet.show();\n _this.form.findField('_update_related').setValue(1);\n \n switch(it) {\n case 'K':\n state = false;\n\n _this.form.findField('item_listprice').allowBlank = false;\n _this.form.findField('item_listprice').actionMode = 'fieldEl';\n _this.form.findField('item_listprice').hideMode = 'display';\n _this.form.findField('item_listprice').show();\n \n break;\n \n case 'R': // refrence\n options = options.concat(r_req);\n state = false;\n _this.standardCostFieldSet.hide();\n break;\n \n case 'P': // purchased..\n options = options.concat(r_req);\n // must have\n break;\n }\n \n Roo.each(options, function(n) {\n var ff = _this.form.findField(n);\n ff.allowBlank = !state;\n ff.actionMode = 'fieldEl';\n ff.hideMode = 'display';\n state ? ff.show() : ff.hide(); \n \n });\n \n \n if(!state){\n _this.standardCostFieldSet.hide();\n _this.itemsiteFieldSet.hide();\n _this.form.findField('_update_related').setValue(0);\n }\n \n \n \n}\n",
93 "name" : "item_type_name",
94 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
97 "xtype" : "SimpleStore",
98 "$ data" : "[ \n [ 'P', \"Purchased (eg. a standard product)\"],\n [ 'R' , \"Reference (Non-Product)\"],\n [ 'K', \"Kit (made up of products)\"] \n]\n",
99 "$ fields" : "[ 'ftype', 'fname']",
100 "$ xns" : "Roo.data",
107 "triggerAction" : "all",
108 "fieldLabel" : "Class",
109 "forceSelection" : true,
110 "selectOnFocus" : true,
112 "displayField" : "classcode_code",
113 "emptyText" : "Select classcode",
114 "hiddenName" : "item_classcode_id",
116 "valueField" : "classcode_id",
117 "xtype" : "ComboBox",
118 "allowBlank" : false,
122 "$ xns" : "Roo.form",
123 "name" : "item_classcode_id_classcode_code",
124 "qtip" : "Select classcode",
126 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{classcode_code}</b> </div>",
127 "loadingText" : "Searching...",
131 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
135 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
136 "$ xns" : "Roo.data",
140 "$ url" : "baseURL + '/Roo/classcode.php'",
141 "xtype" : "HttpProxy",
143 "$ xns" : "Roo.data",
149 "xtype" : "JsonReader",
150 "$ xns" : "Roo.data",
151 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"classcode_code\",\"type\":\"string\"}]",
153 "totalProperty" : "total"
161 "triggerAction" : "all",
162 "fieldLabel" : "Invoice UOM",
163 "forceSelection" : true,
164 "selectOnFocus" : true,
166 "displayField" : "uom_descrip",
167 "emptyText" : "Select uom",
168 "hiddenName" : "item_inv_uom_id",
170 "valueField" : "uom_id",
171 "xtype" : "ComboBox",
172 "allowBlank" : false,
176 "$ xns" : "Roo.form",
177 "name" : "item_inv_uom_id_uom_descrip",
178 "qtip" : "Select classcode",
180 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
181 "loadingText" : "Searching...",
185 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
189 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
190 "$ xns" : "Roo.data",
194 "$ url" : "baseURL + '/Roo/uom.php'",
195 "xtype" : "HttpProxy",
197 "$ xns" : "Roo.data",
203 "xtype" : "JsonReader",
204 "$ xns" : "Roo.data",
205 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
207 "totalProperty" : "total"
215 "triggerAction" : "all",
216 "fieldLabel" : "Price UOM",
217 "forceSelection" : true,
218 "selectOnFocus" : true,
220 "displayField" : "uom_descrip",
221 "emptyText" : "Select uom",
222 "hiddenName" : "item_price_uom_id",
224 "valueField" : "uom_id",
225 "xtype" : "ComboBox",
226 "allowBlank" : false,
230 "$ xns" : "Roo.form",
231 "name" : "item_price_uom_id_uom_descrip",
232 "qtip" : "Select classcode",
234 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{uom_descrip}</b> </div>",
235 "loadingText" : "Searching...",
239 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
243 "$ sortInfo" : "{ direction : 'ASC', field: 'uom_name' }",
244 "$ xns" : "Roo.data",
248 "$ url" : "baseURL + '/Roo/uom.php'",
250 "xtype" : "HttpProxy",
251 "$ xns" : "Roo.data",
257 "xtype" : "JsonReader",
258 "$ xns" : "Roo.data",
259 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"uom_name\",\"type\":\"string\"},\n {\"name\":\"uom_descrip\",\"type\":\"string\"},\n]",
261 "totalProperty" : "total"
268 "fieldLabel" : "Weight",
269 "xtype" : "NumberField",
270 "allowBlank" : false,
271 "allowDecimals" : true,
272 "decimalPrecision" : 2,
274 "$ xns" : "Roo.form",
275 "name" : "item_prodweight"
278 "fieldLabel" : "Item comments",
279 "xtype" : "TextArea",
281 "$ xns" : "Roo.form",
282 "name" : "item_comments",
286 "fieldLabel" : "Item sold",
288 "xtype" : "Checkbox",
291 "$ xns" : "Roo.form",
295 "fieldLabel" : "Item active",
297 "xtype" : "Checkbox",
300 "$ xns" : "Roo.form",
301 "name" : "item_active"
305 "add" : "function (combo)\n{\n Pman.Dialog.XtupleProdcat.show({prodcat_id : 0});\n}",
306 "edit" : "function (combo, record)\n{\n var s = _this.form.findField('item_prodcat_id').getValue() * 1;\n if(s < 1){\n Roo.MessageBox.alert('Error','Please select a account assignment');\n return;\n }\n Pman.Dialog.XtupleProdcat.show({prodcat_id : s});\n}"
308 "alwaysQuery" : true,
310 "triggerAction" : "all",
311 "fieldLabel" : "Product Category",
312 "forceSelection" : true,
313 "selectOnFocus" : true,
315 "displayField" : "prodcat_code",
316 "emptyText" : "Select Category",
317 "hiddenName" : "item_prodcat_id",
319 "valueField" : "prodcat_id",
320 "xtype" : "ComboBox",
321 "allowBlank" : false,
325 "$ xns" : "Roo.form",
326 "name" : "item_prodcat_id_prodcat_code",
327 "qtip" : "Select prodcat",
329 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{prodcat_code}</b> </div>",
330 "loadingText" : "Searching...",
334 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
338 "$ xns" : "Roo.data",
339 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
343 "$ url" : "baseURL + '/Roo/prodcat.php'",
345 "xtype" : "HttpProxy",
346 "$ xns" : "Roo.data",
352 "xtype" : "JsonReader",
353 "$ xns" : "Roo.data",
354 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"prodcat_code\",\"type\":\"string\"}]",
356 "totalProperty" : "total"
363 "fieldLabel" : "Sales Account",
364 "xtype" : "DisplayField",
365 "$ xns" : "Roo.form",
366 "name" : "item_salesaccnt"
369 "fieldLabel" : "Item listprice",
370 "xtype" : "NumberField",
372 "$ xns" : "Roo.form",
373 "name" : "item_listprice"
377 "render" : "function (_self)\n{\n _this.standardCostFieldSet = _self;\n}"
379 "legend" : "Standard Cost",
380 "style" : "width:320px",
381 "xtype" : "FieldSet",
382 "$ xns" : "Roo.form",
386 "triggerAction" : "all",
387 "fieldLabel" : "Currency",
388 "forceSelection" : true,
389 "selectOnFocus" : true,
391 "displayField" : "curr_name",
392 "emptyText" : "Select Currency",
393 "hiddenName" : "item_itemcost_id_itemcost_curr_id",
395 "valueField" : "curr_id",
396 "xtype" : "ComboBox",
397 "allowBlank" : false,
401 "$ xns" : "Roo.form",
402 "name" : "curr_name",
403 "qtip" : "Select Currency",
404 "queryParam" : "query[curr_name]",
405 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{curr_name}</b> </div>",
406 "loadingText" : "Searching...",
410 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n \n}\n"
414 "$ sortInfo" : "{ direction : 'ASC', field: 'curr_symbol' }",
415 "$ xns" : "Roo.data",
419 "$ url" : "baseURL + '/Roo/curr_symbol.php'",
421 "xtype" : "HttpProxy",
422 "$ xns" : "Roo.data",
428 "xtype" : "JsonReader",
429 "$ xns" : "Roo.data",
430 "$ fields" : "[{\"name\":\"curr_id\",\"type\":\"int\"},\"curr_symbol\"]",
432 "totalProperty" : "total"
439 "fieldLabel" : "Value",
440 "xtype" : "NumberField",
441 "allowBlank" : false,
443 "$ xns" : "Roo.form",
444 "name" : "item_itemcost_id_itemcost_actcost"
452 "$ xns" : "Roo.form",
456 "render" : "function (_self)\n{\n _this.itemsiteFieldSet = _self;\n}"
458 "xtype" : "FieldSet",
459 "legend" : "Itemsite Settings",
460 "$ xns" : "Roo.form",
461 "String/Object/Function style" : "width:335px;",
462 "Number labelWidth" : 120,
465 "fieldLabel" : "Reorder Level",
466 "xtype" : "NumberField",
467 "allowBlank" : false,
469 "$ xns" : "Roo.form",
470 "name" : "item_itemsite_id_itemsite_reorderlevel"
473 "fieldLabel" : "Stock Safety Level",
474 "xtype" : "NumberField",
475 "allowBlank" : false,
477 "$ xns" : "Roo.form",
478 "name" : "item_itemsite_id_itemsite_safetystock"
481 "fieldLabel" : "Lead time (Days)",
482 "xtype" : "NumberField",
483 "allowBlank" : false,
485 "$ xns" : "Roo.form",
486 "name" : "item_itemsite_id_itemsite_leadtime"
490 "triggerAction" : "all",
491 "fieldLabel" : "Control Method",
492 "displayField" : "fname",
493 "hiddenName" : "item_itemsite_id_itemsite_controlmethod",
494 "valueField" : "ftype",
495 "xtype" : "ComboBox",
496 "allowBlank" : false,
499 "$ xns" : "Roo.form",
501 "name" : "item_itemsite_id_itemsite_controlmethod_name",
502 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{fname}</b> </div>",
505 "xtype" : "SimpleStore",
506 "$ data" : "[ \n [ 'N', \"None\"],\n [ 'R' , \"Regular\"]\n]\n",
507 "$ fields" : "[ 'ftype', 'fname']",
508 "$ xns" : "Roo.data",
515 "triggerAction" : "all",
516 "fieldLabel" : "Planner Code",
517 "forceSelection" : true,
518 "selectOnFocus" : true,
520 "displayField" : "plancode_name",
521 "emptyText" : "Select plancode",
522 "hiddenName" : "item_itemsite_id_itemsite_plancode_id",
524 "valueField" : "plancode_id",
525 "xtype" : "ComboBox",
526 "allowBlank" : false,
530 "$ xns" : "Roo.form",
531 "name" : "plancode_name",
532 "qtip" : "Select plancode",
534 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{plancode_name}</b> </div>",
535 "loadingText" : "Searching...",
539 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
543 "$ xns" : "Roo.data",
544 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
548 "$ url" : "baseURL + '/Roo/plancode.php'",
550 "xtype" : "HttpProxy",
551 "$ xns" : "Roo.data",
557 "xtype" : "JsonReader",
558 "$ xns" : "Roo.data",
559 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"plancode_code\",\"type\":\"string\"}]",
561 "totalProperty" : "total"
569 "triggerAction" : "all",
570 "fieldLabel" : "Costcat",
571 "forceSelection" : true,
572 "selectOnFocus" : true,
574 "displayField" : "costcat_code",
575 "emptyText" : "Select costcat",
576 "hiddenName" : "item_itemsite_id_itemsite_costcat_id",
578 "valueField" : "costcat_id",
579 "xtype" : "ComboBox",
580 "allowBlank" : false,
584 "$ xns" : "Roo.form",
585 "name" : "costcat_code",
586 "qtip" : "Select costcat",
588 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{costcat_code}</b> </div>",
589 "loadingText" : "Searching...",
593 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
597 "$ xns" : "Roo.data",
598 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
602 "$ url" : "baseURL + '/Roo/costcat.php'",
604 "xtype" : "HttpProxy",
605 "$ xns" : "Roo.data",
611 "xtype" : "JsonReader",
612 "$ xns" : "Roo.data",
613 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"costcat_code\",\"type\":\"string\"}]",
615 "totalProperty" : "total"
622 "fieldLabel" : "Active",
624 "xtype" : "Checkbox",
627 "$ xns" : "Roo.form",
628 "name" : "item_itemsite_id_itemsite_active"
631 "fieldLabel" : "Sold",
633 "xtype" : "Checkbox",
636 "$ xns" : "Roo.form",
637 "name" : "item_itemsite_id_itemsite_sold"
640 "fieldLabel" : "Stocked",
642 "xtype" : "Checkbox",
645 "$ xns" : "Roo.form",
646 "name" : "item_itemsite_id_itemsite_stocked"
649 "fieldLabel" : "Perishable",
651 "xtype" : "Checkbox",
654 "$ xns" : "Roo.form",
655 "name" : "item_itemsite_id_itemsite_perishable"
658 "fieldLabel" : "Multi Location",
660 "xtype" : "Checkbox",
663 "$ xns" : "Roo.form",
664 "name" : "item_itemsite_id_itemsite_loccntrl"
668 "triggerAction" : "all",
669 "fieldLabel" : "Default Location",
670 "forceSelection" : true,
671 "selectOnFocus" : true,
673 "displayField" : "location_name",
674 "emptyText" : "Default Location",
675 "hiddenName" : "item_itemsite_id_itemsite_location_id",
677 "valueField" : "location_id",
678 "xtype" : "ComboBox",
679 "allowBlank" : false,
683 "$ xns" : "Roo.form",
684 "name" : "location_name",
685 "qtip" : "Select terms",
686 "queryParam" : "query[location_name]",
687 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{location_name}</b> </div>",
688 "loadingText" : "Searching...",
692 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n o.params.location_netable = 1;\n o.params._notinternalcompany = 1;\n o.params.location_restrict = 0;\n}\n"
696 "$ sortInfo" : "{ direction : 'ASC', field: 'location_name' }",
697 "$ xns" : "Roo.data",
701 "$ url" : "baseURL + '/Roo/location.php'",
702 "xtype" : "HttpProxy",
704 "$ xns" : "Roo.data",
708 "id" : "location_id",
710 "xtype" : "JsonReader",
711 "$ fields" : "[{\"name\":\"location_id\",\"type\":\"int\"},\"location_name\"]",
712 "$ xns" : "Roo.data",
714 "totalProperty" : "total"
727 "$ xns" : "Roo.form",
734 "$ xns" : "Roo.form",
735 "name" : "_update_related"
743 "|activate" : "function() {\n _this.partspanel = this;\n \n try { if (MODULE.isBuilder) {\n return;\n } } catch(e) { }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding parts\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n var type = _this.form.findField('item_type').getValue();\n \n if(!type.length || type != 'K'){\n Roo.MessageBox.alert(\"Error\", \"Can't add parts to non-kit item\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n if (_this.partsgrid) {\n _this.partsgrid.footer.onClick('first');\n \n }\n}"
748 "title" : "Item Parts",
749 "xtype" : "GridPanel",
750 "fitContainer" : true,
752 "tableName" : "bomitem",
756 "beforeedit" : "function (e)\n{\n if(e.field != 'bomitem_qtyper'){\n return false;\n }\n \n}",
757 "|render" : "function() \n{\n _this.partsgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.partspanel.active) {\n this.footer.onClick('first');\n }\n}",
758 "afteredit" : "function (e)\n{\n if(e.originalValue == e.value){\n return false;\n }\n \n \n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/bomitem.php',\n mask : 'Saving',\n params : {\n bomitem_id : e.record.data.bomitem_id,\n bomitem_qtyper : e.value\n },\n success : function() {\n e.record.set('bomitem_qtyper', e.value);\n }\n \n });\n \n \n \n \n}"
760 "autoExpandColumn" : "bomitem_item_id_item_descrip1",
761 "xtype" : "EditorGrid",
764 "$ xns" : "Roo.grid",
770 "* prop" : "toolbar",
774 "render" : "function (_self)\n{\n _this.partsBox = _self;\n}",
775 "select" : "function (combo, record, index)\n{\n var item_id = _this.form.findField('item_id').getValue() * 1;\n \n if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || item_id < 1){\n return;\n }\n \n var err = false;\n\n _this.partsgrid.ds.each(function(d){\n if(record.data.item_id == d.data.bomitem_item_id){\n err = true;\n }\n });\n\n if(err){\n Roo.MessageBox.alert('Error', record.data.item_number + ' already exists!');\n _this.partsBox.reset();\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/bomitem.php',\n method : 'POST',\n params : {\n bomitem_parent_item_id : item_id,\n bomitem_item_id : record.data.item_id\n }, \n success : function(res) {\n _this.partsBox.reset();\n _this.partsgrid.footer.onClick('first');\n }\n }); \n}"
777 "alwaysQuery" : true,
778 "triggerAction" : "all",
779 "fieldLabel" : "Item",
780 "forceSelection" : true,
781 "selectOnFocus" : true,
783 "displayField" : "item_number",
784 "emptyText" : "Select item",
787 "xtype" : "ComboBox",
792 "$ xns" : "Roo.bootstrap",
793 "qtip" : "Select item",
794 "queryParam" : "query[number_or_name]",
795 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{item_number}</b> </div>",
796 "loadingText" : "Searching...",
800 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n \n o.params.item_active = 1;\n o.params['!item_type'] = 'K';\n}\n"
804 "$ sortInfo" : "{ direction : 'ASC', field: 'item_number' }",
805 "$ xns" : "Roo.data",
809 "$ url" : "baseURL + '/Roo/item.php'",
810 "xtype" : "HttpProxy",
812 "$ xns" : "Roo.data",
818 "xtype" : "JsonReader",
819 "$ fields" : "[\n {\"name\":\"id\",\"type\":\"int\"},\n {\"name\":\"item_number\",\"type\":\"string\"}\n]",
820 "$ xns" : "Roo.data",
822 "totalProperty" : "total"
830 "$ xns" : "Roo.Toolbar"
834 "|click" : "function ()\n{\n var sel = _this.partsgrid.getSelectionModel().getSelectedCell();\n \n if(!sel || !sel.length){\n Roo.MessageBox.alert(\"Error\", \"Please select a item from below list\");\n return;\n }\n \n var d = _this.partsgrid.ds.getAt(sel[0]); \n \n if(d.data.bomitem_id * 1 < 1){\n Roo.MessageBox.alert(\"Error\", \"Invaild selection\");\n return;\n }\n \n new Pman.Request({\n url : baseURL + '/Roo/bomitem.php',\n method : 'POST',\n params : {\n _delete : d.data.bomitem_id\n }, \n success : function(res) {\n _this.partsgrid.footer.onClick('first');\n }\n }); \n \n}"
838 "cls" : "x-btn-text-icon",
839 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
846 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n o.params.bom_parent_item_id = id;\n}"
850 "$ sortInfo" : "{ field : 'bomitem_item_id_item_name', direction: 'ASC' }",
851 "$ xns" : "Roo.data",
852 "* prop" : "dataSource",
855 "$ url" : "baseURL + '/Roo/bomitem.php'",
857 "xtype" : "HttpProxy",
858 "$ xns" : "Roo.data",
864 "xtype" : "JsonReader",
865 "$ fields" : "[\n {\n 'name': 'bomitem_id',\n 'type': 'int'\n }\n]",
866 "$ xns" : "Roo.data",
868 "totalProperty" : "total"
874 "xtype" : "PagingToolbar",
875 "emptyMsg" : "Nothing found",
877 "displayMsg" : "Displaying parts {0} - {1} of {2}",
878 "displayInfo" : true,
882 "xtype" : "ColumnModel",
885 "$ renderer" : "function(v) { return String.format('{0}', v); }",
886 "$ xns" : "Roo.grid",
887 "* prop" : "colModel[]",
888 "dataIndex" : "bomitem_item_id_item_number"
891 "xtype" : "ColumnModel",
893 "header" : "Description",
894 "$ renderer" : "function(v) { return String.format('{0}', v); }",
895 "$ xns" : "Roo.grid",
896 "* prop" : "colModel[]",
897 "dataIndex" : "bomitem_item_id_item_descrip1"
900 "xtype" : "ColumnModel",
901 "String align" : "right",
904 "$ renderer" : "function(v) { return String.format('{0}', v); }",
905 "$ xns" : "Roo.grid",
906 "* prop" : "colModel[]",
907 "dataIndex" : "bomitem_qtyper",
910 "xtype" : "GridEditor",
911 "$ xns" : "Roo.grid",
915 "Boolean allowBlank" : false,
916 "String cls" : "align-right",
917 "xtype" : "NumberField",
918 "Number decimalPrecision" : 0,
919 "$ xns" : "Roo.form",
921 "Number minValue" : 0
933 "|activate" : "function() {\n _this.panel = this;\n \n try { if (MODULE.isBuilder) {\n return;\n } } catch(e) { }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding image\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n if (_this.grid) {\n _this.grid.footer.onClick('first');\n \n }\n}"
938 "title" : "Reference Files",
939 "xtype" : "GridPanel",
940 "fitContainer" : true,
942 "tableName" : "Images",
946 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n \n var s = _self.getDataSource().getAt(rowIndex);\n new Pman.Download({\n url : baseURL + '/Images/Download/' + s.data.id\n });\n \n}",
947 "|render" : "function() { \n _this.grid = this; \n\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}"
949 "autoExpandColumn" : "id",
952 "$ xns" : "Roo.grid",
957 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue();\n \n if(id * 1 < 1){\n return false;\n }\n \n o.params.onid = id;\n o.params.ontable = 'item';\n \n}"
961 "$ sortInfo" : "{ field: 'created' , direction: 'DESC' }",
962 "$ xns" : "Roo.data",
963 "* prop" : "dataSource",
968 "xtype" : "JsonReader",
969 "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'filename',\n 'type': 'string'\n },\n {\n 'name': 'ontable',\n 'type': 'string'\n },\n {\n 'name': 'onid',\n 'type': 'int'\n },\n {\n 'name': 'mimetype',\n 'type': 'string'\n },\n {\n 'name': 'width',\n 'type': 'int'\n },\n {\n 'name': 'height',\n 'type': 'int'\n },\n {\n 'name': 'filesize',\n 'type': 'int'\n },\n {\n 'name': 'displayorder',\n 'type': 'int'\n },\n {\n 'name': 'language',\n 'type': 'string'\n },\n {\n 'name': 'parent_image_id',\n 'type': 'int'\n },\n {\n 'name': 'created',\n 'type': 'date',\n 'dateFormat' : 'Y-m-d H:i:s'\n },\n {\n 'name': 'imgtype',\n 'type': 'string'\n },\n {\n 'name': 'linkurl',\n 'type': 'string'\n },\n {\n 'name': 'descript',\n 'type': 'string'\n },\n {\n 'name': 'title',\n 'type': 'string'\n }\n]",
970 "$ xns" : "Roo.data",
972 "totalProperty" : "total"
975 "$ url" : "baseURL + '/Roo/Images.php'",
977 "xtype" : "HttpProxy",
978 "$ xns" : "Roo.data",
985 "xtype" : "PagingToolbar",
986 "emptyMsg" : "No Images found",
988 "displayInfo" : true,
989 "displayMsg" : "Displaying Images {0} - {1} of {2}",
995 "* prop" : "toolbar",
999 "|click" : "function()\n{\n Pman.Dialog.Image.show({\n id : 0, \n ontable: 'item',\n onid: _this.form.findField('item_id').getValue() * 1,\n imgtype : ''\n }, function(data){\n if (!data) { return; } \n _this.grid.footer.onClick('first');\n }); \n\n} "
1003 "cls" : "x-btn-text-icon",
1004 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1005 "$ xns" : "Roo.Toolbar"
1009 "|click" : "function()\n{\n Pman.genericDelete(_this, 'Images'); \n}\n "
1013 "cls" : "x-btn-text-icon",
1014 "$ icon" : "rootURL + '/Pman/templates/images/trash.gif'",
1015 "$ xns" : "Roo.Toolbar"
1020 "xtype" : "ColumnModel",
1022 "header" : "Created",
1024 "$ renderer" : "function(v,x,r) {\n return String.format('{0}<br/><i>{1}</i><br/>{2}<br/><i>{3}x{4}</i>',\n v.format('d/M/Y'), r.data.mimetype, r.data.filename,\n r.data.width, r.data.height\n ); \n}\n ",
1025 "$ xns" : "Roo.grid",
1026 "* prop" : "colModel[]",
1027 "dataIndex" : "created"
1030 "xtype" : "ColumnModel",
1033 "$ renderer" : "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" height=\"100\">', baseURL, v, r.data.filename); }",
1034 "$ xns" : "Roo.grid",
1035 "* prop" : "colModel[]",
1044 "|activate" : "function() {\n _this.lpanel = this;\n \n try { if (MODULE.isBuilder) {\n return;\n } } catch(e) { }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding image\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n if (_this.lgrid) {\n _this.lgrid.footer.onClick('first');\n \n }\n}"
1046 "background" : true,
1047 "region" : "center",
1048 "fitToframe" : true,
1049 "title" : "Price List",
1050 "xtype" : "GridPanel",
1051 "fitContainer" : true,
1053 "tableName" : "ipshead",
1057 "beforeedit" : "function (e)\n{\n if(e.field != 'ipshead_ipsitem_price'){\n return false;\n }\n \n}",
1058 "|render" : "function() \n{\n _this.lgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.lpanel.active) {\n this.footer.onClick('first');\n }\n}",
1059 "afteredit" : "function (e)\n{\n if(e.originalValue == e.value){\n return false;\n }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n new Pman.Request({\n method : 'POST',\n url : baseURL + '/Roo/ipsiteminfo',\n mask : 'Saving',\n params : {\n ipsitem_ipshead_id : e.record.data.ipshead_id,\n ipsitem_item_id : id,\n ipsitem_price : e.record.data.ipshead_ipsitem_price,\n ipsitem_id : e.record.data.ipshead_ipsitem_id\n }\n \n });\n \n \n \n \n}"
1061 "autoExpandColumn" : "ipshead_descrip",
1062 "xtype" : "EditorGrid",
1065 "$ xns" : "Roo.grid",
1070 "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if(id < 1){\n return false;\n }\n \n o.params._with_item = id;\n}"
1073 "remoteSort" : true,
1074 "$ sortInfo" : "{ field : 'ipshead_id', direction: 'ASC' }",
1075 "$ xns" : "Roo.data",
1076 "* prop" : "dataSource",
1079 "$ url" : "baseURL + '/Roo/ipshead.php'",
1080 "xtype" : "HttpProxy",
1082 "$ xns" : "Roo.data",
1086 "id" : "ipshead_id",
1088 "xtype" : "JsonReader",
1089 "$ fields" : "[\n {\n 'name': 'ipshead_id',\n 'type': 'int'\n },\n {\n 'name': 'ipshead_name',\n 'type': 'string'\n }\n]",
1090 "$ xns" : "Roo.data",
1091 "* prop" : "reader",
1092 "totalProperty" : "total"
1098 "xtype" : "PagingToolbar",
1099 "emptyMsg" : "Nothing found",
1101 "displayMsg" : "Displaying records {0} - {1} of {2}",
1102 "displayInfo" : true,
1106 "xtype" : "ColumnModel",
1109 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1110 "$ xns" : "Roo.grid",
1111 "* prop" : "colModel[]",
1112 "dataIndex" : "ipshead_name"
1115 "xtype" : "ColumnModel",
1116 "header" : "Description",
1118 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1119 "$ xns" : "Roo.grid",
1120 "* prop" : "colModel[]",
1121 "dataIndex" : "ipshead_descrip"
1124 "xtype" : "ColumnModel",
1125 "header" : "Currency",
1127 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1128 "$ xns" : "Roo.grid",
1129 "* prop" : "colModel[]",
1130 "dataIndex" : "ipshead_curr_id_curr_name"
1134 "xtype" : "ColumnModel",
1137 "$ renderer" : "function(v) { return String.format('{0}', Roo.util.Format.number(v*1,2)); }",
1138 "$ xns" : "Roo.grid",
1139 "* prop" : "colModel[]",
1140 "dataIndex" : "ipshead_ipsitem_price",
1143 "xtype" : "GridEditor",
1144 "$ xns" : "Roo.grid",
1145 "* prop" : "editor",
1148 "xtype" : "NumberField",
1149 "cls" : "align-right",
1150 "decimalPrecision" : 2,
1151 "$ xns" : "Roo.form",
1164 "|activate" : "function() {\n _this.itemsrcpanel = this;\n \n try { if (MODULE.isBuilder) {\n return;\n } } catch(e) { }\n \n var id = _this.form.findField('item_id').getValue() * 1;\n if (id < 1) {\n Roo.MessageBox.alert(\"Save First\", \"Save the item first, before adding suppliers\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n var type = _this.form.findField('item_type').getValue();\n \n if(type == 'K'){\n Roo.MessageBox.alert(\"Error\", \"Can't add suppliers to kit item\");\n _this.dialog.layout.getRegion('center').showPanel(0);\n return;\n }\n \n if (_this.itemsrcgrid) {\n _this.itemsrcgrid.footer.onClick('first');\n }\n}"
1166 "background" : true,
1167 "region" : "center",
1168 "fitToframe" : true,
1169 "title" : "Suppliers",
1170 "xtype" : "GridPanel",
1171 "fitContainer" : true,
1173 "tableName" : "itemsrc",
1177 "|rowdblclick" : "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n",
1178 "|render" : "function() \n{\n _this.itemsrcgrid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n \n}",
1179 "afteredit" : "function (e)\n{\n e.record.commit();\n}"
1181 "autoExpandColumn" : "itemsrc_comments",
1182 "xtype" : "EditorGrid",
1185 "$ xns" : "Roo.grid",
1190 "update" : "function (_self, record, operation)\n{\n Roo.log(operation);\n Roo.log(record);\n \n if (operation != 'commit') {\n return;\n }\n if (record.data.itemsrc_vend_id * 1 < 1) {\n return; // do not save.\n }\n if (record.data.itemsrc_id * 1 < 0) {\n return; // do not save. -- updating at present...\n }\n \n var p = Roo.apply({}, record.data);\n record.set('itemsrc_id', -1); \n \n new Pman.Request({\n url : baseURL + '/Roo/Itemsrc',\n params : p,\n method : 'POST',\n success: function(res) {\n if (record.data.itemsrc_id *1 < 1) { \n record.set('itemsrc_id', res.data.itemsrc_id);\n }\n }\n });\n \n \n}",
1191 "beforeload" : "function (_self, o)\n{\n \n var id = 1 * _this.form.findField('item_id').getValue();\n if (!id) {\n this.removeAll();\n return false;\n }\n o.params.itemsrc_item_id = id;\n}"
1194 "remoteSort" : true,
1195 "$ sortInfo" : "{ field : 'itemsrc_vend_id_vend_name', direction: 'ASC' }",
1196 "$ xns" : "Roo.data",
1197 "* prop" : "dataSource",
1200 "$ url" : "baseURL + '/Roo/itemsrc.php'",
1202 "xtype" : "HttpProxy",
1203 "$ xns" : "Roo.data",
1209 "xtype" : "JsonReader",
1210 "$ xns" : "Roo.data",
1211 "$ fields" : "[\n {\n 'name': 'itemsrc_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_item_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_item_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_id',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_vend_item_number',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_vend_item_descrip',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_comments',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_vend_uom',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_invvendoruomratio',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_minordqty',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_multordqty',\n 'type': 'float'\n },\n {\n 'name': 'itemsrc_leadtime',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_ranking',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_active',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_manuf_name',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_manuf_item_number',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_manuf_item_descrip',\n 'type': 'string'\n },\n {\n 'name': 'itemsrc_default',\n 'type': 'int'\n },\n {\n 'name': 'itemsrc_upccode',\n 'type': 'string'\n }\n]",
1212 "* prop" : "reader",
1213 "totalProperty" : "total"
1219 "xtype" : "PagingToolbar",
1220 "emptyMsg" : "No itemsrc found",
1222 "displayInfo" : true,
1223 "displayMsg" : "Displaying itemsrc{0} - {1} of {2}",
1227 "xtype" : "Toolbar",
1229 "* prop" : "toolbar",
1233 "|click" : "function()\n{\n \n Roo.log(\"add presed\");\n \n // work out last \n var grid = _this.itemsrcgrid;\n \n // uses form defaults or last row value.\n var nr = grid.ds.reader.newRow({\n itemsrc_id : 0,\n itemsrc_item_id : _this.form.findField('item_id').getValue(),\n\n itemsrc_vend_id : 0,\n itemsrc_vend_item_number : '',\n itemsrc_vend_item_descrip : '',\n itemsrc_comments : '',\n itemsrc_vend_uom : 'EA',\n itemsrc_invvendoruomratio : 1.0,\n itemsrc_minordqty : 0,\n itemsrc_multordqty : 0,\n itemsrc_leadtime : 30,\n itemsrc_ranking : 0,\n itemsrc_active : true,\n itemsrc_manuf_name : '',\n itemsrc_manuf_item_number : '',\n itemsrc_manuf_item_descrip: '',\n itemsrc_default : true,\n itemsrc_upccode : ''\n \n });\n grid.stopEditing();\n grid.ds.insert(0, nr); \n grid.startEditing(0, 0); // type..\n\n}\n \n"
1237 "cls" : "x-btn-text-icon",
1238 "$ icon" : "Roo.rootURL + 'images/default/dd/drop-add.gif'",
1239 "$ xns" : "Roo.Toolbar"
1244 "xtype" : "ColumnModel",
1245 "header" : "Vendor",
1247 "$ renderer" : "function(v,x,r) { return String.format('{0}', r.data.itemsrc_vend_id_vend_name); }",
1248 "$ xns" : "Roo.grid",
1249 "* prop" : "colModel[]",
1250 "dataIndex" : "itemsrc_vend_id",
1253 "xtype" : "GridEditor",
1254 "$ xns" : "Roo.grid",
1255 "* prop" : "editor",
1259 "triggerAction" : "all",
1260 "forceSelection" : true,
1261 "selectOnFocus" : true,
1263 "displayField" : "vend_name",
1264 "emptyText" : "Select Vendor",
1265 "hiddenName" : "itemsrc_vend_id",
1267 "valueField" : "vend_id",
1268 "xtype" : "ComboBox",
1269 "allowBlank" : false,
1273 "$ xns" : "Roo.form",
1275 "name" : "itemsrc_vend_id_vend_name",
1276 "qtip" : "Select vendinfo",
1277 "queryParam" : "q[search]",
1278 "tpl" : "<div class=\"x-grid-cell-text x-btn button\"><b>{vend_name}</b> </div>",
1279 "loadingText" : "Searching...",
1283 "|beforeload" : "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
1286 "remoteSort" : true,
1287 "$ xns" : "Roo.data",
1288 "$ sortInfo" : "{ direction : 'ASC', field: 'id' }",
1292 "$ url" : "baseURL + '/Roo/vendinfo.php'",
1294 "xtype" : "HttpProxy",
1295 "$ xns" : "Roo.data",
1301 "xtype" : "JsonReader",
1302 "$ xns" : "Roo.data",
1303 "$ fields" : "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"vend_name\",\"type\":\"string\"}]",
1304 "* prop" : "reader",
1305 "totalProperty" : "total"
1316 "xtype" : "ColumnModel",
1317 "header" : "Vendor Ref#",
1319 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1320 "$ xns" : "Roo.grid",
1321 "* prop" : "colModel[]",
1322 "dataIndex" : "itemsrc_vend_item_number",
1325 "xtype" : "GridEditor",
1326 "$ xns" : "Roo.grid",
1327 "* prop" : "editor",
1330 "xtype" : "TextField",
1331 "$ xns" : "Roo.form",
1339 "xtype" : "ColumnModel",
1340 "header" : "Comments",
1342 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1343 "$ xns" : "Roo.grid",
1344 "* prop" : "colModel[]",
1345 "dataIndex" : "itemsrc_comments",
1348 "xtype" : "GridEditor",
1349 "$ xns" : "Roo.grid",
1350 "* prop" : "editor",
1353 "xtype" : "TextField",
1354 "$ xns" : "Roo.form",
1362 "xtype" : "ColumnModel",
1365 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1366 "$ xns" : "Roo.grid",
1367 "* prop" : "colModel[]",
1368 "dataIndex" : "itemsrc_vend_uom"
1372 "xtype" : "ColumnModel",
1373 "header" : "Min Qty",
1375 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1376 "$ xns" : "Roo.grid",
1377 "* prop" : "colModel[]",
1378 "dataIndex" : "itemsrc_minordqty",
1381 "xtype" : "GridEditor",
1382 "$ xns" : "Roo.grid",
1383 "* prop" : "editor",
1387 "xtype" : "NumberField",
1388 "decimalPrecision" : 0,
1389 "$ xns" : "Roo.form",
1398 "xtype" : "ColumnModel",
1399 "header" : "Lead time",
1401 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1402 "$ xns" : "Roo.grid",
1403 "* prop" : "colModel[]",
1404 "dataIndex" : "itemsrc_leadtime",
1407 "xtype" : "GridEditor",
1408 "$ xns" : "Roo.grid",
1409 "* prop" : "editor",
1413 "xtype" : "NumberField",
1414 "decimalPrecision" : 0,
1415 "$ xns" : "Roo.form",
1423 "xtype" : "ColumnModel",
1424 "header" : "Active",
1426 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1427 "$ xns" : "Roo.grid",
1428 "* prop" : "colModel[]",
1429 "dataIndex" : "itemsrc_active"
1437 "|activate" : "function() {\n _this.hpanel = this;\n if (_this.hgrid) {\n _this.hgrid.footer.onClick('first');\n }\n}"
1439 "background" : true,
1440 "region" : "center",
1441 "fitToframe" : true,
1442 "title" : "History",
1443 "xtype" : "GridPanel",
1444 "fitContainer" : true,
1446 "tableName" : "events",
1450 "|render" : "function() \n{\n _this.hgrid = this; \n if (_this.hpanel.active) {\n this.footer.onClick('first');\n }\n}"
1452 "autoExpandColumn" : "remarks",
1455 "$ xns" : "Roo.grid",
1460 "beforeload" : "function (_self, options)\n{\n options.params = options.params || {};\n \n options.params.on_table = 'item';\n options.params.on_id = _this.form.findField('item_id').getValue();\n}"
1463 "remoteSort" : true,
1464 "$ sortInfo" : "{ field : 'event_when', direction: 'DESC' }",
1465 "$ xns" : "Roo.data",
1466 "* prop" : "dataSource",
1469 "$ url" : "baseURL + '/Roo/events.php'",
1470 "xtype" : "HttpProxy",
1472 "$ xns" : "Roo.data",
1478 "xtype" : "JsonReader",
1479 "$ fields" : "[\n {\n 'name': 'event_when',\n 'type': 'date'\n },\n {\n 'name': 'action',\n 'type': 'string'\n },\n {\n 'name': 'ipaddr',\n 'type': 'string'\n },\n {\n 'name': 'person_id_name',\n 'type': 'string'\n },\n {\n 'name': 'remarks',\n 'type': 'string'\n }\n]",
1480 "$ xns" : "Roo.data",
1481 "* prop" : "reader",
1482 "totalProperty" : "total"
1488 "xtype" : "PagingToolbar",
1489 "emptyMsg" : "No Events found",
1491 "displayMsg" : "Displaying events{0} - {1} of {2}",
1492 "displayInfo" : true,
1496 "xtype" : "ColumnModel",
1497 "header" : "Changed",
1499 "$ renderer" : "function(v) { return String.format('{0}', v ? v.format('d/M/Y H:i:s') : ''); }",
1500 "$ xns" : "Roo.grid",
1501 "* prop" : "colModel[]",
1502 "dataIndex" : "event_when"
1505 "xtype" : "ColumnModel",
1506 "header" : "Action",
1508 "$ renderer" : "function(v,x,r) { return String.format('{0} - {1}', v, r.data.on_table); }",
1509 "$ xns" : "Roo.grid",
1510 "* prop" : "colModel[]",
1511 "dataIndex" : "action"
1514 "xtype" : "ColumnModel",
1515 "header" : "IP Address",
1517 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1518 "$ xns" : "Roo.grid",
1519 "* prop" : "colModel[]",
1520 "dataIndex" : "ipaddr"
1523 "xtype" : "ColumnModel",
1526 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1527 "$ xns" : "Roo.grid",
1528 "* prop" : "colModel[]",
1529 "dataIndex" : "person_id_name"
1532 "xtype" : "ColumnModel",
1535 "$ renderer" : "function(v) { return String.format('{0}', v); }",
1536 "$ xns" : "Roo.grid",
1537 "* prop" : "colModel[]",
1538 "dataIndex" : "remarks"
1546 "click" : "function (_self, e)\n{\n _this.dialog.hide();\n}"
1551 "* prop" : "buttons[]"
1555 "render" : "function (_self)\n{\n _this.saveBtn = this;\n}",
1556 "click" : "function (_self, e)\n{\n // do some checks?\n \n \n // _this.dialog.el.mask(\"Saving\");\n _this.form.doAction(\"submit\");\n\n}"
1561 "* prop" : "buttons[]"