[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/design/standard/javascript/tools/ -> eziepngfix.js (source)

   1  //
   2  // Created on: <18-Nov-2004 10:54:01 bh>
   3  //
   4  // SOFTWARE NAME: eZ publish
   5  // SOFTWARE RELEASE: 3.9.0
   6  // BUILD VERSION: 17785
   7  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
   8  // SOFTWARE LICENSE: GNU General Public License v2.0
   9  // NOTICE: >
  10  //   This program is free software; you can redistribute it and/or
  11  //   modify it under the terms of version 2.0  of the GNU General
  12  //   Public License as published by the Free Software Foundation.
  13  //
  14  //   This program is distributed in the hope that it will be useful,
  15  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  16  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17  //   GNU General Public License for more details.
  18  //
  19  //   You should have received a copy of version 2.0 of the GNU General
  20  //   Public License along with this program; if not, write to the Free
  21  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  22  //   MA 02110-1301, USA.
  23  //
  24  //
  25              
  26  /*! \file eziepngfix.js
  27  */
  28  
  29  
  30  /*!
  31    Forces use of DirectX transparency filter for image tags with
  32    "transparent-png-icon" as class. The result: correct alpha 
  33    blending for normal (32x32) PNG icons in Internet Explorer.
  34  */
  35  function useDirectXAlphaBlender()
  36  {
  37      var images = document.getElementsByTagName( "img" );
  38  
  39      for( var i=0; i<images.length; i++ )
  40      {
  41          if( images[i].className == "transparent-png-icon" )
  42          {
  43              images[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + images[i].src + "', sizingMethod='scale')";
  44              
  45              if( images[i].width == 16 )
  46              {           
  47                  images[i].src = emptyIcon16;
  48              }
  49              else
  50              {
  51                  images[i].src = emptyIcon32;
  52              }
  53          }
  54      }
  55  }
  56  
  57  window.attachEvent( "onload", useDirectXAlphaBlender );


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7