CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamically modifying themes

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP Related
View previous topic :: View next topic  
Author Message
cgarvey



Joined: 21 Nov 2005
Posts: 7

PostPosted: Wed Aug 09, 2006 2:36 pm    Post subject: Dynamically modifying themes Reply with quote

Great product, but a little difficult to configure.

I'm writing a JAVA taglib to use in conjunction with your popCal control so that junior developers don't have to become familiar with your product in order to use it. The problem I have run in to is that it doesn't seem to be possible to determine the type of calendar required on any given page dynamically.

I would like to include the calendar in a basic page template and then dynamically choose whether a date only, date and time, or just time popup appears.

Is this possible to do? It seems to me at first glance that I will need to include 3 calendars to do this - is there another way?
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Aug 09, 2006 5:39 pm    Post subject: Reply with quote

I think you just need 1 calendar iframe tag on page but using taglib to choose between the plugins, which is configurable via the name & id of the iframe.

Also note that you may override the theme options in the plugins.js. e.g. you may add the following in plugins_time.js to create a plugins_timeonly.js:

Code:
gbHideTop=true;
gbHideCalMiddle=true;

_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
cgarvey



Joined: 21 Nov 2005
Posts: 7

PostPosted: Wed Aug 09, 2006 8:02 pm    Post subject: Reply with quote

Sorry, I just realised I didn't state the problem clearly.
As you rightly point out, I could of course dynamically write out the theme to use but that supposes that I only need one of each calendar type per page.

What I would like is to be able to dynamically assign a theme based on the kind of control I want so that I can have a date only, date and time and time only input fields on the page but only one iframe.

I've looked at the code in more detail now and I think this may be possible, I just need to come up with a theme that has functions for setting up all 3 scenarios and then wrap another function around the fPopCalendar function to add another parameter.

Whew!

Is there a simpler way?
Back to top
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Aug 09, 2006 10:24 pm    Post subject: Reply with quote

There is another way to do it - dynamically generate the iframe tag on demand.

Please check the following FAQ for details:
http://www.calendarxp.net/forum/viewtopic.php?t=75

_________________
Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved.
Back to top
View user's profile Send private message
cgarvey



Joined: 21 Nov 2005
Posts: 7

PostPosted: Thu Aug 10, 2006 8:34 am    Post subject: Reply with quote

Wouldn't generating the iframe on the fly generate a noticeable delay though? I assume the client system would need to interpret the javascript and reload the page everytime... though it might be possible to generate and cache these..

I will run some tests and let you know how it works out. Thanks for the advice.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> PopCalendarXP Related All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group