[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/libraries/ckeditor/_source/plugins/a11yhelp/ -> plugin.js (source)

   1  /*

   2  Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.

   3  For licensing, see LICENSE.html or http://ckeditor.com/license

   4  */
   5  
   6  /**

   7   * @fileOverview Plugin definition for the a11yhelp, which provides a dialog

   8   * with accessibility related help.

   9   */
  10  
  11  (function()
  12  {
  13      var pluginName = 'a11yhelp',
  14          commandName = 'a11yHelp';
  15  
  16      CKEDITOR.plugins.add( pluginName,
  17      {
  18          // List of available localizations.

  19          availableLangs : { en:1, he:1 },
  20  
  21          init : function( editor )
  22          {
  23              var plugin = this;
  24              editor.addCommand( commandName,
  25                  {
  26                      exec : function()
  27                      {
  28                          var langCode = editor.langCode;
  29                          langCode = plugin.availableLangs[ langCode ] ? langCode : 'en';
  30  
  31                          CKEDITOR.scriptLoader.load(
  32                                  CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ),
  33                                  function()
  34                                  {
  35                                      CKEDITOR.tools.extend( editor.lang, plugin.lang[ langCode ] );
  36                                      editor.openDialog( commandName );
  37                                  });
  38                      },
  39                      modes : { wysiwyg:1, source:1 },
  40                      canUndo : false
  41                  });
  42  
  43              CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' );
  44          }
  45      });
  46  })();


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7