# HG changeset patch
# User luginbue
# Date 1080212168 -3600
# Node ID f1631db2ff3d2d85fe9695bc3e10c60e952b9138
# Parent 9bd2ae6f5e776518281d032b0e4f8952c60beb57
relato juhuii
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/astro.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/astro.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/compare.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/compare.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/neugebauer.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/neugebauer.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+ In order to use relato you need to have a frame capable browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/picture.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/picture.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In order to use relato you need to have a frame capable browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/relato.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/relato.js Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,176 @@
+top.name = 'f'
+
+if ( !top.focused )
+ top.focused = '';
+
+
+function identity() {
+ return 'Relato v0.1';
+}
+
+
+function frameSelected() {
+ return top.focused != '';
+}
+
+
+function noFrameSelected() {
+ alert( "No frame activated at the moment - click on the desired frame to activate it!" );
+}
+
+
+function nameOfSelectedFrame() {
+ return top.focused.name;
+}
+
+
+function selectedFrameObject() {
+ return top.focused;
+}
+
+
+function hex_color(dec) {
+ var hex = "#";
+ for (i = 6; i > 0; i--) {
+ var pow = Math.pow(16, i);
+ if (pow < dec) {
+ val = parseInt(dec / pow);
+ dec -= val*pow;
+ if (val > 9) {
+ switch (val) {
+ case (10): hex += 'A'; break;
+ case (11): hex += 'B'; break;
+ case (12): hex += 'C'; break;
+ case (13): hex += 'D'; break;
+ case (14): hex += 'E'; break;
+ case (15): hex += 'F'; break;
+ }
+ } else {
+ hex += val;
+ }
+ } else {
+ hex += "0";
+ }
+ }
+ return hex;
+}
+
+function init() {
+ // do the initialisation just if it is top-level relato
+ if ( top == window ) {
+ init_rec( top, top.name );
+ }
+ return true;
+}
+
+
+function init_rec( current, name ) {
+
+ if (current.frames.length > 0) {
+ for ( i=0; i < current.frames.length; i++ ) {
+ if (!current.frames[i].name) {
+ current.frames[i].name = name + i;
+ }
+ current.frames[i].addEventListener( 'click', focusListener, true );
+ current.frames[i].addEventListener( 'unload', unloadListener, true );
+ if (current.frames[i] == selectedFrameObject()) {
+// var color = current.frames[i].document.bgColor;
+// if (color.match(/#\d{6}/)) {
+// color = parseInt('0x' + color.slice(1)) - parseInt('0x222222');
+// if (color < 0) {
+// color = 0;
+// }
+// current.frames[i].document.bgColor = hex_color(color);
+// }
+ current.frames[i].document.bgColor = '#444444';
+ }
+ init_rec( current.frames[i], current.frames[i].name );
+ }
+ }
+}
+
+
+function focusListener( event ) {
+
+ var active = this;
+
+ if ( event.ctrlKey ) {
+ active = this.parent;
+ }
+
+ markActiveFrame_rec( top, active );
+
+ top.focused = active;
+
+ // just debug information
+ window.status = top.focused.name;
+}
+
+
+function unloadListener( event ) {
+ setTimeout('init()', 250);
+}
+
+function markActiveFrame_rec(current, active) {
+
+ if ( current.frames.length > 0 ) {
+ for ( i=0; i < current.frames.length; i++ ) {
+ markActiveFrame_rec( current.frames[i], active );
+ }
+ } else {
+ if ( current.name.indexOf(active.name) == 0 ) {
+// var color = current.document.bgColor;
+// if (color.match(/#\d{6}/)) {
+// color = parseInt('0x' + color.slice(1)) - parseInt('0x222222');
+// if (color < 0) {
+// color = 0;
+// }
+// current.document.bgColor = hex_color(color);
+// }
+ current.document.bgColor = '#444444';
+ } else {
+ current.document.bgColor = '#666666';
+ }
+ }
+}
+
+
+function loadFocusedFrame(url) {
+
+ if (frameSelected()) {
+ top.focused.location.href = url;
+ setTimeout( 'top.init()', 1000 );
+ } else {
+ noFrameSelected();
+ }
+}
+
+
+function loadNamedFrame(url, framename) {
+
+ desired = loadNamedFrame_rec(top, framename);
+ if ( desired ) {
+ desired.location.href = url;
+ setTimeout( 'top.init()', 1000 );
+ } else {
+ alert( "Error - a frame with this name does not exist!" );
+ }
+}
+
+function loadNamedFrame_rec(current, framename) {
+
+ if ( current.frames.length > 0 ) {
+ for ( i=0; i < current.frames.length; i++ ) {
+ thisone = loadNamedFrame_rec(current.frames[i], framename);
+ if (thisone) {
+ return thisone;
+ }
+ }
+ } else {
+ if (current.name == framename) {
+ return current;
+ } else {
+ return null;
+ }
+ }
+}
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/relato.xsl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/relato.xsl Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function () {
+ if (frameSelected()) {
+
+ if (nameOfSelectedFrame() == "") {
+ id = selectedFrameObject();
+ return id.(.arguments[0], .arguments[1], .arguments[2], .arguments[3]);
+ }
+
+ } else {
+
+
+ // alert message
+ noFrameSelected();
+
+
+ // be quiet
+ return false;
+
+
+ }
+ }
+
+
+
+
+ function dynamicButtons() {
+ var btns = '';
+
+ btns += '#|';
+ return btns.slice(1);
+ }
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/type.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/type.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In order to use relato you need to have a frame capable browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/work.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/work.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In order to use relato you need to have a frame capable browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 9bd2ae6f5e77 -r f1631db2ff3d client/digitallibrary/relato/work_debug.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/relato/work_debug.xml Thu Mar 25 11:56:08 2004 +0100
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In order to use relato you need to have a frame capable browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+