|
[HepData-svn] r1527 - review/resourceblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Mar 19 10:29:06 GMT 2012
Author: whalley Date: Mon Mar 19 10:29:06 2012 New Revision: 1527 Log: latest additions Added: review/resource/HEPjax.js review/resource/dictionary review/resource/dictionary.eml review/resource/example.html review/resource/mathjax-MathJax-v2.0-14-gfc06ebe.zip (contents, props changed) Added: review/resource/HEPjax.js ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ review/resource/HEPjax.js Mon Mar 19 10:29:06 2012 (r1527) @@ -0,0 +1,46 @@ +function findElements(rootElement, className){ + /** Finds */ + var res = [] + var pushed = false; + if (rootElement.className){ + var classes = rootElement.className.split(" ") + for (var ind in classes){ + if (classes[ind] == className){ + res.push(rootElement); + pushed = true; + break; + } + } + } + if (!pushed){ + var element = rootElement.firstChild + while (element){ + res = res.concat(findElements(element, className)); + element = element.nextSibling; + } + } + + return res; +} + +function replaceElement(element){ + /** replace the text inside of the element */ + return; + var prevCont = "" + if (element.innerHTML){ + prevCont = element.innerHTML; + } + + element.innerHTML = "HELLO WORLD from HEPjax \\( \\sum _{n=1} ^\\infty \\frac{1}{n^2} \\) previous content: <div style=\"background-color:red;\">" + prevCont + "</div>" ; +} + +function replaceHEP(xqClassName, yClassName, dictionaryURL){ + /** + This method replaces all the content of elements having class layerClass with its parsed version + */ + var elementsToReplace = findElements(document, xqClassName); + for (indEl in elementsToReplace){ + replaceElement(elementsToReplace[indEl]); + } + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); +} Added: review/resource/dictionary ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ review/resource/dictionary Mon Mar 19 10:29:06 2012 (r1527) @@ -0,0 +1,28 @@ +{ + ".LT." : ">", + ".GT." : "<", + ".GE." : "\\geq", + ".LE." : "\\leq", + "ELECTRON" : "e", + "MU" : "\\mu", + "NU" : "\\nu", + "MU+" : "\\mu^{+}", + "UPSILON" : "\Upsilon", + "PT" : "\\textit{p}_T", + "CHARGED" : "charged", + "PB" : "Pb", + "JET": "jet", + "X" : "\\textit{X}", + "NUCLEON" : "nucleon", + "S" : "\\textit{s}", + "pct" : "\\%", + "PCT" : "\\%", + "SIG" : "\\sigma", + "sig" : "\\sigma", + "DEG" : "^\\circ", + "deg" : "^\\circ", + "GEV" : "GeV", + "PSI" : "\\psi", + "LEPTON" : "l", + "YRAP": "\\textit{y}" + } Added: review/resource/dictionary.eml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ review/resource/dictionary.eml Mon Mar 19 10:29:06 2012 (r1527) @@ -0,0 +1,128 @@ +Return-Path: piotr.praczyk at cern.ch +Received: from MAIL.PhyIP3.Dur.ac.UK (LHLO mail.phyip3.dur.ac.uk) + (129.234.186.130) by mail.phyip3.dur.ac.uk with LMTP; Fri, 9 Mar 2012 + 12:05:09 +0000 (GMT) +Received: from localhost (localhost [127.0.0.1]) + by mail.phyip3.dur.ac.uk (Postfix) with ESMTP id 55492AC75546 + for <m.r.whalley at durham.ac.uk>; Fri, 9 Mar 2012 12:05:09 +0000 (GMT) +X-Virus-Scanned: amavisd-new at mail.phyip3.dur.ac.uk +X-Spam-Flag: NO +X-Spam-Score: -1.12 +X-Spam-Level: +X-Spam-Status: No, score=-1.12 tagged_above=-10 required=10 + tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_NEUTRAL=0.779] + autolearn=no +Received: from mail.phyip3.dur.ac.uk ([127.0.0.1]) + by localhost (mail.phyip3.dur.ac.uk [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 1Mk3wGcjMZkd for <m.r.whalley at durham.ac.uk>; + Fri, 9 Mar 2012 12:05:08 +0000 (GMT) +Received: from mailrelay1.dur.ac.uk (mailrelay1.dur.ac.uk [129.234.248.33]) + by mail.phyip3.dur.ac.uk (Postfix) with ESMTPS id 5B3DAAC41E2F + for <whalley at ip3-mail.dur.ac.uk>; Fri, 9 Mar 2012 12:05:08 +0000 (GMT) +Received: from CERNMX30.cern.ch (cernmx30.cern.ch [137.138.144.177]) + by mailrelay1.dur.ac.uk (8.13.8/8.13.7) with ESMTP id q29C1ECK024982 + for <M.R.Whalley at durham.ac.uk>; Fri, 9 Mar 2012 12:01:18 GMT +Received: from CERNFE20.cern.ch (137.138.144.155) by cernmxgwlb2.cern.ch + (137.138.144.177) with Microsoft SMTP Server (TLS) id 14.1.270.1; Fri, 9 Mar + 2012 13:01:03 +0100 +Received: from PLOXCHG04.cern.ch ([fe80::200f:c2cc:c81e:9143]) by + CERNFE20.cern.ch ([fe80::30be:ea5a:76b5:631b%11]) with mapi id + 14.01.0270.002; Fri, 9 Mar 2012 13:01:01 +0100 +From: Piotr Praczyk <piotr.praczyk at cern.ch> +To: Michael Whalley <m.r.whalley at durham.ac.uk> +Subject: Qualifier symbols dictionary (initial version) +Thread-Topic: Qualifier symbols dictionary (initial version) +Thread-Index: Acz97Esf9q6xHiVuT3GZ0TfKqRvZ8g== +Date: Fri, 9 Mar 2012 12:01:00 +0000 +Message-ID: <8C20FB4C5B2CD84EB9AA8033F1A2D7FCC5CD47CA at PLOXCHG04.cern.ch> +Accept-Language: en-GB, en-US +Content-Language: en-GB +X-MS-Has-Attach: +X-MS-TNEF-Correlator: +x-originating-ip: [129.234.186.138] +Content-Type: multipart/alternative; + boundary="_000_8C20FB4C5B2CD84EB9AA8033F1A2D7FCC5CD47CAPLOXCHG04cernch_" +MIME-Version: 1.0 +Keywords: CERN SpamKiller Note: -50 +X-DurhamAcUk-MailScanner-ID: q29C1ECK024982 +X-DurhamAcUk-MailScanner: Found to be clean + +--_000_8C20FB4C5B2CD84EB9AA8033F1A2D7FCC5CD47CAPLOXCHG04cernch_ +Content-Type: text/plain; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +{ + ".LT." : ">", + ".GT." : "<", + ".GE." : "\\geq", + ".LE." : "\\leq", + "ELECTRON" : "e", + "MU" : "\\mu", + "NU" : "\\nu", + "MU+" : "\\mu^{+}", + "UPSILON" : "\Upsilon", + "PT" : "\\textit{p}_T", + "CHARGED" : "charged", + "PB" : "Pb", + "JET": "jet", + "X" : "\\textit{X}", + "NUCLEON" : "nucleon", + "S" : "\\textit{s}", + "pct" : "\\%", + "PCT" : "\\%", + "SIG" : "\\sigma", + "sig" : "\\sigma", + "DEG" : "^\\circ", + "deg" : "^\\circ", + "GEV" : "GeV", + "PSI" : "\\psi", + "LEPTON" : "l", + "YRAP": "\\textit{y}" + } + +--_000_8C20FB4C5B2CD84EB9AA8033F1A2D7FCC5CD47CAPLOXCHG04cernch_ +Content-Type: text/html; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +<html dir=3D"ltr"> +<head> +<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= +1"> +<style id=3D"owaParaStyle" type=3D"text/css">P {margin-top:0;margin-bottom:= +0;}</style> +</head> +<body ocsi=3D"0" fpstyle=3D"1"> +<div style=3D"direction: ltr;font-family: Tahoma;color: #000000;font-size: = +10pt;">{<br> + ".LT." : ">",<br> + ".GT." : "<",<br> + ".GE." : "\\geq",<br> + ".LE." : "\\leq",<br> + "ELECTRON" : "e",<br> + "MU" : "\\mu",<br> + "NU" : "\\nu",<br> + "MU+" : "\\mu^{+}",<br> + "UPSILON" : "\Upsilon",<br> + "PT" : "\\textit{p}_T",<br> + "CHARGED" : "charged",<br> + "PB" : "Pb",<br> + "JET": "jet",<br> + "X" : "\\textit{X}",<br> + "NUCLEON" : "nucleon",<br> + "S" : "\\textit{s}",<br> + "pct" : "\\%",<br> + "PCT" : "\\%",<br> + "SIG" : "\\sigma",<br> + "sig" : "\\sigma",<br> + "DEG" : "^\\circ",<br> + "deg" : "^\\circ",<br> + "GEV" : "GeV",<br> + "PSI" : "\\psi",<br> + "LEPTON" : "l",<br> + "YRAP": "\\textit{y}"<br> + }<br> +</div> +</body> +</html> + +--_000_8C20FB4C5B2CD84EB9AA8033F1A2D7FCC5CD47CAPLOXCHG04cernch_-- Added: review/resource/example.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ review/resource/example.html Mon Mar 19 10:29:06 2012 (r1527) @@ -0,0 +1,20 @@ +<HTML> +<HEAD> + <script type="text/javascript" src="http://hepdata.cedar.ac.uk/resource/HEPjax.js"></script> + <script type="text/javascript" + src="http://hepdata.cedar.ac.uk/resource/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> +</script> +</HEAD> +<BODY onload="replaceHEP('HEPqualifier', 'nothing');"> +<pre> duoa < \(dsfdfs\) ble </pre> +Hello math: \(\in(1,2)\) + +<div class="HEPqualifier" style="display:block; width:400px; height: 300px; border-width:1px; border-style:solid; border-color: black;">This is layer containng a HEP data qualifier</div> + +<table> +<tr><td> +<div class="HEPqualifier" style="display:block; width:400px; height: 300px; border-width:1px; border-style:solid; border-color: black;">This is another HEPData related layer</div> +</td><td><div>Normal layer (unchanged)</div></td></tr><tr><td colspan="2">bleee</td></tr></table> +\[ \sum _{n=1} ^\infty \frac{1}{n^3} \] +</BODY> +</HTML> Added: review/resource/mathjax-MathJax-v2.0-14-gfc06ebe.zip ============================================================================== Binary file. No diff available.
More information about the HepData-svn mailing list |