[Zope3-checkins]
SVN: Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js
Change javascript for supporting mozilla
Roger Ineichen
roger at projekt01.ch
Wed Jan 12 20:19:42 EST 2005
Log message for revision 28822:
Change javascript for supporting mozilla
Changed:
U Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js
-=-
Modified: Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js
===================================================================
--- Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js 2005-01-12 22:54:21 UTC (rev 28821)
+++ Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js 2005-01-13 01:19:42 UTC (rev 28822)
@@ -1,3 +1,8 @@
+//
+var ie = document.all != null;
+var moz = !ie && document.getElementById != null && document.layers == null;
+
+
// change the status of the matrix table
function changeMatrix(e) {
var ele = e? e: window.event;
@@ -3,7 +8,14 @@
var id = ele.getAttribute('id');
var name = ele.getAttribute('name');
- var label = ele.parentElement;
- var center = label.parentElement;
- var td = center.parentElement;
+ if (moz) {
+ var label = ele.parentNode;
+ var center = label.parentNode;
+ var td = center.parentNode;
+ }
+ else {
+ var label = ele.parentElement;
+ var center = label.parentElement;
+ var td = center.parentElement;
+ }
resetMatrixCSS(name);
if (td.className != "default") {
@@ -17,7 +29,12 @@
for (var i = 0; i < inputFields.length; i++) {
var field = inputFields[i];
if (field.getAttribute('name') == name) {
- td = field.parentElement.parentElement.parentElement;
+ if (moz) {
+ td = field.parentNode.parentNode.parentNode;
+ }
+ else {
+ td = field.parentElement.parentElement.parentElement;
+ }
if (td.className != "default") {
td.className = "";
}
More information about the Zope3-Checkins
mailing list