Event Calendar:

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/18/2010 3:37:06 PM
Gravatar
Total Posts 2239

Event Calendar:

The Event Calendar title (month) renders with an inline style of "background-color: Silver;". I looked at the source code to see if I could find where this is coming from but I can't. I even tried overriding this in the theme.skin file but it didn't work.

Can this be removed?

<table class="mpcalendarmain" ...>
<tbody>
<tr>
<td style="background-color: Silver;" colspan="7">
<table class="mpcalendartitle" ...>
...
...
</table>

Thanks,
Joe D.

4/19/2010 2:04:54 PM
Gravatar
Total Posts 18439

Re: Event Calendar:

Hi Joe,

Currently theming is disabled on the EventCalendar. I'm adding a config option to enable it, you can do the same in your copy right now by editing the EventCalendarModule.ascx

replace EnabledTheming='false' with

EnableTheming='<%# ConfigHelper.GetBoolProperty("EnableThemeInEventCalendar", false) %>' SkinID="eventcal"

put <add key="EnableThemeInEventCalendar" value="true" /> in user.config

Then in theme.skin uncomment the section for <mp:DataCalendar and add SkinID="eventcal" like:

<mp:DataCalendar runat="server" SkinID="eventcal"
...

Now editing the theme may help you but it does produce bulkier markup.

Note that in Medium Trust all sites use the /App_Themes/Default/theme.skin file instead of the one in the skin folder.

That style is generated by the default theme even when theming is not enabled, it is just built into the ASP.NET calendar (which is the base class for mp:DataCalendar) to have that hard coded markup.

Hope it helps,

Joe

4/19/2010 2:27:10 PM
Gravatar
Total Posts 18439

Re: Event Calendar:

Hi Joe,

I take it back, after further testing it seems we can't really bind the EnableTheming setting there, if I put anything other than hard coded false it resolves to true. I can't make it configurable from a setting because the EnableTheming can only be set during the OnPreInit event, but unfortunately only pages have this event, UserControls do not and by the time content features have loaded in the page the pre-init event has already happened in the page. So there is nowhere in code where I can set this.

So the only way to turn on theming is to edit the EventCalendarModule.ascx and set it to true, but then you would have to maintain that after upgrades which would be a pain.

Wish I could think of a solution but nothing comes to mind.

Best,

Joe

4/19/2010 6:04:38 PM
Gravatar
Total Posts 2239

Re: Event Calendar:

Hi Joe,

Any clue as to why the TD that holds the table for the Title has an inline style in the first place? Is this just some default or what?

Thanks for your help,
Joe D.

4/20/2010 7:07:25 AM
Gravatar
Total Posts 18439

Re: Event Calendar:

Hi Joe,

It is just the way the ASP.NET calendar control is implemented. It renders some inline styles by default. The issue is very similar to how crappy the ASP.NET Menu control renders as a set of nested tables rather than a list when not using the CSSControl Adapters that were released later to improve the rendering. Unfortunately there is no control adapter available to fix the rendering of the calendar as far as I know. There might be some improvements in the .NET 4 version of the control, I'm not sure, but we won't be able to change to .NET 4 for a while yet.

There is nothing in mojoPortal code that causes the inline styles, it is just the way the calendar control works.

Best,

Joe

4/20/2010 9:02:11 AM
Gravatar
Total Posts 2239

Re: Event Calendar:

Hi Joe,

Okay, it sounds like a job for jQuery. I will post a solution when I come up with one. Thanks for your time.

Later,
Joe D.

4/20/2010 9:19:52 AM
Gravatar
Total Posts 2239

Re: Event Calendar:

Hi Joe,

I LOVE jQuery!!!!!! For anyone who wants to fix this themselves, here's the fix:

Add the following to your layout.master just after the <asp:ScriptManager line:

<script type="text/javascript">
  $(document).ready(function (){
    $("table.mpcalendartitle").parent().attr('style', 'background-color: transparent;');
  });
</script>

Hope this helps someone,
Joe D.

You must sign in to post in the forums. This thread is closed to new posts.