10708 Posts in 2389 Topics by 1763 members
Page: 1 2
|Go to End||Next >|
27 August 2009 at 7:46am Last edited: 28 August 2009 12:17am
This hacking around here should no longer be needed, I just packed it into a normal widget: Event Calendar Widget
The widget will request a list of events for the currently visible month. Subsequently, only dates which have at least one event associated with them are selectable.
Unfortunately, the possibility to select months and weeks directly in the widget are gone. Maybe one could readd that feature with the Daterangepicker plugin.
When downloading the archive, it should suffice to overwrite the current module folder with the provided one. For the patchfile, it is necessary to get all the image files from the archive (in the images/ and css/ui-smoothness/images/ folders).
Unfortunately, the file management in the forum is messed up. I cannot remove the old jquery-ui.patch, so please ignore it.
27 August 2009 at 7:59am
Have you tried LiveCalendarWidget?
27 August 2009 at 8:04am
Not sure I understand, so here are my guesses
"Have you ever tried LiveCalendarWidget?"
-- Yes, works great, but I do not see the point. Static is fine, events aren't changed that often.
"Does this patch break LiveCalendarWidget?"
-- No idea!
27 August 2009 at 8:33am
Well, the idea for LiveCalendarWidget was to deliver a calendar tool that was aware of your events. It does that by making an ajax call to the calendar page every time the month advances, so you always have information about which days have events. Plus, it breaks the widget out of client side generation and into the MVC pattern, so it's easy to customize and rebrand. May not work for you, but something else to look into.
27 August 2009 at 8:40am
Ah, I see. That's a good idea, generally speaking, but since I usually have a bottleneck in latency and not bandwith, I try to avoid anything "Live" as much as possible and get all necessary data at once. But that's of course just my situation here.
There is not much to this patch here, after all. I wanted to use the jQuery UI datepicker() for a more homogenous look with the rest of the widgets, and that's it.
27 August 2009 at 8:47am
Coming to think of it, you're of course right: It is much cleaner to let the static calendar widget just display all days, and use the LiveWidgetCalender for the advanced stuff.
It seems like this is easy enough to implement with the jQuery UI datepicker, I'll give it a try.
27 August 2009 at 9:12am
Yeah, my experience is that it's pretty snappy, but I am on a fairly fast connection, too.
Also, when you feed a static array to a calendar, you have to somehow provide limits on either end of the date range, but making a call to the database, you're always sure to get that set of months.
I also wonder if a several asynchronous queries for one month are more better performing than one huge one up front?
27 August 2009 at 10:27am Last edited: 27 August 2009 2:21pm
From my working experience, the fewer calls to the server a site makes, the faster it is. Unless you are talking about really huge amounts of data (in the 100KBs), the added latency will always outweigh the gains in download speed.
Here is a cleaned up version of the CalendarWidget, with all the requirements bundled. It should behave as the standard version, minus the week selection.
Page: 1 2
|Go to Top||Next >|