[Zope3-checkins] SVN: zope.formlib/trunk/src/zope/formlib/ revert
unintentionally committed changes
Fred L. Drake, Jr.
fdrake at gmail.com
Tue Aug 16 16:19:02 EDT 2005
Log message for revision 37969:
revert unintentionally committed changes
Changed:
U zope.formlib/trunk/src/zope/formlib/pageform.pt
U zope.formlib/trunk/src/zope/formlib/subpageform.pt
-=-
Modified: zope.formlib/trunk/src/zope/formlib/pageform.pt
===================================================================
--- zope.formlib/trunk/src/zope/formlib/pageform.pt 2005-08-16 20:17:40 UTC (rev 37968)
+++ zope.formlib/trunk/src/zope/formlib/pageform.pt 2005-08-16 20:19:02 UTC (rev 37969)
@@ -16,15 +16,26 @@
<script type="text/javascript"><!--
function toggleFormFieldHelp(ob,state) {
- // ob is the label element
- var field = ob.form[ob.htmlFor];
- if (field) {
- field.style.visibility = state && 'hidden' || 'visible';
- var help = document.getElementById("field-help-for-" + field.name);
- if (help) {
- help.style.visibility = state && 'visible' || 'hidden';
- }
+ ob = ob.nextSibling;
+ while (ob && ob.className != 'field') {
+ ob = ob.nextSibling;
}
+ var td = ob;
+
+ ob = ob.firstChild;
+ while (ob && ob.className != 'form-fields-help')
+ ob = ob.nextSibling;
+ if (ob) {
+ ob.style.visibility = state && 'visible' || 'hidden';
+ }
+
+ ob = td.firstChild;
+ while (ob && ob.className != 'widget') {
+ ob = ob.nextSibling;
+ }
+ if (ob) {
+ ob.style.visibility = state && 'hidden' || 'visible';
+ }
}
//-->
@@ -94,7 +105,6 @@
i18n:translate=""
tal:content="hint"
tal:condition="hint"
- tal:attributes="id string:field-help-for-${widget/name}"
onclick="this.style.visibility='hidden';"
>Title of this content object.</div>
<div class="widget" tal:content="structure widget">
Modified: zope.formlib/trunk/src/zope/formlib/subpageform.pt
===================================================================
--- zope.formlib/trunk/src/zope/formlib/subpageform.pt 2005-08-16 20:17:40 UTC (rev 37968)
+++ zope.formlib/trunk/src/zope/formlib/subpageform.pt 2005-08-16 20:19:02 UTC (rev 37969)
@@ -4,15 +4,26 @@
<script type="text/javascript"><!--
function toggleFormFieldHelp(ob,state) {
- // ob is the label element
- var field = ob.form[ob.htmlFor];
- if (field) {
- field.style.visibility = state && 'hidden' || 'visible';
- var help = document.getElementById("field-help-for-" + field.name);
- if (help) {
- help.style.visibility = state && 'visible' || 'hidden';
- }
+ ob = ob.nextSibling;
+ while (ob && ob.className != 'field') {
+ ob = ob.nextSibling;
}
+ var td = ob;
+
+ ob = ob.firstChild;
+ while (ob && ob.className != 'form-fields-help')
+ ob = ob.nextSibling;
+ if (ob) {
+ ob.style.visibility = state && 'visible' || 'hidden';
+ }
+
+ ob = td.firstChild;
+ while (ob && ob.className != 'widget') {
+ ob = ob.nextSibling;
+ }
+ if (ob) {
+ ob.style.visibility = state && 'hidden' || 'visible';
+ }
}
//-->
@@ -83,7 +94,6 @@
<div class="form-fields-help"
tal:content="hint"
tal:condition="hint"
- tal:attributes="id string:field-help-for-${widget/name}"
onclick="this.style.visibility='hidden';"
i18n:translate=""
>Title of this content object.</div>
More information about the Zope3-Checkins
mailing list