shuber 2004/10/28 20:18:03 CEST
Modified files:
core/src/webapp/jsp/jahia/engines/shared page_field.jsp
Log:
Bugfix :
- Javascript check() method should now work even when we have only one radio button
in the page field display. The problem was that we were using
document.mainForm.operation.length on an <input> radio tags that had only one radio
button, in which case the document.mainForm.operation.length method call returns void.
Revision Changes Path
1.7 +7 -0 jahia/core/src/webapp/jsp/jahia/engines/shared/page_field.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/engines/shared/page_field.jsp.diff?r1=1.6&r2=1.7&f=h
Index: page_field.jsp
===================================================================
RCS file:
/home/cvs/repository/jahia/core/src/webapp/jsp/jahia/engines/shared/page_field.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- page_field.jsp 27 Oct 2004 14:24:09 -0000 1.6
+++ page_field.jsp 28 Oct 2004 18:18:02 -0000 1.7
@@ -114,11 +114,18 @@
// Test if checked
checked = false;
+ if (document.mainForm.operation.length > 1) {
for (var i = 0; i < document.mainForm.operation.length; i++) {
if (document.mainForm.operation[i].checked) {
checked = true;
}
}
+ } else {
+ // if operation == 1 then we have to test differently.
+ if (document.mainForm.operation.checked) {
+ checked = true;
+ }
+ }
if (!checked) return false;
// now here we will test if the move page or the link page