creates the Units view in the scheduler
config | object | the configuration object of the Units view |
Available only in PRO Edition
scheduler.createUnitsView({
name:"unit",
property:"unit_id",
list:[
{key:1, label:"Section A"},
{key:2, label:"Section B"},
{key:3, label:"Section C"}
]
});
scheduler.init('scheduler_here',new Date(2009,5,30),"unit");
scheduler.parse([
{start_date:"06/30/2009 09:00",end_date:"06/30/2009 12:00",text:"Task1",unit_id:1},
{start_date:"06/30/2009 12:00",end_date:"06/30/2009 20:00",text:"Task2",unit_id:3},
{start_date:"06/30/2009 08:00",end_date:"06/30/2009 12:00",text:"Task3",unit_id:2}
],"json");
This functionality is available in the PRO edition only.
The method requires the units plugin to be activated.
The configuration object of the Units view can have the following properties:
name | (string) the view's id. If you specify the name of some already existing Units view - it will be overwritten |
property | (string) the name of a data property that will be used to assign events to certain units |
list | (array of objects) defines units of the view. Each object in the array specifies a single unit and takes these properties:
|
days | (number) a number of items(days) in the Y-Axis |
skip_incorrect | (boolean) if true, events which belong to none of the units won't be displayed. If false - such events will be assigned to the first unit. By default - false. Optional |
size | (number) the number of units that should be shown in the view (if the real count exceeds this value, scroll bar will be shown). Optional |
step | (number) the number of units that will be scrolled at once. Optional |