Skip to main content
Topic: Yay! I found another one! (Calendar.template.php) (Read 6188 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Yay! I found another one! (Calendar.template.php)

Ok, this is bodgey. ;D

Code: [Select]
// If this is today, make it a different color and show a border.
            echo '
                        <td style="height: ', $calendar_data['size'] == 'small' ? '20' : '100', 'px; padding: 2px;', $calendar_data['size'] == 'small' ? 'font-size: x-small;' : '', '" class="', $day['is_today'] ? 'calendar_today' : 'windowbg', ' days">';

There is no need to force inline styles there. No need for $calendar_data['size'] to handle it either. It can be handled via css, which will be more flexible and better for teh performance anxiety.

ETA: It's easy to style this stuff just by using #main_grid or #month_grid.

Me fix. Just sayin'. :)

ETA again: On second thought, I think I'll leave the calendar shiz for the moment as it will just derail me from other stuff. If anyone else wants to have a crack.... :D

or I can fix it later. Whatever works.
Last Edit: June 12, 2013, 08:38:26 pm by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Yay! I found another one! (Calendar.template.php)

Reply #1

Got a fix for this that looks good. CSS edits and new template attached. :)

This can be shifted to dead bugz after PR stuffz.

ETA: $calendar_data['size'] is still needed in sources. It still controls one conditional in the template.

Code: [Select]
				// Is this the first day of the week? (and are we showing week numbers?)
if ($day['is_first_day'] && $calendar_data['size'] != 'small')
echo ' -
Last Edit: June 15, 2013, 05:55:39 am by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Yay! I found another one! (Calendar.template.php)

Reply #2

https://github.com/elkarte/Elkarte/pull/529

Looks like there were some other changes in the css file attached ... I only changed the (obvious) calendar sections in the PR and did not touch the gradients / highlighting stuff that was different in the attached css file ... figured that was other stuff you are looking at ... if not I can make anther PR

Re: Yay! I found another one! (Calendar.template.php)

Reply #3

No worries. It's all WIP anyway.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Yay! I found another one! (Calendar.template.php)

Reply #4

Seems fixed... I think/hope.
Bugs creator.
Features destroyer.
Template killer.