function feederUpdatesks() { /** COMMON STORES */ var ds_sks_diakui = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'feeder/updatesksdiakui_controller/get_mahasiswa_pindahan', method: 'POST' }), timeout: 1000000, root: 'data', autoLoad:true, fields: [ {name: 'a_pernah_paud', mapping: 'a_pernah_paud'}, {name: 'a_pernah_tk', mapping: 'a_pernah_tk'}, {name: 'a_pindah_mhs_asing', mapping: 'a_pindah_mhs_asing'}, {name: 'bln_akhir_bimbingan', mapping: 'bln_akhir_bimbingan'}, {name: 'bln_awal_bimbingan', mapping: 'bln_awal_bimbingan'}, {name: 'fk__jns_daftar', mapping: 'fk__jns_daftar'}, {name: 'fk__jns_keluar', mapping: 'fk__jns_keluar'}, {name: 'fk__sms', mapping: 'fk__sms'}, {name: 'fk__sp', mapping: 'fk__sp'}, {name: 'id_jns_daftar', mapping: 'id_jns_daftar'}, {name: 'id_jns_keluar', mapping: 'id_jns_keluar'}, {name: 'id_pd', mapping: 'id_pd'}, {name: 'id_reg_pd', mapping: 'id_reg_pd'}, {name: 'id_sms', mapping: 'id_sms'}, {name: 'id_sp', mapping: 'id_sp'}, {name: 'ipk', mapping: 'ipk'}, {name: 'jalur_skripsi', mapping: 'jalur_skripsi'}, {name: 'judul_skripsi', mapping: 'judul_skripsi'}, {name: 'ket', mapping: 'ket'}, {name: 'mulai_smt', mapping: 'mulai_smt'}, {name: 'nipd', mapping: 'nipd'}, {name: 'nm_pd', mapping: 'nm_pd'}, {name: 'nm_prodi_asal', mapping: 'nm_prodi_asal'}, {name: 'nm_pt_asal', mapping: 'nm_pt_asal'}, {name: 'no_seri_ijazah', mapping: 'no_seri_ijazah'}, {name: 'sert_prof', mapping: 'sert_prof'}, {name: 'sk_yudisium', mapping: 'sk_yudisium'}, {name: 'skhun', mapping: 'skhun'}, {name: 'sks_diakui', mapping: 'sks_diakui'}, {name: 'sksdiakui_siak', mapping: 'sksdiakui_siak'}, {name: 'tgl_keluar', mapping: 'tgl_keluar'}, {name: 'tgl_lahir', mapping: 'tgl_lahir'}, {name: 'tgl_masuk_sp', mapping: 'tgl_masuk_sp'}, {name: 'tgl_sk_yudisium', mapping: 'tgl_sk_yudisium'}, ] }); /** GRID COLUMN MODEL */ var cm_sks_diakui = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer({width: 30}), //for rows numbering { header: headerGerid('NIM'), width: 140, dataIndex: 'nipd', sortable: true, },{ header: headerGerid('Nama Mahasiswa'), width: 250, dataIndex: 'nm_pd', sortable: true, },{ header: headerGerid('Nama Prodi'), width: 180, dataIndex: 'fk__sms', sortable: true, },{ header: headerGerid('Tanggal Masuk'), width: 110, dataIndex: 'tgl_masuk_sp', sortable: true, renderer: Ext.util.Format.dateRenderer('d/m/Y'), },{ header: headerGerid('SKS Diakui'), width: 110, dataIndex: 'sksdiakui_siak', sortable: true, align: 'right', editor: RH.getNumEditor('sksdiakui_siak', 'INTEGER', 0, 500, false, function(){}), xtype: 'numbercolumn', format:'0,000', }] ); var grid_sks_diakui = new Ext.grid.EditorGridPanel({ id: 'grid_sks_diakui', store: ds_sks_diakui, autoSizeColumns: true, enableColumnResize: true, clicksToEdit: 1, //for cell editing (single click =1, dblclick=2) view: new Ext.grid.GridView({emptyText: '< Belum ada Data >'}), cm: cm_sks_diakui, frame: true, loadMask: true, height: 400, layout: 'anchor', tbar:[{ text: 'Export To Feeder', id: 'id_eks_feeder', iconCls: 'silk-book', handler: function() { export_to_feeder(); } }], style: 'padding-bottom:5px', }); var fp_sks_diakui = RH.GPContainer1({ title: 'Update SKS diakui untuk mahasiswa pindahan', iconCls:'silk-book', gridPanel: grid_sks_diakui, headerLabelWidth: 60, }); SET_PAGE_CONTENT(fp_sks_diakui); function export_to_feeder(){ var waitmsg = Ext.MessageBox.wait('Mengirim data ke aplikasi Feeder...', 'Info'); var dt_sksdiakui = []; for(var zx = 0; zx < ds_sks_diakui.data.items.length; zx++){ var record = ds_sks_diakui.data.items[zx].data; dt_sksdiakui[zx] = record; } Ext.Ajax.request({ url: BASE_URL + 'feeder/updatesksdiakui_controller/export_to_feeder', params: { json_sksdiakui : Ext.encode(dt_sksdiakui) }, timeout: 1000000, success: function(response){ waitmsg.hide(); obj = Ext.util.JSON.decode(response.responseText); if(obj.success === true){ Ext.MessageBox.alert('Informasi','Berhasil mengekspor data SKS ke aplikasi feeder.'); }else{ Ext.MessageBox.alert('Informasi',obj.message); } ds_sks_diakui.reload(); } }); } } function headerGerid(text, align){ var hAlign = 'center'; if(align =='c') hAlign = 'center'; if(align =='l') hAlign = 'left'; if(align =='r') hAlign = 'right'; return "