1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.XtuplePurchasesVendors = new Roo.XComponent({
6 part : ["Xtuple","PurchasesVendors"],
7 order : '300-Pman.Tab.XtuplePurchasesVendors',
9 parent : 'Pman.Tab.XtuplePurchases',
10 name : "unnamed module",
18 xtype: 'NestedLayoutPanel',
26 xtype: 'BorderLayout',
33 activate : function() {
36 _this.grid.footer.onClick('first');
44 tableName : 'vendinfo',
53 //_this.dialog = Pman.Dialog.FILL_IN
54 if (_this.panel.active) {
55 this.footer.onClick('first');
58 rowdblclick : function (_self, rowIndex, e)
60 var s = _this.grid.ds.getAt(rowIndex);
61 if(s.data.vend_id * 1 < 1){
62 Roo.MessageBox.alert("Error", "Select a row");
65 Pman.Dialog.XtupleVendorEdit.show(s.data, function() {
66 _this.grid.footer.onClick('first');
70 autoExpandColumn : 'vend_name',
73 xtype: 'RowSelectionModel',
81 beforeload : function (_self, options)
84 if (! _this.searchBox) {
85 // not rendered yet...
89 options.params = options.params || {};
90 options.params._with_char = 1;
91 options.params['search[name]'] = _this.searchBox.getValue();
93 if (!_this.active.pressed) {
94 options.params.vend_active = 1;
99 sortInfo : { field : 'vend_name', direction: 'ASC' },
104 url : baseURL + '/Roo/Vendinfo.php'
111 totalProperty : 'total',
125 xtype: 'PagingToolbar',
128 displayMsg : "Displaying vendinfo{0} - {1} of {2}",
129 emptyMsg : "No vendinfo found",
145 render : function (_self)
147 _this.searchBox = _self;
149 specialkey : function (_self, e)
151 _this.grid.footer.onClick('first');
159 click : function (_self, e)
161 _this.grid.footer.onClick('first');
165 icon : rootURL + '/Pman/templates/images/search.gif'
171 click : function (_self, e)
173 _this.searchBox.setValue('');
176 _this.grid.footer.onClick('first');
180 icon : rootURL + '/Pman/templates/images/edit-clear.gif'
190 toggle : function (_self, pressed)
193 this.setText(pressed ? "Hide Inactive" : "Show Inactive");
194 (function() { _this.grid.footer.onClick('first'); }).defer(100);
196 render : function (_self)
198 _this.active = _self;
202 text : "Show Inactive"
215 Pman.Dialog.XtupleVendorEdit.show( { id : 0 } , function() {
216 _this.grid.footer.onClick('first');
220 cls : 'x-btn-text-icon',
222 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
230 var s = _this.grid.getSelectionModel().getSelected();
232 if(!s || s.data.vend_id * 1 < 1){
233 Roo.MessageBox.alert('Error', 'Please select a row');
237 Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete that?",
244 url: baseURL+ '/Roo/vendinfo',
246 _delete : s.data.vend_id
248 success : function() {
249 _this.grid.footer.onClick('refresh');
255 cls : 'x-btn-text-icon',
257 icon : rootURL + '/Pman/templates/images/trash.gif'
263 click : function (_self, e)
265 Pman.Dialog.Image.show(
267 _url : baseURL+'/Xtuple/Import/Vendors'
271 _this.grid.footer.onClick('first');
272 Roo.MessageBox.alert("Notice", "DONE");
273 // Roo.MessageBox.alert("Notice", msg.join("\n"));
279 text : "Upload Vendors"
285 xtype: 'ColumnModel',
287 dataIndex : 'vend_name',
290 renderer : function(v) { return String.format('{0}', v); }
293 xtype: 'ColumnModel',
295 dataIndex : 'vend_vendtype_id_vendtype_descrip',
298 renderer : function(v) { return String.format('{0}', v); }
301 xtype: 'ColumnModel',
303 dataIndex : 'vend_char_internalcompany',
304 header : 'Internal?',
306 renderer : function(v) { return String.format('{0}', v ? v : ''); }
313 xtype: 'LayoutRegion',