1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.XtupleMetric = new Roo.XComponent({
6 part : ["Xtuple","Metric"],
7 order : '900-Pman.Tab.XtupleMetric',
9 parent : 'Pman.Tab.Admin',
10 name : "unnamed module",
21 activate : function() {
24 _this.grid.footer.onClick('first');
41 if (_this.panel.active) {
42 this.footer.onClick('first');
45 afteredit : function (e)
47 if(e.originalValue == e.value || !e.value.length){
54 autoExpandColumn : 'metric_value',
61 beforeload : function (_self, o){
62 o.params = o.params || {};
64 var s = _this.searchBox.getValue();
70 o.params['search[name]'] = s;
72 update : function (_self, record, operation)
74 if (operation != Roo.data.Record.COMMIT) {
78 if (!record.data.metric_name.length || !record.data.metric_value.length) {
83 url : baseURL + '/Roo/Metric',
86 success : function(res) {
87 _this.grid.footer.onClick('refresh');
94 sortInfo : { field : 'metric_name', direction: 'ASC' },
100 url : baseURL + '/Xtuple/Roo/Metric.php'
107 totalProperty : 'total',
114 'name': 'metric_name',
118 'name': 'metric_value',
122 'name': 'metric_module',
136 specialkey : function (_self, e)
138 _this.grid.footer.onClick('first');
140 render : function (_self)
142 _this.searchBox = _self;
150 click : function (_self, e)
152 _this.grid.footer.onClick('first');
156 icon : rootURL + '/Pman/templates/images/search.gif'
162 click : function (_self, e)
164 _this.searchBox.setValue('');
165 _this.grid.footer.onClick('first');
\r
169 icon : rootURL + '/Pman/templates/images/edit-clear.gif'
182 var nr = _this.grid.ds.reader.newRow({
189 _this.grid.stopEditing();
190 _this.grid.ds.insert(0, nr);
191 _this.grid.startEditing(0, 0);
194 cls : 'x-btn-text-icon',
196 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
205 var sel = _this.invgrid.getSelectionModel().getSelected();
207 Roo.MessageBox.alert("Error", "Select a invoice");
210 // check current status of shipment..
213 // cobmisc_id : sel.data.cobmisc_id,
216 if (sel.data.cobmisc_id * 1) {
217 params.cobmisc_id = sel.data.cobmisc_id * 1 ;
219 if (sel.data.cobmisc_invchead_id_invchead_id * 1) {
220 params.invchead_id = sel.data.cobmisc_invchead_id_invchead_id * 1;
223 Roo.MessageBox.confirm("Are you sure", "Are you sure you want to VOID that invoice?",
230 url : baseURL + '/Roo/cobmisc',
233 success : function() {
234 _this.invgrid.ds.load({});
245 cls : 'x-btn-text-icon',
247 icon : rootURL + '/Pman/templates/images/trash.gif'
252 xtype: 'PagingToolbar',
255 emptyMsg : "No Metric found",
260 xtype: 'ColumnModel',
262 dataIndex : 'metric_name',
265 renderer : function(v) { return String.format('{0}', v); },
277 xtype: 'ColumnModel',
279 dataIndex : 'metric_value',
282 renderer : function(v) { return String.format('{0}', v); },
294 xtype: 'ColumnModel',
296 dataIndex : 'metric_module',
299 renderer : function(v) { return String.format('{0}', v); },