themouette/jquery-week-calendar — pull request #106 by kamileczek123 (2011-12-12 19:33:10+00:00)
Title: new features...

Hello Julien,

regarding out conversation from April this year, here is my small contribution to your excellent calendar code. I hope it will be usefull for you and you will add it to the code.
Thanks for some bugfixes you and others intriduced to calendar code.

There are three significant changes I made for calendar:
1. jquery.UI.Datepicker with text input field, where you can put date in ISO format by typing from keyboard or just pick date by mouse navigating through Datepicker. After you pick date calendar will be reloaded to this date. I also added date ISO regex checker to avoid wrong dates and accidental switching. Datepicker can be set by 'datepicker' option, as an argument there is going datepicker initialization object with parameters as for regular use of Datepicker. Datapicker is switched when 'prev', 'today' and 'next' buttons are used as weel as show days buttons.
2. Multiuser combo which permits on switching calendar views for particular users and his events. This also requires some external wrapper functions which can do mapping between web application user object and calendar user object. I added all these functions in the example. This feature requires following options to be set: 'showUsersCombo' - true/false - shows combo element, 'usersComboUser' - string represents user element which will be displayed while calendar is initialized. This is mostly required when when some calendar configuration options are kept in web application session (see next feature). By default "null". 'usersComboAllUsersEntry' - name for 'null' element set in 'usersComboUser'.
3. Function which helps to store some calendar params in session, so when user set some view options (currently in example) like 'daysToShow', 'date', 'usersComboUser' and go to other page in web app and after that returns to calendar, these stored parameters will be set as default while calendar initialization.
I also did small refactoring in calendar code related refreshing calendar function.
All my changes are marked by '//**' comment string before change begins and after it finishes. Additionally every change is described in code to understand what happens in the change.
Enclosed demo also contains some commented-out ajax code related to calendar events and features I introduced - just to easier understanding of new things and maybe to help others setting the calendar.
Btw. When I retrived code from git, there was a mess with comments formatting, I tried to fix this, so don't blame me if something with original comments is wrong.