Log in |
JavaScript patch for folders with lots of objectsNote: In Zope version 2.3 DC added this into the management interface. So there. If you have a page with lots of objects and are getting bored of clicking on each individual object to select try this patch to allow selecting all the objects: To /lib/python/OFS/main.dtml add:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function SetChecked(val) {
dml=document.main;
len = dml.elements.length;
var num=0;
for(num=0; num < len; num++) {
if (dml.elements[num].name=='ids:list') {
dml.elements[num].checked=val;
}
}
}
</SCRIPT>
You can then add:
<javascript:SetChecked(1)> some where into to that page as you see fit. Even more cunning, add the javascript into manage_tabs so its available on all mgmt. pages. |