Diff for /ECHO_content/ECHO_helpers.py between versions 1.51 and 1.52

version 1.51, 2005/06/09 11:12:59 version 1.52, 2005/06/09 15:08:01
Line 299  class ECHO_basis: Line 299  class ECHO_basis:
         tag += ">" + text + "</a>"          tag += ">" + text + "</a>"
     return tag      return tag
   
     def createMapAux(self, ob, arrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil",target="_blank"):      def createMapAux(self, ob, arrowsrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/pfeil", circlesrc="http://nausikaa2.rz-berlin.mpg.de/digitallibrary/servlet/Scaler/?dw=15&fn=icons/kreis", target="_blank"):
     """generate map link image, text and other stuff"""      """generate map link image, text and other stuff"""
     bt = BrowserCheck(self)      bt = BrowserCheck(self)
     id = ob.getFullId()      id = ob.getFullId()
Line 308  class ECHO_basis: Line 308  class ECHO_basis:
     tag = ""      tag = ""
   
     if bt.isN4:      if bt.isN4:
           #
         # N4 needs layer and img elements          # N4 needs layer and img elements
           #
         tag += '<layer id="i.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)">'%(id,id,id)          tag += '<layer id="i.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)">'%(id,id,id)
         if ob.isTypeArrow():          if ob.isTypeArrow():
           # N4 - Arrow
             rot = ob.angle              rot = ob.angle
         tag += '<a href="%s"><img border="0" src="%s&rot=%s" /></a>'%(link,arrowsrc,rot)          marksrc = arrowsrc
           if rot < 0:
               marksrc = circlesrc
           tag += '<a href="%s"><img border="0" src="%s&rot=%s" /></a>'%(link,marksrc,rot)
         else:          else:
           # N4 - Area
         tag += '<a href="%s"><img border="0" width="1000" height="1000" src="trans_img"'%(link)          tag += '<a href="%s"><img border="0" width="1000" height="1000" src="trans_img"'%(link)
         if tiptext:          if tiptext:
             tag += ' alt="%s"'%tiptext              tag += ' alt="%s"'%tiptext
         tag += ' /></a>'          tag += ' /></a>'
         tag += '</layer>'          tag += '</layer>'
     else:      else:
         # create a-element          #
           # (more or less) DOM capable browser
           #
         tag = '<a id="b.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" href="%s" target="%s">'%(id,id,id,link,target)          tag = '<a id="b.%s" onmouseover="highlightPair(\'%s\', true)" onmouseout="highlightPair(\'%s\', false)" href="%s" target="%s">'%(id,id,id,link,target)
         if ob.isTypeArrow():          if ob.isTypeArrow():
           # DOM - Arrow
         rot = ob.angle          rot = ob.angle
           marksrc = arrowsrc
           if float(rot) < 0:
               marksrc = circlesrc
           print "ROT: ", rot, " mark: ", marksrc
         if bt.isIEWin and bt.versIE > 5:          if bt.isIEWin and bt.versIE > 5:
             # IE/Win 5.5 has "feature" for PNG transparency              # IE/Win 5.5 has "feature" for PNG transparency
             tag += '<span id="i.%s" style="position:absolute; top:-100px; left:-100px; border-style:none; border-width=1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'%s&rot=%s\');"><img style="visibility:hidden" src="%s&rot=%s" /></span>'%(id,arrowsrc,rot,arrowsrc,rot)              tag += '<span id="i.%s" style="position:absolute; top:-100px; left:-100px; border-style:none; border-width=1px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'%s&rot=%s\');"><img style="visibility:hidden" src="%s&rot=%s" /></span>'%(id,marksrc,rot,marksrc,rot)
         else:          else:
             # arrow image              # arrow image
             tag += '<img id="i.%s" src="%s&rot=%s" border="1" style="position:absolute; top:-100px; left:-100px; border-style:none;" />'%(id,arrowsrc,rot)              tag += '<img id="i.%s" src="%s&rot=%s" border="1" style="position:absolute; top:-100px; left:-100px; border-style:none;" />'%(id,marksrc,rot)
         elif ob.isTypeText():          elif ob.isTypeText():
             # div for area          # DOM - Text
             tag += '<div id="i.%s" style="position:absolute; top:-100px; left:-100px;"'%(id)              tag += '<div id="i.%s" style="position:absolute; top:-100px; left:-100px;"'%(id)
             if tiptext:              if tiptext:
             tag += ' title="%s"'%tiptext              tag += ' title="%s"'%tiptext
Line 339  class ECHO_basis: Line 353  class ECHO_basis:
             tag += ob.getText()              tag += ob.getText()
             tag += '</div></div>'              tag += '</div></div>'
         else:          else:
           # DOM - Area
         if bt.isIE:          if bt.isIE:
             # IE needs transparent img for area              # IE needs transparent img for area
             tag += '<img id="i.%s" border="0" style="position:absolute; top:-100px; left:-100px;" src="trans_img"'%(id)              tag += '<img id="i.%s" border="0" style="position:absolute; top:-100px; left:-100px;" src="trans_img"'%(id)

Removed from v.1.51  
changed lines
  Added in v.1.52


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>