function pMatkulDosMhs1(idmenu){ var pageTitle = ''; var pageIcon = ''; var hideJadwal = true; var hideNilai = true; var idcb_prodi = 'cb.prodi'; var idcb_stsemester = 'cb.stsemester'; var pnDosId = 'fp.detil-dosen'; var pnMhsId = 'fp.detil-mhs'; var pnJdwkulId = 'fp.detil-jdwkul'; var pnJdwujiId = 'fp.detil-jdwuji'; var pnMatkulHeight = 235; var pnDosHeight = 200; var pnMhsHeight = 440; var DosenStat = ''; var IdDetObj = { dosen : pnDosId, mahasiswa : pnMhsId, jdwkul : pnJdwkulId, jdwuji : pnJdwujiId }; if(idmenu == MENU.jadwal){ pageTitle = 'Jadwal Kuliah & Ujian'; pageIcon = 'silk-calendar'; hideJadwal = false; pnMatkulHeight = 235; pnDosHeight = 150; pnMhsHeight = 390; pnMhsTitle = 'Daftar Mahasiswa'; DosenStat = 'Dosen Pengajar'; } if(idmenu == MENU.nilai){ pageTitle = 'Nilai Mahasiswa'; pageIcon = 'silk-report'; hideNilai = false; pnMatkulHeight = 300; pnDosHeight = 185; pnMhsHeight = 490; pnMhsTitle = 'Nilai Mahasiswa'; DosenStat = 'Dosen Koordinator'; } //var kdmk = ''; /** COMON STORES */ var ds_prodireg = store_prodireg(); var ds_stsmt = store_stsmt(); /** GRID PANEL MATKUL */ var gp_matkul = cMatkul(idmenu, idcb_prodi, idcb_stsemester, IdDetObj, DosenStat); var fpMain = new Ext.form.FormPanel({ title: pageTitle, iconCls: pageIcon, buttonAlign: 'left', //bodyStyle: 'padding: 5px', border: true, layout:'border', labelWidth: 150, waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, autoScroll:true, frame: true, items: [{ layout: 'form', region:'north', height:40, //autoHeight:true, items:[ headerProdiSmt({ idcb_prodi : idcb_prodi, cb_prodi_width: 300, idcb_stsmt : idcb_stsemester, cb_stsmt_width : 150, space : (idmenu == MENU.nilai)? 10:80, fnReload : function(){reloadGridMatkul();}, extracomp: (idmenu == MENU.nilai)? comboButtonPrintNilai():false }), ] },{ layout: 'form', region:'center', autoScroll:true, items: [ { xtype: 'panel', layout:'fit', title:'Mata Kuliah', id:'fp.master', height:pnMatkulHeight, frame:true, items: [gp_matkul], }, RH.vSpacer(5), { xtype: 'panel', layout:'fit', hidden:false, height:pnDosHeight, frame:true, title:DosenStat, id: pnDosId, //items: [gp_dosen], }, RH.vSpacer(5), { xtype: 'panel', layout:'fit', hidden:hideJadwal, height:200, frame:true, title:'Jadwal Kuliah (Waktu & Ruangan)', id: pnJdwkulId, },{ xtype:'fieldset', hidden:!hideJadwal, items:[ RH.CodeNameField({ ids:['info.kdmatkul','info.nmmatkul'], label: 'Mata Kuliah', widths:[100,250], disabled:true, }) ] }] },{ layout: 'form', region:'east', width:'50%', margins:'0 0 0 10', split:true, autoScroll:true, items: [{ xtype: 'panel', layout:'fit', hidden:false, height:pnMhsHeight, frame:true, title: pnMhsTitle, id: pnMhsId, }, RH.vSpacer(5), { xtype: 'panel', layout:'fit', hidden:hideJadwal, height:200, frame:true, title:'Jadwal Ujian (Waktu & Ruangan)', id: pnJdwujiId, },{ xtype:'fieldset', hidden:!hideJadwal, items:[ RH.CodeNameField({ ids:['info.nidu','info.nmdos'], label: DosenStat, widths:[100,250], disabled:true, }), { xtype:'hidden', id:'hidden.idklsmhs' } ] }] }] }); SET_PAGE_CONTENT(fpMain); /** FUNCTIONS */ function removeAllDetails(){ RH.removeDetail(IdDetObj.dosen); RH.removeDetail(IdDetObj.mahasiswa); RH.removeDetail(IdDetObj.jdwkul); RH.removeDetail(IdDetObj.jdwuji); } function reloadGridMatkul(){ //remove details removeAllDetails(); clearInfoMatkulDos(); //reload master-grid gp_matkul.store.reload({ params: { kdprodi: RH.getCompValue(idcb_prodi, true), kdstsemester: RH.getCompValue(idcb_stsemester, true) } }); } }; //pMatkulDosMhs2 implemented in: Absensi function pMatkulDosMhs2(idmenu){ var pageTitle = ''; var pageIcon = ''; var idcb_prodi = 'cb.prodi'; var idcb_stsemester = 'cb.stsemester'; var pnDosId = 'fp.detdos'; var pAbsenDosId = 'fp.detabsdos'; var pAbsenMhsId = 'fp.detabsmhs'; var DosenStat ='' var IdDetObj = { dosen : pnDosId, absendos : pAbsenDosId, absenmhs : pAbsenMhsId, }; if(idmenu == MENU.absen){ pageTitle = 'Kehadiran Mahasiswa & Dosen '; pageIcon = 'silk-calendar'; DosenStat = 'Dosen Pengajar'; } //var kdmk = ''; /** COMON STORES */ var ds_prodireg = store_prodireg(); var ds_stsmt = store_stsmt(); /** GRID PANEL MATKUL */ var gp_matkul = cMatkul(idmenu, idcb_prodi, idcb_stsemester, IdDetObj, DosenStat); var fpMain = new Ext.form.FormPanel({ title: pageTitle, iconCls: pageIcon, buttonAlign: 'left', bodyStyle: 'padding: 0px', border: true, layout: 'border', waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, autoScroll:true, frame: true, items: [{ region:'north', layout:'border', height:40, items:[{ region:'center', items:[ headerProdiSmt({ idcb_prodi : idcb_prodi, cb_prodi_width: 220, idcb_stsmt : idcb_stsemester, cb_stsmt_width : 140, fnReload : function(){reloadGridMatkul();} }) ] },{ region:'east', width:'50%',split: true, //autoWidth:true, items:[ stAbsenPicker({ //defined in cAbsen.js idcb_temuke : 'cb.temuke', idcb_stabsenmhs : 'cb.stabsenmhs', //fnSelect_temuke : function(){}, //fnSelect_stabsenmhs : function(){} }) ] }] },{ region:'center', layout:'border',//autoScroll:true, items:[{ region:'center', xtype: 'panel', layout:'fit', title:'Mata Kuliah', id:'fp.master', frame: true, //height:220, items: [gp_matkul], },{ region:'east',width:'50%',split: true, xtype: 'panel', layout:'fit', //margins:'0 0 0 0', title:DosenStat, id: pnDosId, frame: true, //height:220, //items: [gp_dosen], },{ region:'south', //split:true, xtype:'fieldset', layout:'border', height:45, items:[{ region:'center', items:[ RH.CodeNameField({ ids:['info.kdmatkul','info.nmmatkul'], label: 'Mata Kuliah', widths:[100,250], disabled:true, }) ] },{ region:'east', width:'50%', items:[ RH.CodeNameField({ ids:['info.nidu','info.nmdos'], label: DosenStat, widths:[100,250], disabled:true, }) ] }] }] },{ region:'south', layout:'form', height:250, split:true, autoScroll:true, items:[{ xtype: 'panel', layout:'fit', //margins:'10 0 10 0', title:'Daftar Kehadiran Dosen', id: pAbsenDosId, frame: true, height:160, },{ xtype: 'panel', layout:'fit', //margins:'10 0 10 0', title:'Daftar Kehadiran Mahasiswa', id: pAbsenMhsId, frame: true, height:400, }] }] }); SET_PAGE_CONTENT(fpMain); /** FUNCTIONS */ function removeAllDetails(){ RH.removeDetail(IdDetObj.dosen); if(idmenu == MENU.absen){ RH.removeDetail(IdDetObj.absendos); RH.removeDetail(IdDetObj.absenmhs); } } function reloadGridMatkul(){ //remove details removeAllDetails(); clearInfoMatkulDos(); //reload master-grid gp_matkul.store.reload({ params: { kdprodi: RH.getCompValue(idcb_prodi, true), kdstsemester: RH.getCompValue(idcb_stsemester, true) } }); } }; function clearInfoMatkulDos(){ RH.setCompValue('info.kdmatkul',''); RH.setCompValue('info.nmmatkul',''); RH.setCompValue('info.nidu',''); RH.setCompValue('info.nmdos',''); } /** MASTER: MATKUL from struprog ======================== */ function cMatkul(idmenu, idcb_prodi, idcb_stsemester, IdDetObj, DosenStat){ var pageSize = 10; var nmmatkulWidth = 330; if(idmenu == MENU.jadwal){ pageSize = 5; } if(idmenu == MENU.nilai){ pageSize = 10; } if(idmenu == MENU.absen){ pageSize = 5; nmmatkulWidth = 300; } var fields_matkul = RH.storeFields('kdprodi', 'kdstsemester', 'kdmk', 'nmmkind', 'jmldos'); //from struprog join matakuliah /** GRID STORE: MTAKULIAH */ var ds_matkul = RH.JsonStore({ url : BASE_URL + 'matkuldosmhs_controller/get_matkulProdiSmt', fields : fields_matkul, limit: pageSize, params: [ {key:'kdprodi', id: idcb_prodi} ,{key:'kdstsemester', id: idcb_stsemester} ], enableSearch: true, }); ds_matkul.on('beforeload', function(){ removeMatkulDetails() }); //SEARCH COMPONENT var sb_matkul = RH.searchComp({ id : 'sb_matkul', fields : ['kdmk:Kode Mata Kuliah','nmmkind:Nama Mata Kuliah'], selected : 'kdmk', store : ds_matkul, textWidth : 250 }); /** GRID COLUMN MODEL */ var cm_matkul = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), //for rows numbering { header: 'Kode', width:80, dataIndex: 'kdmk', renderer: RH.keyToDetil, sortable: true }, { header: 'Nama Mata Kuliah ', width: nmmatkulWidth, dataIndex: 'nmmkind', sortable: true, }, { header: 'Jumlah Dosen', width: 80, dataIndex: 'jmldos', align:'right' }] ); // Selection Model var sm_matkul = new Ext.grid.RowSelectionModel({ singleSelect: true }); // Grid View var gv_matkul = new Ext.grid.GridView({emptyText: '< Belum ada Data >'}); /** GRID PANEL */ var gp_matkul = new Ext.grid.GridPanel({ ds: ds_matkul, cm: cm_matkul, sm: sm_matkul, view: gv_matkul, forceFit: true, //height:200, //autoHeight: (idmenu != MENU.absen), layout:'anchor', //autoSizeColumns: true, //autoExpandColumn: 'nmmkind', autoScroll:true, //enableColumnResize: true, columnLines: true, loadMask: true, tbar:[sb_matkul], bbar: new Ext.PagingToolbar({ store: ds_matkul, displayInfo: true, pageSize: pageSize, mode: 'local', displayMsg: 'Data {0} - {1} dari {2}', emptyMsg: "Belum ada data" }), listeners: { cellclick: onCellMatkulClick } }); return gp_matkul; function onCellMatkulClick(grid, rowIndex, columnIndex, e) { var t = e.getTarget(); var record = grid.getStore().getAt(rowIndex); // Get the Record var kdprodi = record.data['kdprodi']; var kdstsemester = record.data['kdstsemester']; var kdmk = record.data['kdmk']; removeMatkulDetails(); if (t.className == 'keyMasterDetail') { //if(idmenu == MENU.absen){ var nmmk = record.data['nmmkind']; RH.setCompValue('info.kdmatkul',kdmk); RH.setCompValue('info.nmmatkul',nmmk); RH.setCompValue('info.nidu',''); RH.setCompValue('info.nmdos',''); //} var gridPanelDet = cDosenMatkul(idmenu, kdprodi, kdstsemester, kdmk, IdDetObj, DosenStat); RH.loadDetail(IdDetObj.dosen, gridPanelDet); } } function removeMatkulDetails(){ RH.removeDetail(IdDetObj.dosen); if(idmenu == MENU.jadwal){ RH.removeDetail(IdDetObj.mahasiswa); RH.removeDetail(IdDetObj.jdwkul); RH.removeDetail(IdDetObj.jdwuji); } if(idmenu == MENU.nilai){ RH.removeDetail(IdDetObj.mahasiswa); } } } /** DETIL#1: DOSEN ===================================== */ function cDosenMatkul(idmenu, kdprodi, kdstsemester, kdmk, IdDetObj, DosenStat){ //var nidu = ''; //param for detail to jadwal var fields_dosmk = RH.storeFields('kdprodi', 'kdstsemester', 'kdmk', 'nidu', 'nmdosen', 'idkelas','nmkelas','nmklsmhs','jmlmhs'); //from struprogdet join dosen /** GRID STORE: DOSEN MATKUL */ var ds_dosmk = RH.JsonStore({ url : BASE_URL + 'matkuldosmhs_controller/get_dosmk', fields : fields_dosmk, limit: 3, params: [ {key:'kdprodi', value: kdprodi} ,{key:'kdstsemester', value: kdstsemester} ,{key:'kdmk', value: kdmk} ,{key:'jdosen', value: DosenStat} ], enableSearch: false, }); ds_dosmk.on('beforeload', function(){ removeDosenDetails() }); /** GRID COLUMN MODEL */ var cm_dosmk = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), //for rows numbering { header: 'NIDU', width:70, dataIndex: 'nidu', renderer: RH.keyToDetil, sortable: true }, { header: 'Nama Dosen ', width: 240, dataIndex: 'nmdosen', sortable: true, }, { header: 'Kelas Perkuliahan', width: 100, dataIndex: 'nmkelas', }, { header: 'Kelas Mahasiswa', width: 100, dataIndex: 'nmklsmhs', }, { header: 'Jml Mahasiswa', width: 80, dataIndex: 'jmlmhs', align:'right' }] ); // Selection Model var sm_dosmk = new Ext.grid.RowSelectionModel({ singleSelect: true }); // Grid View var gv_dosmk = new Ext.grid.GridView({emptyText: '< Belum ada Data >'}); /** GRID PANEL */ var gp_dosmk = new Ext.grid.GridPanel({ id:'gp_dosmk', ds: ds_dosmk, cm: cm_dosmk, sm: sm_dosmk, view: gv_dosmk, forceFit: true, //height: 200, //autoHeight: (idmenu != MENU.absen),//true, layout:'anchor', autoScroll:true, columnLines: true, loadMask: true, //tbar:[RH.searchBar()], bbar: new Ext.PagingToolbar({ store: ds_dosmk, displayInfo: true, mode: 'local', pageSize: 3, displayMsg: 'Data {0} - {1} dari {2}', emptyMsg: "Belum ada data" }), listeners: { cellclick: onCellDosmkClick } }); return gp_dosmk; function onCellDosmkClick(grid, rowIndex, columnIndex, e) { var t = e.getTarget(); var record = grid.getStore().getAt(rowIndex); // Get the Record var nidu = record.data['nidu']; var idklsmhs = record.data['idklsmhs']; var idkelas = record.data['idkelas']; var jmlmhs = record.data['jmlmhs']; removeDosenDetails(); if (t.className == 'keyMasterDetail') { RH.setCompValue('info.nidu',nidu); RH.setCompValue('info.nmdos',record.data['nmdosen']); if(Ext.getCmp('hidden.idklsmhs')) RH.setCompValue('hidden.idklsmhs',idklsmhs); if(idmenu == MENU.jadwal){ var gridPanelDet1 = cMahasiswaMatkul(idmenu, kdprodi, kdstsemester, kdmk, nidu, idklsmhs); var gridPanelDet2 = cJadwalKuliah(kdprodi, kdstsemester, kdmk, nidu, idklsmhs, jmlmhs); var gridPanelDet3 = cJadwalUjian(kdprodi, kdstsemester, kdmk, nidu, idklsmhs, jmlmhs); RH.loadDetail(IdDetObj.mahasiswa, gridPanelDet1); RH.loadDetail(IdDetObj.jdwkul, gridPanelDet2); RH.loadDetail(IdDetObj.jdwuji, gridPanelDet3); } if(idmenu == MENU.nilai){ var gridPanelDet = cMahasiswaMatkul(idmenu, kdprodi, kdstsemester, kdmk, nidu, idklsmhs); RH.loadDetail(IdDetObj.mahasiswa, gridPanelDet); } if(idmenu == MENU.absen){ //RH.setCompValue('info.nidu',nidu); //RH.setCompValue('info.nmdos',record.data['nmdosen']); var panelDet = cAbsenDosen(kdprodi, kdstsemester, kdmk, nidu, idkelas); var gridPanelDet = cAbsenMahasiswa(kdprodi, kdstsemester, kdmk, nidu, idkelas); RH.loadDetail(IdDetObj.absendos, panelDet); RH.loadDetail(IdDetObj.absenmhs, gridPanelDet); } } //function cek(){} } function removeDosenDetails(){ if(idmenu == MENU.jadwal){ RH.removeDetail(IdDetObj.mahasiswa); RH.removeDetail(IdDetObj.jdwkul); RH.removeDetail(IdDetObj.jdwuji); } if(idmenu == MENU.nilai){ RH.removeDetail(IdDetObj.mahasiswa); } if(idmenu == MENU.absen){ RH.removeDetail(IdDetObj.absendos); RH.removeDetail(IdDetObj.absenmhs); } } } /** DETIL#2a: MAHASISWA from Nilai ===================================== */ function cMahasiswaMatkul(idmenu, kdprodi, kdstsemester, kdmk, nidu, idklsmhs){ var isMenuJadwal = (idmenu==MENU.jadwal)? true : false; var isMenuNilai = (idmenu==MENU.nilai)? true : false; var pageSize = 10; var gpheight = 200; if(idmenu == MENU.jadwal){ pageSize = 50; gpheight = 540; } if(idmenu == MENU.nilai){ pageSize = 50; gpheight = 540 } /** FOR COMBO EDITOR (KLSPARALEL & NILAI HURUF)==================================*/ var ds_klsparalel = store_klsparalel(); var fields_setnilai = RH.storeFields('kdprodi','kdstsemester','nilaihuruf','bobotnilai'); var ds_setnilai = RH.JsonStore({ url : BASE_URL + 'nilai_controller/get_bonilaiByProdiSmt', fields : fields_setnilai, params: [ {key:'kdprodi', value: kdprodi} ,{key:'kdstsemester', value: kdstsemester} ], enableSearch: false, }); var fnSelectKlsparalel = function(combo, record){ var klsparalel = record.data['klsparalel']; updateKlsparalel(klsparalel); }; function render_klsparalel(value) { return RH.qtipEdit(value,'12px'); } var fnSelectNilai = function(combo, record){ var nilaihuruf = record.data['nilaihuruf']; var bobotnilai = record.data['bobotnilai']; /* if (bobotnilai == '4.00') { Ext.getCmp('nilaihurufsp').enable(); //return '' + value + ''; } else if (bobotnilai == '3.00') { Ext.getCmp('nilaihurufsp').disable(); //return '' + value + ''; } */ //Update nilai updateNilai(nilaihuruf, bobotnilai); }; var fnSelectNilaiSP = function(combo, record){ var nilaihuruf = Ext.getCmp('nilaihurufsp').getRawValue(); if (nilaihuruf == 'A') { //Ext.getCmp('nilaihurufsp').enable(); //return '' + value + ''; } else if (nilaihuruf == '3.00') { Ext.getCmp('nilaihurufsp').disable(); //return '' + value + ''; } var nilaihurufsp = record.data['nilaihuruf']; var bobotnilaisp = record.data['bobotnilai']; //Update nilai updateNilaiSP(nilaihurufsp, bobotnilaisp); }; function render_nilaihuruf(value) { var val = RH.getRecordFieldValue(ds_setnilai, 'nilaihuruf', 'nilaihuruf', value); //return RH.qtipEditDenGreen(val,'12px'); if (value == 'A' || value == 'B') { return '' + value + ''; } else if (value == 'C') { return '' + value + ''; } else if (value == 'D' || value == 'E' || value == 'T') { return '' + value + ''; } return value; } function render_nilaihurufsp(value) { var val = RH.getRecordFieldValue(ds_setnilai, 'nilaihuruf', 'nilaihuruf', value); //return RH.qtipEditDenRed(val,'12px'); if (value == 'A' || value == 'B') { return '' + value + ''; } else if (value == 'C') { return '' + value + ''; } else if (value == 'D' || value == 'E' || value == 'T') { return '' + value + ''; } return value; } /** =============THE GRID PROPERTIES ================================= */ var fields_mhsmk = RH.storeFields('idnilai','kdprodi', 'kdstsemester', 'kdmk', 'nidu', 'nim', 'nmmhs', 'kdjnskelamin','thnmasuk', 'kdstawalmhs','nmstawalmhs', 'idklsmhs','nmklsmhs', 'nilaihuruf','bobotnilai','nilaihurufsp','bobotnilaisp','klsparalel'); var ds_mhsmk = RH.JsonStore({ url : BASE_URL + 'matkuldosmhs_controller/get_mahasiswamk', fields : fields_mhsmk, limit: pageSize, params: [ {key:'kdprodi', value: kdprodi} ,{key:'kdstsemester', value: kdstsemester} ,{key:'kdmk', value: kdmk} ,{key:'nidu', value: nidu} ,{key:'idklsmhs', value: idklsmhs} ], enableSearch: false, }); var sb_mhsmk = RH.searchComp({ id: 'sb_mhsmk', fields : ['nim:NIM','nmmhs:Nama Mahasiswa', 'klsparalel:Kelas Paralel'], selected : 'nmmhs', store : ds_mhsmk, textWidth : 200 }); var cm_mhsmk = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), { header:'idnilai', dataIndex:'idnilai', hidden:true }, { header: 'NPM', width:100, dataIndex: 'nim', sortable: true }, { header: 'Nama Mahasiswa', width: 150, dataIndex: 'nmmhs',sortable: true, }, { header: '(L/P)', width: 35, dataIndex: 'kdjnskelamin', align:'center' }, { header: 'Tahun
Masuk', width: 55, dataIndex: 'thnmasuk', sortable: true, align:'center', hidden: !isMenuJadwal }, { header: 'Status
Daftar', width: 65, dataIndex: 'nmstawalmhs', hidden: !isMenuJadwal }, { header: 'Kelas
Paralel', width:55, dataIndex: 'klsparalel', align:'center', sortable: true, renderer: render_klsparalel, editor: RH.getComboEditor('klsparalel', false, ds_klsparalel, 'klsparalel', 'klsparalel', fnSelectKlsparalel), hidden: !isMenuJadwal }, { header: 'Kelas
Mahasiswa', width:80, dataIndex: 'nmklsmhs', hidden: !isMenuJadwal }, { header: 'Nilai
Huruf', width:70, align:'center', dataIndex: 'nilaihuruf', renderer: render_nilaihuruf, editor: RH.getComboEditor('nilaihuruf', false, ds_setnilai, 'nilaihuruf', 'nilaihuruf', fnSelectNilai), hidden: !isMenuNilai }, { header: 'Bobot Nilai', width:80, align:'center', dataIndex: 'bobotnilai', xtype:'numbercolumn', /* editor: new Ext.form.TextField({ allowBlank: true, id: 'idbotnilai', //readOnly: true, validator:function(value){ var set = Ext.getCmp('idbotnilai').getValue(); //var val = record.get('statut'); if (set == "4.00") { Ext.getCmp('idbotnilai').enable(); } else if (set == "3.00") { Ext.getCmp('idbotnilai').disable(); } } }), */ hidden: !isMenuNilai }, { header: 'Nilai
Huruf SP', width:75, align:'center', dataIndex: 'nilaihurufsp', renderer: render_nilaihurufsp, editor: RH.getComboEditor('nilaihurufsp', false, ds_setnilai, 'nilaihuruf', 'nilaihuruf', fnSelectNilaiSP), hidden: !isMenuNilai }, { header: 'Bobot Nilai SP', width:80, align:'center', dataIndex: 'bobotnilaisp', xtype:'numbercolumn', hidden: !isMenuNilai }] ); function aa (value) { //var idx = combo.store.find(combo.valueField, value); //var rec = combo.store.getAt(idx); var a = Ext.getCmp('idnil').getRawValue(); if (a == "1.00") { new Ext.form.TextField({ allowBlank: true, readOnly: false, }); } else { new Ext.form.TextField({ allowBlank: true, readOnly: true, }); } } /** GRID PANEL */ var gp_mhsmk = RH.EditorGridPanel_T1({ ds: ds_mhsmk, cm: cm_mhsmk, singleSelect: true, clicksToEdit: 1, searchComp: sb_mhsmk, allowAdd: false, pageSize: pageSize, cellclick: onCellClick, customButton: { xtype:'textfield', id:'hidden.idnilai', hidden:true }, }); return gp_mhsmk; /* function onCellClick(grid, rowIndex, columnIndex, e) { var record = grid.getStore().getAt(rowIndex); // Get the Record var idnilai = record.data['idnilai']; RH.setCompValue('hidden.idnilai', idnilai); } */ function onCellClick(grid, rowIndex, cellIndex, e) { var rec = ds_mhsmk.getAt(rowIndex); var record = grid.getStore().getAt(rowIndex); // Get the Record var idnilai = record.data['idnilai']; var columnName = gp_mhsmk.getColumnModel().getDataIndex(cellIndex); //idnilai = rec.data['idnilai']; nilai= rec.data['bobotnilai']; nilaisp= rec.data['bobotnilaisp']; if (columnName == 'nilaihurufsp') { if (nilai > 2.00 ) { Ext.MessageBox.alert("Informasi", "Nilai Sudah Diatas Minimal"); Ext.getCmp('nilaihurufsp').disable(); return; }else{ Ext.getCmp('nilaihurufsp').enable(); } } RH.setCompValue('hidden.idnilai', idnilai); } function updateKlsparalel(klsparalel){ Ext.Ajax.request({ url: BASE_URL + 'nilai_controller/update_klsparalel', params: { idnilai : RH.getCompValue('hidden.idnilai'), klsparalel : klsparalel, }, success: function() { ds_mhsmk.reload(); if(Ext.getCmp('gp_jdwkul')){ var grid = Ext.getCmp('gp_jdwkul'); grid.store.reload(); } }, failure: function() { Ext.Msg.alert("Info", "Ubah Data Gagal"); } }); } function updateNilai(nilaihuruf, bobotnilai){ Ext.Ajax.request({ url: BASE_URL + 'nilai_controller/update_nilai', params: { idnilai : RH.getCompValue('hidden.idnilai'), nilaihuruf : nilaihuruf, bobotnilai : bobotnilai, //nilaihurufsp: nilaihurufsp, //bobotnilaisp: bobotnilaisp }, success: function() { //Ext.Msg.alert("Info", "Ubah Berhasil"); ds_mhsmk.reload(); }, failure: function() { Ext.Msg.alert("Info", "Ubah Data Gagal"); } }); } function updateNilaiSP(nilaihurufsp, bobotnilaisp){ Ext.Ajax.request({ url: BASE_URL + 'nilai_controller/update_nilaisp', params: { idnilai : RH.getCompValue('hidden.idnilai'), nilaihurufsp : nilaihurufsp, bobotnilaisp : bobotnilaisp }, success: function() { //Ext.Msg.alert("Info", "Ubah Berhasil"); ds_mhsmk.reload(); }, failure: function() { Ext.Msg.alert("Info", "Ubah Data Gagal"); } }); } } /** DETIL#2b: JADWAL KULIAH ===================================== pJadwal.js */ /** DETIL#2c: JADWAL Ujian ===================================== pJadwal.js */ function comboButtonPrintNilai(){ var ds_jujian = store_jujian(); var comp = [{ layout:'form', labelWidth:150, labelAlign:'right', items:[ RH.ActionCombo({ id: 'cb.selUjian', label: 'Cetak Form Nilai', width: 80, data: ds_jujian, key: 'idjnsujian', display: 'kdjnsujian', fnSelect: function(){} }) ] },{ xtype:'button', iconCls:'silk-printer', text:'Cetak Blanko', margins:'0 0 0 10', handler: function(){ printBlankoNilai(); } }] return comp; } function printBlankoNilai(){ if(RH.getCompValue('info.kdmatkul')==''){ RH.warning('Mata Kuliah Belum Dipilih!'); return; } if(RH.getCompValue('info.nidu')==''){ RH.warning('Dosen Mata Kuliah Belum Dipilih!'); return; } if(RH.getCompValue('cb.selUjian')==''){ RH.warning('Pilih Jenis Ujian!'); return; } var kdprodi = RH.getCompValue('cb.prodi'); var kdstsemester= RH.getCompValue('cb.stsemester'); var kdmk = RH.getCompValue('info.kdmatkul'); var nidu = RH.getCompValue('info.nidu'); var idklsmhs = RH.getCompValue('hidden.idklsmhs'); if(RH.getCompValue('cb.selUjian')=='1'){ RH.ShowReport(BASE_URL + 'rpt/rpt_peserta_uts/get_peserta_uts/' +kdprodi+'/'+kdstsemester+'/'+kdmk+'/'+nidu+'/'+idklsmhs); } if(RH.getCompValue('cb.selUjian')=='2'){ RH.ShowReport(BASE_URL + 'rpt/rpt_pesertauas/get_peserta_uas/' +kdprodi+'/'+kdstsemester+'/'+kdmk+'/'+nidu+'/'+idklsmhs); } }