[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/e107_handlers/tiny_mce/plugins/emoticons/ -> editor_plugin.js (source)

   1  
   2  tinyMCE.importPluginLanguagePack('emoticons', 'en');
   3  
   4  // Plucin static class
   5  var TinyMCE_emoticonsPlugin = {
   6      getInfo : function() {
   7          return {
   8              longname : 'emoticons',
   9              author : 'CaMer0n',
  10              authorurl : 'http://e107coders.org',
  11              infourl : 'http://www.e107.org',
  12              version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
  13          };
  14      },
  15  
  16      /**
  17       * Returns the HTML contents of the emoticons control.
  18       */
  19      getControlHTML : function(cn) {
  20          switch (cn) {
  21              case "emoticons":
  22                  return tinyMCE.getButtonHTML(cn, 'lang_emoticons_desc', '{$pluginurl}/images/emoticons.png', 'mceEmotion');
  23          }
  24  
  25          return "";
  26      },
  27  
  28      /**
  29       * Executes the mceEmotion command.
  30       */
  31      execCommand : function(editor_id, element, command, user_interface, value) {
  32          // Handle commands
  33          switch (command) {
  34              case "mceEmotion":
  35                  var template = new Array();
  36  
  37                  template['file'] = '../../plugins/emoticons/emoticons.php'; // Relative to theme
  38                  template['width'] = 200;
  39                  template['height'] = 200;
  40  
  41                  // Language specific width and height addons
  42                  template['width'] += tinyMCE.getLang('lang_emoticons_delta_width', 0);
  43                  template['height'] += tinyMCE.getLang('lang_emoticons_delta_height', 0);
  44  
  45                  tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
  46  
  47                  return true;
  48          }
  49  
  50          // Pass to next handler in chain
  51          return false;
  52      }
  53  };
  54  
  55  // Register plugin
  56  tinyMCE.addPlugin('emoticons', TinyMCE_emoticonsPlugin);


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7