function rekapabsensmt() { var ds_stsmt = store_stsmt(); var ds_prodi = store_prodireg(); var ds_idkelas = new Ext.data.JsonStore({ //from database proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'data_controller/get_kelas_combo', method: 'POST' }), autoLoad: true, root: 'data', fields: [ { name: "idkelas", mapping: "idkelas" } , { name: "nmkelas", mapping: "nmkelas" } ] }); var ds_idsemester = new Ext.data.JsonStore({ //from database proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'data_controller/get_semester_ganjilgenap', method: 'POST' }), autoLoad: true, root: 'data', fields: [ { name: "kode", mapping: "kode" } , { name: "tingsem", mapping: "tingsem" } ] }); var ds_years = store_tahun(); var form_back = new Ext.form.FormPanel({ border: false, id: 'form_back', labelAlign: 'left', buttonAlign: 'right', bodyStyle: 'padding:10px 3px 3px 5px', // atas, kanan, bawah, kiri monitorValid: true, height: 150, width: 400, layout: 'form', items: [] }); var form_bp_general = new Ext.form.FormPanel({ labelWidth: 200, labelAlign: 'left', border: false, id: 'form_bp_general', labelAlign: 'left', buttonAlign: 'right', bodyStyle: 'padding:10px 3px 3px 5px', // atas, kanan, bawah, kiri monitorValid: true, height: 190, width: 500, layout: 'form', items: [ { xtype: 'combo', fieldLabel: 'Program Studi', id: 'cb.prodi', store: ds_prodi, width: 250, valueField: 'kdprodi', displayField: 'nmprodi', editable: false, triggerAction: 'all', allowBlank: false, forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this, select: set_kelas } }, { xtype: 'combo', fieldLabel: 'Tahun Akademik - Semester', id: 'cb.stsmt', store: ds_stsmt, width: 250, valueField: 'kdstsemester', displayField: 'nmsmt', editable: false, triggerAction: 'all', allowBlank: false, forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this, select: set_semester } }, { xtype: 'combo', fieldLabel: 'Semester', disabled: true, id: 'cb.smt', store: ds_idsemester, width: 250, valueField: 'kode', displayField: 'tingsem', editable: false, triggerAction: 'all', allowBlank: false, forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this,// select: } }, { xtype: 'combo', fieldLabel: 'Kelas', disabled: true, id: 'cb.kelas', store: ds_idkelas, width: 250, valueField: 'idkelas', displayField: 'nmkelas', editable: false, triggerAction: 'all', allowBlank: false, forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this,// select: } }, { xtype:'compositefield', fieldLabel: 'Tahun Masuk/Angkatan', items:[{ xtype:'checkbox', boxLabel: '', name: 'cbtahun', id: 'cbtahun', listeners: { check : function(cb, value) { if(value){ Ext.getCmp('cb.thmasuk').allowBlank=false; Ext.getCmp('cb.thmasuk').enable(); } else { Ext.getCmp('cb.thmasuk').allowBlank=true; Ext.getCmp('cb.thmasuk').disable(); Ext.getCmp('cb.thmasuk').setValue(null); } } } }, { xtype: 'combo', fieldLabel: 'Tahun Masuk/Angkatan', disabled: true, id: 'cb.thmasuk', store: ds_years, width: 200, valueField: 'kode', displayField: 'nama', editable: false, triggerAction: 'all', allowBlank: true, forceSelection: true, submitValue: true, mode: 'local', emptyText:'Pilih...', listeners:{ scope: this,// select: } }] } ], buttons: [{ text: 'Cetak', iconCls: 'silk-printer', handler: function() { cetak_rekapnilai('form_bp_general'); } }, { text: 'Kembali', handler: function() { win.close(); } } ] }); function set_kelas() { Ext.getCmp('cb.kelas').enable(); Ext.getCmp('cb.kelas').allowBlank=true; Ext.getCmp('cb.kelas').setValue(null); Ext.getCmp('cb.kelas').allowBlank=false; ds_idkelas.reload({ params: { kdprodi: RH.getCompValue('cb.prodi', true) } }); } function set_semester() { Ext.getCmp('cb.smt').enable(); Ext.getCmp('cb.smt').allowBlank=true; Ext.getCmp('cb.smt').setValue(null); Ext.getCmp('cb.smt').allowBlank=false; ds_idsemester.reload({ params: { jsemester: RH.getCompValue('cb.stsmt', true).substr(-1) } }); } function cetak_rekapnilai(namaForm) { var form_nya = Ext.getCmp(namaForm); if (form_nya.getForm().isValid()) { var thn = (Ext.getCmp('cb.thmasuk').getValue()) ? Ext.getCmp('cb.thmasuk').getValue():'null'; var parsing = Ext.getCmp('cb.prodi').getValue() + '/'; parsing = parsing + Ext.getCmp('cb.stsmt').getValue() + '/'; parsing = parsing + Ext.getCmp('cb.smt').getValue() + '/'; parsing = parsing + Ext.getCmp('cb.kelas').getValue() + '/'; parsing = parsing + thn; var win = window.open(); win.location.reload(); //win.location = BASE_URL + 'rpt/rpt_rekap_absen_smt/cetak_rekap_absen/' + parsing; win.location = BASE_URL + 'rpt/rpt_rekap_absen_smt/cetak_rekap_absen/' + parsing; } else if (!form_nya.getForm().isValid()) { Ext.MessageBox.alert("Informasi", "Lengkapi"); } } SET_PAGE_CONTENT(form_back); var win = new Ext.Window({ title: 'Rekap Kehadiran Per Semester', modal: true, items: [form_bp_general], resizable: false, draggable: false, }).show(); }