Changeset 2245


Ignore:
Timestamp:
09/27/08 15:36:08 (6 years ago)
Author:
robert
Message:

finished implementation for ticket:397

Location:
trunk/ePubTk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ePubTk/lib/js/reftooltip.js

    r2242 r2245  
    44 */ 
    55 
    6 var disappeardelay = 250;  //tooltip disappear delay (in miliseconds) 
    7 var verticaloffset = 0; //vertical offset of tooltip from anchor link, if any 
     6var disappeardelay = 500;  //tooltip disappear delay (in miliseconds) 
    87 
    98var ie = document.all; 
     
    4443    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight; 
    4544    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) //move up? 
    46       edgeoffsety=dropmenuobj.contentmeasure+obj.offsetHeight+(verticaloffset*2); 
     45      edgeoffsety=dropmenuobj.contentmeasure+obj.offsetHeight; 
    4746    return edgeoffsety; 
    4847  } 
     
    5756  clearhidemenu(); 
    5857  dropmenuobj = document.getElementById('ref_display'); 
    59   dropmenuobj.innerHTML = pubNo+'-'+citekey; 
    60   //unapiRequest2('refdb',pubNo+'-'+citekey,'en-utf8', 'ref_display'); 
     58  //dropmenuobj.innerHTML = pubNo+'-'+citekey; 
     59  unapiRequest2('refdb',pubNo+'-'+citekey,'html-fragment', 'ref_display'); 
    6160 
    6261  showhide(dropmenuobj.style, e); 
    6362 
    6463  dropmenuobj.x = getposOffset(obj, "left"); 
    65   dropmenuobj.y = getposOffset(obj, "top")+verticaloffset; 
     64  dropmenuobj.y = getposOffset(obj, "top"); 
    6665  dropmenuobj.style.left = dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"; 
    6766  dropmenuobj.style.top = dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"; 
     
    9190 
    9291  var script = document.createElement("script"); 
    93   script.setAttribute("src", "../../js/ajax.js"); 
     92  script.setAttribute("src", "/js/ajax.js"); 
    9493  head.appendChild(script); 
    9594 
    9695  var style = document.createElement("style"); 
    97   style.innerHTML = ".balloonstyle{position:absolute;top: -500px;left: 0;padding: 5px;visibility: hidden;border:1px solid black;font:normal 12px Verdana;line-height: 18px;z-index: 100;background-color: white;width: 200px;/*Remove below line to remove shadow. Below line should always appear last within this CSS*/filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135,Strength=5);}"; 
     96  style.innerHTML = ".balloonstyle{position:absolute;top: -500px;left: 0;padding: 5px;visibility: hidden;border:1px solid black;font:normal 12px Verdana;line-height: 18px;z-index: 100;background-color: white;min-width: 200px;/*Remove below line to remove shadow. Below line should always appear last within this CSS*/filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135,Strength=5);}"; 
    9897  head.appendChild(style); 
    9998 
     
    101100 
    102101  for (var i=0; i<all_links.length; i++){ 
    103     if (all_links[i].className == 'refLink'){ 
     102    if (all_links[i].className == 'refLink' && all_links[i].href.indexOf('#') > 0){ 
    104103      all_links[i].title = null; 
    105104      all_links[i].onmouseover = function(e){ 
    106105          var evtobj = window.event? window.event : e; 
    107           var citekey = this.href.split('#ref-')[1].split("'")[0]; 
     106          // we parse the citekey from the links href attribute, which is expected to 
     107          // look like javascript:parent.bibpopup('refs.html#ref-Brown1971') 
     108          var citekey = this.href.split('#')[1] 
     109          // the citekey may be prefixed with 'ref-', e.g. for lrsp articles 
     110          if (citekey.indexOf('ref-') == 0){citekey = citekey.substring(4)} 
     111          if (citekey.indexOf("')") != -1){citekey = citekey.split("')")[0];} 
    108112          displayballoontip(this, evtobj, pubNo, citekey); 
    109113          return false; 
  • trunk/ePubTk/refdb/config/xslt/export2html_fragment.xsl

    r2244 r2245  
    1414       transform refdb export to html fragment - suitable for inclusion in a page. 
    1515  -->  
    16   <xsl:output method="text"/> 
     16  <xsl:output method="html"/> 
    1717 
    1818  <xsl:param name="subdomain"/> 
     
    2424   
    2525  <xsl:template match="refdb:record"> 
     26    <xsl:variable name="url" select="concat('http://', $subdomain, '.', $domain, '/refdb/record/', @refdb:id)"/> 
    2627    <div> 
    2728      <xsl:for-each select="refdb:bibData[@refdb:field='title']"><em><xsl:call-template name="complexText"/></em></xsl:for-each> 
    2829      <xsl:for-each select="refdb:bibData[@refdb:field='author' and @refdb:type='person']"> 
    29         <xsl:if test="position=1">by</xsl:if> 
    30         <xsl:if test="position!=1"> and </xsl:if> 
     30        <xsl:if test="position()=1"><br/>by </xsl:if> 
     31        <xsl:if test="position()!=1"> and </xsl:if> 
    3132        <strong><xsl:value-of select="."/></strong> 
    3233      </xsl:for-each> 
     34      <xsl:for-each select="refdb:bibData[@refdb:field='year']"><xsl:if test="position()=1"><br/>(<xsl:value-of select="."/>)</xsl:if></xsl:for-each> 
     35      <!--br/> 
     36      <a href="{$url}"><xsl:value-of select="$url"/></a--> 
    3337    </div> 
    3438  </xsl:template> 
Note: See TracChangeset for help on using the changeset viewer.