cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject RE: CForms, mattkruse-lib, dreamteam sample
Date Mon, 01 Nov 2004 08:20:31 GMT
Stavros (and others),

First of all, I don't mind that you patch the file and add a bugzilla entry.
Thank you for taking the time to do that.

Second: the forms-samples-styling.xsl file and the dependent XSL files are
powerful enough to merit a place outside the forms samples, but they need a
bit of tweaking. 
One "improvement" in my mind is a more conditional include of the scripts.
As you can see, my DreamTeam example doesn't use any of the fancy Calendar,
OptionTransfer and other scripts, but I needed the XSL files to include the
forms-lib.js. So I know this is a hard thing to realise, but if the scripts
could be included based on the occurrence of specific syntax, this problem
would be solved in a more elegant way.

Bye, Helma

> -----Original Message-----
> From: gounis@osmosis.gr [mailto:gounis@osmosis.gr] 
> Sent: Sunday, 31 October, 2004 11:21
> To: dev@cocoon.apache.org
> Subject: CForms, mattkruse-lib, dreamteam sample
> 
> 
> 
> hi people
> 
> There is some javascript code that live in any produced CForm
> 
> ..
> ..
> 
> <script type="text/javascript" 
> src="resources/mattkruse-lib/AnchorPosition.js"></script><script 
> type="text/javascript" 
> src="resources/mattkruse-lib/PopupWindow.js"></script><script 
> type="text/javascript" 
> src="resources/mattkruse-lib/OptionTransfer.js"></script><script 
> type="text/javascript" 
> src="resources/mattkruse-lib/selectbox.js"></script><script 
> type="text/javascript" 
> src="resources/mattkruse-lib/CalendarPopup.js"></script><script 
> type="text/javascript" 
> src="resources/mattkruse-lib/date.js"></script><script 
> type="text/javascript">
>       // Setup calendar
>       var forms_calendar = CalendarPopup('forms_calendarDiv');
>       forms_calendar.setWeekStartDay(1);
>       forms_calendar.showYearNavigation();
>       forms_calendar.showYearNavigationInput();
>       forms_calendar.setCssPrefix("forms_");
>     </script>
> ...
> ..
> 
> This code produce javascript error (internet explorer display 
> a dialog) in 
> forms that live outside samples/blocks/forms directory and 
> does not have a 
> "resources" directory contain all this mattkruse-lib javascript files 
> 
> This error is appeared in DreamTeam sample 
> 
> Dirty solution here is to add mattkruse-lib under dreamteam/resources 
> directory and touch dreamteam's sitemap (add one more 
> map:match pattern):
> 
>       <map:match pattern="resources/**.js">
>         <map:read src="../resources/{1}.js"/>
>       </map:match>      
> 
> A most pretty solution is to put all this libraries (if they are so 
> critical/required) in a common place and use more generic map:mathc 
> pattern using context// or cocoon// protocol
> 
> 
> BTW 
> 
> I have prepared a patch for DreamTeam sample that fix this error in a 
> dirty way.
> 
> I think that is Helma's choice to let me add the patch to 
> bugzilla or will 
> fix the problem by himself.
> 
> -- stavros 
> 
> 

Mime
View raw message