Hi,
I made a little javascript to add a "select all" feature to
CPSSharedCalendar.
For the beginnin, it's a very simple script:
//////////////////////////////////////////////////
function checkUncheckAll(theElement) 
{
    var theForm = theElement.form, z = 0;
    for(z=0; z<theForm.length;z++)
        {
            if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall')
                {
                    theForm[z].checked = theElement.checked;
                }
        }
}
//////////////////////////////////////////////////

That's all.
I wonder where should I put my script.

In the CPSSharedCalendar product, there is a file named widget.py wich
contains:

########### [....] ###########
calendar_js_scripts = """\
<style type="text/css">
        @import url(++resource++calendar-win2k-1.css);
</style>
<script 
        type="text/javascript" 
        src="++resource++calendar.js">
</script>
<script 
        type="text/javascript" 
        src="++resource++calendar-%s.js">
</script>
<script 
        type="text/javascript" 
        src="++resource++calendar-setup.js">
</script>"""
########### [....] ###########

I tried appending the location of my Javascript in there, but it is not
liste in the code source, whan I display the source of the attendees
page.

I tried placing the Javascript in the same directory as the javascripts
of jscalendar, but nothing.

So:

- Where should I place the Javascript?
- How/where should I "declare" it? (the <script> tag)

Thanks. 

I dont want to make a new Product just for that, and as far as I
understood, Lennart was OK to integrate such a feature, if I submit a
good engouh patch.

-- 
A powerfull GroupWare, CMS, CRM, ECM: CPS (Open Source & GPL).
Opengroupware, SPIP, Plone, PhpBB, JetSpeed... are good: CPS is better.
http://www.cps-project.org for downloads & documentation.
Free hosting of CPS groupware: http://www.objectis.org.

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to