It looks like you have to specify whether or not each event is
"allDay" otherwise it assumes that it is. So if you're going to
specifically allow people to do all day events, you may want to have a
checkbox to flag that and add that check into the template.

Here's a modified script that won't show everything as being all day
and also adds in some custom time formatting:

<script type="text/javascript">
  $(document).ready(function() {
    $('#calendar').fullCalendar({
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
      },
      timeFormat: {
        // for agendaWeek and agendaDay
        agenda: 'h(:mm)t{ - h(:mm)t}', // 5a - 6:30p  the parens ()
mean don't show if it's :00, t means show "a" for am and "p" for pm

        //for basicWeek and basicDay
        basic: 'h(:mm)t{ - h(:mm)t}', // 5a - 6:30p
        //basicDay: 'h(:mm) t{ - h(:mm)t}', // 5:00a - 6:30p

        // for all other views
        '': 'h(:mm)t { - h(:mm)t}'            // 7pm
      },

      editable: false,
      events: [
{{for reservation in reservations:}}{{t1=reservation.start_time}}
{{t2=reservation.stop_time}}
  {
  start: new Date('{{=t1.strftime('%B %d, %Y %H:%M:%S')}}'),
  end: new Date('{{=t2.strftime('%B %d, %Y %H:%M:%S')}}'),
  allDay: false,
  {{if auth.user.id==reservation.user:}}
  title: '{{=db.plugin_booking_resource
[reservation.resource].name.replace("'","\\'")}}',
  url: '{{=URL(r=request,f='edit_reservation',args=reservation.id)}}',
  {{else:}}
  title: '{{=("[%(first_name)s %(last_name)s]" %db.auth_user
[reservation.user]).replace("'","\\'")}}',
  {{pass}}
},
{{pass}}
              ]
  });
});
</script>


Brian

On Oct 27, 7:40 pm, Brian M <bmere...@gmail.com> wrote:
> Well the new strftime only partly fixes it. It shows up on just the
> one day but it's still in the "all day" area rather than showing up in
> the correct timeslot if you go to single day view.
>
> Brian
>
> On Oct 27, 7:38 pm, Brian M <bmere...@gmail.com> wrote:
>
> > Very cool. The non-profit I work for has been looking for a scheduling
> > system for volunteers and this may give us a start if we decide to do
> > our own. As others have said, every resource ends up with different
> > requirements - we for example would have pre-defined time slots that
> > can hold a limited number of people and then want group leaders to
> > reserve some number of slots and then individuals to register as part
> > of a group. Then add in families or individuals that aren't part of a
> > group but still want to help out and you get a jumbled mess of
> > requirements. We've looked at commercial systems and they all end up
> > being restrictive in some silly way.
>
> > One bug I noticed, the calendar display shows an event booked
> > 2009-10-28 18:00:00 to 2009-10-28 19:30 as happening all day both Oct
> > 28 & 29. Your strftime pattern is wrong in plugin_booking/
> > calendar.html it should probably be .strftime('%B %d, %Y %H:%M:%S')
> > instead of .strftime('%B %d, %Y %M:%H:%S')  - you've got the hours and
> > minutes flipped.
>
> > On Oct 26, 11:21 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > BTW. The total length is 40 lines of python code (models and
> > > controllers) on top of the scaffoding app + ~200 lines of custom html
> > > + fullcalendar.js and dependencies.
>
> > > On Oct 26, 11:17 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > Fixed and resposted. It works great and I think it does what people
> > > > asked.
>
> > > > - It may need a new more js effects.
> > > > - It certainly needs a better layout.
> > > > - It is all coded as a plugin (so you can add this to app that defines
> > > > db, auth, crud)
> > > > - You may want to add some more actions
>
> > > > It would be great if one of you were to adopt it and maintain it.
>
> > > > Massimo
>
> > > > On Oct 26, 10:45 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > Can you help me with this?
>
> > > > >    http://web2py.com/examples/static/web2py.app.booking.w2p
>
> > > > > Almost everything works except the jquery calendar widget does not
> > > > > display events. I do not know why.
>
> > > > > It would also be nice to add a better layout.
>
> > > > > Massimo
>
> > > > > On Oct 26, 8:02 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
>
> > > > > > It would be nice to have a simple scheduling / allocation 
> > > > > > interface, that
> > > > > > could easily be extended. Provide a base system so that everyone 
> > > > > > can add
> > > > > > their own requirements into it.
>
> > > > > > -Thadeus
>
> > > > > > On Mon, Oct 26, 2009 at 7:49 PM, Alex Fanjul 
> > > > > > <alex.fan...@gmail.com> wrote:
> > > > > > >  We have a requirement for system like this for a laboratory with 
> > > > > > > rooms and
> > > > > > > objets (machines, cubes, etc.) treated as shared resources, as 
> > > > > > > soon as I can
> > > > > > > I will send you the requirements.
> > > > > > > Alex F
>
> > > > > > > El 27/10/2009 1:06, david bain escribió:
>
> > > > > > > Just to extend the feature set, it would be nice if you could 
> > > > > > > 'register'
> > > > > > > and manage/present the bookings of multiple properties.
>
> > > > > > > On Mon, Oct 26, 2009 at 4:38 PM, villas <villa...@gmail.com> 
> > > > > > > wrote:
>
> > > > > > >> We have a similar system requirement:  accommodation bookings.  
> > > > > > >> In
> > > > > > >> this case,  each room/property is booked for a flexible period of
> > > > > > >> days.  As Weheh says,  in each type of resource booking system,  
> > > > > > >> there
> > > > > > >> are so many add-on requirements for each use case.  I believe 
> > > > > > >> one of
> > > > > > >> the central features of an "excellent" system is making really 
> > > > > > >> good
> > > > > > >> booking charts, so people can see availability at a glance.
>
> > > > > > > --
> > > > > > > SplashStart - Professional Websites. Starting Now.
> > > > > > >http://www.splashstart.com
>
> > > > > > > --
> > > > > > > Alejandro Fanjul Fdez.
> > > > > > > alex.fan...@gmail.com
> > > > > > >www.mhproject.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to