[ Index ]
 

Code source de WebCalendar 1.0.5

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables | Statistiques

title

Body

[fermer]

/includes/js/ -> edit_layer.php (source)

   1  <script type="text/javascript">
   2  <!-- <![CDATA[
   3  function valid_color ( str ) {
   4    var ch, j;
   5    var valid = "0123456789abcdefABCDEF";
   6  
   7    if ( str.length == 0 )
   8      return true;
   9  
  10    if ( str.charAt ( 0 ) != '#' || str.length != 7 )
  11      return false;
  12  
  13    for ( j = 1; j < str.length; j++ ) {
  14     ch = str.charAt ( j );
  15     if ( valid.indexOf ( ch ) < 0 )
  16       return false;
  17    }
  18    return true;
  19  }
  20  
  21  function valid_form ( form ) {
  22    var err = "";
  23    if ( ! valid_color ( form.layercolor.value ) )
  24      err += "<?php etranslate("Invalid color")?>.\n";
  25  
  26    if ( err.length > 0 ) {
  27      alert ( "Error:\n\n" + err + "\n\n<?php etranslate("Color format should be '#RRGGBB'")?>" );
  28      return false;
  29    }
  30    return true;
  31  }
  32  
  33  function selectColor ( color ) {
  34    url = "colors.php?color=" + color;
  35    var colorWindow = window.open(url,"ColorSelection","width=390,height=350,resizable=yes,scrollbars=yes");
  36  }
  37  //]]> -->
  38  </script>


Généré le : Fri Nov 30 19:09:19 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics