Shared Files
Editable shchedule table.
new io.github.shunshun94.scheduler.Scheduler($('#my-Scheduler'), {extendable:true});
1st argument is a HTML Element as jQuery Object
.
2nd argument is optional parameters.
If it’s true
, the schedule table can be extendable.
Default Value: false
How to generate new schedule. The arguments must like io.github.shunshun94.scheduler.Scheduler.generateSchedule
.
If false
is inputed, user can’t add new schedule.
Default value: io.github.shunshun94.scheduler.Scheduler.generateSchedule
The function to generate delete button DOM of each schedules. 1st argument is schedule, 2nd argument is the id of scheduler.
Default Value: io.github.shunshun94.scheduler.Scheduler.defaultDeleteButtonGenerator
If it’s true
, the schedules are appendable, resizable and deletable.
Default Value: true
How to separate the schedules. 1st argument must be the separation target schedule. 2nd argument must be Date object where you’ll separate the schedule.
Default value: io.github.shunshun94.scheduler.Scheduler.SEPARATION_INTERVAL_ALGORITHM
How the day’s will be formatted. Use %y
, %m
, %d
(date) and %D
(day).
Default Value: %m/%d (%D)
How many days will be displayed initially.
Default Value: 7
The schedules data.
Default Value: io.github.shunshun94.scheduler.Scheduler.INITIAL_SCHEDULE
(sample schedule)
The head day of the schedule table.
Default Value: initialSchedule
head day. If initialSchedule
is empty, it’ll Today.
This method adds new schedule for scheduler.
This method gets one argument a Date which day will get new schedule.
This method returns added schedule.
This method adds a new schedule.
This method gets one argument the schedule.
This method returns jQuery elements array of the added schedules.
This method updates a schedule.
This method gets one argument the updated schedule.
This method returns jQuery elements array of the added schedules.
This method gets the schedules list.
This method gets no arguments.
This method returns the schedules array.
This method gets a schedule.
This method gets the schedule ID to get schedule.
This method returns the indicated schedule or undefined.
When user clicked a schedule, this event is fired.
This event has a property schedule
which has the clicked schedule information.
When user added a new schedule, this event is fired.
This event has a property added
which has the added schedule information.
When user deleted a schedule, this event is fired.
This event has a property deleted
which has the deleted schedule information.
When user resized a schedule, this event is fired.
This event has a property schedule
which has the resized schedule information.
When user separated a schedule, this event is fired.
This event has two properties.
First one is schedules
which has new schedules information as array.
Second one is deleted
which has the base schedule information.
Use io.github.shunshun94.scheduler.Scheduler.generateSchedule
to generate schedule data.
This method required 3 argument and more 3 optional argument.
300
. 540
startDate
, Preparation time length as minutes. This value isn’t included in length
. 0
length
. 0
The schedule object should have those values
id
…… unique id of schedulelabel
…… displayed name of the schedulestart
(As Number) …… When the schedule is startedend
(As Number) …… When the schedule is finishedprepare
(As Number) …… When the schedule preparation is started. This value should be smaller value than start
.tidyUp
(As Number) …… When the schedule tidy up is finished. This value should be larger than end
.length
…… All values are length as minutes
head
(As Number) …… How long the preparationbody
(As Number) …… How long the schedulefoot
(As Number) …… How long the tidy uptotal
(As Number) …… Sum of head
, body
and foot
.