[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/public_html/fckeditor/editor/_source/commandclasses/ -> fckspellcheckcommand_ie.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: fckspellcheckcommand_ie.js
  14   *     FCKStyleCommand Class: represents the "Spell Check" command.
  15   *     (IE specific implementation)
  16   * 
  17   * File Authors:
  18   *         Frederico Caldeira Knabben (fredck@fckeditor.net)
  19   */
  20  
  21  var FCKSpellCheckCommand = function()
  22  {
  23      this.Name = 'SpellCheck' ;
  24      this.IsEnabled = ( FCKConfig.SpellChecker == 'ieSpell' || FCKConfig.SpellChecker == 'SpellerPages' ) ;
  25  }
  26  
  27  FCKSpellCheckCommand.prototype.Execute = function()
  28  {
  29      switch ( FCKConfig.SpellChecker )
  30      {
  31          case 'ieSpell' :
  32              this._RunIeSpell() ;
  33              break ;
  34          
  35          case 'SpellerPages' :
  36              FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ;
  37              break ;
  38      }
  39  }
  40  
  41  FCKSpellCheckCommand.prototype._RunIeSpell = function()
  42  {
  43      try
  44      {
  45          var oIeSpell = new ActiveXObject( "ieSpell.ieSpellExtension" ) ;
  46          oIeSpell.CheckAllLinkedDocuments( FCK.EditorDocument ) ;
  47      }
  48      catch( e )
  49      {
  50          if( e.number == -2146827859 )
  51          {
  52              if ( confirm( FCKLang.IeSpellDownload ) )
  53                  window.open( FCKConfig.IeSpellDownloadUrl , 'IeSpellDownload' ) ;
  54          }
  55          else
  56              alert( 'Error Loading ieSpell: ' + e.message + ' (' + e.number + ')' ) ;
  57      }
  58  }
  59  
  60  FCKSpellCheckCommand.prototype.GetState = function()
  61  {
  62      return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ;
  63  }


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