Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.ux.ServiceStore = Ext.extend(Ext.data.JsonStore, {
- constructor: function(config){
- Ext.ux.ServiceStore.superclass.constructor.call(this, Ext.apply({
- root: 'data',
- totalProperty: 'total',
- fields: [
- 'id','userName', 'tpo_Nro_Documento', 'nombre', 'apellido','email'
- ],
- url: './usuarios-list.html',
- sortInfo: {field: 'apellido', direction:'ASC'},
- remoteSort: true
- }, config));
- }
- });
- Ext.reg('servicestore', Ext.ux.ServiceStore);
- Ext.ux.UsuariosServicesGrid = Ext.extend(Ext.grid.GridPanel, {
- initComponent:function() {
- var config = {
- border: false,
- frame:true,
- autoScroll: true,
- loadMask: true,
- stripeRows: true,
- layout: 'fit',
- viewConfig: {forceFit:true},
- store: new Ext.ux.ServiceStore(),
- sm: new Ext.grid.RowSelectionModel({singleSelect: true}),
- columns:[{
- header: "Usuario",
- dataIndex: 'userName',
- sortable: true,
- width: 150
- },{
- header: "Apellido",
- dataIndex: 'apellido',
- width: 200,
- sortable: true
- },{
- header: "Nombre",
- dataIndex: 'nombre',
- sortable: true,
- width: 150
- },{
- header: "Documento",
- dataIndex: 'tpo_Nro_Documento',
- sortable: true,
- align: 'center',
- width: 150
- },{
- header: "E-mail",
- dataIndex: 'email',
- sortable: true,
- groupable: true,
- align: 'center',
- width: 200
- }],
- plugins: [new Ext.ux.grid.GridFilters({
- encode: true,
- updateBuffer: 2000,
- filters: [{
- dataIndex: 'apellido',
- type: 'string'
- },{
- dataIndex: 'nombre',
- type: 'string'
- },{
- dataIndex: 'userName',
- type: 'string'
- },{
- dataIndex: 'email',
- type: 'string'
- }]
- })
- ],
- tbar:[{
- text:'Aprobar',
- tooltip:'Aprueba usuario de autogestión',
- iconCls:'accept',
- scope: this,
- handler: this.aprobar
- },{
- text:'Desaprobar',
- tooltip:'Desaprueba usuario de autogestión',
- iconCls:'delete',
- scope: this,
- handler: this.desaprobar
- }]
- }; // eo config object
- // apply config
- Ext.apply(this, Ext.apply(this.initialConfig, config));
- this.bbar = new Ext.PagingToolbar({
- pageSize: 15,
- store: this.store,
- plugins: this.plugins,
- displayInfo: true,
- displayMsg: 'Mostrando registros {0} - {1} de {2}',
- emptyMsg: "No existen elementos a mostrar"
- });
- Ext.ux.UsuariosServicesGrid.superclass.initComponent.apply(this, arguments);
- } // eo function initComponent
- });
- Ext.reg('usuariosservicesgrid', Ext.ux.UsuariosServicesGrid);
- Ext.ux.BaseComboBox = Ext.extend(Ext.form.ComboBox, {
- initComponent:function() {
- var config = {
- displayField:'label'
- ,valueField: 'value'
- ,emptyText:'Selecione un Item...'
- , width: 200
- ,forceSelection: true
- ,triggerAction: 'all'
- ,queryDelay: 100
- ,typeAhead: true
- ,editable: true
- ,mode: 'remote'
- }; // eo config object
- // apply config
- Ext.apply(this, Ext.apply(this.initialConfig, config));
- Ext.ux.BaseComboBox.superclass.initComponent.apply(this, arguments);
- } // eo function initComponent
- });
- /*
- Ext.ux.RolesComboBox = Ext.extend(Ext.ux.BaseComboBox, {
- store: new Ext.data.JsonStore({
- root: 'data',
- fields: ['value', 'label'],
- url: './buscarRoles.html'
- })
- });
- Ext.reg('rolescombo', Ext.ux.RolesComboBox);
- Ext.ux.ClientesComboBox = Ext.extend(Ext.ux.BaseComboBox, {
- store: new Ext.data.JsonStore({
- root: 'data',
- fields: ['value', 'label'],
- url: './buscarClientes.html
- })
- });
- Ext.reg('clientescombo', Ext.ux.ClientesComboBox);
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement