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'
204 var cs = _this.grid.getSelectionModel().getSelectedCell();
207 Roo.MessageBox.alert("Error", "Select a cell");
210 _this.grid.stopEditing();
212 var r = _this.grid.ds.getAt(cs[0]);
214 Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete this metric?", function (v){
220 url : baseURL + '/Roo/Metric',
225 success : function(res) {
226 _this.grid.footer.onClick('refresh');
232 cls : 'x-btn-text-icon',
234 icon : rootURL + '/Pman/templates/images/trash.gif'
239 xtype: 'PagingToolbar',
242 emptyMsg : "No Metric found",
247 xtype: 'ColumnModel',
249 dataIndex : 'metric_name',
252 renderer : function(v) { return String.format('{0}', v); },
264 xtype: 'ColumnModel',
266 dataIndex : 'metric_value',
269 renderer : function(v) { return String.format('{0}', v); },
281 xtype: 'ColumnModel',
283 dataIndex : 'metric_module',
286 renderer : function(v) { return String.format('{0}', v); },