[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/public_html/fckeditor/editor/_source/classes/ -> fckevents.js (source)

   1  /*
   2   * FCKeditor - The text editor for internet
   3   * Copyright (C) 2003-2006 Frederico Caldeira Knabben
   4   * 
   5   * Licensed under the terms of the GNU Lesser General Public License:
   6   *         http://www.opensource.org/licenses/lgpl-license.php
   7   * 
   8   * For further information visit:
   9   *         http://www.fckeditor.net/
  10   * 
  11   * "Support Open Source software. What about a donation today?"
  12   * 
  13   * File Name: fckevents.js
  14   *     FCKEvents Class: used to handle events is a advanced way.
  15   * 
  16   * File Authors:
  17   *         Frederico Caldeira Knabben (fredck@fckeditor.net)
  18   */
  19  
  20  var FCKEvents ;
  21  
  22  FCKEvents = function( eventsOwner )
  23  {
  24      this.Owner = eventsOwner ;
  25      this.RegisteredEvents = new Object() ;
  26  }
  27  
  28  FCKEvents.prototype.AttachEvent = function( eventName, functionPointer )
  29  {
  30      var aTargets ;
  31  
  32      if ( !( aTargets = this.RegisteredEvents[ eventName ] ) ) 
  33          this.RegisteredEvents[ eventName ] = [ functionPointer ] ;
  34      else
  35          aTargets.push( functionPointer ) ;
  36  }
  37  
  38  FCKEvents.prototype.FireEvent = function( eventName, params )
  39  {
  40      var bReturnValue = true ;
  41  
  42      var oCalls = this.RegisteredEvents[ eventName ] ;
  43  
  44      if ( oCalls )
  45      {
  46          for ( var i = 0 ; i < oCalls.length ; i++ )
  47              bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ;
  48      }
  49  
  50      return bReturnValue ;
  51  }


Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics