EllisLab/CodeIgniter — pull request #2802 by marcossffilho (2014-01-08 18:02:35+00:00)
Title: Calendar Updates

From all the people I know that uses the Code Igniter just a few uses the CI_Calendar Class. In my work I discovered that doing a AJAX call requesting the calendar HTML in the server and inserting it is more fast than the AJAX call for JSONs that all calendar plugins we haveve tried requests, mostly notable when the month has many data (the {content} in the CI_Calendar template). But the design and user experience teams always wants a calendar that shows the day of the previous and next month. To do this I always change the class addingcal_cell_start_other the feature. Now that the CI 3.0 is coming, I create this PR to implement this feature on the new CI.

![ci_calendar](https://f.cloud.github.com/assets/4489182/1870782/fb00949e-788c-11e3-8cea-6fa8db83400c.jpg)
*The image is the default template in both examples using the Google Chrome*

If, in the calendar configuration, the key **show_other_days** is defined as ``TRUE`` the calendar will be the 'MY CI Calendar' in the image. Otherwise, the calendar will be displayed like the old ones (Original CI). And I added the templates **cal_cell_start_other**, **cal_cell_other** and **cal_cell_end_other**. The default template of this cells is a simple table cell with the style ``color: #666;``.

And I also modify the ``initialize()`` function to set the ``$next_prev_url`` property to the current controller and method defined in the Router class if the developer want the links (``$show_next_prev = TRUE``) but don't set the URL. With this, (I think) the ``$next_prev_url`` will be used most when routes are set.