Calendar_Plus Overview

The Calendar module (http://drupal.org/project/calendar) currently uses tables for display. Tables can be styled to resize based on the dimensions of the containing element, but simply resizing doesn't make an element responsive. While tables are scalable via inherited dimensions, table cells are displayed in discreet rows and columns. As the table resizes, the contents either scale accordingly or become crammed into the smaller space. This is not responsive nor is it particularly usable on a mobile device.

We wanted to create a truly responsive experience so that on different display sizes, the presentation can be reorganized for a more device-appropriate experience. In particular, we wanted the calendar to display as a table view on larger screens and as a list on smaller screen sizes.

We wanted to create a viable responsive version of the calendar without forking the code or relying on hackish CSS-only approaches that attempt to force table elements to behave like other elements. Our solution uses an unordered list that is styled to display like a table on devices that are wider than 768 pixels, but displays as a list on devices narrower than 768 pixels.

The way the Calendar module is written, it is possible to theme the output using Drupal's standard theming paradigm, which is to say, by creating custom tpl.php files and adding them to the active theme. Unfortunately, however, the tables output is tightly coupled to the logic of the module code so there was no way to use any element other than a table by simply creating new template files.

Even while I knew I'd have to recode part of the module, I didn't want to reinvent the wheel unnecessarily. At this point I created a few restrictions for myself. Which were:

1. Keep most as much of the heavy lifting in terms of administration/configuration and business logic in Calendar.

2. Calendar_Plus will run invisibly as an extension of the functionality of Calendar but not as a replacement.

3. Calender_Plus must be completely self-contained so using it is simply a matter of installing and enabling.

4. Calendar_Plus must change the Calendar output only. It must not in any way modify the stored configuration or data.

5. Calendar_Plus must implement existing Drupal hooks and API’s without relying on hacks or invented conventions.

The Calendar_Plus module changes where Calendar looks for the templates, and over-rides those functions in Calendar that have the concept of table-based output hard-coded, using standard Drupal hooks.

When the Calendar_Plus module is enabled, it changes the output of the Calendar module but doesn't affect any other functionality. Calendar events are created and managed exactly as they always are and the module configuration is handled exactly the same. There is no admin interface for the Calendar_Plus module.

Sandbox Link: https://drupal.org/sandbox/iconify/2087897

git clone --branch 7.x-1.x git.drupal.org:sandbox/iconify/2087897.git calendar_plus

Comments

rjdjohnston’s picture

Category: task » feature

Mod works BEAUTIFULLY!!! Great job iconify, can't wait to see what else you have in store for the community.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxiconify2087897git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.