[ Index ]
 

Code source de Seagull 0.6.1

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

title

Body

[fermer]

/tinyfck/plugins/emotions/ -> editor_plugin_src.js (source)

   1  /**

   2   * $RCSfile: editor_plugin_src.js,v $

   3   * $Revision: 1.23 $

   4   * $Date: 2006/02/10 16:29:38 $

   5   *

   6   * @author Moxiecode

   7   * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.

   8   */
   9  
  10  /* Import plugin specific language pack */

  11  tinyMCE.importPluginLanguagePack('emotions', 'en,tr,sv,zh_cn,cs,fa,fr_ca,fr,de,pl,pt_br,nl,da,he,nb,hu,ru,ru_KOI8-R,ru_UTF-8,nn,es,cy,is,zh_tw,zh_tw_utf8,sk');
  12  
  13  // Plucin static class

  14  var TinyMCE_EmotionsPlugin = {
  15      getInfo : function() {
  16          return {
  17              longname : 'Emotions',
  18              author : 'Moxiecode Systems',
  19              authorurl : 'http://tinymce.moxiecode.com',
  20              infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_emotions.html',
  21              version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
  22          };
  23      },
  24  
  25      /**

  26       * Returns the HTML contents of the emotions control.

  27       */
  28      getControlHTML : function(cn) {
  29          switch (cn) {
  30              case "emotions":
  31                  return tinyMCE.getButtonHTML(cn, 'lang_emotions_desc', '{$pluginurl}/images/emotions.gif', 'mceEmotion');
  32          }
  33  
  34          return "";
  35      },
  36  
  37      /**

  38       * Executes the mceEmotion command.

  39       */
  40      execCommand : function(editor_id, element, command, user_interface, value) {
  41          // Handle commands

  42          switch (command) {
  43              case "mceEmotion":
  44                  var template = new Array();
  45  
  46                  template['file'] = '../../plugins/emotions/emotions.htm'; // Relative to theme

  47                  template['width'] = 160;
  48                  template['height'] = 160;
  49  
  50                  // Language specific width and height addons

  51                  template['width'] += tinyMCE.getLang('lang_emotions_delta_width', 0);
  52                  template['height'] += tinyMCE.getLang('lang_emotions_delta_height', 0);
  53  
  54                  tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
  55  
  56                  return true;
  57          }
  58  
  59          // Pass to next handler in chain

  60          return false;
  61      }
  62  };
  63  
  64  // Register plugin

  65  tinyMCE.addPlugin('emotions', TinyMCE_EmotionsPlugin);


Généré le : Fri Mar 30 01:27:52 2007 par Balluche grâce à PHPXref 0.7