function pDashJadKul(){
var fields_jadkul = RH.storeFields('idruangan', 'nmruangan','idklpruangan', 'nmklpruangan',
'hj11','hj12','hj13','hj14','hj15','hj16',
'hj21','hj22','hj23','hj24','hj25','hj26',
'hj31','hj32','hj33','hj34','hj35','hj36',
'hj41','hj42','hj43','hj44','hj45','hj46',
'hj51','hj52','hj53','hj54','hj55','hj56',
'hj61','hj62','hj63','hj64','hj65','hj66',
'hj71','hj72','hj73','hj74','hj75','hj76'
);
var ds_jadkul = new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({
url: BASE_URL + 'dashboard_controller/get_AllJadwalKul',
method: 'POST'
}),
root: 'data',
totalProperty: 'results',
autoLoad: false,
fields : fields_jadkul
});
/** COLUMN MODEL & RENDERER */
var headwidth = 80
var group = new Ext.ux.grid.ColumnHeaderGroup({
rows: []
});
var cm_jadkul = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(), //for rows numbering
{
header: 'Kelompok Ruangan',width: 150,
dataIndex: 'nmklpruangan',
sortable: true,
align: 'left',
renderer: render_bold
},
{
header: 'Ruangan',width: headwidth,
dataIndex: 'nmruangan',
sortable: true,
align: 'left',
renderer: render_bold
},
//====================================SENIN
{
header: 'SENIN
JAM KE - 1', width: headwidth,
dataIndex: 'hj11',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SENIN
JAM KE - 2', width: headwidth,
dataIndex: 'hj12',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SENIN
JAM KE - 3', width: headwidth,
dataIndex: 'hj13',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SENIN
JAM KE - 4', width: headwidth,
dataIndex: 'hj14',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SENIN
JAM KE - 5', width: headwidth,
dataIndex: 'hj15',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SENIN
JAM KE - 6', width: headwidth,
dataIndex: 'hj16',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================SELASA
{
header: 'SELASA
JAM KE - 1', width: headwidth,
dataIndex: 'hj21',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SELASA
JAM KE - 2', width: headwidth,
dataIndex: 'hj22',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SELASA
JAM KE - 3', width: headwidth,
dataIndex: 'hj23',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SELASA
JAM KE - 4', width: headwidth,
dataIndex: 'hj24',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SELASA
JAM KE - 5', width: headwidth,
dataIndex: 'hj25',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SELASA
JAM KE - 6', width: headwidth,
dataIndex: 'hj26',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================RABU
{
header: 'RABU
JAM KE - 1', width: headwidth,
dataIndex: 'hj31',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'RABU
JAM KE - 2', width: headwidth,
dataIndex: 'hj32',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'RABU
JAM KE - 3', width: headwidth,
dataIndex: 'hj33',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'RABU
JAM KE - 4', width: headwidth,
dataIndex: 'hj34',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'RABU
JAM KE - 5', width: headwidth,
dataIndex: 'hj35',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'RABU
JAM KE - 6', width: headwidth,
dataIndex: 'hj36',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================KAMIS
{
header: 'KAMIS
JAM KE - 1', width: headwidth,
dataIndex: 'hj41',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'KAMIS
JAM KE - 2', width: headwidth,
dataIndex: 'hj42',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'KAMIS
JAM KE - 3', width: headwidth,
dataIndex: 'hj43',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'KAMIS
JAM KE - 4', width: headwidth,
dataIndex: 'hj44',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'KAMIS
JAM KE - 5', width: headwidth,
dataIndex: 'hj45',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'KAMIS
JAM KE - 6', width: headwidth,
dataIndex: 'hj46',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================JUMAT
{
header: 'JUMAT
JAM KE - 1', width: headwidth,
dataIndex: 'hj51',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'JUMAT
JAM KE - 2', width: headwidth,
dataIndex: 'hj52',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'JUMAT
JAM KE - 3', width: headwidth,
dataIndex: 'hj53',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'JUMAT
JAM KE - 4', width: headwidth,
dataIndex: 'hj54',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'JUMAT
JAM KE - 5', width: headwidth,
dataIndex: 'hj55',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'JUMAT
JAM KE - 6', width: headwidth,
dataIndex: 'hj56',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================SABTU
{
header: 'SABTU
JAM KE - 1', width: headwidth,
dataIndex: 'hj61',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SABTU
JAM KE - 2', width: headwidth,
dataIndex: 'hj62',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SABTU
JAM KE - 3', width: headwidth,
dataIndex: 'hj63',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SABTU
JAM KE - 4', width: headwidth,
dataIndex: 'hj64',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SABTU
JAM KE - 5', width: headwidth,
dataIndex: 'hj65',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'SABTU
JAM KE - 6', width: headwidth,
dataIndex: 'hj66',
sortable: true,
align: 'center',
renderer: render_available
},
//====================================MINGGU
{
header: 'MINGGU
JAM KE - 1', width: headwidth,
dataIndex: 'hj71',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'MINGGU
JAM KE - 2', width: headwidth,
dataIndex: 'hj72',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'MINGGU
JAM KE - 3', width: headwidth,
dataIndex: 'hj73',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'MINGGU
JAM KE - 4', width: headwidth,
dataIndex: 'hj74',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'MINGGU
JAM KE - 5', width: headwidth,
dataIndex: 'hj75',
sortable: true,
align: 'center',
renderer: render_available
}, {
header: 'MINGGU
JAM KE - 6', width: headwidth,
dataIndex: 'hj76',
sortable: true,
align: 'center',
renderer: render_available
}
]
);
var sm_jadkul = new Ext.grid.RowSelectionModel({ singleSelect: true });
var gv_jadkul = new Ext.grid.GridView({emptyText: '< Belum ada Data >'});
function render_bold(value) {
return ''+value+'';
}
function render_available(value,meta) {
Ext.QuickTips.init();
var color, val;
if (value == '0'){
color = "green";
val = 'KOSONG';
} else if (value == '1') {
color = "blue";
val = 'ISI';
} else if (value > '1') {
color = "red";
val = 'BENTROK';
}
return '