//ALL FIELDS MAHASISWA function allFields_mhs() { return new Object([ //EXTRA FROM OTHER TABLES //V_PRODI { name: "nmfakultas", mapping: "nmfakultas" } , { name: "nourutprodi", mapping: "nourutprodi" } , { name: "nmprodi", mapping: "nmprodi" } , { name: "lnmprodi", mapping: "lnmprodi" } , { name: "nmjenjangstudi", mapping: "nmjenjangstudi" } // , { name: "nmstawal", mapping: "nmstawal" } , { name: "nmstaktiv", mapping: "nmstaktiv" } , { name: "nmkotkabasal", mapping: "nmkotkabasal"} , { name: "nmkotkabsurat", mapping: "nmkotkabsurat"} , { name: "nmkotkabortu", mapping: "nmkotkabortu"} , { name: "nmkotkabslta", mapping: "nmkotkabslta"} , { name: "nmproslta", mapping: "nmproslta"} //PERSONAL , { name: "nim", mapping: "nim" } , { name: "nmmhs", mapping: "nmmhs" } , { name: "kdjnskelamin", mapping: "kdjnskelamin" } , { name: "tptlahir", mapping: "tptlahir" } , { name: "tgllahir", mapping: "tgllahir" } , { name: "kdagama", mapping: "kdagama" } , { name: "idgoldarah", mapping: "idgoldarah" } , { name: "kdwn", mapping: "kdwn" } , { name: "notelpmhs", mapping: "notelpmhs" } , { name: "nohpmhs", mapping: "nohpmhs" } , { name: "alamatasal", mapping: "alamatasal" } , { name: "kelurahanasal", mapping: "kelurahanasal" } , { name: "kecamatanasal", mapping: "kecamatanasal" } , { name: "kdkotkabasal", mapping: "kdkotkabasal" } , { name: "kdposasal", mapping: "kdposasal" } , { name: "alamatsurat", mapping: "alamatsurat" } , { name: "kelurahansurat", mapping: "kelurahansurat" } , { name: "kecamatansurat", mapping: "kecamatansurat" } , { name: "kdkotkabsurat", mapping: "kdkotkabsurat" } //ORTU , { name: "nmortu", mapping: "nmortu" } , { name: "idpekerjaanortu", mapping: "idpekerjaanortu" } , { name: "idpendidikanortu", mapping: "idpendidikanortu" } , { name: "alamatortu", mapping: "alamatortu" } , { name: "kecamatanortu", mapping: "kecamatanortu" } , { name: "kdkotkabortu", mapping: "kdkotkabortu" } , { name: "kdposortu", mapping: "kdposortu" } , { name: "notelportu", mapping: "notelportu" } //DAFTAR , { name: "nopmb", mapping: "nopmb" } , { name: "kdstsemester", mapping: "kdstsemester" } , { name: "kdprodi", mapping: "kdprodi" } , { name: "shiftmhs", mapping: "shiftmhs" } , { name: "idklsmhs", mapping: "idklsmhs" } , { name: "thnmasuk", mapping: "thnmasuk" } , { name: "tglmasuk", mapping: "tglmasuk" } , { name: "kdstawalmhs", mapping: "kdstawalmhs" } , { name: "kdstaktivitasmhs", mapping: "kdstaktivitasmhs" } , { name: "kdpropinsislta", mapping: "kdpropinsislta" } , { name: "btsstudi", mapping: "btsstudi" } //SLTA , { name: "nmslta", mapping: "nmslta" } , { name: "kdkotkabslta", mapping: "kdkotkabslta" } , { name: "idjnsslta", mapping: "idjnsslta" } , { name: "idstakreditasislta", mapping: "idstakreditasislta" } , { name: "thnlulusslta", mapping: "thnlulusslta" } , { name: "nemslta", mapping: "nemslta" } , { name: "rangkingslta", mapping: "rangkingslta" } , { name: "noijazahslta", mapping: "noijazahslta" } , { name: "tglijazahslta", mapping: "tglijazahslta" } // ASAL PT , { name: "kdptasal", mapping: "kdptasal" } , { name: "nmptasal", mapping: "nmptasal" } , { name: "idjnspt", mapping: "idjnspt" } , { name: "idstakreditasi", mapping: "idstakreditasi" } , { name: "idkuakreditasi", mapping: "idkuakreditasi" } , { name: "kdjenjangstudiasal", mapping: "kdjenjangstudiasal" } , { name: "fakultasasal", mapping: "fakultasasal" } , { name: "kdprodiasal", mapping: "kdprodiasal" } , { name: "nimasal", mapping: "nimasal" } , { name: "noijazahasal", mapping: "noijazahasal" } , { name: "tglijazahasal", mapping: "tglijazahasal" } , { name: "idsemesterpindah", mapping: "idsemesterpindah" } , { name: "jmlsksdiakui", mapping: "jmlsksdiakui" } , { name: "alasanpindah", mapping: "alasanpindah" } // PEKERJAAN , { name: "idpekerjaanmhs", mapping: "idpekerjaanmhs" } , { name: "nmtptbekerjaalumni", mapping: "nmtptbekerjaalumni" } , { name: "alamatkerjaalumni", mapping: "alamatkerjaalumni" } , { name: "jabatanalumni", mapping: "jabatanalumni" } , { name: "thnkeluar", mapping: "thnkeluar" } , { name: "tgllulus", mapping: "tgllulus" } //ALUMNI , { name: "idpekerjaanalumni", mapping: "idpekerjaanalumni" } , { name: "nmtptbekerjaalumni", mapping: "nmtptbekerjaalumni" } , { name: "alamatkerjaalumni", mapping: "alamatkerjaalumni" } , { name: "jabatanalumni", mapping: "jabatanalumni" } , { name: "thnkeluar", mapping: "thnkeluar" } , { name: "tgllulus", mapping: "tgllulus" } // S3 , { name: "kdbiayastudi", mapping: "kdbiayastudi" } , { name: "kdpttptbekerja", mapping: "kdpttptbekerja" } , { name: "nmpttptbekerja", mapping: "nmpttptbekerja" } , { name: "kdproditptbekerja", mapping: "kdproditptbekerja" } , { name: "nmproditptbekerja", mapping: "nmproditptbekerja" } , { name: "nidupromotor", mapping: "nidupromotor" } , { name: "nidukopromotor1", mapping: "nidukopromotor1" } , { name: "nidukopromotor2", mapping: "nidukopromotor2" } , { name: "nidukopromotor3", mapping: "nidukopromotor3" } , { name: "nidukopromotor4", mapping: "nidukopromotor4" } //LAINNYA , { name: "email", mapping: "email" } , { name: "facebook", mapping: "facebook" } , { name: "twitter", mapping: "twitter" } , { name: "pinbb", mapping: "pinbb" } , { name: "website", mapping: "website" } /* , { name: "abcd", mapping: "abcd" } , { name: "abcd", mapping: "abcd" } , { name: "abcd", mapping: "abcd" } , { name: "abcd", mapping: "abcd" } */ ]); }; //COLUMN MODEL var cm_mahasiswa = new Ext.grid.ColumnModel([{ header: 'NPM', width: 100, dataIndex: 'nim', sortable: true }, { header: 'Nama Mahasiswa', width: 200, dataIndex: 'nmmhs', sortable: true }, { header: '(L/P)', width: 40, dataIndex: 'kdjnskelamin', sortable: true }, { header: 'Program Studi', width: 130, dataIndex: 'nmprodi', sortable: true }, { header: 'Tahun Masuk', width: 70, dataIndex: 'thnmasuk', sortable: true }, { header: 'Status Pendaftar', width: 85, dataIndex: 'nmstawal', sortable: true }, { header: 'Status Aktiv', width: 80, dataIndex: 'nmstaktiv', sortable: true }] ); // Selection Model var sm_mhs = new Ext.grid.RowSelectionModel({ singleSelect: true }); // Grid View var gv_mhs = new Ext.grid.GridView({ emptyText: '< Belum ada Data >' }); function wGridMhs(){ //DATA SOURCE var ds_mhs = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'mahasiswa_controller/get_mhs', method: 'POST' }), baseParams: { start: 0, limit: 20}, totalProperty: 'results', autoLoad : true, root: 'data', fields: allFields_mhs(), }); //Grid Search (for Plugin) var gSearch = [new Ext.ux.grid.Search({ iconCls: 'silk-zoom', minChars: 1, width: 200, autoFocus: true, autoHeight: true, position: 'top', mode: 'local', //'remote', })]; // Paging (for placement in bottom bar) /*var paging = new Ext.PagingToolbar({ store: ds_mhs, pageSize: 30, displayInfo: false, mode: 'local', //displayMsg: 'Baris {0} sampai {1} dari {2}', emptyMsg: 'No data to display' });*/ //GRID PANEL var gp_mhs = new Ext.grid.GridPanel({ ds: ds_mhs, cm: cm_mahasiswa, sm: sm_mhs, view: gv_mhs, forceFit: true,//height: 400,width: 720, plugins: gSearch, forceFit: true, autoSizeColumns: true, enableColumnResize: true, enableColumnHide: false, enableColumnMove: false, enableHdaccess: false, columnLines: true, loadMask: true, //buttonAlign: 'left', layout: 'anchor', //anchorSize: { width: 400, height: 720, }, tbar: [{hidden:true, text: 'Print', iconCls: 'silk-printer', }, '->'], /*// Belum terdefinisi di versi < 4 dockedItems: [Ext.create('Ext.toolbar.Paging', { dock: 'bottom'//, //store: ds_lookup })],*/ bbar: new Ext.PagingToolbar({ store: ds_mhs, displayInfo: true, displayMsg: 'Data {0} - {1} dari {2}', emptyMsg: "Belum ada data", }), listeners: { rowdblclick: dblclk_mhs } }); var win_mhs = new Ext.Window({ title: 'Daftar Mahasiswa', modal: true, layout: 'fit', width:720, height:400, items: [gp_mhs] }).show(); function dblclk_mhs(grid, rowIdx) { var rec = ds_mhs.getAt(rowIdx); var npm = rec.data['nim']; var nama = rec.data['nmmhs']; var fakultas = rec.data['nmfakultas']; var prodi = rec.data['lnmprodi']; var thmasuk = rec.data['thnmasuk']; var nmstawal = rec.data['nmstawal']; var nmstaktiv = rec.data['nmstaktiv']; //SETUP disableMhsContents(); resetMhsContents(); Ext.getCmp('fp.mhsFDisp').getForm().reset(); Ext.getCmp('tb.save-mhs').disable(); Ext.getCmp('tb.update-mhs').disable(); Ext.getCmp('tabpanel-mhs').setActiveTab(0); //FORM DISPLAY Ext.getCmp('frm.npm').setValue(npm); Ext.getCmp('frm.nama').setValue(nama); Ext.getCmp('frm.fakultas').setValue(fakultas); Ext.getCmp('frm.prodi').setValue(prodi); Ext.getCmp('frm.thmasuk').setValue(thmasuk); Ext.getCmp('frm.staktiv').setValue(nmstaktiv); Ext.getCmp('frm.stawal').setValue(nmstawal); //PERSONAL TAB Ext.getCmp('tf.npm-mhs').setValue(npm); Ext.getCmp('tf.nama-mhs').setValue(nama); Ext.getCmp('cb.gender-mhs').setValue(rec.data['kdjnskelamin']); Ext.getCmp('tf.tplahir-mhs').setValue(rec.data['tptlahir']); Ext.getCmp('df.tglahir-mhs').setValue(rec.data['tgllahir']); Ext.getCmp('cb.agama-mhs').setValue(rec.data['kdagama']); Ext.getCmp('cb.goldarah-mhs').setValue(rec.data['idgoldarah']); Ext.getCmp('cb.wn-mhs').setValue(rec.data['kdwn']); Ext.getCmp('tf.telp-mhs').setValue(rec.data['notelpmhs']); Ext.getCmp('tf.hp-mhs').setValue(rec.data['nohpmhs']); Ext.getCmp('tf.alamat_asal-mhs').setValue(rec.data['alamatasal']); Ext.getCmp('tf.kel_asal-mhs').setValue(rec.data['kelurahanasal']); Ext.getCmp('tf.kec_asal-mhs').setValue(rec.data['kecamatanasal']); Ext.getCmp('tf.kdkota_asal-mhs').setValue(rec.data['kdkotkabasal']); Ext.getCmp('tf.kota_asal-mhs').setValue(rec.data['nmkotkabasal']); Ext.getCmp('tf.kdpos_asal-mhs').setValue(rec.data['kdposasal']); Ext.getCmp('tf.alamat_surat-mhs').setValue(rec.data['alamatsurat']); Ext.getCmp('tf.kel_surat-mhs').setValue(rec.data['kelurahansurat']); Ext.getCmp('tf.kec_surat-mhs').setValue(rec.data['kecamatansurat']); Ext.getCmp('tf.kdkota_surat-mhs').setValue(rec.data['kdkotkabsurat']); Ext.getCmp('tf.kota_surat-mhs').setValue(rec.data['nmkotkabsurat']); Ext.getCmp('tf.kdpos_surat-mhs').setValue(rec.data['kdpossurat']); //ORTU TAB's Fields Ext.getCmp('tf.namaortu').setValue(rec.data['nmortu']); Ext.getCmp('cb.jobortu').setValue(rec.data['idpekerjaanortu']); Ext.getCmp('cb.eduortu').setValue(rec.data['idpendidikanortu']); Ext.getCmp('tf.alamatortu').setValue(rec.data['alamatortu']); Ext.getCmp('tf.kelortu').setValue(rec.data['kelurahanortu']); Ext.getCmp('tf.kecortu').setValue(rec.data['kecamatanortu']); Ext.getCmp('tf.kdkotaortu').setValue(rec.data['kdkotkabortu']); Ext.getCmp('tf.kotaortu').setValue(rec.data['nmkotkabortu']); Ext.getCmp('tf.kdposortu').setValue(rec.data['kdposortu']); Ext.getCmp('tf.tlportu').setValue(rec.data['notelportu']); //DAFTAR TAB's Fields Ext.getCmp('tf.nopmb').setValue(rec.data['nopmb']); Ext.getCmp('cb.stsmt').setValue(rec.data['kdstsemester']); Ext.getCmp('cb.prodireg').setValue(rec.data['kdprodi']); Ext.getCmp('cb.shift').setValue(rec.data['shiftmhs']); Ext.getCmp('cb.class').setValue(rec.data['idklsmhs']); Ext.getCmp('cb.thmasuk').setValue(rec.data['thnmasuk']); Ext.getCmp('df.tgmasuk').setValue(rec.data['tglmasuk']); Ext.getCmp('cb.stawal').setValue(rec.data['kdstawalmhs']); Ext.getCmp('cb.staktiv').setValue(rec.data['kdstaktivitasmhs']); Ext.getCmp('tf.kdprovslta').setValue(rec.data['kdpropinsislta']); Ext.getCmp('tf.provslta').setValue(rec.data['nmproslta']); Ext.getCmp('cb.batasstudi').setValue(rec.data['btsstudi']); //SLTA TAB's Fields Ext.getCmp('tf.nmslta').setValue(rec.data['nmslta']); Ext.getCmp('tf.kdkotaslta').setValue(rec.data['kdkotkabslta']); Ext.getCmp('tf.kotaslta').setValue(rec.data['nmkotkabslta']); Ext.getCmp('cb.jnslta').setValue(rec.data['idjnsslta']); Ext.getCmp('cb.stakrslta').setValue(rec.data['idstakreditasislta']); Ext.getCmp('cb.thlulusslta').setValue(rec.data['thnlulusslta']); Ext.getCmp('tf.nemslta').setValue(rec.data['nemslta']); Ext.getCmp('tf.rankslta').setValue(rec.data['rangkingslta']); Ext.getCmp('tf.noijzslta').setValue(rec.data['noijazahslta']); Ext.getCmp('df.tgijzslta').setValue(rec.data['tglijazahslta']); // ASAL PT/PINDAHAN Ext.getCmp('tf.kdpt-asal').setValue(rec.data['kdptasal']); Ext.getCmp('tf.nmpt-asal').setValue(rec.data['nmptasal']); Ext.getCmp('cb.jnpt-asal').setValue(rec.data['idjnspt']); Ext.getCmp('cb.stakr-asal').setValue(rec.data['idstakreditasi']); Ext.getCmp('cb.kuakr-asal').setValue(rec.data['idkuakreditasi']); Ext.getCmp('tf.jjgstudi-asal').setValue(rec.data['kdjenjangstudiasal']); Ext.getCmp('tf.fakultas-asal').setValue(rec.data['fakultasasal']); Ext.getCmp('tf.kdprodi-asal').setValue(rec.data['kdprodiasal']); Ext.getCmp('tf.nmprodi-asal').setValue(rec.data['nmprodiasal']); Ext.getCmp('tf.npm-asal').setValue(rec.data['nimasal']); Ext.getCmp('tf.noijzpt-asal').setValue(rec.data['noijazahasal']); Ext.getCmp('df.tgijzpt-asal').setValue(rec.data['tglijazahasal']); Ext.getCmp('nf.smtpindah-asal').setValue(rec.data['idsemesterpindah']); Ext.getCmp('nf.jumsks-asal').setValue(rec.data['jmlsksdiakui']); Ext.getCmp('ta.alasanpindah').setValue(rec.data['alasanpindah']); // PEKERJAAN MAHASISWA Ext.getCmp('cb.idjob-mhs').setValue(rec.data['idpekerjaanmhs']); Ext.getCmp('tf.tpjob-mhs').setValue(rec.data['nmtptbekerjamhs']); Ext.getCmp('tf.alamatjob-mhs').setValue(rec.data['alamatkerkamhs']); Ext.getCmp('tf.jabjob-mhs').setValue(rec.data['jabatanmhs']); // ALUMNI Ext.getCmp('cb.idjob-alumni').setValue(rec.data['idpekerjaanalumni']); Ext.getCmp('tf.tpjob-alumni').setValue(rec.data['nmtptbekerjaalumni']); Ext.getCmp('tf.alamatjob-alumni').setValue(rec.data['alamatkerjaalumni']); Ext.getCmp('tf.jabjob-alumni').setValue(rec.data['jabatanalumni']); Ext.getCmp('cb.thout-alumni').setValue(rec.data['thnkeluar']); Ext.getCmp('df.tglulus-alumni').setValue(rec.data['tgllulus']); //S3 Ext.getCmp('cb.biaya-s3').setValue(rec.data['kdbiayastudi']); Ext.getCmp('tf.kdpt-s3').setValue(rec.data['kdpttptbekerja']); Ext.getCmp('tf.nmpt-s3').setValue(rec.data['nmpttptbekerja']); Ext.getCmp('tf.kdprodi-s3').setValue(rec.data['kdproditptbekerja']); Ext.getCmp('tf.nmprodi-s3').setValue(rec.data['nmproditptbekerja']); Ext.getCmp('tf.nippro').setValue(rec.data['nidupromotor']); Ext.getCmp('tf.nipko1').setValue(rec.data['nidukopromotor1']); Ext.getCmp('tf.nipko2').setValue(rec.data['nidukopromotor2']); Ext.getCmp('tf.nipko3').setValue(rec.data['nidukopromotor3']); Ext.getCmp('tf.nipko4').setValue(rec.data['nidukopromotor4']); //LAINNYA Ext.getCmp('tf.email-mhs').setValue(rec.data['email']); Ext.getCmp('tf.fb-mhs').setValue(rec.data['facebook']); Ext.getCmp('tf.twit-mhs').setValue(rec.data['twitter']); Ext.getCmp('tf.pinbb-mhs').setValue(rec.data['pinbb']); Ext.getCmp('tf.web-mhs').setValue(rec.data['website']); /* Ext.getCmp('fform').setValue(rec.data['field']); Ext.getCmp('fform').setValue(rec.data['field']); */ win_mhs.close(); } };