[ Index ]
 

Code source de CMS made simple 1.0.5

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

title

Body

[fermer]

/lib/filemanager/ImageManager/ -> IMEStandalone.js (source)

   1  /**
   2   * The ImageManager plugin javascript.
   3   * @author $Author: Wei Zhuo $
   4   * @version $Id: image-manager.js 26 2004-03-31 02:35:21Z Wei Zhuo $
   5   * @package ImageManager
   6   */
   7  
   8  //Translation unit.
   9  var I18N;    
  10  
  11  /**
  12   * This is the ImageManager constructor.
  13   * manager_url is where this script is.
  14   * lang is the lanaguage file you wish to use.
  15   */
  16  function ImageManager(manager_url,lang)
  17  {
  18      var plugin_lang = manager_url + "/lang/" + lang + ".js";
  19      this.url = manager_url + '/manager.php';
  20      
  21      // next line should allow for language changing, but should be defined in a page before, for not language is hard coded
  22      //document.write("<script type='text/javascript' src='" + plugin_lang + "'></script>");
  23      I18N = ImageManager.I18N;    
  24      
  25  };
  26  
  27  ImageManager._pluginInfo = {
  28      name          : "ImageManager Stand Alone",
  29      version       : "1.0",
  30      developer     : "Xiang Wei Zhuo",
  31      developer_url : "http://www.zhuo.org/htmlarea/",
  32      license       : "htmlArea"
  33  };
  34  
  35  //Call this to popup the Image Manager and Editor.
  36  //updater is an object with a update method that accepts
  37  //an array of parameters.
  38  //The returned parameters are
  39  //param.f_url, param.f_file, param.f_alt,
  40  //param.f_border, param.f_align, param.f_vert, param.f_horiz, 
  41  //param.f_width, param.f_height
  42  ImageManager.prototype.popManager = function(updater)
  43  {
  44      this._insertImage(updater);
  45  }
  46  
  47  // Open up the ImageManger script.
  48  // when the dialog returns, if there are parameters
  49  // then updater.update is called with the parameters
  50  ImageManager.prototype._insertImage = function(updater) {
  51  
  52      var manager = this;    // for nested functions
  53  
  54      Dialog(manager.url, function(param) {
  55          if (!param) {    // user must have pressed Cancel
  56              return false;
  57          }
  58          else
  59          {
  60              if(updater && typeof updater.update != 'undefined')
  61                  updater.update(param);
  62          }
  63          
  64      }, null);
  65  };
  66  
  67  


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7