var
proxy =new Ext.data.HttpProxy({
url
: GLOBAL_URL_DAILY_CALENDAR_GRID
});
var reader =new Ext.data.JsonReader({},[{
name
:'timeSlot'
},{
name
:'activity'
},{
name
:'no_of_units'
},{
name
:'observed_time'
},{
name
:'theoretical_time'
},{
name
:'additional_activity'
},{
name
:'additional_prod_time'
},{
name
:'additional_nonprod_time'
},{
name
:'total_time'
},{
name
:'efficiency'
},{
name
:'productivity'
},{
name
:'utilization'
}])
var store =new Ext.data.Store({
proxy
: proxy,
reader
: reader
});
var gridDailyCalendar =new Ext.grid.GridPanel({
region
:'center',
id
:'grid-daily-calendar',
store
: store,
columns
:[{
header
:"Time",
id
:'time',
width
:120,
dataIndex
:'timeSlot',
sortable
:false
},{
header
:"Actvity",
id
:'activity',
width
:200,
dataIndex
:'activity',
sortable
:true
},{
header
:"Number of Units Produced",
id
:'num-of-units-produced',
width
:115,
renderer
: fnMulti,
dataIndex
:'no_of_units',
sortable
:true
},{
header
:"Observed Time (hr:mm:ss)",
id
:'observed-time',
width
:115,
dataIndex
:'observed_time',
sortable
:true
},{
header
:"Theoretical Time (hr:mm:ss)",
id
:'theoretical-time',
width
:115,
dataIndex
:'theoretical_time',
sortable
:true
},{
header
:"Additional Activity",
id
:'add-activity',
width
:115,
dataIndex
:'',
sortable
:true
},{
header
:"Additional Productive Activity Time(hr:mm:ss)",
id
:'add-pro-act-time',
width
:130,
dataIndex
:'additional_prod_time',
sortable
:true
},{
header
:"Additional Activity Time (hr:mm:ss)",
id
:'add-act-time',
width
:150,
dataIndex
:'additional_nonprod_time',
sortable
:true
},{
header
:"Total Activity Time (hr:mm:ss)",
id
:'total-act-time',
width
:115,
dataIndex
:'total_time',
sortable
:true
},{
header
:"Efficiency %",
id
:'efficiency',
width
:80,
dataIndex
:'efficiency',
sortable
:true
},{
header
:"Productivity %",
id
:'productivity',
width
:90,
dataIndex
:'productivity',
sortable
:true
},{
header
:"Utilization %",
id
:'utilization',
width
:80,
dataIndex
:'utilization',
sortable
:true
}],
tbar
:["First row:",{
text
:"Button 1"
},'-',{
text
:"Button 2"
}]
});
store
.load();
var tb2 =new Ext.Toolbar({
renderTo
: grid-daily-calendar.tbar,
items
:["Second row:",{
text
:"Button 3"
},'-',{
text
:"button 4"
}]
});
var dailyCalendar ={
id
:'daily-calendar-panel',
items
:[{
title
:'Individual Daily Calendar',
layout
:'border',
items
:[{
region
:'north',
title
:'North',
height
:50,
maxSize
:150,
margins
:'5 5 0 5',
bodyStyle
:'padding:10px;',
split
:true,
html
:'Username Day Date Time'
},
gridDailyCalendar
,{
region
:'south',
height
:74,
autoScroll
:true,
html
:'<p>formulas</p>'
}]
}]
};
}