[ Index ]
 

Code source de WordPress 2.1.2

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

title

Body

[fermer]

/wp-includes/js/tinymce/plugins/autosave/ -> editor_plugin.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('autosave');
  10  
  11  var TinyMCE_AutoSavePlugin = {
  12      getInfo : function() {
  13          return {
  14              longname : 'Auto save',
  15              author : 'Moxiecode Systems AB',
  16              authorurl : 'http://tinymce.moxiecode.com',
  17              infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',
  18              version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
  19          };
  20      },
  21  
  22      // Private plugin internal methods
  23  
  24      _beforeUnloadHandler : function() {
  25          var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
  26  
  27          if (tinyMCE.getParam("fullscreen_is_enabled"))
  28              return;
  29  
  30          for (n in tinyMCE.instances) {
  31              inst = tinyMCE.instances[n];
  32  
  33              if (!tinyMCE.isInstance(inst))
  34                  continue;
  35  
  36              if (inst.isDirty())
  37                  return msg;
  38          }
  39  
  40          return;
  41      }
  42  };
  43  
  44  window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
  45  
  46  tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);


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