function studentbody() { Ext.MessageBox.show({ msg: 'Proses mendapatkan data...', title: 'Loading..', width:300, wait:true, waitConfig: {interval:550} }); var ds_grid = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'akademik/c_studentbody/grid', method: 'POST' }), baseParams: { kdstsemester: KDSTSEMESTER }, root: 'data', totalProperty: 'results', //autoLoad: true, fields: [ { name: "nourutprodi", mapping: "nourutprodi" },{ name: "nmprodi", mapping: "nmprodi" },{ name: "nmjenjangstudi", mapping: "nmjenjangstudi" },{ name: "jumlah", mapping: "jumlah" },{ name: "aktif", mapping: "aktif" },{ name: "cuti", mapping: "cuti" },{ name: "do", mapping: "do" },{ name: "keluar", mapping: "keluar" },{ name: "lulus", mapping: "lulus" },{ name: "nonaktif", mapping: "nonaktif" },{ name: "sdd", mapping: "sdd" }] }); ds_grid.load({ scope : this, callback: function(records, operation, success) { var cuti = 0, jumlah = 0, aktif = 0, DO = 0, keluar = 0, lulus = 0, nonaktif = 0, sdd = 0; ds_grid.each(function (rec) { jumlah += parseFloat(rec.get('jumlah')); cuti += parseFloat(rec.get('cuti')); aktif += parseFloat(rec.get('aktif')); DO += parseFloat(rec.get('do')); keluar += parseFloat(rec.get('keluar')); lulus += parseFloat(rec.get('lulus')); nonaktif += parseFloat(rec.get('nonaktif')); sdd += parseFloat(rec.get('sdd')); }); Ext.getCmp('jumlah2').setValue(jumlah); Ext.getCmp('cuti2').setValue(cuti); Ext.getCmp('aktif2').setValue(aktif); Ext.getCmp('do2').setValue(DO); Ext.getCmp('keluar2').setValue(keluar); Ext.getCmp('lulus2').setValue(lulus); Ext.getCmp('sdd2').setValue(sdd); Ext.getCmp('nonaktif2').setValue(nonaktif); Ext.getCmp('kdsemester_name').setValue(KDSTSEMESTER); Ext.getCmp('thnakademik').setValue(KDTHNAKADEMIK); Ext.getCmp('semester').setValue(NMJNSSEMESTER); Ext.MessageBox.hide(); } }); var cm = new Ext.grid.ColumnModel({ // specify any defaults for each column defaults: { sortable: true // columns are not sortable by default }, columns: [{ header: '
No.
', width: 50, dataIndex: 'nourutprodi', sortable: true }, { header: '
Program Studi
', width: 250, dataIndex: 'nmprodi', sortable: true }, { header: '
Jenjang
Studi
', width: 90, dataIndex: 'nmjenjangstudi', sortable: true }, { header: '
Jumlah
', width: 75, dataIndex: 'jumlah', sortable: true }, { header: '
Aktif
', width: 75, dataIndex: 'aktif', sortable: true }, { header: '
Cuti
', width: 75, dataIndex: 'cuti', sortable: true }, { header: '
DO
', width: 75, dataIndex: 'do', sortable: true }, { header: '
Keluar
', width: 75, dataIndex: 'keluar', sortable: true }, { header: '
Lulus
', width: 75, dataIndex: 'lulus', sortable: true }, { header: '
Non Aktif
', width: 75, dataIndex: 'nonaktif', sortable: true }, { header: '
Sedang Double
Degree
', width: 100, dataIndex: 'sdd', sortable: true }] }); var vw = new Ext.grid.GridView({emptyText:'< Data Masih Kosong >'}); var sm_nya = new Ext.grid.CheckboxSelectionModel({ listeners: { // rowselect: select_action, // rowdeselect: deselect_action } }); var cari_data = [new Ext.ux.grid.Search({ iconCls: 'btn_search', minChars: 1, autoFocus: true, autoHeight: true, position: 'top', mode: 'remote', width: 200 })]; // var paging = new Ext.PagingToolbar({ // pageSize: 50, // store: ds_grid, // displayInfo: true, // displayMsg: 'Data Jadwal PMB Dari {0} - {1} of {2}', // emptyMsg: 'Jadwal PMB Belum Dipilih.' // }); var grid_nya = new Ext.grid.EditorGridPanel({ store: ds_grid, frame: true, title: "Laporan per Fakultas/Program Studi", //width: 1140, height: 595, //plugins: cari_data, id: 'grid_det_product', // autoWidth:true, // autoSizeColumns:true, // enableColumnResize: true, // enableColumnHide: false, // enableColumnMove: false, // enableHdMenu: false, columnLines: true, // loadMask: true, buttonAlign: 'left', defaults : { anchor : '-10' }, forceFit: true, tbar: [ { xtype: 'label', text:"Status Semester", style: 'margin-left:10px;margin-right:5px;' },{ xtype: 'combo', store:ds_vsemester3, name: 'kdsemester_id', id: 'kdsemester_name', triggerAction: 'all', editable: false, //disabled :true, valueField: 'kdstsemester', displayField: 'kdstsemester', forceSelection: true, submitValue: true, hiddenName: 'h_kdstsemester', listeners: { select : function(){ ds_grid.setBaseParam('kdstsemester',Ext.getCmp('kdsemester_name').getValue()); ds_grid.load(); } }, typeAhead: true, mode: 'local', emptyText:'Pilih...', selectOnFocus:true },{ xtype: 'label', text : "Tahun Akademik", style: 'margin-left:10px;margin-right:5px;' },{ xtype: 'textfield', name: 'thnakademik', id: 'thnakademik', width: 100, disabled: true },{ xtype: 'label', text:"Semester", style: 'margin-left:10px;margin-right:5px;' },{ xtype: 'textfield', name: 'semester', id: 'semester', width: 100, disabled: true },{ text: 'Cetak', id: 'btn_cetak', iconCls: 'silk-printer', style: 'margin-left:10px;margin-right:5px;', handler: function() { var parsing = ''; parsing = parsing + Ext.getCmp('kdsemester_name').getValue(); parsing = parsing + 'istra' + Ext.getCmp('thnakademik').getValue().replace('/','_'); parsing = parsing + 'istra' + Ext.getCmp('semester').getValue(); var win = window.open(); win.location.reload(); win.location = BASE_URL + 'print/print_topdf/pstudentbody/'+parsing; } } ], bbar:[ { xtype: 'label', text : "Total", style: 'margin-left:10px;margin-right:360px;' },{ xtype: 'textfield', name: 'jumlah2', id: 'jumlah2', width: 75, disabled: true },{ xtype: 'textfield', name: 'aktif2', id: 'aktif2', width: 75, disabled: true },{ xtype: 'textfield', name: 'cuti2', id: 'cuti2', width: 75, disabled: true },{ xtype: 'textfield', name: 'do2', id: 'do2', width: 75, disabled: true },{ xtype: 'textfield', name: 'keluar2', id: 'keluar2', width: 75, disabled: true },{ xtype: 'textfield', name: 'lulus2', id: 'lulus2', width: 75, disabled: true },{ xtype: 'textfield', name: 'nonaktif2', id: 'nonaktif2', width: 75, disabled: true },{ xtype: 'textfield', name: 'sdd2', id: 'sdd2', width: 100, disabled: true } ], sm:sm_nya, vw:vw, autoScroll: true, cm:cm, //bbar: //paging, //autoExpandColumn: 'common', clicksToEdit: 1, listeners: { rowdblclick: function rowdblClick(grid, rowIdx) { var rec = ds_grid.getAt(rowIdx); //alert(rec.data["kdmenu"] + ', ' + Ext.getCmp('combox').getValue()); } } }); var form_bp_general = new Ext.form.FormPanel({ id: 'form_bp_general_id', region: 'center', autoScroll: true, buttonAlign: 'left', title: "Student Body", bodyStyle: 'padding: 5px', border: false, disabled: true, waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, items: [{ layout: 'form', border: false, items: [grid_nya] }] }); function btn_menu_add(){ f_jadwalpmb_form('',ds_grid); } get_content(form_bp_general); }