[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/mambots/editors/tinymce/jscripts/tiny_mce/plugins/emotions/ -> editor_plugin_src.js (source)

   1  /**

   2   * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $

   3   *

   4   * @author Moxiecode

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

   6   */
   7  
   8  /* Import plugin specific language pack */

   9  tinyMCE.importPluginLanguagePack('emotions');
  10  
  11  // Plucin static class

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

  24       * Returns the HTML contents of the emotions control.

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

  36       * Executes the mceEmotion command.

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

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

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

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

  58          return false;
  59      }
  60  };
  61  
  62  // Register plugin

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


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics