[rkward-cvs] SF.net SVN: rkward:[4202] trunk/rkward/rkward/rbackend/rpackages/rkward/R
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Tue Apr 17 15:11:28 UTC 2012
Revision: 4202
http://rkward.svn.sourceforge.net/rkward/?rev=4202&view=rev
Author: m-eik
Date: 2012-04-17 15:11:27 +0000 (Tue, 17 Apr 2012)
Log Message:
-----------
minor changes to the HTML markup, to improve the parsability of rk_out.html
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2012-04-15 20:40:28 UTC (rev 4201)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2012-04-17 15:11:27 UTC (rev 4202)
@@ -351,7 +351,7 @@
#' @export
".rk.make.hr" <- function () {
- .rk.cat.output ("<hr>\n");
+ .rk.cat.output ("<hr />\n");
}
# General purpose storage environment (which will hopefully never get locked by R)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R 2012-04-15 20:40:28 UTC (rev 4201)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.filename-functions.R 2012-04-17 15:11:27 UTC (rev 4202)
@@ -76,52 +76,54 @@
.rk.cat.output (paste ("<html><head>\n<title>RKWard Output</title>\n", .rk.do.plain.call ("getCSSlink"), sep=""))
# the next part defines a JavaScript function to add individual results to a global table of contents menu in the document
.rk.cat.output (paste ("\t<script type=\"text/javascript\">
- function addToTOC(id, level){
- var fullHeader = document.getElementById(id);
- var resultsTOC = document.getElementById('RKWardResultsTOCShown');
- var headerName = fullHeader.getAttribute('name');
- var headerText = fullHeader.firstChild.data;
- var headerTitle = fullHeader.getAttribute('title');
- var newDiv = document.createElement('div');
- // create new anchor for TOC
- var newAnchor = '<a href=\"#' + headerName + '\" title=\"' + headerTitle + '\"';
- // indent anchor depending on header level
- if(level > 1){
- newDiv.style.textIndent = level-1 + 'em';
- newDiv.className = 'level' + level;
- newAnchor = '• ' + newAnchor + '>' + headerText + '</a>';
- } else {
- newAnchor = newAnchor + '>' + headerText + '</a>';
+ <!--
+ function addToTOC(id, level){
+ var fullHeader = document.getElementById(id);
+ var resultsTOC = document.getElementById('RKWardResultsTOCShown');
+ var headerName = fullHeader.getAttribute('name');
+ var headerText = fullHeader.firstChild.data;
+ var headerTitle = fullHeader.getAttribute('title');
+ var newDiv = document.createElement('div');
+ // create new anchor for TOC
+ var newAnchor = '<a href=\"#' + headerName + '\" title=\"' + headerTitle + '\"';
+ // indent anchor depending on header level
+ if(level > 1){
+ newDiv.style.textIndent = level-1 + 'em';
+ newDiv.className = 'level' + level;
+ newAnchor = '• ' + newAnchor + '>' + headerText + '</a>';
+ } else {
+ newAnchor = newAnchor + '>' + headerText + '</a>';
+ }
+ newDiv.innerHTML = newAnchor;
+ resultsTOC.appendChild(newDiv);
}
- newDiv.innerHTML = newAnchor;
- resultsTOC.appendChild(newDiv);
- }
- function switchVisible(show, hide) {
- document.getElementById(show).style.display = 'inline';
- document.getElementById(hide).style.display = 'none';
- }
- function showMLevel(nodes){
- for(var i=0; i < nodes.length; i++) {
- nodes[i].style.display = 'block';
+ function switchVisible(show, hide) {
+ document.getElementById(show).style.display = 'inline';
+ document.getElementById(hide).style.display = 'none';
}
- }
- function hideMLevel(nodes){
- for(var i=0; i < nodes.length; i++) {
- nodes[i].style.display = 'none';
+ function showMLevel(nodes){
+ for(var i=0; i < nodes.length; i++) {
+ nodes[i].style.display = 'block';
+ }
}
- }
- function maxLevel(level){
- if(level > 5){
- return false;
+ function hideMLevel(nodes){
+ for(var i=0; i < nodes.length; i++) {
+ nodes[i].style.display = 'none';
+ }
}
- for(var i=1; i < 6; i++) {
- if(i <= level){
- showMLevel(document.getElementsByClassName('level' + i));
- } else {
- hideMLevel(document.getElementsByClassName('level' + i));
+ function maxLevel(level){
+ if(level > 5){
+ return false;
}
+ for(var i=1; i < 6; i++) {
+ if(i <= level){
+ showMLevel(document.getElementsByClassName('level' + i));
+ } else {
+ hideMLevel(document.getElementsByClassName('level' + i));
+ }
+ }
}
- }\n\t</script>\n", sep=""))
+ // -->\n\t</script>\n", sep=""))
# positioning of the TOC is done by CSS, default state is hidden
# see $SRC/rkward/pages/rkward_output.css
.rk.cat.output (paste ("</head>\n<body>\n", sep=""))
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R 2012-04-15 20:40:28 UTC (rev 4201)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R 2012-04-17 15:11:27 UTC (rev 4202)
@@ -116,7 +116,7 @@
# the function addToTOC() will be defined in the document head
# see rk.set.output.html.file() in rk.filename-functions.R
if (isTRUE(toc) || (is.null(toc) && level <= 4)){
- cat("<script>\n\t<!--\n\t\taddToTOC('",header.id,"','",level,"');\n\t-->\n</script>\n", sep="")
+ cat("<script type=\"text/javascript\">\n\t<!--\n\t\taddToTOC('",header.id,"','",level,"');\n\t>// -->\n</script>\n", sep="")
}
if (length (parameters)) {
# legacy handling: parameter=value used to be passed as parameter, value
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list