From: Nicolas <ni...@us...> - 2005-01-25 22:34:20
|
Update of /cvsroot/jmol/Jmol-web/source/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21121/source/doc Modified Files: style.xsl default.css Log Message: First release of Jmol-fah Index: style.xsl =================================================================== RCS file: /cvsroot/jmol/Jmol-web/source/doc/style.xsl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- style.xsl 24 Jan 2005 18:51:11 -0000 1.6 +++ style.xsl 25 Jan 2005 22:34:11 -0000 1.7 @@ -246,6 +246,104 @@ </ul> </xsl:template> -</xsl:stylesheet> - + <xsl:template match="fah_projects"> + <![CDATA[ + var doc = document; + + function displayStatus(projectname) { + window.status = "Project " + projectname; + } + + function clearStatus() { + window.status = " "; + } + + function viewProject(project, filename, projectname,credit) { + jmolScript("load ../fah/projects/" + filename + ".xyz.gz", "Fah"); + document.fahForm.infoNumber.value = project; + document.fahForm.infoName.value = projectname; + document.fahForm.infoCredit.value = credit; + document.getElementById('infoProject').href = "http://vspx27.stanford.edu/cgi-bin/allprojects#" + project; + } + + function addProject(project, filename, projectname, credit) { + var varDisabled = ""; + var varOnClick = ""; + var varOnMouseOver = ""; + var varOnMouseOut = ""; + if (filename == undefined || filename == null) { + varDisabled = "disabled='true'"; + } else { + varOnClick = + "onclick='viewProject(" + + "\"" + project + "\", " + + "\"" + filename + "\", " + + "\"" + projectname + "\", " + + "\"" + credit + "\")'"; + } + if (projectname == undefined || projectname == null) { + } else { + varOnMouseOver = "onMouseOver='displayStatus(\"" + projectname + "\");return true'"; + varOnMouseOut = "onMouseout='clearStatus();return true'"; + } + doc.open(); + if (projectname == undefined || projectname == null) { + } else { + varInput = "<input" + + " type='button'" + + " value='" + project + "'" + + " " + varDisabled + + " " + varOnClick + + " " + varOnMouseOver + + " " + varOnMouseOut + + " />"; + doc.writeln(varInput); + } + doc.close(); + } + doc.writeln("<table width=100% border=0 cellpadding=0><tr>"); + ]]> + <xsl:for-each select="fah_proj" > + <xsl:value-of select="." /> + <xsl:if test="@number"> + <xsl:if test="@name"> + <xsl:text> +</xsl:text> + <xsl:text>addProject('</xsl:text> + <xsl:value-of select="@number" /> + <xsl:text>',</xsl:text> + <xsl:choose> + <xsl:when test="@file = 'y'"> + <xsl:text>'p</xsl:text> + <xsl:value-of select="@number" /> + <xsl:text>'</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>null</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>,'</xsl:text> + <xsl:value-of select="@name" /> + <xsl:text>',</xsl:text> + <xsl:choose> + <xsl:when test="@credit"> + <xsl:text>'</xsl:text> + <xsl:value-of select="@credit" /> + <xsl:text>'</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>null</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>);</xsl:text> + </xsl:if> + </xsl:if> + </xsl:for-each> + <![CDATA[ + doc.writeln("</tr></table>") + doc.writeln("<br />"); + ]]> + </xsl:template> + +</xsl:stylesheet> Index: default.css =================================================================== RCS file: /cvsroot/jmol/Jmol-web/source/doc/default.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- default.css 15 Apr 2002 05:53:25 -0000 1.1 +++ default.css 25 Jan 2005 22:34:11 -0000 1.2 @@ -1,26 +1,37 @@ -body { - margin: 1em 1em 2em 30px; - font-family: arial, helvetica, sans-serif; - color: black; - background: white; -} - -h1, h2, h3, h4, h5, h6 { text-align: left } -h1, h2, h3, h4, h5 { color: #040099 } -h1 { font: 170% arial, helvetica, sans-serif; } -h2 { font: 140% arial, helvetica, sans-serif; } -h3 { font: 120% arial, helvetica, sans-serif; } -h4 { font: bold 100% arial, helvetica, sans-serif; } -h5 { font: italic 100% arial, helvetica, sans-serif; } -h6 { font: small-caps 100% arial, helvetica, sans-serif; } - -p { font-family: arial, helvetica, sans-serif; } - -ul, td, th { - font-family: arial, helvetica, sans-serif; -} - -tt, pre, code { - font-family: monospace; -} - +body { + margin: 1em 1em 2em 30px; + font-family: arial, helvetica, sans-serif; + color: black; + background: white; +} + +h1, h2, h3, h4, h5, h6 { text-align: left } +h1, h2, h3, h4, h5 { color: #040099 } +h1 { font: 170% arial, helvetica, sans-serif; } +h2 { font: 140% arial, helvetica, sans-serif; } +h3 { font: 120% arial, helvetica, sans-serif; } +h4 { font: bold 100% arial, helvetica, sans-serif; } +h5 { font: italic 100% arial, helvetica, sans-serif; } +h6 { font: small-caps 100% arial, helvetica, sans-serif; } + +p { font-family: arial, helvetica, sans-serif; } + +ul, td, th { + font-family: arial, helvetica, sans-serif; +} + +tt, pre, code { + font-family: monospace; +} + +td.btfah { + text-align: center; + line-height: 1.5em; + padding-left: 0; + padding-right: 0; +} +td.btfah input { + margin-left: 0; + margin-right: 0; + width: 3em; +} |