Developer forum

Forum » Development » Removing Calendar CSS and JS files

Removing Calendar CSS and JS files

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Hi there,

When I  use the Management Module with a custom field of type Date / DateTime, I end up with the following links in my source file:

<link rel="stylesheet" type="text/css" href="/Admin/Public/DateSelector/calendar-skin.css"></link>

<script type="text/javascript" src="/Admin/Public/DateSelector/calendar.js"></script>

<script type="text/javascript" src="/Admin/Public/DateSelector/calendar-setup.js"></script>

<script type="text/javascript" src="/Admin/Public/DateSelector/calendar-lang.js.aspx"></script>


Is there a way to tell Dynamicweb not to render this code? I don't need it, and it means four unneccessary http requests for each page...

Thanks,

Imar

Replies

 
Morten Bengtson
Reply
You can prevent it by disabling the pop-up calendar...
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Management-Center/Setup-(Interface-settings).aspx
... but don't do that.

WARNING: DO NOT DISABLE POP-UP CALENDAR 
If you disable the pop-up calendar, you break the user management administration! When administrators save a user in backend, the validfrom and validto dates are not handled correctly and the user will be deactivated.
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Right, so that's not really an option.... ;-)

Other solutions? Or should I file an enhancement request?

Imar

 
Morten Bengtson
Reply
Assembly injection? ;-) 

I think the only solution is to create your own version of the @javascript and @stylesheet tags in a notification subscriber.
 
David Matheson
Reply
Here is an idea!
How about adding tick boxes to the standard module asking include/not include js/css.  And to other modules that automatically insert js/css.  It does not solve the problem now, but will help other users in the future.
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yes, that would be great idea. We can't have enough checkboxes.... ;-)

Imar
 

 

You must be logged in to post in the forum