function f_inputhasilusm() { var nopmbx, cmbpengujix, catatanx = ''; var ds_prodi = store_prodi(); var ds_klsmhs = store_klsmhs(); var ds_stusm = store_stusm(); var ds_jadwalpmb = store_jadwalpmb(); var ds_penguji = store_penguji(); var ds_grid = new Ext.data.JsonStore({ proxy: new Ext.data.HttpProxy({ url: BASE_URL + 'pendaftaran/c_inputhasilusm/grid', method: 'POST' }), params: { start: 0, limit: 5 }, root: 'data', totalProperty: 'results', autoLoad: true, fields: [{ name: "nopmb", mapping: "nopmb" }, { name: "tglpmb", mapping: "tglpmb" }, { name: "nama", mapping: "nama" }, { name: "kdjk", mapping: "kdjk" }, { name: "idstmskmhs", mapping: "idstmskmhs" }, { name: "idklsmhs1", mapping: "idklsmhs1" }, { name: "kdprodi1", mapping: "kdprodi1" }, { name: "idstusm", mapping: "idstusm" }, { name: "penguji", mapping: "penguji" }, { name: "catatanusm", mapping: "catatanusm" }] }); var cm = new Ext.grid.ColumnModel({ // specify any defaults for each column defaults: { sortable: true // columns are not sortable by default }, columns: [{ header: 'No. PMB', width: 100, dataIndex: 'nopmb', sortable: true }, { header: 'Tgl. Daftar', width: 70, dataIndex: 'tglpmb', sortable: true // , // renderer:function(v){ // var d= new Date(v); // return d.format('d-m-Y'); // } }, { header: 'Nama Pendaftar', width: 150, dataIndex: 'nama', sortable: true }, { header: '(L/P)', width: 40, dataIndex: 'kdjk', sortable: true }, { header: 'Status Pendaftar', width: 110, dataIndex: 'idstmskmhs', sortable: true }, { header: 'Program Studi', width: 180, dataIndex: 'kdprodi1', sortable: true, editor: { xtype: 'combo', allowBlank: true, store: ds_prodi, name: 'cmbkdprodi', triggerAction: 'all', id: 'cmbkdprodi', valueField: 'nmprodi', displayField: 'nmprodi', forceSelection: true, submitValue: true, hiddenName: 'h_cmbkdprodi', listeners: { select: function() { Ext.Ajax.request({ url: BASE_URL + 'pendaftaran/c_inputhasilusm/getklsprodi', method: 'POST', params: { prodi: Ext.getCmp("cmbkdprodi").getValue() }, success: function(response) { Ext.getCmp("cmbklsmhs").setValue(response.responseText); } }); } }, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true } }, { header: 'Kelas', width: 100, dataIndex: 'idklsmhs1', sortable: true, editor: { xtype: 'combo', allowBlank: true, store: ds_klsmhs, name: 'cmbklsmhs', triggerAction: 'all', id: 'cmbklsmhs', valueField: 'nmklsmhs', displayField: 'nmklsmhs', forceSelection: true, submitValue: true, hiddenName: 'h_cmbklsmhs', listeners: { select: function() { } }, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true } }, { header: 'Hasil', width: 110, dataIndex: 'idstusm', sortable: true, editor: { xtype: 'combo', allowBlank: true, store: ds_stusm, name: 'cmbidstusm', triggerAction: 'all', id: 'cmbidstusm', valueField: 'nmstusm', displayField: 'nmstusm', forceSelection: true, submitValue: true, hiddenName: 'h_cmbidstusm', listeners: { select: function() { } }, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true } }, { header: 'Dosen Penguji', width: 150, dataIndex: 'penguji', sortable: true, editor: { // xtype: 'combo', // allowBlank: false, // name: 'cmbpenguji', // id: 'cmbpenguji', // store: ds_stusm, // forceSelection: true, // submitValue: true, // listeners: { // focus: function() { // find_x("Data Dosen Penguji", 7); // } // }, // typeAhead: true, // mode: 'local', // emptyText: 'Pilih...', // selectOnFocus: true // // xtype: 'compositefield', name: 'comp_cmbpenguji', id: 'comp_cmbpenguji', items: [{ xtype: 'textfield', id: 'cmbpenguji', name: 'cmbpenguji', width: 122, height: 22, emptyText: 'Pilih...', listeners: { valid: function() { } } }, { xtype: 'button', text: ' ... ', id: 'btn_cmbpenguji2', width: 22, height: 22, handler: function() { find_x("Data Dosen Penguji", 7); } }] } }, { header: 'Catatan', width: 150, dataIndex: 'catatanusm', sortable: true, editor: { xtype: 'textfield', id: 'catatanusm_text', name: 'catatanusm_text', listeners: { specialkey: function(f,e){ if (e.getKey() == e.ENTER) { } } } } }] }); var vw = new Ext.grid.GridView({ emptyText: '< No Data To Display >' }); var sm_nya = new Ext.grid.CheckboxSelectionModel({ listeners: { // rowselect: select_action, // rowdeselect: deselect_action } }); var editor = new Ext.ux.grid.RowEditor({ saveText: 'Update', clicksToEdit: 1 }); editor.on({ scope: this, afteredit: function(roweditor, changes, record, rowIndex) { Ext.Ajax.request({ url: BASE_URL + 'pendaftaran/c_inputhasilusm/update', params: { nopmb: record.get('nopmb'), idklsmhs1: record.get('idklsmhs1'), kdprodi1: record.get('kdprodi1'), idstusm: record.get('idstusm'), penguji: Ext.getCmp('cmbpenguji').getValue(), catatanusm: record.get('catatanusm') }, success: function() { // Ext.MessageBox.alert("Informasi", "Ubah Data Berhasil"); ds_grid.load(); }, failure: function() { // Ext.MessageBox.alert("Informasi", "Ubah Data Gagal"); } }); } }); var paging = new Ext.PagingToolbar({ pageSize: 50, store: ds_grid, displayInfo: true, displayMsg: 'Data Input Hasil USM Dari {0} - {1} of {2}', emptyMsg: 'Input Hasil USM Belum Dipilih.' }); var grid_nya = new Ext.grid.EditorGridPanel({ store: ds_grid, frame: true, //width: 1140, height: 530, plugins: editor, id: 'grid_det', // autoWidth:true, // autoSizeColumns:true, // enableColumnResize: true, // enableColumnHide: false, // enableColumnMove: false, // enableHdMenu: false, // columnLines: true, // loadMask: true, buttonAlign: 'left', defaults: { anchor: '-10' }, forceFit: true, tbar: [{ xtype: 'buttongroup', title: 'Pencarian', columns: 4, width: 500, defaults: { scale: 'small' }, items: [{ text: 'Jadwal PMB' }, { xtype: 'combo', store: ds_jadwalpmb, name: 'kdjadwalpmb', id: 'kdjadwalpmb', triggerAction: 'all', editable: false, valueField: 'kdjadwalpmb', displayField: 'nmjadwalpmb', forceSelection: true, submitValue: true, hiddenName: 'h_kdjadwalpmb', listeners: {}, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 250 }, { xtype: 'label', text: '' }, { xtype: 'label', text: '' }, { text: 'Program Studi (Pilihan 1)' }, { xtype: 'combo', store: ds_prodi, name: 'kdprodi', id: 'kdprodi', triggerAction: 'all', editable: false, valueField: 'kdprodi', displayField: 'nmprodi', forceSelection: true, submitValue: true, hiddenName: 'h_kdprodi', listeners: {}, typeAhead: true, mode: 'local', emptyText: 'Pilih...', selectOnFocus: true, width: 250 }, { xtype: 'label', text: '' }, { xtype: 'label', text: '' }, { text: 'Cari Berdasarkan' }, { xtype: 'combo', store: ['No PMB', 'Tgl. Daftar', 'Nama Pendaftar', '(L/P)', 'Status', 'Program Studi', 'Hasil', 'Penguji', 'Catatan'], //ds_fieldpmb, name: 'idfield', id: 'idfield', triggerAction: 'all', editable: false, valueField: 'kolom', displayField: 'kolom', forceSelection: true, submitValue: true, hiddenName: 'h_kolom', listeners: {}, typeAhead: true, mode: 'remote', emptyText: 'Pilih...', selectOnFocus: true, width: 250 }, { xtype: 'textfield', name: 'fieldnya', id: 'fieldnya', width: 250 //, // fieldLabel:'Dodol' }, { xtype: 'button', text: ' Cari ', iconCls: 'silk-find', id: 'btn_data', width: 3, handler: function() { ds_grid.setBaseParam('idjadwalpmb', Ext.getCmp('kdjadwalpmb').getValue()); ds_grid.setBaseParam('kdprodi1', Ext.getCmp('kdprodi').getValue()); ds_grid.setBaseParam('idnya', Ext.getCmp('idfield').getValue()); ds_grid.setBaseParam('fieldnya', Ext.getCmp('fieldnya').getValue()); ds_grid.load(); } }] }], sm: sm_nya, vw: vw, autoScroll: true, cm: cm, bbar: paging, listeners: { rowclick: function rowclick(grid, rowIdx) { var rec = ds_grid.getAt(rowIdx); nopmbx = rec.data["nopmb"]; catatanx = rec.data["catatanusm"] // alert(nopmbx); } } }); var form_bp_general = new Ext.form.FormPanel({ id: 'form_bp_general_id', title: 'Input Hasil USM', region: 'center', //autoScroll: true, buttonAlign: 'left', bodyStyle: 'padding: 5px', border: false, disabled: true, waitMsg: 'Waiting...', maskDisabled: false, monitorValid: true, items: [{ layout: 'form', border: false, items: [grid_nya] }] }); function btn_menu_add() { f_pmb_form('', ds_grid); } get_content(form_bp_general); }