An event at a time

174 views
Skip to first unread message

yashiroiori

unread,
Jun 14, 2010, 1:31:32 PM6/14/10
to jquery week calendar
I'm using this project to create class schedules for a school, only
used a week and store the data in mysql, what we need to do is to only
accept one event at a time and not more than one grouping, for example
when drag it over another event and put the two events the same day,
how can this be done?

Julien MUETTON

unread,
Jun 15, 2010, 3:36:37 AM6/15/10
to jquery-wee...@googlegroups.com
Hi,

I'm not sure I understood what you need, but from what I understand you could have a look to the allowCalEventOverlap option.

Julien.

yashiroiori

unread,
Jun 15, 2010, 12:34:48 PM6/15/10
to jquery week calendar
Hi, sorry I use google translater to public my problem, I try to
explain, in the calendar when you drag and drop an event over another
event in the same hour the system put 2 events together recalculate
space, etc. my question is how to do to no't accept more than one
events at the same time?

On 15 jun, 02:36, Julien MUETTON <the.moue...@gmail.com> wrote:
> Hi,
>
> I'm not sure I understood what you need, but from what I understand you
> could have a look to the *allowCalEventOverlap* option.
>
> Julien.
>
>
>
> On Mon, Jun 14, 2010 at 7:31 PM, yashiroiori <yashiroi...@gmail.com> wrote:
> > I'm using this project to create class schedules for a school, only
> > used a week and store the data in mysql, what we need to do is to only
> > accept one event at a time and not more than one grouping, for example
> > when drag it over another event and put the two events the same day,
> > how can this be done?- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Julien MUETTON

unread,
Jun 15, 2010, 12:47:50 PM6/15/10
to jquery-wee...@googlegroups.com
hi,

I guess you're looking for allowCalEventOverlap

Julien

Przemek Parzoch

unread,
Jun 15, 2010, 1:02:53 PM6/15/10
to jquery-wee...@googlegroups.com
as yashiroiori wrote, setting this attribute to true does not allow for overlap event, but there are, for example, two in the same period of time. He does not want to be able to create two events at the same time

2010/6/15 Julien MUETTON <the.m...@gmail.com>



--
Parzoch Przemysław

Julien MUETTON

unread,
Jun 15, 2010, 1:27:49 PM6/15/10
to jquery-wee...@googlegroups.com
Cesc Przemek,

I might be stupid, but I'm unsure of my understanding of the problem.

question is how to make possible to display several events at the same time, and in the meantime not to make it possible to add one if there is one already ?
or is it about being able to create an event as long as there is no other one starting at this exact time ?

for either logic, it has to be done through eventNew, eventResize... callbacks, and to revert, use $('calendar').weekCalendar('updateEvent', calEvent) or $('calendar').weekCalendar('removeEvent', calEvent);

If a freebusy logic is needed, get a glance to http://github.com/themouette/jquery-week-calendar and demo 3, accessible from wiki, that might be what you're looking for.

If I still didn't get it, maybe an example could help.

Julien

2010/6/15 Przemek Parzoch <par...@gmail.com>

Przemek Parzoch

unread,
Jun 15, 2010, 2:05:02 PM6/15/10
to jquery-wee...@googlegroups.com
Cześć:)

"question is how to make possible to display several events at the same time" <---- NO. He wants to block the possibility of adding more than one event at the same time (period of time).

2010/6/15 Julien MUETTON <the.m...@gmail.com>



--
Parzoch Przemysław

Julien MUETTON

unread,
Jun 16, 2010, 3:41:03 AM6/16/10
to jquery-wee...@googlegroups.com
In such a case that's a freebusy management. freebusys are timeslots with a free / busy information.
my weekcalendar fork (http://github.com/themouette/jquery-week-calendar) allows to embed freebusy, and to extend it as you need.

a basic example is available at http://themouette.github.com/jquery-week-calendar/weekcalendar_demo_3.html
documentation is available at http://wiki.github.com/themouette/jquery-week-calendar/

In any case, you will have to specialize the eventNew, eventDrop, event***.... callbacks.
in those callbacks you will have to check wether or not the freebusy can accept the event, and then update the new time frebusy, but also the old one.

this is not hard, but it requires to describe clearly the needed behavior for every case. All you need is in the doc and in demo3.

good luck with integration.
Reply all
Reply to author
Forward
0 new messages