Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Erp.Net.GridLancamento = {}
- /**
- expoe o objeto grid no context this
- @method
- @param {GridPanel} grid objeto do tipo GridPanel a ser exposto
- @member Erp.Net.GridLancamento
- */
- Erp.Net.GridLancamento.initGrid = function (grid) {
- var gridId = grid.id.split('_')[0];
- this[gridId] = grid;
- //ajusta o grid interno
- gridId = gridId + "_grdInner";
- this[gridId] = Erp.Net.Util.getComp(gridId);
- Erp.Net.GridLancamento.setInnerGridSize(this[gridId]);
- }
- /**
- Ajusta o tamanho do grid dentro da janela
- @method
- @param {GridPanel} grid objeto do tipo GridPanel a ser exposto
- @param {int} width largura do grid
- @param {int} height altura do grid
- @member Erp.Net.GridLancamento
- */
- Erp.Net.GridLancamento.setGridSize = function (grid, width, height) {
- if (!width)
- width = Ext.getBody().getWidth();
- if (!height)
- height = Ext.getBody().getHeight() - 80;
- grid.setSize(width, height);
- Erp.Net.GridLancamento.initGrid(grid);
- }
- /**
- Ajusta o tamanho do grid interno dentro da janela
- @method
- @param {GridPanel} grid objeto do tipo GridPanel a ser exposto
- @param {int} width largura do grid
- @param {int} height altura do grid
- @member Erp.Net.GridLancamento
- */
- Erp.Net.GridLancamento.setInnerGridSize = function (grid) {
- var width = Ext.getBody().getWidth() - 100;
- var height = Ext.getBody().getHeight() - 180;
- grid.setSize(width, height);
- }
- /**
- Marcar ou desmarca os checkboxes do grupo
- @param {Command} c botão de comando clicado pelo usuário
- @param {Object[]} r registros que do grupo
- @param {SelectionModel} sm seletor de registros do grid
- @member Erp.Net.GridLancamento
- @method
- */
- Erp.Net.GridLancamento.checkGroup = function (c, r, sm) {
- if (c === 'SelectGroup')
- sm.selectRecords(r, true);
- else
- sm.selectRecords(r, false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement