Index: /extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
===================================================================
--- /extensions/GrumPluginClasses/classes/GPCCore.class.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/classes/GPCCore.class.inc.php	(revision 10246)
@@ -3,7 +3,7 @@
 /* -----------------------------------------------------------------------------
   class name     : GPCCore
-  class version  : 1.3.3
-  plugin version : 3.4.4
-  date           : 2011-02-02
+  class version  : 1.4.0
+  plugin version : 3.5.0
+  date           : 2011-04-10
   ------------------------------------------------------------------------------
   author: grum at piwigo.org
@@ -53,4 +53,5 @@
 |         |            |     with Lightbox, GMaps & ASE plugins (and probably other)
 |         |            |
+| 1.4.0   | 2011/04/10 | * Updated for piwigo 2.2
 |         |            |
 |         |            |
@@ -107,9 +108,9 @@
         Array('name' => "GPCAjax", 'version' => "3.0.0"),
         Array('name' => "GPCCategorySelector", 'version' => "1.0.1"),
-        Array('name' => "GPCCore", 'version' => "1.3.4"),
-        Array('name' => "GPCCss", 'version' => "3.0.0"),
+        Array('name' => "GPCCore", 'version' => "1.4.0"),
+        Array('name' => "GPCCss", 'version' => "3.1.0"),
         Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"),
         Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"),
-        Array('name' => "GPCRequestBuilder", 'version' => "1.1.4"),
+        Array('name' => "GPCRequestBuilder", 'version' => "1.1.2"),
         Array('name' => "GPCTables", 'version' => "1.5.0"),
         Array('name' => "GPCTabSheet", 'version' => "1.1.1"),
@@ -369,51 +370,23 @@
    * @param String $file : the css file
    */
-  static public function addHeaderCSS($id, $file)
-  {
+  static public function addHeaderCSS($id, $file, $order=0)
+  {
+    global $template;
+
     if(!array_key_exists($file, self::$headerItems['css']))
     {
       self::$headerItems['css'][$id]=$file;
-    }
-  }
-  static public function addHeaderJS($id, $file)
+      $template->func_combine_css(array('path'=>$file, 'order'=>$order), $template->smarty);
+    }
+  }
+  static public function addHeaderJS($id, $file, $require=array())
   {
     global $template;
 
-    if(!isset($template->known_scripts)) $template->known_scripts=array();
-
-    if(!array_key_exists($id,  $template->known_scripts) and !array_key_exists($file, self::$headerItems['js']))
-    {
-      $dummy=null;
-
-      $template->func_known_script(
-        array('id'=>$id,
-              'src'=>$file),
-        $dummy);
-     //$template->known_scripts[$id]=$file;
-     self::$headerItems['js'][$id]=$file;
-    }
-  }
-
-  /**
-   * declared as public to be accessible by the event manager, but this funcion
-   * is not aimed to be used directly
-   */
-  static public function applyHeaderItems()
-  {
-    global $template;
-    $dummy1=null;
-    $dummy2=null;
-
-    foreach(self::$headerItems['css'] as $file)
-    {
-      $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.$file.'"/>');
-    }
-/*
-    foreach(self::$headerItems['js'] as $file)
-    {
-      //$template->append('head_elements', '<script type="text/javascript" src="'.$file.'"></script>');
-      $template->block_html_head(null, '<script type="text/javascript" src="'.$file.'"></script>', $dummy1, $dummy2);
-    }
-*/
+    if(!array_key_exists($file, self::$headerItems['js']))
+    {
+      self::$headerItems['js'][$id]=$file;
+      $template->scriptLoader->add($id, 'header', $require, $file, 0);
+    }
   }
 
@@ -457,13 +430,13 @@
         case 'googleTranslate':
           self::addHeaderJS('google.jsapi', 'http://www.google.com/jsapi');
-          self::addHeaderJS('gpc.googleTranslate', 'plugins/GrumPluginClasses/js/google_translate'.self::$minified.'.js');
+          self::addHeaderJS('gpc.googleTranslate', 'plugins/GrumPluginClasses/js/google_translate'.self::$minified.'.js', array('jquery', 'google.jsapi'));
         case 'categorySelector':
           self::addHeaderCSS('gpc.categorySelector', GPC_PATH.'css/categorySelector.css');
           self::addHeaderCSS('gpc.categorySelectorT', sprintf($themeFile, 'categorySelector'));
-          self::addHeaderJS('gpc.categorySelector', GPC_PATH.'js/ui.categorySelector'.self::$minified.'.js');
+          self::addHeaderJS('gpc.categorySelector', GPC_PATH.'js/ui.categorySelector'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputCheckbox':
           self::addHeaderCSS('gpc.inputCheckbox', GPC_PATH.'css/inputCheckbox.css');
-          self::addHeaderJS('gpc.inputCheckbox', GPC_PATH.'js/ui.inputCheckbox'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputCheckbox', GPC_PATH.'js/ui.inputCheckbox'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputColorPicker':
@@ -478,58 +451,58 @@
           self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
           self::addHeaderCSS('gpc.inputColorPickerT', sprintf($themeFile, 'inputColorPicker'));
-          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
-          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/packed/ui.slider.packed.js');
-          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/packed/ui.draggable.packed.js');
-          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js');
-          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js');
-          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js');
-          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js');
-          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js');
-          self::addHeaderJS('gpc.inputColorPicker', GPC_PATH.'js/ui.inputColorPicker'.self::$minified.'.js');
+          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
+          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js', array('jquery.ui'));
+          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/minified/jquery.ui.draggable.min.js', array('jquery.ui'));
+          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.slider.dialog.js', array('jquery.ui'));
+          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js', array('jquery'));
+          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js', array('jquery'));
+          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js', array('jquery'));
+          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js', array('jquery'));
+          self::addHeaderJS('gpc.inputColorPicker', GPC_PATH.'js/ui.inputColorPicker'.self::$minified.'.js', array('jquery.ui.slider','gpc.inputText','gpc.inputNum','gpc.inputColorsFB','gpc.inputDotArea'));
           break;
         case 'inputColorsFB':
           self::addHeaderCSS('gpc.inputColorsFB', GPC_PATH.'css/inputColorsFB.css');
           self::addHeaderCSS('gpc.inputColorsFBT', sprintf($themeFile, 'inputColorsFB'));
-          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputConsole':
           self::addHeaderCSS('gpc.inputConsole', GPC_PATH.'css/inputConsole.css');
           self::addHeaderCSS('gpc.inputConsoleT', sprintf($themeFile, 'inputConsole'));
-          self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputDotArea':
           self::addHeaderCSS('gpc.inputDotArea', GPC_PATH.'css/inputDotArea.css');
           self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
-          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputList':
           self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css');
           self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList'));
-          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputNum':
           self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css');
           self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum'));
-          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
-          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/packed/ui.slider.packed.js');
-          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js');
+          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
+          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js', array('jquery.ui'));
+          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js', array('jquery','jquery.ui.slider'));
           break;
         case 'inputPosition':
           self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css');
           self::addHeaderCSS('gpc.inputPositionT', sprintf($themeFile, 'inputPosition'));
-          self::addHeaderJS('gpc.inputPosition', GPC_PATH.'js/ui.inputPosition'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputPosition', GPC_PATH.'js/ui.inputPosition'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputRadio':
-          self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputStatusBar':
           self::addHeaderCSS('gpc.inputStatusBar', GPC_PATH.'css/inputStatusBar.css');
           self::addHeaderCSS('gpc.inputStatusBarT', sprintf($themeFile, 'inputStatusBar'));
-          self::addHeaderJS('gpc.inputStatusBar', GPC_PATH.'js/ui.inputStatusBar'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputStatusBar', GPC_PATH.'js/ui.inputStatusBar'.self::$minified.'.js', array('jquery'));
           break;
         case 'inputText':
           self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
           self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
-          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js');
+          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js', array('jquery'));
           break;
       }
@@ -707,5 +680,5 @@
 } //class
 
-add_event_handler('loc_begin_page_header', array('GPCCore', 'applyHeaderItems'), 10);
+//add_event_handler('loc_begin_page_header', array('GPCCore', 'applyHeaderItems'), 10);
 
 GPCCore::init();
Index: /extensions/GrumPluginClasses/classes/GPCCss.class.inc.php
===================================================================
--- /extensions/GrumPluginClasses/classes/GPCCss.class.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/classes/GPCCss.class.inc.php	(revision 10246)
@@ -3,7 +3,7 @@
 /* -----------------------------------------------------------------------------
   class name: GPCCss
-  class version  : 3.0.0
-  plugin version : 3.0.0
-  date           : 2010-03-30
+  class version  : 3.1.0
+  plugin version : 3.5.0
+  date           : 2011-01-31
 
   ------------------------------------------------------------------------------
@@ -21,5 +21,5 @@
 | 3.0.0   | 2010/03/30 | * Update class & function names
 |         |            |
-|         |            |
+| 3.1.0   | 2011/01/31 | * Updated for piwigo 2.2
 |         |            |
 |         |            |
@@ -54,10 +54,10 @@
     {
       //if no filename given, load the gpc.css file
-      $fileName=basename(dirname(dirname(__FILE__))).'/css/gpc.css';
-      $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="plugins/'.$fileName.'">');
+      $fileName='./plugins/'.basename(dirname(dirname(__FILE__))).'/css/gpc.css';
+      GPCCore::addHeaderCSS('gpc', $fileName);
     }
     elseif(file_exists($fileName))
     {
-      $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="plugins/'.basename(dirname($fileName))."/".basename($fileName).'">');
+      GPCCore::addHeaderCSS(basename(dirname($fileName)), 'plugins/'.basename(dirname($fileName)).'/'.basename($fileName).'');
     }
   }
Index: /extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
===================================================================
--- /extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php	(revision 10246)
@@ -2,5 +2,5 @@
 /* -----------------------------------------------------------------------------
   class name: GCPRequestBuilder
-  class version  : 1.1.4
+  class version  : 1.1.5
   plugin version : 3.4.3
   date           : 2010-09-08
@@ -84,4 +84,5 @@
 | 1.1.4   | 2011/01/31 | * mantis bug:2167
 |         |            |
+| 1.1.5   | 2011/04/10 | * Compatibility with piwigo 2.2
 |         |            |
 |         |            |
@@ -91,5 +92,5 @@
 |         |            |
 
- --------------------------------------------------------------------------- */
+  --------------------------------------------------------------------------- */
 
 if(!defined('GPC_DIR')) define('GPC_DIR' , baseName(dirname(dirname(__FILE__))));
@@ -539,8 +540,8 @@
 
     $baseName=basename(dirname(dirname(__FILE__))).'/js/';
-    GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.packed.js');
-    GPCCore::addHeaderJS('gpc.interface', 'plugins/'.$baseName.'external/interface/interface.js');
-    GPCCore::addHeaderJS('gpc.inestedsortable', 'plugins/'.$baseName.'external/inestedsortable.pack.js');
-    GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js');
+    GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.min.js');
+    GPCCore::addHeaderJS('gpc.interface', 'plugins/'.$baseName.'external/interface/interface.js', array('jquery'));
+    GPCCore::addHeaderJS('gpc.inestedsortable', 'plugins/'.$baseName.'external/inestedsortable.pack.js', array('jquery', 'gpc.interface'));
+    GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js', array('gpc.inestedsortable'));
 
     $template->append('head_elements',
@@ -1394,5 +1395,4 @@
     $filter=array_flip($filter);
 
-    GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.packed.js');
     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js');
Index: /extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php
===================================================================
--- /extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php	(revision 10246)
@@ -23,5 +23,5 @@
     - (public) function isAllowed($id)
     - (private) function initList()
-
+ 
 
 | release | date       |
@@ -41,5 +41,5 @@
 class GPCAllowedAccess
 {
-  public $access_list;
+  protected $accessList;
   protected $accessMode='a'; // 'a' : allowed, 'n' : not allowed
 
@@ -62,5 +62,5 @@
   public function __destruct()
   {
-    unset($this->access_list);
+    unset($this->accessList);
   }
 
@@ -70,5 +70,5 @@
   protected function initList()
   {
-    $this->access_list=array();
+    $this->accessList=array();
   }
 
@@ -84,5 +84,5 @@
   function getList()
   {
-    return($this->access_list);
+    return($this->accessList);
   }
 
@@ -95,7 +95,7 @@
   function setAllowed($id, $allowed)
   {
-    if(isset($this->access_list[$id]))
-    {
-      $this->access_list[$id]['allowed']=$allowed;
+    if(isset($this->accessList[$id]))
+    {
+      $this->accessList[$id]['allowed']=$allowed;
     }
   }
@@ -116,13 +116,13 @@
     $idList=array_flip($idList);
 
-    foreach($this->access_list as $key => $val)
+    foreach($this->accessList as $key => $val)
     {
       if(isset($idList[$key]))
       {
-        $this->access_list[$key]['allowed']=$allowed;
+        $this->accessList[$key]['allowed']=$allowed;
       }
       else
       {
-        $this->access_list[$key]['allowed']=!$allowed;
+        $this->accessList[$key]['allowed']=!$allowed;
       }
     }
@@ -139,5 +139,5 @@
     $returned=Array();
 
-    foreach($this->access_list as $key => $val)
+    foreach($this->accessList as $key => $val)
     {
       if($val['allowed']) $returned[]=$val;
@@ -155,7 +155,7 @@
   function isAllowed($id)
   {
-    if(isset($this->access_list[$id]))
-    {
-      return($this->access_list[$id]['allowed']);
+    if(isset($this->accessList[$id]))
+    {
+      return($this->accessList[$id]['allowed']);
     }
     else
@@ -177,5 +177,5 @@
  * ----------------------------------------------------------------------------
  *  this class provides base functions to manage groups access
- *  initList redefined to initialize access_list from database GROUPS
+ *  initList redefined to initialize accessList from database GROUPS
  * ----------------------------------------------------------------------------
  */
@@ -187,5 +187,5 @@
   protected  function initList()
   {
-    $this->access_list=array();
+    $this->accessList=array();
     $sql="SELECT id, name FROM ".GROUPS_TABLE." ORDER BY name";
     $result=pwg_query($sql);
@@ -194,5 +194,5 @@
       while($row=pwg_db_fetch_assoc($result))
       {
-        $this->access_list[$row['id']]=array(
+        $this->accessList[$row['id']]=array(
             'id' => $row['id'],
             'name' => $row['name'],
@@ -214,5 +214,5 @@
  * ----------------------------------------------------------------------------
  *  this class provides base functions to manage users access
- *  initList redefined to initialize access_list from piwigo's predefined values
+ *  initList redefined to initialize accessList from piwigo's predefined values
  * ----------------------------------------------------------------------------
  */
@@ -225,8 +225,8 @@
   {
     $usersList = array('guest', 'generic', 'normal', 'webmaster', 'admin');
-    $this->access_list=array();
+    $this->accessList=array();
     foreach($usersList as $val)
     {
-      $this->access_list[$val]=array(
+      $this->accessList[$val]=array(
           'id' => $val,
           'name' => l10n('user_status_'.$val),
Index: /extensions/GrumPluginClasses/gpc_version.inc.php
===================================================================
--- /extensions/GrumPluginClasses/gpc_version.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/gpc_version.inc.php	(revision 10246)
@@ -15,5 +15,5 @@
   if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.4.4');
-  if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.04.04');
+  if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.5.0');
+  if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.05.00');
 ?>
Index: /extensions/GrumPluginClasses/js/ui.inputText.min.js
===================================================================
--- /extensions/GrumPluginClasses/js/ui.inputText.min.js	(revision 10245)
+++ /extensions/GrumPluginClasses/js/ui.inputText.min.js	(revision 10246)
@@ -1,1019 +1,200 @@
-/* file: ui.inputText.js - v1.1.1 | minified on 2011/01/31 with http://jscompress.com/ */
-/**
- * -----------------------------------------------------------------------------
- * file: ui.inputText.js
- * file version: 1.1.0
- * date: 2011-01-09
- *
- * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
- *
- * -----------------------------------------------------------------------------
- * Author     : Grum
- *   email    : grum@piwigo.com
- *   website  : http://photos.grum.fr
- *   PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
- *
- *   << May the Little SpaceFrog be with you ! >>
- * -----------------------------------------------------------------------------
- *
- *
- *
- *
- * :: HISTORY ::
- *
- * | release | date       |
- * | 1.0.0   | 2010/11/04 | * first release
- * |         |            |
- * | 1.1.0   | 2011/01/09 | * if div content is not empty and text value not
- * |         |            |   defined, use of div content to define text value
- * |         |            |
- * |         |            | * add multilanguage managment
- * |         |            |
- * |         |            |
- * |         |            |
- *
- */
-
-
-
-(
-  function($)
-  {
-    /*
-     * plugin 'public' functions
-     */
-    var publicMethods =
-    {
-      init : function (opt)
-        {
-          return this.each(function()
-            {
-              // default values for the plugin
-              var $this=$(this),
-                  data = $this.data('options'),
-                  objects = $this.data('objects'),
-                  properties = $this.data('properties'),
-                  options =
-                    {
-                      languages:[],
-                      currentLanguage:'',
-                      languagesValues:{},
-                      languageSelector:'',
-                      multilines:false,
-                      disabled:false,
-                      textAlign:'left',
-                      displayChar:0,
-                      maxChar:0,
-                      numRows:1,
-                      regExp:'',
-                      value:'',
-                      change:null
-                    };
-
-              // if options given, merge it
-              // if(opt) $.extend(options, opt); ==> options are set by setters
-              if(options.value=='' && $.trim($this.html())!='') options.value=$.trim($this.html());
-
-              $this.data('options', options);
-
-              if(!properties)
-              {
-                $this.data('properties',
-                  {
-                    initialized:false,
-                    re:/.*/,
-                    value:0,
-                    isValid:true,
-                    languagesValues:{}
-                  }
-                );
-                properties=$this.data('properties');
-              }
-
-              if(!objects)
-              {
-                objects =
-                  {
-                    container:$('<div/>',
-                        {
-                          'class':'ui-inputText',
-                          css:{
-                            width:'100%'
-                          }
-                        }
-                    ).bind('click.inputText',
-                        function ()
-                        {
-                          objects.input.focus();
-                        }
-                      ),
-                    input:null
-                  };
-
-                $this
-                  .html('')
-                  .append(objects.container);
-
-                $this.data('objects', objects);
-              }
-
-              privateMethods.setOptions($this, opt);
-            }
-          );
-        }, // init
-      destroy : function ()
-        {
-          return this.each(
-            function()
-            {
-              // default values for the plugin
-              var $this=$(this),
-                  objects = $this.data('objects');
-              objects.input.unbind().remove();
-              objects.container.unbind().remove();
-              $this
-                .unbind('.inputText')
-                .css(
-                  {
-                    width:'',
-                    height:''
-                  }
-                );
-            }
-          );
-        }, // destroy
-
-      options: function (value)
-        {
-          return(
-            this.each(
-              function()
-              {
-                privateMethods.setOptions($(this), value);
-              }
-            )
-          );
-        }, // options
-
-      disabled: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setDisabled($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.disabled);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // disabled
-
-      textAlign: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setTextAlign($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.textAlign);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // textAlign
-
-      displayChar: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setDisplayChar($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.displayChar);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // displayChar
-
-      maxChar: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setMaxChar($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.maxChar);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // maxChar
-
-      numRows: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setNumRows($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.numRows);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // numRows
-
-      regExp: function (value)
-        {
-          if(value!=null)
-          {
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setRegExp($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            var options = this.data('options');
-
-            if(options)
-            {
-              return(options.regExp);
-            }
-            else
-            {
-              return('');
-            }
-          }
-        }, // regExp
-
-      multilines: function ()
-        {
-          // return the selected tags
-          var properties=this.data('properties');
-          return(properties.multilines);
-        }, // multilines
-
-      languages: function (value)
-        {
-          if(value!=null)
-          {
-            // set the known languages
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setLanguages($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the known languages
-            var options = this.data('options');
-            return(options.languages);
-          }
-        },
-
-      currentLanguage: function (value)
-        {
-          if(value!=null)
-          {
-            // set the current language
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setCurrentLanguage($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the current language
-            var options = this.data('options');
-            return(options.currentLanguage);
-          }
-        },
-
-      languageSelector: function (value)
-        {
-          if(value!=null)
-          {
-            // set the language selector id (inputList object)
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setLanguageSelector($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the language selector id
-            var options = this.data('options');
-            return(options.languageSelector);
-          }
-        }, //languageSelector
-
-      languagesValues: function (value)
-        {
-          if(value!=null)
-          {
-            // set the languages values
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setLanguagesValues($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the languages values
-            var properties=this.data('properties');
-            return(properties.languagesValues);
-          }
-        },
-
-      value: function (value, language)
-        {
-          if(value!=null)
-          {
-            var options=this.data('options');
-
-            // set selected value
-            return(
-              this.each(
-                function()
-                {
-                  if(language!=null)
-                  {
-                    privateMethods.setLanguageValue($(this), language, value, options.currentLanguage==language);
-                  }
-                  else
-                  {
-                    privateMethods.setValue($(this), value, true);
-                  }
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the selected tags
-            var properties=this.data('properties');
-            return(properties.value);
-          }
-        }, // value
-
-      isValid: function (value)
-        {
-          if(value!=null)
-          {
-            // set selected value
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setIsValid($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the selected tags
-            var properties=this.data('properties');
-            return(properties.isValid);
-          }
-        }, // isValid
-
-      change: function (value)
-        {
-          if(value!=null && $.isFunction(value))
-          {
-            // set selected value
-            return(
-              this.each(
-                function()
-                {
-                  privateMethods.setEventChange($(this), value);
-                }
-              )
-            );
-          }
-          else
-          {
-            // return the selected value
-            var options=this.data('options');
-
-            if(options)
-            {
-              return(options.change);
-            }
-            else
-            {
-              return(null);
-            }
-          }
-        }, // change
-
-      doTranslation: function ()
-        {
-          // set selected value
-          return(
-            this.each(
-              function()
-              {
-                privateMethods.doTranslation($(this));
-              }
-            )
-          );
-        } // doTranslation
-
-    }; // methods
-
-
-    /*
-     * plugin 'private' methods
-     */
-    var privateMethods =
-    {
-      /**
-       * return true is given value is a valid numeric value, according to the
-       * rules defined by the object
-       * @param Object object
-       * @param value
-       * @return Bool
-       */
-      isValid : function (object, value)
-        {
-          var properties=object.data('properties');
-
-          return(properties.re.exec(value))
-        },
-
-      setOptions : function (object, value)
-        {
-          var properties=object.data('properties'),
-              options=object.data('options');
-
-          if(!$.isPlainObject(value)) return(false);
-
-          properties.initialized=false;
-
-          privateMethods.setMultilines(object, (value.multilines!=null)?value.multilines:options.multilines);
-          privateMethods.setDisplayChar(object, (value.displayChar!=null)?value.displayChar:options.displayChar);
-          privateMethods.setMaxChar(object, (value.maxChar!=null)?value.maxChar:options.maxChar);
-          privateMethods.setNumRows(object, (value.numRows!=null)?value.numRows:options.numRows);
-          privateMethods.setRegExp(object, (value.regExp!=null)?value.regExp:options.regExp);
-
-          privateMethods.setLanguages(object, (value.languages!=null)?value.languages:options.languages);
-          privateMethods.setLanguagesValues(object, (value.languagesValues!=null)?value.languagesValues:options.languagesValues);
-          privateMethods.setCurrentLanguage(object, (value.currentLanguage!=null)?value.currentLanguage:options.currentLanguage);
-          privateMethods.setLanguageSelector(object, (value.languageSelector!=null)?value.languageSelector:options.languageSelector);
-
-          if((properties.languagesValues[options.currentLanguage]!=null &&
-              properties.languagesValues[options.currentLanguage]!='' ||
-              properties.languagesValues[options.currentLanguage]==null) &&
-             (value.value!=null && value.value!='' || options.value!='')
-            ) privateMethods.setValue(object, (value.value!=null)?value.value:options.value, true);
-
-          privateMethods.setTextAlign(object, (value.textAlign!=null)?value.textAlign:options.textAlign);
-
-          privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change);
-
-          properties.initialized=true;
-        },
-
-      /**
-       * define the regular expression used to check validity of a numeric value
-       * @param Object object
-       */
-      setRegExp : function (object, value)
-        {
-          var properties=object.data('properties'),
-              flagRE=/^\/(.*)\/(.*)$/,
-              flags=flagRE.exec(value);
-
-          if(flags==null)
-          {
-            flags=['.*', ''];
-          }
-
-          delete properties.re;
-          properties.re = new RegExp(flags[1],flags[2]);
-        },
-
-      setIsValid : function (object, value)
-        {
-          var objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if(properties.isValid!=value && properties.initialized)
-          {
-            properties.isValid=value;
-            if(properties.isValid)
-            {
-              objects.container.removeClass('ui-error');
-              objects.input.removeClass('ui-error');
-            }
-            else
-            {
-              objects.container.addClass('ui-error');
-              objects.input.addClass('ui-error');
-            }
-          }
-          return(properties.isValid);
-        },
-
-      setDisplayChar : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects');
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.displayChar!=value) && value>=0)
-          {
-            options.displayChar=value;
-            if(options.displayChar>0)
-            {
-              if(options.multilines)
-              {
-                objects.input.attr('cols', options.displayChar);
-              }
-              else
-              {
-                objects.input.attr('size', options.displayChar);
-              }
-            }
-            else
-            {
-              if(options.multilines)
-              {
-                objects.input.removeAttr('size');
-              }
-              else
-              {
-                objects.input.removeAttr('cols');
-              }
-            }
-          }
-          if(object.width()>0)
-          {
-            objects.input.css(
-              {
-                'width': object.width()+'px',
-                'max-width': object.width()+'px'
-              }
-            );
-          }
-          return(options.displayChar);
-        },
-
-      setMaxChar : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.maxChar!=value) && value>=0)
-          {
-            options.maxChar=value;
-            if(!options.multilines)
-            {
-              if(options.maxChar>0)
-              {
-                objects.input.attr('maxlength', options.maxChar);
-              }
-              else
-              {
-                objects.input.removeAttr('maxlength');
-              }
-            }
-          }
-          return(options.maxChar);
-        },
-
-      setNumRows : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.numRows!=value) && value>0)
-          {
-            options.numRows=value;
-            if(options.multilines)
-            {
-              objects.input.attr('rows', options.numRows);
-            }
-          }
-          return(options.numRows);
-        },
-
-      setDisabled : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.disabled!=value) && (value==true || value==false))
-          {
-            options.disabled=value;
-            objects.input.attr('disabled', options.disabled);
-          }
-          return(options.disabled);
-        },
-
-      setTextAlign : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.textAlign!=value) && (value=='left' || value=='right'))
-          {
-            options.textAlign=value;
-            objects.input.css('text-align', options.textAlign);
-          }
-          return(options.textAlign);
-        },
-
-
-      setMultilines : function (object, value)
-        {
-          var options=object.data('options'),
-              objects=object.data('objects'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.multilines!=value) && (value==true || value==false))
-          {
-            options.multilines=value;
-
-            if(options.multilines)
-            {
-              objects.input=$('<textarea/>');
-            }
-            else
-            {
-              objects.input=$('<input>',
-                      {
-                        type:"text",
-                        value:''
-                      }
-                    );
-            }
-
-            objects.container.append(
-                objects.input.bind('keyup.inputText',
-                                      function (event)
-                                      {
-                                        return(privateMethods.keyUp(object, event));
-                                      }
-                                    )
-                                  .bind('change.inputText',
-                                      function (event)
-                                      {
-                                        return(privateMethods.change(object, event));
-                                      }
-                                    )
-                                  .bind('keydown.inputText',
-                                      function (event)
-                                      {
-                                        return(privateMethods.keyDown(object, event));
-                                      }
-                                    )
-            );
-
-          }
-          return(options.textAlign);
-        }, //setMultilines
-
-      setLanguages : function (object, value)
-        {
-          var properties=object.data('properties'),
-              options=object.data('options');
-
-          options.languages=value;
-          options.languagesValues={};
-
-          if(options.languages.length>0)
-          {
-            if($.inArray(options.currentLanguage, options.languages)<0 ||
-               options.currentLanguage=='') options.currentLanguage=options.languages[0];
-
-            for(var i=0;i<options.languages.length;i++)
-            {
-              properties.languagesValues[options.languages[i]]='';
-            }
-          }
-          else
-          {
-            options.currentLanguage='';
-          }
-
-          return(options.languages);
-        }, //setLanguages
-
-      setLanguagesValues : function (object, value)
-        {
-          var options=object.data('options'),
-              properties=object.data('properties');
-
-          if(value==':clear')
-          {
-            for(var langValue in properties.languagesValues)
-            {
-              privateMethods.setLanguageValue(object, langValue, '', langValue==options.currentLanguage);
-            }
-          }
-          else if(!$.isEmptyObject(value))
-          {
-            for(var langValue in value)
-            {
-              if(properties.languagesValues[langValue]!=null)
-                  privateMethods.setLanguageValue(object, langValue, value[langValue], langValue==options.currentLanguage);
-            }
-          }
-
-          return(properties.languagesValues);
-        }, //setLanguagesValues
-
-      setLanguageValue : function (object, language, value, updateInput)
-        {
-          var options=object.data('options'),
-              properties=object.data('properties');
-
-          if(properties.languagesValues[language]!=null)
-          {
-            properties.languagesValues[language]=value;
-
-            if(updateInput) privateMethods.setValue(object, properties.languagesValues[options.currentLanguage], true);
-          }
-
-          return(options.languagesValues);
-        }, //setLanguageValue
-
-      setCurrentLanguage : function (object, value)
-        {
-          var options=object.data('options'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.currentLanguage!=value) && $.inArray(value, options.languages)>=0)
-          {
-            options.currentLanguage=value;
-
-            privateMethods.setValue(object, properties.languagesValues[options.currentLanguage], true);
-          }
-
-          return(options.currentLanguage);
-        }, //setCurrentLanguage
-
-      setLanguageSelector : function (object, value)
-        {
-          var options=object.data('options'),
-              properties=object.data('properties');
-
-          if((!properties.initialized || options.languageSelector!=value) && value!='' && $('#'+value).length>0)
-          {
-            if(options.languageSelector!='') $('#'+options.languageSelector).unbind('inputListChange');
-            options.languageSelector=value;
-
-            if(options.languageSelector!='')
-              $('#'+options.languageSelector).bind('inputListChange',
-                function (event, lang)
-                {
-                  privateMethods.setCurrentLanguage(object, lang);
-                }
-              );
-          }
-
-          return(options.currentLanguage);
-        }, //setCurrentLanguage
-
-      setValue : function (object, value, apply)
-        {
-          var options=object.data('options'),
-              properties=object.data('properties'),
-              objects=object.data('objects');
-
-          if(properties.initialized && properties.value==value)
-          {
-            return(properties.value);
-          }
-
-          privateMethods.setIsValid(object, true);
-
-          properties.value=value;
-
-          if(apply)
-          {
-            objects.input.val(properties.value);
-          }
-
-          if(options.currentLanguage!='') privateMethods.setLanguageValue(object, options.currentLanguage, value, false);
-
-          if(options.change) object.trigger('inputTextChange', properties.value);
-
-          return(properties.value);
-        }, //setValue
-
-      setEventChange : function (object, value)
-        {
-          var options=object.data('options');
-
-          options.change=value;
-          object.unbind('inputTextChange');
-          if(value) object.bind('inputTextChange', options.change);
-          return(options.change);
-        },
-
-      keyUp : function (object, event)
-        {
-          var objects=object.data('objects');
-
-          if(event.keyCode==9 || //DOM_VK_TAB
-             event.keyCode==12 || //DOM_VK_CLEAR
-             event.keyCode==16 || //DOM_VK_SHIFT
-             event.keyCode==17 || //DOM_VK_CONTROL
-             event.keyCode==18 || //DOM_VK_ALT
-             event.keyCode==33 || //DOM_VK_PAGE_UP
-             event.keyCode==34 || //DOM_VK_PAGE_DOWN
-             event.keyCode==35 || //DOM_VK_END
-             event.keyCode==36 || //DOM_VK_HOME
-             event.keyCode==37 || //DOM_VK_LEFT
-             event.keyCode==38 || //DOM_VK_UP
-             event.keyCode==39 || //DOM_VK_RIGHT
-             event.keyCode==40 || //DOM_VK_DOWN
-             event.keyCode==45 || //DOM_VK_INSERT
-             event.keyCode==93  //DOM_VK_CONTEXT_MENU
-            ) return(false);
-
-          return(privateMethods.setValue(object, objects.input.val(), false));
-        },
-
-      change : function (object, event)
-        {
-          var objects=object.data('objects');
-
-          return(privateMethods.setValue(object, objects.input.val(), false))
-        },
-
-      keyDown : function (object, event)
-        {
-          var objects=object.data('objects'),
-              options=object.data('options');
-
-          if(options.maxChar>0 &&
-             objects.input.val().length>=options.maxChar &&
-             !(event.keyCode==8 || //DOM_VK_BACK_SPACE
-               event.keyCode==9 || //DOM_VK_TAB
-               event.keyCode==12 || //DOM_VK_CLEAR
-               event.keyCode==16 || //DOM_VK_SHIFT
-               event.keyCode==17 || //DOM_VK_CONTROL
-               event.keyCode==18 || //DOM_VK_ALT
-               event.keyCode==33 || //DOM_VK_PAGE_UP
-               event.keyCode==34 || //DOM_VK_PAGE_DOWN
-               event.keyCode==35 || //DOM_VK_END
-               event.keyCode==36 || //DOM_VK_HOME
-               event.keyCode==37 || //DOM_VK_LEFT
-               event.keyCode==38 || //DOM_VK_UP
-               event.keyCode==39 || //DOM_VK_RIGHT
-               event.keyCode==40 || //DOM_VK_DOWN
-               event.keyCode==45 || //DOM_VK_INSERT
-               event.keyCode==46 || //DOM_VK_DELETE
-               event.keyCode==93 || //DOM_VK_CONTEXT_MENU
-               objects.input.get(0).selectionStart!=objects.input.get(0).selectionEnd
-              )
-          ) return(false);
-        },
-
-        /**
-         * do translation through a google translate API call (need the GPC google_translate.js file is loaded)
-         *
-         * @param String input : id of input field ; if empty, translate all localized fields
-         */
-      doTranslation : function(object)
-        {
-          var objects=object.data('objects'),
-              properties=object.data('properties'),
-              options=object.data('options');
-
-          if(googleTranslate!=null)
-          {
-            googleTranslate(properties.value, '', options.currentLanguage.substr(0,2),
-              function (result)
-              {
-                privateMethods.setValue(object, result, true);
-              }
-            );
-          }
-        }
-
-    };
-
-
-    $.fn.inputText = function(method)
-    {
-      if(publicMethods[method])
-      {
-        return publicMethods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
-      }
-      else if(typeof method === 'object' || ! method)
-      {
-        return publicMethods.init.apply(this, arguments);
-      }
-      else
-      {
-        $.error( 'Method ' +  method + ' does not exist on jQuery.inputText' );
-      }
-    } // $.fn.inputText
-
-  }
-)(jQuery);
-
-
+(function($)
+{var publicMethods={init:function(opt)
+{return this.each(function()
+{var $this=$(this),data=$this.data('options'),objects=$this.data('objects'),properties=$this.data('properties'),options={languages:[],currentLanguage:'',languagesValues:{},languageSelector:'',multilines:false,disabled:false,textAlign:'left',displayChar:0,maxChar:0,numRows:1,regExp:'',value:'',change:null};if(options.value==''&&$.trim($this.html())!='')options.value=$.trim($this.html());$this.data('options',options);if(!properties)
+{$this.data('properties',{initialized:false,re:/.*/,value:0,isValid:true,languagesValues:{}});properties=$this.data('properties');}
+if(!objects)
+{objects={container:$('<div/>',{'class':'ui-inputText',css:{width:'100%'}}).bind('click.inputText',function()
+{objects.input.focus();}),input:null};$this.html('').append(objects.container);$this.data('objects',objects);}
+privateMethods.setOptions($this,opt);});},destroy:function()
+{return this.each(function()
+{var $this=$(this),objects=$this.data('objects');objects.input.unbind().remove();objects.container.unbind().remove();$this.unbind('.inputText').css({width:'',height:''});});},options:function(value)
+{return(this.each(function()
+{privateMethods.setOptions($(this),value);}));},disabled:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setDisabled($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.disabled);}
+else
+{return('');}}},textAlign:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setTextAlign($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.textAlign);}
+else
+{return('');}}},displayChar:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setDisplayChar($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.displayChar);}
+else
+{return('');}}},maxChar:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setMaxChar($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.maxChar);}
+else
+{return('');}}},numRows:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setNumRows($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.numRows);}
+else
+{return('');}}},regExp:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setRegExp($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.regExp);}
+else
+{return('');}}},multilines:function()
+{var properties=this.data('properties');return(properties.multilines);},languages:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setLanguages($(this),value);}));}
+else
+{var options=this.data('options');return(options.languages);}},currentLanguage:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setCurrentLanguage($(this),value);}));}
+else
+{var options=this.data('options');return(options.currentLanguage);}},languageSelector:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setLanguageSelector($(this),value);}));}
+else
+{var options=this.data('options');return(options.languageSelector);}},languagesValues:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setLanguagesValues($(this),value);}));}
+else
+{var properties=this.data('properties');return(properties.languagesValues);}},value:function(value,language)
+{if(value!=null)
+{var options=this.data('options');return(this.each(function()
+{if(language!=null)
+{privateMethods.setLanguageValue($(this),language,value,options.currentLanguage==language);}
+else
+{privateMethods.setValue($(this),value,true);}}));}
+else
+{var properties=this.data('properties');return(properties.value);}},isValid:function(value)
+{if(value!=null)
+{return(this.each(function()
+{privateMethods.setIsValid($(this),value);}));}
+else
+{var properties=this.data('properties');return(properties.isValid);}},change:function(value)
+{if(value!=null&&$.isFunction(value))
+{return(this.each(function()
+{privateMethods.setEventChange($(this),value);}));}
+else
+{var options=this.data('options');if(options)
+{return(options.change);}
+else
+{return(null);}}},doTranslation:function()
+{return(this.each(function()
+{privateMethods.doTranslation($(this));}));}};var privateMethods={isValid:function(object,value)
+{var properties=object.data('properties');return(properties.re.exec(value))},setOptions:function(object,value)
+{var properties=object.data('properties'),options=object.data('options');if(!$.isPlainObject(value))return(false);properties.initialized=false;privateMethods.setMultilines(object,(value.multilines!=null)?value.multilines:options.multilines);privateMethods.setDisplayChar(object,(value.displayChar!=null)?value.displayChar:options.displayChar);privateMethods.setMaxChar(object,(value.maxChar!=null)?value.maxChar:options.maxChar);privateMethods.setNumRows(object,(value.numRows!=null)?value.numRows:options.numRows);privateMethods.setRegExp(object,(value.regExp!=null)?value.regExp:options.regExp);privateMethods.setLanguages(object,(value.languages!=null)?value.languages:options.languages);privateMethods.setLanguagesValues(object,(value.languagesValues!=null)?value.languagesValues:options.languagesValues);privateMethods.setCurrentLanguage(object,(value.currentLanguage!=null)?value.currentLanguage:options.currentLanguage);privateMethods.setLanguageSelector(object,(value.languageSelector!=null)?value.languageSelector:options.languageSelector);if((properties.languagesValues[options.currentLanguage]!=null&&properties.languagesValues[options.currentLanguage]!=''||properties.languagesValues[options.currentLanguage]==null)&&(value.value!=null&&value.value!=''||options.value!=''))privateMethods.setValue(object,(value.value!=null)?value.value:options.value,true);privateMethods.setTextAlign(object,(value.textAlign!=null)?value.textAlign:options.textAlign);privateMethods.setEventChange(object,(value.change!=null)?value.change:options.change);properties.initialized=true;},setRegExp:function(object,value)
+{var properties=object.data('properties'),flagRE=/^\/(.*)\/(.*)$/,flags=flagRE.exec(value);if(flags==null)
+{flags=['.*',''];}
+delete properties.re;properties.re=new RegExp(flags[1],flags[2]);},setIsValid:function(object,value)
+{var objects=object.data('objects'),properties=object.data('properties');if(properties.isValid!=value&&properties.initialized)
+{properties.isValid=value;if(properties.isValid)
+{objects.container.removeClass('ui-error');objects.input.removeClass('ui-error');}
+else
+{objects.container.addClass('ui-error');objects.input.addClass('ui-error');}}
+return(properties.isValid);},setDisplayChar:function(object,value)
+{var options=object.data('options'),objects=object.data('objects');properties=object.data('properties');if((!properties.initialized||options.displayChar!=value)&&value>=0)
+{options.displayChar=value;if(options.displayChar>0)
+{if(options.multilines)
+{objects.input.attr('cols',options.displayChar);}
+else
+{objects.input.attr('size',options.displayChar);}}
+else
+{if(options.multilines)
+{objects.input.removeAttr('size');}
+else
+{objects.input.removeAttr('cols');}}}
+if(object.width()>0)
+{objects.input.css({'width':object.width()+'px','max-width':object.width()+'px'});}
+return(options.displayChar);},setMaxChar:function(object,value)
+{var options=object.data('options'),objects=object.data('objects'),properties=object.data('properties');if((!properties.initialized||options.maxChar!=value)&&value>=0)
+{options.maxChar=value;if(!options.multilines)
+{if(options.maxChar>0)
+{objects.input.attr('maxlength',options.maxChar);}
+else
+{objects.input.removeAttr('maxlength');}}}
+return(options.maxChar);},setNumRows:function(object,value)
+{var options=object.data('options'),objects=object.data('objects'),properties=object.data('properties');if((!properties.initialized||options.numRows!=value)&&value>0)
+{options.numRows=value;if(options.multilines)
+{objects.input.attr('rows',options.numRows);}}
+return(options.numRows);},setDisabled:function(object,value)
+{var options=object.data('options'),objects=object.data('objects'),properties=object.data('properties');if((!properties.initialized||options.disabled!=value)&&(value==true||value==false))
+{options.disabled=value;objects.input.attr('disabled',options.disabled);}
+return(options.disabled);},setTextAlign:function(object,value)
+{var options=object.data('options'),objects=object.data('objects'),properties=object.data('properties');if((!properties.initialized||options.textAlign!=value)&&(value=='left'||value=='right'))
+{options.textAlign=value;objects.input.css('text-align',options.textAlign);}
+return(options.textAlign);},setMultilines:function(object,value)
+{var options=object.data('options'),objects=object.data('objects'),properties=object.data('properties');if((!properties.initialized||options.multilines!=value)&&(value==true||value==false))
+{options.multilines=value;if(options.multilines)
+{objects.input=$('<textarea/>');}
+else
+{objects.input=$('<input>',{type:"text",value:''});}
+objects.container.append(objects.input.bind('keyup.inputText',function(event)
+{return(privateMethods.keyUp(object,event));}).bind('change.inputText',function(event)
+{return(privateMethods.change(object,event));}).bind('keydown.inputText',function(event)
+{return(privateMethods.keyDown(object,event));}));}
+return(options.textAlign);},setLanguages:function(object,value)
+{var properties=object.data('properties'),options=object.data('options');options.languages=value;options.languagesValues={};if(options.languages.length>0)
+{if($.inArray(options.currentLanguage,options.languages)<0||options.currentLanguage=='')options.currentLanguage=options.languages[0];for(var i=0;i<options.languages.length;i++)
+{properties.languagesValues[options.languages[i]]='';}}
+else
+{options.currentLanguage='';}
+return(options.languages);},setLanguagesValues:function(object,value)
+{var options=object.data('options'),properties=object.data('properties');if(value==':clear')
+{for(var langValue in properties.languagesValues)
+{privateMethods.setLanguageValue(object,langValue,'',langValue==options.currentLanguage);}}
+else if(!$.isEmptyObject(value))
+{for(var langValue in value)
+{if(properties.languagesValues[langValue]!=null)
+privateMethods.setLanguageValue(object,langValue,value[langValue],langValue==options.currentLanguage);}}
+return(properties.languagesValues);},setLanguageValue:function(object,language,value,updateInput)
+{var options=object.data('options'),properties=object.data('properties');if(properties.languagesValues[language]!=null)
+{properties.languagesValues[language]=value;if(updateInput)privateMethods.setValue(object,properties.languagesValues[options.currentLanguage],true);}
+return(options.languagesValues);},setCurrentLanguage:function(object,value)
+{var options=object.data('options'),properties=object.data('properties');if((!properties.initialized||options.currentLanguage!=value)&&$.inArray(value,options.languages)>=0)
+{options.currentLanguage=value;privateMethods.setValue(object,properties.languagesValues[options.currentLanguage],true);}
+return(options.currentLanguage);},setLanguageSelector:function(object,value)
+{var options=object.data('options'),properties=object.data('properties');if((!properties.initialized||options.languageSelector!=value)&&value!=''&&$('#'+value).length>0)
+{if(options.languageSelector!='')$('#'+options.languageSelector).unbind('inputListChange');options.languageSelector=value;if(options.languageSelector!='')
+$('#'+options.languageSelector).bind('inputListChange',function(event,lang)
+{privateMethods.setCurrentLanguage(object,lang);});}
+return(options.currentLanguage);},setValue:function(object,value,apply)
+{var options=object.data('options'),properties=object.data('properties'),objects=object.data('objects');if(properties.initialized&&properties.value==value)
+{return(properties.value);}
+privateMethods.setIsValid(object,true);properties.value=value;if(apply)
+{objects.input.val(properties.value);}
+if(options.currentLanguage!='')privateMethods.setLanguageValue(object,options.currentLanguage,value,false);if(options.change)object.trigger('inputTextChange',properties.value);return(properties.value);},setEventChange:function(object,value)
+{var options=object.data('options');options.change=value;object.unbind('inputTextChange');if(value)object.bind('inputTextChange',options.change);return(options.change);},keyUp:function(object,event)
+{var objects=object.data('objects');if(event.keyCode==9||event.keyCode==12||event.keyCode==16||event.keyCode==17||event.keyCode==18||event.keyCode==33||event.keyCode==34||event.keyCode==35||event.keyCode==36||event.keyCode==37||event.keyCode==38||event.keyCode==39||event.keyCode==40||event.keyCode==45||event.keyCode==93)return(false);return(privateMethods.setValue(object,objects.input.val(),false));},change:function(object,event)
+{var objects=object.data('objects');return(privateMethods.setValue(object,objects.input.val(),false))},keyDown:function(object,event)
+{var objects=object.data('objects'),options=object.data('options');if(options.maxChar>0&&objects.input.val().length>=options.maxChar&&!(event.keyCode==8||event.keyCode==9||event.keyCode==12||event.keyCode==16||event.keyCode==17||event.keyCode==18||event.keyCode==33||event.keyCode==34||event.keyCode==35||event.keyCode==36||event.keyCode==37||event.keyCode==38||event.keyCode==39||event.keyCode==40||event.keyCode==45||event.keyCode==46||event.keyCode==93||objects.input.get(0).selectionStart!=objects.input.get(0).selectionEnd))return(false);},doTranslation:function(object)
+{var objects=object.data('objects'),properties=object.data('properties'),options=object.data('options');if(googleTranslate!=null)
+{googleTranslate(properties.value,'',options.currentLanguage.substr(0,2),function(result)
+{privateMethods.setValue(object,result,true);});}}};$.fn.inputText=function(method)
+{if(publicMethods[method])
+{return publicMethods[method].apply(this,Array.prototype.slice.call(arguments,1));}
+else if(typeof method==='object'||!method)
+{return publicMethods.init.apply(this,arguments);}
+else
+{$.error('Method '+method+' does not exist on jQuery.inputText');}}})(jQuery);
Index: /extensions/GrumPluginClasses/language/de_DE/rbuilder.lang.php
===================================================================
--- /extensions/GrumPluginClasses/language/de_DE/rbuilder.lang.php	(revision 10245)
+++ /extensions/GrumPluginClasses/language/de_DE/rbuilder.lang.php	(revision 10246)
@@ -20,5 +20,4 @@
 $lang['There is no criteria ! At least, one criteria is required to do search...']="Es gibt kein Kriterium! Es muss mindestens ein Kriterium angegeben werden um die Suche starten zu können...";
 
-// need to be translated ! thanks :-)
 $lang['gpc_help_edit_criteria']="Kriterium bearbeiten";
 $lang['gpc_help_delete_criteria']="Kriterium löschen";
Index: /extensions/GrumPluginClasses/language/hu_HU/rbuilder.lang.php
===================================================================
--- /extensions/GrumPluginClasses/language/hu_HU/rbuilder.lang.php	(revision 10245)
+++ /extensions/GrumPluginClasses/language/hu_HU/rbuilder.lang.php	(revision 10246)
@@ -18,5 +18,5 @@
 $lang['gpc_something_is_wrong_on_the_server_side'] = 'Hiba történt a szerver oldalon';
 
-// need to be translated ! thanks :-)
+
 // GPC 3.3.2
 $lang['There is no criteria ! At least, one criteria is required to do search...']="Nincsenek feltételek ! Legalább egy feltételre szükség van a kereséshez...";
Index: /extensions/GrumPluginClasses/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/GrumPluginClasses/language/it_IT/plugin.lang.php	(revision 10245)
+++ /extensions/GrumPluginClasses/language/it_IT/plugin.lang.php	(revision 10246)
@@ -1,4 +1,3 @@
 <?php
-
 $lang['Module'] = 'Modulo';
 $lang['Version'] = 'Versione';
@@ -9,5 +8,6 @@
 $lang['Installed'] = 'Installato il';
 $lang['Infos'] = 'Informazioni';
-$lang['Some plugins are dependent on Grum Plugin Classes: before uninstall, you must first uninstall the plugins dependent'] = 'Alcuni plugin dipendono da Grum Plugin Classes. Prima di disinstallare Grum Plugin Classes, dovete disinstallare i plugin dipendenti';
+$lang['Some plugins are dependent on Grum Plugin Classes: before uninstall, you must first uninstall the plugins dependent'] = 'Alcuni plug-in dipendono da Grum Plugin Classes. Prima di disinstallare Grum Plugin Classes, si devono disinstallare i plug-in dipendenti da questo';
+
 
 // gpc > 3.3.0
Index: /extensions/GrumPluginClasses/main.inc.php
===================================================================
--- /extensions/GrumPluginClasses/main.inc.php	(revision 10245)
+++ /extensions/GrumPluginClasses/main.inc.php	(revision 10246)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Grum Plugins Classes.3
-Version: 3.4.4
+Version: 3.5.0
 Description: Collection de classes partagées entre mes plugins (existants, ou à venir) / Partaged classes between my plugins (actuals or futures)
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=199
@@ -157,6 +157,11 @@
 |         |            | * add language pt_PT (thanks to translator)
 |         |            |
-|         |            |
-|         |            |
+| 3.5.0   | 2011/04/10 | * mantis bug:2149 
+|         |            |
+|         |            |
+|         |            |
+|         |            |
+|         |            |
+|         |            |   . Compatibility with piwigo 2.2
 |         |            |
 |         |            | ===== Don't forget to update the plugin version ! =====
