aboutsummaryrefslogtreecommitdiffstats
path: root/src/documentation/resources
diff options
context:
space:
mode:
authorPeter Bernard West <pbwest@apache.org>2003-03-12 13:42:24 +0000
committerPeter Bernard West <pbwest@apache.org>2003-03-12 13:42:24 +0000
commit35ca329e122f830c3370ec5fe5cba4076ab147bb (patch)
treefc06fb4c8fe770d94a7b80b3dfa88799ebafa0b3 /src/documentation/resources
parent2ac9fa5376d798152bdb1d1e590a4d393b64c94e (diff)
downloadxmlgraphics-fop-35ca329e122f830c3370ec5fe5cba4076ab147bb.tar.gz
xmlgraphics-fop-35ca329e122f830c3370ec5fe5cba4076ab147bb.zip
Modified scroll variable handling.
Inserted a BR node; made BR and IFRAME children of the added SPAN. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196078 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/documentation/resources')
-rw-r--r--src/documentation/resources/scripts/design/alt.design/codedisplay.js21
-rw-r--r--src/documentation/resources/scripts/design/alt.design/properties/codedisplay.js21
2 files changed, 24 insertions, 18 deletions
diff --git a/src/documentation/resources/scripts/design/alt.design/codedisplay.js b/src/documentation/resources/scripts/design/alt.design/codedisplay.js
index 03df70dbb..f45bab796 100644
--- a/src/documentation/resources/scripts/design/alt.design/codedisplay.js
+++ b/src/documentation/resources/scripts/design/alt.design/codedisplay.js
@@ -1,7 +1,7 @@
// $Id$
var showing = new Array();
-var x = -1; // scrollX
-var y = -1; // scrollY
+var x = new Array(); // scrollX
+var y = new Array(); // scrollY
function toggleCode(id, src, height, width) {
//alert('In toggleCode');
@@ -16,19 +16,22 @@ function showCode(id, src, height, width) {
//alert('In showCode');
if (showing[id]) { return; }
if (document.getElementById && document.createElement) {
- if (window.scrollX) {
- x = window.scrollX;
- y = window.scrollY;
+ if (window.scrollX != undefined) {
+ x[id] = window.scrollX;
+ y[id] = window.scrollY;
}
var parent = document.getElementById(id);
var span = document.createElement('SPAN');
parent.appendChild(span);
+ var br = document.createElement('BR');
var iframe = document.createElement('IFRAME');
iframe.setAttribute('src', src);
iframe.setAttribute('height', height);
iframe.setAttribute('width', width);
- parent.replaceChild(iframe, parent.lastChild);
- // window.scrollTo(x,y);
+ span.appendChild(br);
+ span.appendChild(iframe);
+ //parent.replaceChild(iframe, parent.lastChild);
+ // window.scrollTo(x[id],y[id]);
showing[id] = true;
} else {
alert(
@@ -43,8 +46,8 @@ function hideCode(id) {
if (document.getElementById && document.createElement) {
var parent = document.getElementById(id);
parent.removeChild(parent.lastChild);
- if (x >= 0) {
- window.scrollTo(x,y);
+ if (x[id] != undefined) {
+ window.scrollTo(x[id],y[id]);
}
showing[id] = false;
} else {
diff --git a/src/documentation/resources/scripts/design/alt.design/properties/codedisplay.js b/src/documentation/resources/scripts/design/alt.design/properties/codedisplay.js
index 03df70dbb..f45bab796 100644
--- a/src/documentation/resources/scripts/design/alt.design/properties/codedisplay.js
+++ b/src/documentation/resources/scripts/design/alt.design/properties/codedisplay.js
@@ -1,7 +1,7 @@
// $Id$
var showing = new Array();
-var x = -1; // scrollX
-var y = -1; // scrollY
+var x = new Array(); // scrollX
+var y = new Array(); // scrollY
function toggleCode(id, src, height, width) {
//alert('In toggleCode');
@@ -16,19 +16,22 @@ function showCode(id, src, height, width) {
//alert('In showCode');
if (showing[id]) { return; }
if (document.getElementById && document.createElement) {
- if (window.scrollX) {
- x = window.scrollX;
- y = window.scrollY;
+ if (window.scrollX != undefined) {
+ x[id] = window.scrollX;
+ y[id] = window.scrollY;
}
var parent = document.getElementById(id);
var span = document.createElement('SPAN');
parent.appendChild(span);
+ var br = document.createElement('BR');
var iframe = document.createElement('IFRAME');
iframe.setAttribute('src', src);
iframe.setAttribute('height', height);
iframe.setAttribute('width', width);
- parent.replaceChild(iframe, parent.lastChild);
- // window.scrollTo(x,y);
+ span.appendChild(br);
+ span.appendChild(iframe);
+ //parent.replaceChild(iframe, parent.lastChild);
+ // window.scrollTo(x[id],y[id]);
showing[id] = true;
} else {
alert(
@@ -43,8 +46,8 @@ function hideCode(id) {
if (document.getElementById && document.createElement) {
var parent = document.getElementById(id);
parent.removeChild(parent.lastChild);
- if (x >= 0) {
- window.scrollTo(x,y);
+ if (x[id] != undefined) {
+ window.scrollTo(x[id],y[id]);
}
showing[id] = false;
} else {