function feederNilaiTransfer() { /** COMMON STORES */ var ds_nilai_transfer = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'feeder/feedernilaitransfer_controller/get_mahasiswa_pindahan', method: 'POST' }), //timeout: 1000000, root: 'data', fields: [ {name: 'id_reg_pd', mapping: 'id_reg_pd'}, {name: 'nipd', mapping: 'nipd'}, {name: 'id_pd', mapping: 'id_pd'}, {name: 'nm_pd', mapping: 'nm_pd'}, {name: 'tgl_lahir', mapping: 'tgl_lahir'}, {name: 'id_sms', mapping: 'id_sms'}, {name: 'fk__sms', mapping: 'fk__sms'}, {name: 'id_sp', mapping: 'id_sp'}, {name: 'fk__sp', mapping: 'fk__sp'}, {name: 'tgl_masuk_sp', mapping: 'tgl_masuk_sp'}, {name: 'id_jns_daftar', mapping: 'id_jns_daftar'}, {name: 'fk__jns_daftar', mapping: 'fk__jns_daftar'}, {name: 'id_jns_keluar', mapping: 'id_jns_keluar'}, {name: 'fk__jns_keluar', mapping: 'fk__jns_keluar'}, {name: 'tgl_keluar', mapping: 'tgl_keluar'}, {name: 'ket', mapping: 'ket'}, {name: 'skhun', mapping: 'skhun'}, {name: 'a_pernah_paud', mapping: 'a_pernah_paud'}, {name: 'a_pernah_tk', mapping: 'a_pernah_tk'}, {name: 'mulai_smt', mapping: 'mulai_smt'}, {name: 'sks_diakui', mapping: 'sks_diakui'}, {name: 'jalur_skripsi', mapping: 'jalur_skripsi'}, {name: 'judul_skripsi', mapping: 'judul_skripsi'}, {name: 'bln_awal_bimbingan', mapping: 'bln_awal_bimbingan'}, {name: 'bln_akhir_bimbingan', mapping: 'bln_akhir_bimbingan'}, {name: 'sk_yudisium', mapping: 'sk_yudisium'}, {name: 'tgl_sk_yudisium', mapping: 'tgl_sk_yudisium'}, {name: 'ipk', mapping: 'ipk'}, {name: 'no_seri_ijazah', mapping: 'no_seri_ijazah'}, {name: 'sert_prof', mapping: 'sert_prof'}, {name: 'a_pindah_mhs_asing', mapping: 'a_pindah_mhs_asing'}, {name: 'nm_pt_asal', mapping: 'nm_pt_asal'}, {name: 'nm_prodi_asal', mapping: 'nm_prodi_asal'}, ] }); var ds_stsmt = store_stsmt(); var filter_panel = new Ext.FormPanel({ width: 800, autoHeight: true, layout: 'form', bodyStyle: 'padding: 10px 10px 10px 10px;', labelWidth: 180, defaults: {allowBlank: false, msgTarget: 'side'}, items:[ { id: 'cb.stsemester', fieldLabel: 'Tahun Akademik - Semester ', xtype: 'combo', store: ds_stsmt, triggerAction: 'all', valueField: 'kdstsemester', displayField: 'nmsmt', forceSelection: true, submitValue: true, mode: 'local', allowBlank: false, editable: false, width: 250, listeners:{ select:function(){ reload_nilai_transfer(); } } }], }); /** FUNCTION for GRID COLUMN EDITOR */ /** GRID COLUMN MODEL */ var cm_nilai = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer({width: 30}), //for rows numbering { header: headerGerid('NIM'), width: 100, dataIndex: 'nipd', sortable: true, },{ header: headerGerid('Nama Mahasiswa'), width: 100, dataIndex: 'nm_pd', sortable: true, },{ header: headerGerid('Nama Prodi'), width: 100, dataIndex: 'fk__sms', sortable: true, },{ header: headerGerid('Nama Kelas Perkuliahan'), width: 100, dataIndex: 'nmkelas', sortable: true, },{ header: headerGerid('Nilai Angka'), width: 100, dataIndex: 'nilai_angka', sortable: true, },{ header: headerGerid('Nilai Huruf'), width: 100, dataIndex: 'nilai_huruf', sortable: true, },{ header: headerGerid('Nilai Indeks'), width: 100, dataIndex: 'nilai_indeks', sortable: true, },] ); var grid_nilai_transfer = new Ext.grid.EditorGridPanel({ id: 'grid_nilai_transfer', store: ds_nilai_transfer, autoSizeColumns: true, enableColumnResize: true, view: new Ext.grid.GridView({emptyText: '< Belum ada Data >'}), cm: cm_nilai, frame: true, loadMask: true, height: 400, layout: 'anchor', style: 'padding-bottom:5px', }); var fp_nilai_transfer = RH.GPContainer1_wHeaders({ title: 'Export Nilai Mahasiswa', iconCls:'silk-book', gridPanel: grid_nilai_transfer, headerLabelWidth: 60, headers: [{ xtype: 'container', layout: 'hbox', items:[{ layout:'form', labelWidth:60, labelAlign:'right', items: [filter_panel] }] }], }); SET_PAGE_CONTENT(fp_nilai_transfer); function export_to_feeder(){ var waitmsg = Ext.MessageBox.wait('Mengirim data ke aplikasi Feeder...', 'Info'); var dt_mahasiswa = []; for(var zx = 0; zx < ds_nilai_transfer.data.items.length; zx++){ var record = ds_nilai_transfer.data.items[zx].data; dt_mahasiswa[zx] = record; } Ext.Ajax.request({ url: BASE_URL + 'feeder/feedermahasiswa_controller/export_to_feeder', params: { json_mahasiswa : Ext.encode(dt_mahasiswa) }, success: function(response){ waitmsg.hide(); obj = Ext.util.JSON.decode(response.responseText); if(obj.success === true){ Ext.MessageBox.alert('Informasi','Berhasil mengekspor data mahasiswa ke aplikasi feeder.'); //ds_nilai_transfer.clearData(); Ext.getCmp('btn_export_to_feeder').disable(); }else{ Ext.MessageBox.alert('Informasi',obj.message); } } }); } function reload_nilai_transfer() { var stsemester = Ext.getCmp('cb.stsemester').getValue(); if(stsemester){ ds_nilai_transfer.setBaseParam('kdstsemester',stsemester); ds_nilai_transfer.load(); } } } function headerGerid(text, align){ var hAlign = 'center'; if(align =='c') hAlign = 'center'; if(align =='l') hAlign = 'left'; if(align =='r') hAlign = 'right'; return "