cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gou...@osmosis.gr
Subject CForms, mattkruse-lib, dreamteam sample
Date Sun, 31 Oct 2004 10:21:21 GMT

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