Changeset 8961


Ignore:
Timestamp:
Jan 28, 2011, 4:54:02 PM (13 years ago)
Author:
grum
Message:

release 3.4.0
fix bug:1984, bug:2109
js file are minified, remove packed files

Location:
extensions/GrumPluginClasses
Files:
63 added
5 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/classes/CommonPlugin.class.inc.php

    r7310 r8961  
    88  ------------------------------------------------------------------------------
    99  Author     : Grum
    10     email    : grum@grum.dnsalias.com
    11     website  : http://photos.grum.dnsalias.com
     10    email    : grum@piwigo.org
     11    website  : http://photos.grum.fr
    1212    PWG user : http://forum.phpwebgallery.net/profile.php?id=3706
    1313
  • extensions/GrumPluginClasses/classes/GPCCore.class.inc.php

    r7387 r8961  
    33/* -----------------------------------------------------------------------------
    44  class name     : GPCCore
    5   class version  : 1.3.1
    6   plugin version : 3.3.2
    7   date           : 2010-10-20
     5  class version  : 1.3.2
     6  plugin version : 3.4.0
     7  date           : 2011-01-28
    88  ------------------------------------------------------------------------------
    99  author: grum at piwigo.org
     
    2828|         |            |   extended description function if present
    2929|         |            |
    30 |         |            | * implement the getPiwigoSystemPath function
    31 |         |            |
    32 |         |            | * implement the rmDir function
     30|         |            | * implement the getPiwigoSystemPath() function
     31|         |            |
     32|         |            | * implement the rmDir() function
     33|         |            |
     34| 1.3.2   | 2011/01/28 | * implement the addUI() function
     35|         |            |
     36|         |            | * implement getMinified() & setMinifiedState() functions
     37|         |            |
    3338|         |            |
    3439|         |            |
     
    4752    - static function addHeaderCSS
    4853    - static function addHeaderJS
     54    - static function addUI
     55    - static function getMinified
     56    - static function setMinifiedState
    4957    - static function getUserLanguageDesc
    5058    - static function getPiwigoSystemPath
     
    5866{
    5967  static private $piwigoSystemPath;
     68  static private $minified='.min';
    6069
    6170  static public $pluginName = "GPCCore";
     
    7988        Array('name' => "CommonPlugin", 'version' => "2.2.0"),
    8089        Array('name' => "GPCAjax", 'version' => "3.0.0"),
    81         Array('name' => "GPCCore", 'version' => "1.3.1"),
     90        Array('name' => "GPCCategorySelector", 'version' => "1.0.1"),
     91        Array('name' => "GPCCore", 'version' => "1.3.2"),
    8292        Array('name' => "GPCCss", 'version' => "3.0.0"),
    83         Array('name' => "GPCPagesNavigations", 'version' => "2.0.0"),
     93        Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"),
    8494        Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"),
    85         Array('name' => "GPCRequestBuilder", 'version' => "1.1.0"),
     95        Array('name' => "GPCRequestBuilder", 'version' => "1.1.2"),
    8696        Array('name' => "GPCTables", 'version' => "1.5.0"),
    8797        Array('name' => "GPCTabSheet", 'version' => "1.1.1"),
    88         Array('name' => "GPCTranslate", 'version' => "2.1.0"),
    89         Array('name' => "GPCUsersGroups", 'version' => "2.0.0"),
     98        Array('name' => "GPCTranslate", 'version' => "2.1.1"),
     99        Array('name' => "GPCUsersGroups", 'version' => "2.1.0")
    90100      )
    91101    );
     
    365375  {
    366376    global $template;
     377    $dummy1=null;
     378    $dummy2=null;
    367379
    368380    foreach(self::$headerItems['css'] as $file)
     
    373385    foreach(self::$headerItems['js'] as $file)
    374386    {
    375       $template->append('head_elements', '<script type="text/javascript" src="'.$file.'"></script>');
    376     }
    377   }
     387      //$template->append('head_elements', '<script type="text/javascript" src="'.$file.'"></script>');
     388      $template->block_html_head(null, '<script type="text/javascript" src="'.$file.'"></script>', $dummy1, $dummy2);
     389    }
     390  }
     391
     392  /**
     393   * add a ui component ; css & js dependencies are managed
     394   *
     395   * @param Array $list : possibles values are
     396   *                        - inputCheckbox
     397   *                        - inputColorPicker
     398   *                        - inputColorsFB
     399   *                        - inputConsole
     400   *                        - inputDotArea
     401   *                        - inputList
     402   *                        - inputNum
     403   *                        - inputPosition
     404   *                        - inputRadio
     405   *                        - inputStatusBar
     406   *                        - inputText
     407   *                        - categorySelector
     408   */
     409  static public function addUI($list)
     410  {
     411    global $template;
     412
     413    if(is_string($list)) $list=explode(',', $list);
     414    if(!is_array($list)) return(false);
     415
     416    if(defined('IN_ADMIN'))
     417    {
     418      $themeFile=GPC_PATH.'css/%s_'.$template->get_themeconf('name').'.css';
     419    }
     420    else
     421    {
     422      $themeFile='themes/'.$template->get_themeconf('name').'/css/GPC%s.css';
     423    }
     424
     425    foreach($list as $ui)
     426    {
     427      switch($ui)
     428      {
     429        case 'googleTranslate':
     430          self::addHeaderJS('google.jsapi', 'http://www.google.com/jsapi');
     431          self::addHeaderJS('gpc.googleTranslate', 'plugins/GrumPluginClasses/js/google_translate'.self::$minified.'.js');
     432        case 'categorySelector':
     433          self::addHeaderCSS('gpc.categorySelector', GPC_PATH.'css/categorySelector.css');
     434          self::addHeaderCSS('gpc.categorySelectorT', sprintf($themeFile, 'categorySelector'));
     435          self::addHeaderJS('gpc.categorySelector', GPC_PATH.'js/ui.categorySelector'.self::$minified.'.js');
     436          break;
     437        case 'inputCheckbox':
     438          self::addHeaderCSS('gpc.inputCheckbox', GPC_PATH.'css/inputCheckbox.css');
     439          self::addHeaderJS('gpc.inputCheckbox', GPC_PATH.'js/ui.inputCheckbox'.self::$minified.'.js');
     440          break;
     441        case 'inputColorPicker':
     442          self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
     443          self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css');
     444          self::addHeaderCSS('gpc.inputColorsFB', GPC_PATH.'css/inputColorsFB.css');
     445          self::addHeaderCSS('gpc.inputDotArea', GPC_PATH.'css/inputDotArea.css');
     446          self::addHeaderCSS('gpc.inputColorPicker', GPC_PATH.'css/inputColorPicker.css');
     447          self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
     448          self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum'));
     449          self::addHeaderCSS('gpc.inputColorsFBT', sprintf($themeFile, 'inputColorsFB'));
     450          self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
     451          self::addHeaderCSS('gpc.inputColorPickerT', sprintf($themeFile, 'inputColorPicker'));
     452          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
     453          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/packed/ui.slider.packed.js');
     454          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/packed/ui.draggable.packed.js');
     455          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.slider.dialog.js');
     456          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js');
     457          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js');
     458          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js');
     459          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js');
     460          self::addHeaderJS('gpc.inputColorPicker', GPC_PATH.'js/ui.inputColorPicker'.self::$minified.'.js');
     461          break;
     462        case 'inputColorsFB':
     463          self::addHeaderCSS('gpc.inputColorsFB', GPC_PATH.'css/inputColorsFB.css');
     464          self::addHeaderCSS('gpc.inputColorsFBT', sprintf($themeFile, 'inputColorsFB'));
     465          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js');
     466          break;
     467        case 'inputConsole':
     468          self::addHeaderCSS('gpc.inputConsole', GPC_PATH.'css/inputConsole.css');
     469          self::addHeaderCSS('gpc.inputConsoleT', sprintf($themeFile, 'inputConsole'));
     470          self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole'.self::$minified.'.js');
     471          break;
     472        case 'inputDotArea':
     473          self::addHeaderCSS('gpc.inputDotArea', GPC_PATH.'css/inputDotArea.css');
     474          self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
     475          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js');
     476          break;
     477        case 'inputList':
     478          self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css');
     479          self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList'));
     480          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList'.self::$minified.'.js');
     481          break;
     482        case 'inputNum':
     483          self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css');
     484          self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum'));
     485          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
     486          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/packed/ui.slider.packed.js');
     487          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js');
     488          break;
     489        case 'inputPosition':
     490          self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css');
     491          self::addHeaderCSS('gpc.inputPositionT', sprintf($themeFile, 'inputPosition'));
     492          self::addHeaderJS('gpc.inputPosition', GPC_PATH.'js/ui.inputPosition'.self::$minified.'.js');
     493          break;
     494        case 'inputRadio':
     495          self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio'.self::$minified.'.js');
     496          break;
     497        case 'inputStatusBar':
     498          self::addHeaderCSS('gpc.inputStatusBar', GPC_PATH.'css/inputStatusBar.css');
     499          self::addHeaderCSS('gpc.inputStatusBarT', sprintf($themeFile, 'inputStatusBar'));
     500          self::addHeaderJS('gpc.inputStatusBar', GPC_PATH.'js/ui.inputStatusBar'.self::$minified.'.js');
     501          break;
     502        case 'inputText':
     503          self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
     504          self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
     505          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js');
     506          break;
     507      }
     508    }
     509  }
     510
     511  /**
     512   * return the minified value
     513   *
     514   * @return String
     515   */
     516  static public function getMinified()
     517  {
     518    return(self::$minified);
     519  }
     520
     521  /**
     522   * set the minified state
     523   *
     524   * @param Bool $state
     525   * @return Bool
     526   */
     527  static public function setMinifiedState($state)
     528  {
     529    if($state)
     530    {
     531      self::$minified='.min';
     532    }
     533    else
     534    {
     535      self::$minified='';
     536    }
     537    return(self::$minified!='');
     538  }
     539
    378540
    379541  /**
  • extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php

    r7451 r8961  
    22/* -----------------------------------------------------------------------------
    33  class name: GCPRequestBuilder
    4   class version  : 1.1.1
    5   plugin version : 3.3.2
     4  class version  : 1.1.2
     5  plugin version : 3.3.3
    66  date           : 2010-09-08
    77
     
    7575|         |            | * fix bug on user level access to picture
    7676|         |            |
    77 |         |            |
    78 |         |            |
     77| 1.1.2   | 2010/11/01 | * mantis bug:1984
     78|         |            |   . RBuilder returns an error message when one picture
     79|         |            |     have multiple categories
    7980|         |            |
    8081|         |            |
     
    522523    GPCCore::addHeaderJS('gpc.interface', 'plugins/'.$baseName.'external/interface/interface.js');
    523524    GPCCore::addHeaderJS('gpc.inestedsortable', 'plugins/'.$baseName.'external/inestedsortable.pack.js');
    524     GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder.packed.js');
     525    GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js');
    525526
    526527    $template->append('head_elements',
     
    829830      'SELECT' => Array(
    830831        'RB_PIT' => "pit.id AS imageId, pit.name AS imageName, pit.path AS imagePath", // from the piwigo's image table
    831         'RB_PIC' => "GROUP_CONCAT(DISTINCT pic.category_id SEPARATOR ',') AS imageCategoriesId",     // from the piwigo's image_category table
    832         'RB_PCT' => "GROUP_CONCAT(DISTINCT CASE WHEN pct.name IS NULL THEN '' ELSE pct.name END SEPARATOR '#sep#') AS imageCategoriesNames,
    833                      GROUP_CONCAT(DISTINCT CASE WHEN pct.permalink IS NULL THEN '' ELSE pct.permalink END SEPARATOR '#sep#') AS imageCategoriesPLink,
    834                      GROUP_CONCAT(DISTINCT CASE WHEN pct.dir IS NULL THEN 'V' ELSE 'P' END) AS imageCategoriesDir",   //from the piwigo's categories table
     832        'RB_PIC' => "GROUP_CONCAT( pic.category_id SEPARATOR ',') AS imageCategoriesId",     // from the piwigo's image_category table
     833        'RB_PCT' => "GROUP_CONCAT( CASE WHEN pct.name IS NULL THEN '' ELSE pct.name END SEPARATOR '#sep#') AS imageCategoriesNames,
     834                     GROUP_CONCAT( CASE WHEN pct.permalink IS NULL THEN '' ELSE pct.permalink END SEPARATOR '#sep#') AS imageCategoriesPLink,
     835                     GROUP_CONCAT( CASE WHEN pct.dir IS NULL THEN 'V' ELSE 'P' END) AS imageCategoriesDir",   //from the piwigo's categories table
    835836      ),
    836837      'FROM' => Array(
     
    13741375    $filter=array_flip($filter);
    13751376
     1377    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js');
     1378    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js');
     1379    GPCCore::addHeaderJS('gpc.pagesNavigator', 'plugins/'.$baseName.'/js/pagesNavigator'.GPCCore::getMinified().'.js');
     1380    GPCCore::addHeaderJS('gpc.rbSearch', 'plugins/'.$baseName.'/js/rbSearch'.GPCCore::getMinified().'.js');
     1381
     1382
    13761383    $template->set_filename('gpc_search_page',
    13771384                dirname(dirname(__FILE__)).'/templates/GPCRequestBuilder_search.tpl');
  • extensions/GrumPluginClasses/classes/GPCTranslate.class.inc.php

    r5550 r8961  
    33/* -----------------------------------------------------------------------------
    44  class name     : GPCTranslate
    5   class version  : 2.1.0
    6   plugin version : 3.0.0
    7   date           : 2010-03-31
     5  class version  : 2.1.1
     6  plugin version : 3.4.0
     7  date           : 2011-01-28
    88  ------------------------------------------------------------------------------
    99  author: grum at piwigo.org
    1010  << May the Little SpaceFrog be with you >>
    1111  ------------------------------------------------------------------------------
    12 
    1312
    1413  ------------------------------------------------------------------------------
     
    1918| 2.1.0   | 2010/03/31 | * update class & functions names
    2019|         |            |
     20| 2.1.1   | 2011/01/09 | * fixbug on js loading
    2121|         |            |
    22 |         |            |
     22|         |            | * use GPCCore::addUI function (the class is kept for
     23|         |            |   compatibility with older plugins)
    2324|         |            |
    2425|         |            |
    2526
    2627  ------------------------------------------------------------------------------
    27 
    28 
    2928   class call API in HTML header, and provide a .js file manage API call
    3029        >>  http://code.google.com/apis/ajaxlanguage/
    3130
    3231    - constructor
    33 
    3432   ---------------------------------------------------------------------- */
    3533class GPCTranslate
     
    3735  public function __construct()
    3836  {
    39     add_event_handler('loc_end_page_header', array(&$this, 'loadJS'));
     37    GPCCore::addUI('googleTranslate');
    4038  }
    41 
    42   public function loadJS()
    43   {
    44     global $template;
    45 
    46     $googleload='
    47 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    48 <script type="text/javascript" src="plugins/'.basename(dirname(__FILE__)).'/google_translate.js"></script>';
    49 
    50     $template->append('head_elements', $googleload);
    51   }
    52 
    5339} //class
    5440
  • extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php

    r5550 r8961  
    33/* -----------------------------------------------------------------------------
    44  class name: GPCAllowedAccess, GPCGroups, GPCUsers
    5   class version  : 2.0.0
    6   plugin version : 3.0.0
     5  class version  : 2.1.0
     6  plugin version : 3.4.0
    77  date           : 2010-03-30
    88  ------------------------------------------------------------------------------
     
    1414  groups and users classes extends GPCAllowedAccess classes
    1515
    16     - constructor GPCAllowedAccess($alloweds="")
    17     - constructor groups($alloweds="")
    18     - constructor users($alloweds="")
     16    - constructor GPCAllowedAccess($alloweds = array(), $accessMode='a')
     17    - constructor groups($alloweds = array(), $accessMode='a')
     18    - constructor users($alloweds = array(), $accessMode='a')
    1919    - (public) function getList()
    2020    - (public) function setAllowed($id, $allowed)
    21     - (public) function setAlloweds()
    22     - (public) function getAlloweds($return_type)
     21    - (public) function setAlloweds($idList, $allowed)
     22    - (public) function getAlloweds()
    2323    - (public) function isAllowed($id)
    24     - (public) function htmlView($sep=", ", $empty="")
    25     - (public) function htmlForm($basename)
    2624    - (private) function initList()
    2725
     
    3432|         |            | * update classes & functions names
    3533|         |            |
     34| 2.1.0   | 2011/01/15 | * remove html function
     35|         |            |
     36|         |            | * implement accessMode
     37|         |            |
    3638|         |            |
    3739
     
    3941class GPCAllowedAccess
    4042{
    41   public $access_list;
    42 
    43   /*
    44     constructor initialize the groups_getListgetListlist
    45   */
    46   public function __construct($alloweds = "")
     43  protected $accessList;
     44  protected $accessMode='a'; // 'a' : allowed, 'n' : not allowed
     45
     46  /**
     47   * constructor initialize default values
     48   *
     49   * @param Array $alloweds  : list of items
     50   *        String $alloweds : list of items (separator : '/')
     51   *
     52   * @param String $accessMode : 'a' = access is allowed by default for all values, $allowed param is a list of not allowed values
     53   *                             'n' = access is not allowed by default for all values, $allowed param is a list of allowed values
     54   *                             priority is given to the $allowed value
     55   */
     56  public function __construct($alloweds = array(), $accessMode='a')
    4757  {
    4858    $this->initList();
    49     $this->setAlloweds($alloweds);
     59    $this->setAlloweds($alloweds, $accessMode=='n');
    5060  }
    5161
    5262  public function __destruct()
    5363  {
    54     unset($this->access_list);
    55   }
    56 
    57   /*
    58     initialize the groups list
    59   */
     64    unset($this->accessList);
     65  }
     66
     67  /**
     68   * destroy the groups list
     69   */
    6070  protected function initList()
    6171  {
    62     $this->access_list=array();
    63   }
    64 
    65   /*
    66     returns list (as an array)
    67   */
     72    $this->accessList=array();
     73  }
     74
     75  /**
     76   * returns list of items (as an array)
     77   * each array item is an array :
     78   *  'id'      : (String) id of item
     79   *  'name'    : (String) name of item
     80   *  'allowed' : (Bool)   access is allowed or not
     81   *
     82   * @return Array
     83   */
    6884  function getList()
    6985  {
    70     return($this->access_list);
    71   }
    72 
    73   /*
    74     set element an allowed state
    75   */
     86    return($this->accessList);
     87  }
     88
     89  /**
     90   * set allowed value for an item
     91   *
     92   * @param String $id : id of item
     93   * @param Bool $allowed : access allowed or not
     94   */
    7695  function setAllowed($id, $allowed)
    7796  {
    78     if(isset($this->access_list[$id]))
    79     {
    80       $this->access_list[$id]['allowed']=$allowed;
    81     }
    82   }
    83 
    84   /*
    85     set a group enabled/disabled state
    86   */
    87   function setState($id, $enabled)
    88   {
    89     if(isset($this->access_list[$id]))
    90     {
    91       $this->access_list[$id]['enabled']=$enabled;
    92     }
    93   }
    94 
    95   /*
    96     set alloweds list
    97     $list is string of id, separated with "/"
    98   */
    99   function setAlloweds($list)
    100   {
    101     $alloweds=explode("/", $list);
    102     $alloweds=array_flip($alloweds);
    103     foreach($this->access_list as $key => $val)
    104     {
    105       if(isset($alloweds[$key]))
     97    if(isset($this->accessList[$id]))
     98    {
     99      $this->accessList[$id]['allowed']=$allowed;
     100    }
     101  }
     102
     103
     104  /**
     105   * set alloweds items (can be given as an array or a string with separator '/')
     106   * according to the
     107   *
     108   * @param Array $idList  : list of items to set
     109   * @param String $idList
     110   * @param Bool $allowed : access allowed or not
     111   */
     112  function setAlloweds($idList, $allowed)
     113  {
     114    if(!is_array($idList)) $idList=explode("/", $idList);
     115
     116    $idList=array_flip($idList);
     117
     118    foreach($this->accessList as $key => $val)
     119    {
     120      if(isset($idList[$key]))
    106121      {
    107         $this->access_list[$key]['allowed']=true;
     122        $this->accessList[$key]['allowed']=$allowed;
    108123      }
    109124      else
    110125      {
    111         $this->access_list[$key]['allowed']=false;
     126        $this->accessList[$key]['allowed']=!$allowed;
    112127      }
    113128    }
    114129  }
    115130
    116   /*
    117     get alloweds list
    118     return a string of groups, separated with "/"
    119   */
    120   function getAlloweds($return_type = 'name')
    121   {
    122     $returned="";
    123     foreach($this->access_list as $key => $val)
    124     {
    125       if($val['allowed'])
    126       { $returned.=$val[$return_type]."/"; }
     131
     132  /**
     133   * return list of alloweds items
     134   *
     135   * @return Array
     136   */
     137  function getAlloweds()
     138  {
     139    $returned=Array();
     140
     141    foreach($this->accessList as $key => $val)
     142    {
     143      if($val['allowed']) $returned[]=$val;
    127144    }
    128145    return($returned);
     
    130147
    131148
    132   /*
    133     returns true if is allowed
    134   */
     149  /**
     150   * returns true if is allowed
     151   *
     152   * @param String $id : item id
     153   * @retrun Bool
     154   */
    135155  function isAllowed($id)
    136156  {
    137     if(isset($this->access_list[$id]))
    138     { return($this->access_list[$id]['allowed']); }
     157    if(isset($this->accessList[$id]))
     158    {
     159      return($this->accessList[$id]['allowed']);
     160    }
    139161    else
    140     { return(false); }
    141   }
    142 
    143   /*
    144     returns true if all or one is allowed
    145       ids is an array
    146   */
    147   function areAllowed($ids, $all=false)
    148   {
    149     foreach($ids as $val)
    150     {
    151       if($all)
    152       {
    153         if(!$this->isAllowed($val))
    154         {
    155           return(false);
    156         }
    157       }
    158       else
    159       {
    160         if($this->isAllowed($val))
    161         {
    162           return(true);
    163         }
    164       }
    165     }
    166     return(false);
    167   }
    168 
    169   /*
    170     returns an HTML list with label rather than id
    171   */
    172   function htmlView($sep=", ", $empty="")
    173   {
    174     $returned="";
    175     foreach($this->access_list as $key => $val)
    176     {
    177       if($val['allowed'])
    178       {
    179         if($returned!="")
    180         {
    181           $returned.=$sep;
    182         }
    183         $returned.=$val['name'];
    184       }
    185     }
    186     if($returned=="")
    187     {
    188       $returned=$empty;
    189     }
    190     return($returned);
    191   }
    192   /*
    193     returns a generic HTML form to manage the groups access
    194   */
    195   function htmlForm($basename)
    196   {
    197     /*
    198     <!-- BEGIN allowed_group_row -->
    199     <label><input type="checkbox" name="fmypolls_att_allowed_groups_{allowed_group_row.ID}" {allowed_group_row.CHECKED}/>&nbsp;{allowed_group_row.NAME}</label>
    200     <!-- END allowed_group_row -->
    201     */
    202     $text='';
    203     foreach($this->access_list as $key => $val)
    204     {
    205       if($val['allowed'])
    206       {
    207         $checked=' checked';
    208       }
    209       else
    210       {
    211         $checked='';
    212       }
    213 
    214       if($val['enabled'])
    215       {
    216         $enabled='';
    217       }
    218       else
    219       {
    220         $enabled=' disabled';
    221       }
    222 
    223       $text.='<label><input type="checkbox" name="'.$basename.$val['id'].'" '.$checked.$enabled.'/>
    224           &nbsp;'.$val['name'].'</label>&nbsp;';
    225     }
    226     return($text);
    227   }
     162    {
     163      return($this->accessMode=='a');
     164    }
     165  }
     166
    228167} //GPCAllowedAccess
    229168
     
    235174
    236175
    237 /* ----------------------------------------------------------------------
    238    this class provides base functions to manage groups access
    239     initList redefined to initialize access_list from database GROUPS
    240    ---------------------------------------------------------------------- */
     176/**
     177 * ----------------------------------------------------------------------------
     178 *  this class provides base functions to manage groups access
     179 *  initList redefined to initialize accessList from database GROUPS
     180 * ----------------------------------------------------------------------------
     181 */
    241182class GPCGroups extends GPCAllowedAccess
    242183{
    243   /*
    244     initialize the groups list
    245   */
     184  /**
     185   * initialize the groups list
     186   */
    246187  protected  function initList()
    247188  {
    248     $this->access_list=array();
     189    $this->accessList=array();
    249190    $sql="SELECT id, name FROM ".GROUPS_TABLE." ORDER BY name";
    250191    $result=pwg_query($sql);
     
    253194      while($row=pwg_db_fetch_assoc($result))
    254195      {
    255         $this->access_list[$row['id']] =
    256                    array('id' => $row['id'],
    257                          'name' => $row['name'],
    258                          'allowed' => false,
    259                          'enabled' => true);
     196        $this->accessList[$row['id']]=array(
     197            'id' => $row['id'],
     198            'name' => $row['name'],
     199            'allowed' => ($this->accessMode=='a')
     200          );
    260201      }
    261202    }
     
    270211
    271212
    272 /* -----------------------------------------------------------------------------
    273    this class provides base functions to manage users access
    274 ----------------------------------------------------------------------------- */
     213/**
     214 * ----------------------------------------------------------------------------
     215 *  this class provides base functions to manage users access
     216 *  initList redefined to initialize accessList from piwigo's predefined values
     217 * ----------------------------------------------------------------------------
     218 */
    275219class GPCUsers extends GPCAllowedAccess
    276220{
    277   /*
    278     constructor
    279   */
    280   public function __construct($alloweds = "")
    281   {
    282     parent::__construct($alloweds);
    283     $this->setState('admin', false);
    284     $this->setAllowed('admin', true);
    285   }
    286 
    287   /*
    288     initialize the groups list
    289   */
     221  /**
     222   * initialize the users list
     223   */
    290224  protected function initList()
    291225  {
    292     $users_list = array('guest', 'generic', 'normal', 'webmaster', 'admin');
    293     $this->access_list=array();
    294     foreach($users_list as $val)
    295     {
    296       $this->access_list[$val] =
    297                   array('id' => $val,
    298                         'name' => l10n('user_status_'.$val),
    299                         'allowed' => false,
    300                         'enabled' => true);
     226    $usersList = array('guest', 'generic', 'normal', 'webmaster', 'admin');
     227    $this->accessList=array();
     228    foreach($usersList as $val)
     229    {
     230      $this->accessList[$val]=array(
     231          'id' => $val,
     232          'name' => l10n('user_status_'.$val),
     233          'allowed' => ($this->accessMode=='a')
     234        );
    301235    }
    302236  }
  • extensions/GrumPluginClasses/classes/genericjs.class.inc.php

    r5958 r8961  
    11<?php
    2 
    3 /* -----------------------------------------------------------------------------
    4   class name: genericjs
    5   class version: 2.0
    6   date: 2008-07-20
    7   ------------------------------------------------------------------------------
    8   author: grum at grum.dnsalias.com
    9   << May the Little SpaceFrog be with you >>
    10   ------------------------------------------------------------------------------
    11 
    12    this classes provides base functions to add genericjs.js file into html page
    13 
    14    > see genericjs.js file to know javascript functions added
    15 
    16     - constructor genericjs()
    17    ---------------------------------------------------------------------- */
    18 
    19 
    20 class genericjs
    21 {
    22   function genericjs()
    23   {
    24     add_event_handler('loc_end_page_header', array(&$this, 'load_JS'));
    25   }
    26 
    27   function load_JS()
    28   {
    29     global $template;
    30 
    31     $name='plugins/'.basename(dirname(dirname(__FILE__))).'/js/genericjs.js';
    32 
    33     $template->append('head_elements', '<script src="'.$name.'" type="text/javascript"></script>');
    34 
    35   }
    36 
    37 } //class
    38 
    39 $genericjs=new genericjs();
    40 
     2/*
     3 * dummy file to avoid compatibility problem with older plugin.
     4 *
     5 * this file have to be removed on the next release.
     6 */
    417?>
  • extensions/GrumPluginClasses/css/categorySelector_clear.css

    r7349 r8961  
    22.ui-category-selector {
    33  cursor:default;
    4   padding:2px;
     4  min-height:17px;
     5  padding:0;
     6}
     7div.ui-category-selector:focus {
     8  outline:none;
    59}
    610
     
    1014  float:right;
    1115  font-size:8px;
     16  max-height:8px;
    1217}
    1318
     
    1722  font-size:14px;
    1823  font-family:sans-serif;
     24  z-index:9999;
    1925}
    2026
     
    2329}
    2430
    25 li.ui-category-selector-item div {
    26   margin:2px;
     31div.ui-category-selector-multiple div.ui-category-selector-check,
     32div.ui-category-selector-multiple div.ui-category-selector-name {
     33   display:inline-block;
    2734}
    28 
    2935.ui-category-selector-expandable-item,
    3036.ui-category-selector-collapsable-item {
     
    3339
    3440.ui-category-selector-check {
    35   position:absolute;
    36   left:0px;
    37   width:15px;
    38   height:15px;
    39   background: none no-repeat scroll 0px 0px;
     41  background:none no-repeat scroll 0 0 transparent;
     42  display:inline-block;
     43  height:13px;
     44  width:17px;
    4045}
     46
     47
     48/* --- */
     49.ui-category-selector-name ul { list-style:none; margin:0; padding:0; }
     50.ui-category-selector-name li.ui-category-selector-selected-cat {
     51  -moz-border-radius:3px;
     52  -webkit-border-radius:3px;
     53  -khtml-border-radius:3px;
     54  border-radius:3px;
     55  float:left;
     56  margin-bottom:1px;
     57  margin-right:1px;
     58  padding:0 4px;
     59  cursor:default;
     60}
     61.ui-category-selector-name ul li.ui-category-selector-selected-cat span { cursor:pointer; }
     62.ui-category-selector-name li span {
     63  font-family:sans;
     64  font-size:80%;
     65  font-weight:bold;
     66  padding:0 3px;
     67  position:relative;
     68  top:-1px;
     69}
     70.ui-category-selector-arrow {
     71  border-style:solid;
     72  border-width:1px;
     73  cursor:pointer;
     74  font-weight:bold;
     75  width:14px;
     76  margin-top:1px;
     77  height:14px;
     78  text-align:center;
     79  display:inline-block;
     80}
     81.ui-category-selector-name {
     82  padding:1px;
     83}
     84
     85
    4186
    4287/* clear css */
     
    77122  background-image:url(./../icons/check_checked_clear.png);
    78123}
     124
     125/* --- */
     126.ui-category-selector-name ul li.ui-category-selector-selected-cat {
     127  background:#999999;
     128  color:#DDDDDD;
     129  margin-top:1px;
     130  padding-top:1px;
     131}
     132
     133.ui-error, input[type='text'].ui-error {
     134  background:#ff8080;
     135  border-color:#800000;
     136  color:#800000;
     137}
     138
     139.ui-category-selector-arrow {
     140  background:none repeat scroll 0 0 #999999;
     141  border-color:#DDDDDD #666666 #666666 #DDDDDD;
     142  color:#005E89;
     143}
     144
     145.ui-category-selector-arrow-active {
     146  border-color:#666666 #DDDDDD #DDDDDD #666666;
     147}
  • extensions/GrumPluginClasses/css/categorySelector_roma.css

    r7175 r8961  
    22.ui-category-selector {
    33  cursor:default;
    4   padding:2px;
     4  min-height:17px;
     5  padding:0;
     6}
     7div.ui-category-selector:focus {
     8  outline:none;
    59}
    610
     
    1014  float:right;
    1115  font-size:8px;
     16  max-height:8px;
    1217}
    1318
     
    1722  font-size:14px;
    1823  font-family:sans-serif;
     24  z-index:9999;
    1925}
    2026
     
    2329}
    2430
    25 li.ui-category-selector-item div {
    26   margin:2px;
     31div.ui-category-selector-multiple div.ui-category-selector-check,
     32div.ui-category-selector-multiple div.ui-category-selector-name {
     33   display:inline-block;
    2734}
    28 
    2935.ui-category-selector-expandable-item,
    3036.ui-category-selector-collapsable-item {
     
    3339
    3440.ui-category-selector-check {
    35   position:absolute;
    36   left:0px;
    37   width:15px;
    38   height:15px;
    39   background: none no-repeat scroll 0px 0px;
     41  background:none no-repeat scroll 0 0 transparent;
     42  display:inline-block;
     43  height:13px;
     44  width:17px;
     45}
     46
     47
     48/* --- */
     49.ui-category-selector-name ul { list-style:none; margin:0; padding:0; }
     50.ui-category-selector-name li.ui-category-selector-selected-cat {
     51  -moz-border-radius:3px;
     52  -webkit-border-radius:3px;
     53  -khtml-border-radius:3px;
     54  border-radius:3px;
     55  float:left;
     56  margin-bottom:1px;
     57  margin-right:1px;
     58  padding:0 4px;
     59  cursor:default;
     60}
     61.ui-category-selector-name ul li.ui-category-selector-selected-cat span { cursor:pointer; }
     62.ui-category-selector-name li span {
     63  font-family:sans;
     64  font-size:80%;
     65  font-weight:bold;
     66  padding:0 3px;
     67  position:relative;
     68  top:-1px;
     69}
     70.ui-category-selector-arrow {
     71  border-style:solid;
     72  border-width:1px;
     73  cursor:pointer;
     74  font-weight:bold;
     75  width:14px;
     76  margin-top:1px;
     77  height:14px;
     78  text-align:center;
     79  display:inline-block;
     80}
     81.ui-category-selector-name {
     82  padding:1px;
    4083}
    4184
    4285/* roma css */
    43 
    44 .ui-category-selector-arrow {
    45   color:#FF3363;
    46 }
    4786
    4887.ui-category-selector,
     
    75114  background-image:url(./../icons/check_checked_roma.png);
    76115}
     116
     117/* --- */
     118.ui-category-selector-name ul li.ui-category-selector-selected-cat {
     119  background:#666666;
     120  color:#999999;
     121  margin-top:1px;
     122  padding-top:1px;
     123}
     124
     125.ui-error, input[type='text'].ui-error {
     126  background:#ff8080;
     127  border-color:#800000;
     128  color:#800000;
     129}
     130
     131.ui-category-selector-arrow {
     132  background:none repeat scroll 0 0 #666666;
     133  border-color:#999999 #444444 #444444 #999999;
     134  color:#FF3363;
     135}
     136
     137.ui-category-selector-arrow-active {
     138  border-color:#444444 #999999 #999999 #444444;
     139}
  • extensions/GrumPluginClasses/css/tagSelector_roma.css

    r7349 r8961  
    5959  background:#666666;
    6060}
     61
     62.ui-error, input[type='text'].ui-error {
     63  background:#ff8080;
     64  border-color:#800000;
     65  color:#800000;
     66}
  • extensions/GrumPluginClasses/gpc_version.inc.php

    r8809 r8961  
    1515  if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1616
    17   if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.3.4');
    18   if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.03.04');
     17  if(!defined('GPC_VERSION')) define('GPC_VERSION',  '3.4.0');
     18  if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.04.00');
    1919?>
  • extensions/GrumPluginClasses/js/google_translate.js

    r5550 r8961  
    11/* -----------------------------------------------------------------------------
    22  file: google_translate.js
    3   file version: 2.0.0
    4   date: 2008-05-25
     3  file version: 2.1.0
     4  date: 2011-01-09
    55  ------------------------------------------------------------------------------
    66  author: grum at piwigo.org
     
    1212  HISTORY VERSION
    1313  v2.0.0  +
     14  v2.1.0  + add googleTranslate function with callback parameter
    1415  --------------------------------------------------------------------------- */
    1516
     
    1718
    1819  var global_google_translate_plugin_objdest;
     20  var global_google_translate_plugin_callback;
    1921  var global_google_translate_plugin_objproperty;
    2022
     
    4042    }
    4143  }
     44
     45  function googleTranslate(text, pfrom, pto, callback)
     46  {
     47    global_google_translate_plugin_callback=callback;
     48    google.language.translate(text, pfrom, pto, googleTranslateDo);
     49  }
     50
     51  function googleTranslateDo(result)
     52  {
     53    if (!result.error)
     54    {
     55      global_google_translate_plugin_callback(result.translation);
     56    }
     57  }
     58
  • extensions/GrumPluginClasses/js/rbCriteriaBuilder.js

    r7370 r8961  
    22 * -----------------------------------------------------------------------------
    33 * file: criteriaBuilder.js
    4  * file version: 1.1.0
    5  * date: 2010-10-21
     4 * file version: 1.1.1
     5 * date: 2010-01-13
    66 *
    77 * JS file provided by the piwigo's plugin "GrumPluginClasses"
     
    5858 * |         |            |   request
    5959 * |         |            |
    60  * |         |            |
    61  * |         |            |
     60 * | 1.1.1   | 2011/01/13 | * fix bug:2109
     61 * |         |            |   . Incompatibility with IE8
    6262 * |         |            |
    6363 * |         |            |
     
    354354  var serializeData=function(prefix, value)
    355355  {
    356     returned='';
     356    var returned='';
    357357    if(typeof value =='object')
    358358    {
     
    363363          returned+=serializeData(prefix+'['+key+']', value[key]);
    364364        }
    365         else
     365        else if(typeof value[key] =='string' || typeof value[key] =='number' || typeof value[key] =='boolean')
    366366        {
    367367          returned+='&'+prefix+'['+key+']='+value[key];
     
    369369      }
    370370    }
    371     else
     371    else if(typeof value =='string' || typeof value =='number' || typeof value =='boolean')
    372372    {
    373373      returned+='&'+prefix+'='+value;
  • extensions/GrumPluginClasses/js/simpleTip.js

    r7175 r8961  
    22 * -----------------------------------------------------------------------------
    33 * file: simpleTip.js
    4  * file version: 1.0.0
    5  * date: 2010-07-10
     4 * file version: 1.0.1
     5 * date: 2010-12-23
    66 *
    77 * JS file provided by the piwigo's plugin "GrumPluginClasses"
     
    3030 *
    3131 * | release | date       |
    32  * | 1.0.0   | 2010/07/10 | start to coding
     32 * | 1.0.0   | 2010-07-10 | start to coding
    3333 * |         |            |
    34  * |         |            |
     34 * | 1.0.1   | 2010-12-23 | fix minor bugs
    3535 * |         |            |
    3636 * |         |            |
     
    7070      offsetY:0,
    7171      classes:'',
    72       arrowImgDir: './plugins/GrumPluginClasses/icons/',
     72      arrowImgDir: '',
    7373      arrowWidth: 12,
    74       arrowHeight: 12,
     74      arrowHeight: 12
    7575    },
    7676    options
     
    8484      itemIndexInc = 0,
    8585      options={
    86           name:'',
     86          name:''
    8787        };
    8888
     
    150150          {
    151151           title: '',
    152            simpleTip: tip.index,
     152           simpleTip: tip.index
    153153          }
    154154        )
     
    253253          left: '-1500px',
    254254          top:  '-1500px',
    255           display: 'block',
     255          display: 'block'
    256256        }
    257257      );
     
    306306
    307307
    308     stWidth=$('#iSimpleTip').outerWidth();
    309     stHeight=$('#iSimpleTip').outerHeight();
    310     stWidthI=$('#iSimpleTip').innerWidth();
    311     stHeightI=$('#iSimpleTip').innerHeight();
     308    stWidth=$('#iSimpleTipContent'+options.name).outerWidth();
     309    stHeight=$('#iSimpleTipContent'+options.name).outerHeight();
     310    stWidthI=$('#iSimpleTipContent'+options.name).innerWidth();
     311    stHeightI=$('#iSimpleTipContent'+options.name).innerHeight();
    312312    bwX=(stWidth-stWidthI)/2;
    313313    bwY=(stHeight-stHeightI)/2;
     
    321321        y+=items[itemIndex].options.offsetY;
    322322        arrowX=-bwX;
    323         arrowY=-10-bwY;
     323        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    324324        arrowModel='up';
    325325        break;
     
    328328        x-=stWidth/2;
    329329        y+=items[itemIndex].options.offsetY;
    330         arrowX=(stWidthI-10)/2;
    331         arrowY=-10-bwY;
     330        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2;
     331        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    332332        arrowModel='up';
    333333        break;
     
    336336        x-=stWidth+items[itemIndex].options.offsetX;
    337337        y+=items[itemIndex].options.offsetY;
    338         arrowX=stWidthI-10+bwX;
    339         arrowY=-10-bwY;
     338        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
     339        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    340340        arrowModel='up';
    341341        break;
    342342
    343343      case 'middle-left':
     344        x+=items[itemIndex].options.offsetX;
    344345        y-=stHeight/2;
    345         arrowX=-10-bwX;
    346         arrowY=(stHeightI-10)/2;
     346        arrowX=-items[itemIndex].options.arrowWidth+bwX;
     347        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    347348        arrowModel='left';
    348349        break;
     
    357358        y-=stHeight/2;
    358359        arrowX=stWidthI+bwX;
    359         arrowY=(stHeightI-10)/2;
     360        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    360361        arrowModel='right';
    361362        break;
    362363
    363364      case 'bottom-left':
     365        x+=items[itemIndex].options.offsetX;
    364366        y-=stHeight+items[itemIndex].options.offsetY;
    365367        arrowX=-bwX;
     
    371373        x-=stWidth/2;
    372374        y-=stHeight+items[itemIndex].options.offsetY;
    373         arrowX=(stWidthI-10)/2;
     375        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2+bwX;
    374376        arrowY=stHeightI+bwY;
    375377        arrowModel='down';
     
    379381        x-=stWidth+items[itemIndex].options.offsetX;
    380382        y-=stHeight+items[itemIndex].options.offsetY;
    381         arrowX=stWidthI-10+bwX;
     383        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
    382384        arrowY=stHeightI+bwY;
    383385        arrowModel='down';
     
    394396          marginTop: arrowY+'px',
    395397          width: items[itemIndex].options.arrowWidth+'px',
    396           height: items[itemIndex].options.arrowHeight+'px',
     398          height: items[itemIndex].options.arrowHeight+'px'
    397399        }
    398400      );
     
    409411          left: x+'px',
    410412          top:  y+'px',
    411           display: 'none',
     413          display: 'none'
    412414        }
    413415      )
  • extensions/GrumPluginClasses/js/ui.categorySelector.js

    r7181 r8961  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.categorySelector.js
    4  * file version: 1.0.1
    5  * date: 2010-10-10
     4 * file version: 1.1.0
     5 * date: 2011-01-12
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    2828 * |         |            | * add 'name' property
    2929 * |         |            |
     30 * | 1.1.0   | 2011/01/12 | * checkbox moved between +/- button and text
     31 * |         |            |
     32 * |         |            | * dropdown list is managed like dropdown list on
     33 * |         |            |   <select> object (hidden only when object loose
     34 * |         |            |   focus )
     35 * |         |            |
     36 * |         |            | * selected values are dislayed like tags
     37 * |         |            |
     38 * |         |            | * add 'isValid' method
     39 * |         |            |
     40 * |         |            | * add 'displayPath' property
     41 * |         |            |
    3042 * |         |            |
    3143 *
     
    6173                      levelIndent:16,
    6274                      iconWidthEC:15,
    63                       iconWidthCheck:18,
    6475                      serverUrl:'plugins/GrumPluginClasses/gpc_ajax.php',
    6576                      filter:'accessible',
     
    6879                      load:null,
    6980                      multiple:false,
    70                       userMode:'public'
     81                      userMode:'public',
     82                      popupMode:'click',
     83                      displayPath:false,
     84                      downArrow:'&dArr;'
    7185                    };
    7286
     
    86100                    categories:[],
    87101                    labelStatus:['', ''],
     102                    mouseOver:false,
     103                    isValid:true
    88104                  }
    89105                );
     
    98114                        {
    99115                          'class':'ui-category-selector',
     116                          tabindex:0,
    100117                          css:{
    101118                            width:'100%'
     
    106123                        {
    107124                          privateMethods.displaySelector($this, !$this.data('properties').selectorVisible);
     125                          $(this).focus();
    108126                        }
    109127                      ),
     
    111129                      {
    112130                        html: '&nbsp;',
    113                         'class':'ui-category-selector-name',
     131                        'class':'ui-category-selector-name'
    114132                      }
    115133                    ),
     134                    containerList:null,
    116135                    containerStatus:$('<div/>',
    117136                      {
     
    132151                        }
    133152                      }
     153                    ).bind('mousedown',
     154                        function ()
     155                        {
     156                          $(this).addClass('ui-category-selector-arrow-active');
     157                        }
     158                    ).bind('mouseup',
     159                        function ()
     160                        {
     161                          $(this).removeClass('ui-category-selector-arrow-active');
     162                        }
    134163                    ),
    135 
    136164                    listContainer:$('<div/>',
    137165                        {
     
    144172                          }
    145173                        }
    146                     ).bind('mouseleave.categorySelector',
    147                         function ()
    148                         {
    149                           privateMethods.displaySelector($this, false);
    150                         }
    151                       ),
     174                    ),
    152175                    list:$('<ul/>',
    153176                      {
     
    160183                    )
    161184                  };
    162 
    163                 $this
    164                   .html('')
    165                   .append(objects.container.append(objects.containerArrow).append(objects.containerStatus).append(objects.containerName))
    166                   .append(objects.listContainer.append(objects.list));
    167 
    168                 $this.data('objects', objects);
    169               }
     185              }
     186
     187              $this.data('objects', objects);
    170188
    171189              privateMethods.setOptions($this, opt);
     190
     191
     192              if($this.html()!='') privateMethods.setItems($this, $this.html());
     193
     194              $this
     195                .html('')
     196                .append(objects.container.append(objects.containerArrow).append(objects.containerStatus).append(objects.containerName))
     197                .append(objects.listContainer.append(objects.list));
     198
    172199            }
    173200          );
     
    258285      listMaxWidth: function (value)
    259286        {
    260           if(value)
     287          if(value!=null)
    261288          {
    262289            return this.each(function()
     
    283310      listMaxHeight: function (value)
    284311        {
    285           if(value)
     312          if(value!=null)
    286313          {
    287314            return this.each(function()
     
    333360      levelIndent: function (value)
    334361        {
    335           if(value)
     362          if(value!=null)
    336363          {
    337364            return this.each(function()
     
    358385      serverUrl: function (value)
    359386        {
    360           if(value)
     387          if(value!=null)
    361388          {
    362389            return this.each(function()
     
    383410      filter: function (value)
    384411        {
    385           if(value)
     412          if(value!=null)
    386413          {
    387414            return this.each(function()
     
    428455      iconWidthEC: function (value)
    429456        {
    430           if(value)
     457          if(value!=null)
    431458          {
    432459            return this.each(function()
     
    451478        }, // iconWidthEC
    452479
    453       iconWidthCheck: function (value)
    454         {
    455           if(value)
     480      userMode: function (value)
     481        {
     482          if(value!=null)
    456483          {
    457484            return this.each(function()
    458485              {
    459                 privateMethods.setIconWidthCheck($(this), value);
     486                privateMethods.setUserMode($(this), value);
    460487              }
    461488            );
     
    467494            if(options)
    468495            {
    469               return(options.iconWidthCheck);
     496              return(options.userMode);
    470497            }
    471498            else
     
    474501            }
    475502          }
    476         }, // iconWidthCheck
    477 
    478       userMode: function (value)
    479         {
    480           if(value)
    481           {
    482             return this.each(function()
    483               {
    484                 privateMethods.setUserMode($(this), value);
    485               }
    486             );
    487           }
    488           else
    489           {
    490             var options = this.data('options');
    491 
    492             if(options)
    493             {
    494               return(options.userMode);
    495             }
    496             else
    497             {
    498               return(0);
    499             }
    500           }
    501503        }, // userMode
    502504
     
    504506        {
    505507          var options=this.data('options'),
    506               properties=this.data('properties'),
    507               objects=this.data('objects');
     508              properties=this.data('properties');
    508509
    509510          if(!options.multiple)
     
    522523        }, // userMode
    523524
     525      popupMode: function (value)
     526        {
     527          if(value!=null)
     528          {
     529            return this.each(function()
     530              {
     531                privateMethods.setPopupMode($(this), value);
     532              }
     533            );
     534          }
     535          else
     536          {
     537            var options = this.data('options');
     538
     539            if(options)
     540            {
     541              return(options.popupMode);
     542            }
     543            else
     544            {
     545              return(0);
     546            }
     547          }
     548        }, // popupMode
     549
     550      displayPath: function (value)
     551        {
     552          if(value!=null)
     553          {
     554            return this.each(function()
     555              {
     556                privateMethods.setDisplayPath($(this), value);
     557              }
     558            );
     559          }
     560          else
     561          {
     562            var options = this.data('options');
     563
     564            if(options)
     565            {
     566              return(options.displayPath);
     567            }
     568            else
     569            {
     570              return(0);
     571            }
     572          }
     573        }, // displayPath
     574
     575      downArrow: function (value)
     576        {
     577          if(value!=null)
     578          {
     579            return this.each(function()
     580              {
     581                privateMethods.setDownArrow($(this), value);
     582              }
     583            );
     584          }
     585          else
     586          {
     587            var options = this.data('options');
     588
     589            if(options)
     590            {
     591              return(options.downArrow);
     592            }
     593            else
     594            {
     595              return('');
     596            }
     597          }
     598        }, // downArrow
     599
    524600      value: function (value)
    525601        {
    526           if(value)
     602          if(value!=null)
    527603          {
    528604            // set selected value
     
    559635          }
    560636        }, // value
     637
     638      isValid: function (value)
     639        {
     640          if(value!=null)
     641          {
     642            return this.each(function()
     643              {
     644                privateMethods.setIsValid($(this), value);
     645              }
     646            );
     647          }
     648          else
     649          {
     650            var properties=this.data('properties');
     651            return(properties.isValid);
     652          }
     653        }, // isValid
     654
    561655      load: function (value)
    562656        {
     
    634728          }
    635729        }, // popup
     730
    636731      numberOfCategories: function ()
    637732        {
     
    647742          }
    648743        }, // numberOfCategories
     744
    649745      properties: function (value)
    650746        {
    651           var properties=this.data('properties');
     747          var properties=this.data('properties'),
     748              options=this.data('options');
    652749
    653750          if(properties && value==':first' && properties.categories.length>0)
     
    657754          else if(properties && properties.index!=null && (value==':selected' || value==null) && properties.categories.length>0)
    658755          {
    659             if(!option.multiple && properties.index>-1 && properties.index<properties.categories.length)
     756            if(!options.multiple && properties.index>-1 && properties.index<properties.categories.length)
    660757            {
    661758              return(properties.categories[properties.index]);
    662759            }
    663             else if(option.multiple)
     760            else if(options.multiple)
    664761            {
    665762              var returned=[];
     
    686783            return(null);
    687784          }
    688         }, // numberOfCategories
     785        } // numberOfCategories
    689786    }; // methods
    690787
     
    711808          privateMethods.setLevelIndent(object, (value.levelIndent!=null)?value.levelIndent:options.levelIndent);
    712809          privateMethods.setIconWidthEC(object, (value.iconWidthEC!=null)?value.iconWidthEC:options.iconWidthEC);
    713           privateMethods.setIconWidthCheck(object, (value.iconWidthCheck!=null)?value.iconWidthCheck:options.iconWidthCheck);
    714810          privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl);
    715811          privateMethods.setFilter(object, (value.filter!=null)?value.filter:options.filter);
    716812          privateMethods.setUserMode(object, (value.userMode!=null)?value.userMode:options.userMode);
     813          privateMethods.setPopupMode(object, (value.popupMode!=null)?value.popupMode:options.popupMode);
     814          privateMethods.setDisplayPath(object, (value.displayPath!=null)?value.displayPath:options.displayPath);
     815          privateMethods.setDownArrow(object, (value.downArrow!=null)?value.downArrow:options.downArrow);
    717816          privateMethods.setEventPopup(object, (value.popup!=null)?value.popup:options.popup);
    718817          privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change);
     
    725824        },
    726825
     826      setIsValid : function (object, value)
     827        {
     828          var objects=object.data('objects'),
     829              properties=object.data('properties');
     830
     831          if(properties.isValid!=value)
     832          {
     833            properties.isValid=value;
     834            if(properties.isValid)
     835            {
     836              objects.container.removeClass('ui-error');
     837            }
     838            else
     839            {
     840              objects.container.addClass('ui-error');
     841            }
     842          }
     843          return(properties.isValid);
     844        },
     845
    727846      setAutoLoad : function (object, value)
    728847        {
    729848          var options=object.data('options'),
    730849              properties=object.data('properties');
     850
    731851          if((!properties.initialized || options.autoLoad!=value) && (value==true || value==false))
    732852          {
     
    740860          var options=object.data('options'),
    741861              properties=object.data('properties');
     862
    742863          if((!properties.initialized || options.galleryRoot!=value) && (value==true || value==false))
    743864          {
     
    753874              properties=object.data('properties'),
    754875              objects=object.data('objects');
     876
    755877          if((!properties.initialized || options.listMaxWidth!=value) && value>=0)
    756878          {
     
    773895              properties=object.data('properties'),
    774896              objects=object.data('objects');
     897
    775898          if((!properties.initialized || options.listMaxHeight!=value) && value>=0)
    776899          {
     
    793916              properties=object.data('properties'),
    794917              objects=object.data('objects');
     918
    795919          if((!properties.initialized || options.displayStatus!=value) && (value==true || value==false))
    796920          {
     
    813937              properties=object.data('properties'),
    814938              objects=object.data('objects');
     939
    815940          if((!properties.initialized || options.levelIndent!=value) && value>=0)
    816941          {
     
    819944              function ()
    820945              {
    821                 $(this).css('padding-left', (options.iconWidthEC+options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px');
     946                $(this).css('padding-left', (options.iconWidthEC+$(this).attr('level')*options.levelIndent)+'px');
    822947              }
    823948            );
     
    830955          var options=object.data('options'),
    831956              properties=object.data('properties');
     957
    832958          if(!properties.initialized || options.serverUrl!=value)
    833959          {
     
    838964        },
    839965
    840 
    841966      setFilter : function (object, value)
    842967        {
    843968          var options=object.data('options'),
    844969              properties=object.data('properties');
     970
    845971          if((!properties.initialized || options.filter!=value) && (value=='none' || value=='accessible' || value=='public'))
    846972          {
     
    856982              properties=object.data('properties'),
    857983              objects=object.data('objects');
     984
    858985          if((!properties.initialized || options.iconWidthEC!=value) && value>=0)
    859986          {
     
    862989              function ()
    863990              {
    864                 $(this).css('padding-left', (options.iconWidthEC+options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px');
    865               }
    866             );
    867           }
    868           return(options.filter);
    869         },
    870 
    871       setIconWidthCheck : function (object, value)
     991                $(this).css('padding-left', (options.iconWidthEC+$(this).attr('level')*options.levelIndent)+'px');
     992              }
     993            );
     994          }
     995          return(options.iconWidthEC);
     996        },
     997
     998      setMultiple : function (object, value)
    872999        {
    8731000          var options=object.data('options'),
    8741001              properties=object.data('properties'),
    8751002              objects=object.data('objects');
    876           if((!properties.initialized || options.iconWidthCheck!=value) && (value>=0 && options.multiple || !options.multiple && value==0))
    877           {
    878             options.iconWidthCheck=value;
    879             objects.list.find('.ui-category-selector-item').each(
    880               function ()
    881               {
    882                 $(this).css('padding-left', (options.iconWidthEC+options.iconWidthCheck+$(this).attr('level')*options.levelIndent)+'px');
    883               }
    884             );
    885           }
    886           return(options.filter);
    887         },
    888 
    889       setMultiple : function (object, value)
     1003
     1004          if((!properties.initialized || options.multiple!=value) && (value==true || value==false))
     1005          {
     1006            if(!value)
     1007            {
     1008              properties.index=-1;
     1009              if(objects.containerList!=null)
     1010              {
     1011                objects.containerList.remove();
     1012                objects.containerList=null;
     1013              }
     1014            }
     1015            else
     1016            {
     1017              properties.index=[];
     1018              objects.listContainer.addClass('ui-category-selector-multiple');
     1019              if(objects.containerList==null)
     1020              {
     1021                objects.containerList=$('<ul/>',
     1022                  {
     1023                    css: {
     1024                      listStyle:'none',
     1025                      padding:'0px',
     1026                      margin:'0px',
     1027                      overflow:"auto"
     1028                    },
     1029                    html:'<li>&nbsp;</li>'
     1030                  }
     1031                );
     1032                objects.containerName.html('').append(objects.containerList);
     1033              }
     1034            }
     1035            options.multiple=value;
     1036          }
     1037          return(options.multiple);
     1038        }, //setMultiple
     1039
     1040      setUserMode : function (object, value)
     1041        {
     1042          var options=object.data('options'),
     1043              properties=object.data('properties');
     1044
     1045          if((!properties.initialized || options.userMode!=value) && (value=='admin' || value=='public'))
     1046          {
     1047            options.userMode=value;
     1048            if(options.autoLoad && properties.initialized) privateMethods.load(object);
     1049          }
     1050          return(options.userMode);
     1051        }, //setUserMode
     1052
     1053      setPopupMode : function (object, value)
    8901054        {
    8911055          var options=object.data('options'),
    8921056              properties=object.data('properties'),
    8931057              objects=object.data('objects');
    894           if((!properties.initialized || options.multiple!=value) && (value==true || value==false))
    895           {
    896             if(!value)
    897             {
    898               privateMethods.setIconWidthCheck(object, 0);
    899               properties.index=-1;
    900             }
    901             else
    902             {
    903               properties.index=[];
    904               objects.listContainer.addClass('ui-category-selector-multiple');
    905             }
    906             options.multiple=value;
    907           }
    908           return(options.filter);
    909         }, //setMultiple
    910 
    911       setUserMode : function (object, value)
     1058
     1059          if((!properties.initialized || options.popupMode!=value) && (value=='click' || value=='mouseout'))
     1060          {
     1061            options.popupMode=value;
     1062
     1063            if(value=='mouseout')
     1064            {
     1065              objects.listContainer
     1066                .unbind('mouseleave.categorySelector')
     1067                .unbind('mouseenter.categorySelector')
     1068                .bind('mouseleave.categorySelector',
     1069                  function ()
     1070                  {
     1071                    privateMethods.displaySelector(object, false);
     1072                  }
     1073                );
     1074            }
     1075            else
     1076            {
     1077              objects.listContainer
     1078                .unbind('mouseleave.categorySelector')
     1079                .bind('mouseleave.categorySelector',
     1080                  function ()
     1081                  {
     1082                    properties.mouseOver=false;
     1083                  }
     1084                )
     1085                .bind('mouseenter.categorySelector',
     1086                  function ()
     1087                  {
     1088                    properties.mouseOver=true;
     1089                  }
     1090                );
     1091              $(document).bind('focusout focusin',
     1092                function (event)
     1093                {
     1094                  if(!properties.mouseOver) privateMethods.displaySelector(object, false);
     1095                }
     1096              );
     1097            }
     1098          }
     1099          return(options.popupMode);
     1100        }, //setUserMode
     1101
     1102
     1103      setDisplayPath : function (object, value)
    9121104        {
    9131105          var options=object.data('options'),
    9141106              properties=object.data('properties'),
    9151107              objects=object.data('objects');
    916           if((!properties.initialized || options.userMode!=value) && (value=='admin' || value=='public'))
    917           {
    918             options.userMode=value;
    919             if(options.autoLoad && properties.initialized) privateMethods.load(object);
    920           }
    921           return(options.filter);
    922         }, //setUserMode
     1108
     1109          if((!properties.initialized || options.displayPath!=value) && (value==true || value==false))
     1110          {
     1111            options.displayPath=value;
     1112
     1113          }
     1114          return(options.userMode);
     1115        }, //setDisplayPath
     1116
     1117      setDownArrow : function (object, value)
     1118        {
     1119          var options=object.data('options'),
     1120              properties=object.data('properties'),
     1121              objects=object.data('objects');
     1122
     1123          if(!properties.initialized || options.downArrow!=value)
     1124          {
     1125            options.downArrow=value;
     1126            objects.containerArrow.html(options.downArrow);
     1127          }
     1128          return(options.downArrow);
     1129        }, //setDownArrow
     1130
     1131
     1132      setItems : function (object, value)
     1133        {
     1134          var properties=object.data('properties'),
     1135              options=object.data('options'),
     1136              objects=object.data('objects');
     1137
     1138          if(value=='' || value==null)
     1139          {
     1140            value={
     1141              status:['',''],
     1142              categories:[]
     1143            }
     1144          }
     1145          else if($.isArray(value))
     1146          {
     1147            value={
     1148              status:'public',
     1149              categories:value
     1150            }
     1151          }
     1152          else
     1153          {
     1154            try
     1155            {
     1156              value=$.parseJSON($.trim(value));
     1157            }
     1158            catch (e)
     1159            {
     1160              return(false);
     1161            }
     1162          }
     1163
     1164          properties.labelStatus=value.status;
     1165          privateMethods.listClear(object);
     1166          if(value.categories.length>0) privateMethods.listAddItems(object, value.categories, objects.list);
     1167
     1168          properties.initialized=false;
     1169          if(options.multiple)
     1170          {
     1171            privateMethods.setValue(object, ':none');
     1172          }
     1173          else
     1174          {
     1175            privateMethods.setValue(object, ':first');
     1176          }
     1177          properties.initialized=true;
     1178
     1179          if(options.load) object.trigger('categorySelectorLoad');
     1180        },
    9231181
    9241182      /**
     
    11981456          if(!options.multiple && (!properties.initialized || properties.index!=index) && index>-1)
    11991457          {
     1458
    12001459            objects.list.find('.ui-category-selector-selected-item').removeClass('ui-category-selector-selected-item');
    12011460            objects.list.find('[catId="'+value+'"]').addClass('ui-category-selector-selected-item');
     1461            title=privateMethods.getParentName(object, objects.list.find('[catId="'+value+'"] div.ui-category-selector-name')).replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '<');
    12021462            properties.index=index;
    1203             objects.containerName.html(properties.categories[properties.index].name);
     1463            objects.containerName.html(properties.categories[properties.index].name).attr('title', title);
    12041464            objects.containerStatus.html(properties.labelStatus[properties.categories[properties.index].status]);
    12051465            if(trigger && options.change) object.trigger('categorySelectorChange', [properties.categories[properties.index].id]);
     
    12321492              tmp.push(properties.categories[index[i]].id);
    12331493            }
    1234             containerHtml='';
     1494            objects.containerList.html('');
    12351495            objects.list.find('.ui-category-selector-selected-item div.ui-category-selector-name').each(
    12361496              function ()
    12371497              {
    1238                 containerHtml+=((containerHtml=='')?'':'&nbsp;; ')+$(this).html();
    1239               }
    1240             );
    1241             if(containerHtml=='') containerHtml="&nbsp;";
    1242             objects.containerName.html(containerHtml);
     1498                var path='';
     1499
     1500                title=privateMethods.getParentName(object, $(this)).replace('&amp;', '&').replace('&gt;', '>').replace('&lt;', '<');
     1501                if(!options.displayPath)
     1502                {
     1503                  path=$(this).html();
     1504                }
     1505                else
     1506                {
     1507                  path=title;
     1508                }
     1509
     1510                objects.containerList.append(
     1511                  $('<li/>',
     1512                    {
     1513                      html:path,
     1514                      title:title,
     1515                      'class':'ui-category-selector-selected-cat'
     1516                    }
     1517                  ).prepend(
     1518                      $('<span/>',
     1519                        {
     1520                          html:'x'
     1521                        }
     1522                       ).bind('click.categorySelector',
     1523                          {object:object, value:$(this).parent().parent().attr('catid')},
     1524                          function (event)
     1525                          {
     1526                            event.stopPropagation();
     1527                            privateMethods.setValue(event.data.object, event.data.value);
     1528                          }
     1529                        )
     1530                      )
     1531                )
     1532              }
     1533            );
     1534
     1535            if(objects.containerList.children().length==0) objects.containerList.append('<li>&nbsp;</li>');
     1536
    12431537            if(trigger && options.change) object.trigger('categorySelectorChange', [tmp]);
    12441538            return(tmp);
     
    12461540          return(null);
    12471541        },
     1542
     1543      getParentName : function (object, item)
     1544      {
     1545        if(item==null || item.length==0) return('');
     1546        foundItem=item.parent().parent().parent().prev().find('div.ui-category-selector-name');
     1547
     1548        if(foundItem.length==0) return(item.html());
     1549
     1550        return(privateMethods.getParentName(object, foundItem)+' / '+item.html());
     1551      },
    12481552
    12491553      displaySelector : function (object, value)
     
    12521556              properties=object.data('properties'),
    12531557              objects=object.data('objects');
     1558
    12541559          if(properties.selectorVisible!=value)
    12551560          {
     
    12661571                  }
    12671572                );
     1573
    12681574              if($.isArray(properties.index))
    12691575              {
     
    12891595          // load datas from server through an asynchronous ajax call
    12901596          var options=object.data('options'),
    1291               properties=object.data('properties'),
    12921597              objects=object.data('objects');
     1598
     1599          if(options.serverUrl=='') return(false);
    12931600
    12941601          $.ajax(
     
    13061613              success: function(msg)
    13071614                {
    1308                   list=$.parseJSON(msg);
    1309 
    1310                   properties.labelStatus=list.status;
    1311                   privateMethods.listClear(object);
    1312                   privateMethods.listAddItems(object, list.categories, objects.list);
    1313 
    1314                   properties.initialized=false;
    1315                   privateMethods.setValue(object, ':first');
    1316                   properties.initialized=true;
    1317 
    1318                   if(options.load) object.trigger('categorySelectorLoad');
     1615                  privateMethods.setItems(object, msg);
    13191616                },
    13201617              error: function(msg)
    13211618                {
    13221619                  objects.listContainer.html('Error ! '+msg);
    1323                 },
     1620                }
    13241621            }
    13251622         );
     
    13451642          properties.categories=[];
    13461643        },
     1644
    13471645      listAddItems : function (object, listItems, parent)
    13481646        {
     
    13741672            }
    13751673
    1376             var spaceWidth = (options.iconWidthEC+options.iconWidthCheck+listItems[i].level*options.levelIndent),
     1674            var spaceWidth = (options.iconWidthEC+listItems[i].level*options.levelIndent),
    13771675                li=$('<li/>',
    13781676                      {
     
    13891687                        function (event)
    13901688                        {
    1391                           if(!event.layerX && event.offsetX)
    1392                           {
    1393                             // trick for IE..
    1394                             event.layerX=event.offsetX;
    1395                             event.layerY=event.offsetY;
    1396                           }
     1689                          event.layerX=event.pageX-$(event.currentTarget).offset().left;
     1690                          event.layerY=event.pageY-$(event.currentTarget).offset().top;
    13971691
    13981692                          if(event.layerX<event.data.expandArea && event.data.nbchilds>0 )
     
    14241718                            }
    14251719                          }
     1720
     1721                          if(options.multiple) objects.container.focus();
    14261722                        }
    14271723                      );
    14281724            if(listItems[i].childs.length>0)
    14291725            {
    1430               li.addClass('ui-category-selector-collapsable-item').css('background-position', (options.iconWidthCheck+options.levelIndent*listItems[i].level)+'px 0px');
     1726              li.addClass('ui-category-selector-collapsable-item').css('background-position', (options.levelIndent*listItems[i].level)+'px 0px');
    14311727            }
    14321728
    14331729            if(options.multiple)
    14341730            {
    1435               li.prepend('<div class="ui-category-selector-check"></div>');
     1731              li.children().prepend('<div class="ui-category-selector-check"></div>');
    14361732            }
    14371733
     
    14651761           */
    14661762          var properties=object.data('properties');
     1763
    14671764          for(var i=0;i<properties.categories.length;i++)
    14681765          {
     
    14711768          return(-1);
    14721769        },
     1770
    14731771      setEventPopup : function (object, value)
    14741772        {
    14751773          var options=object.data('options');
     1774
    14761775          options.popup=value;
    14771776          object.unbind('categorySelectorPopup');
     
    14791778          return(options.popup);
    14801779        },
     1780
    14811781      setEventChange : function (object, value)
    14821782        {
    14831783          var options=object.data('options');
     1784
    14841785          options.change=value;
    14851786          object.unbind('categorySelectorChange');
     
    14871788          return(options.change);
    14881789        },
     1790
    14891791      setEventLoad : function (object, value)
    14901792        {
    14911793          var options=object.data('options');
     1794
    14921795          options.load=value;
    14931796          object.unbind('categorySelectorLoad');
  • extensions/GrumPluginClasses/js/ui.categorySelector.packed.js

    r7181 r8961  
    1 /* file: ui.categorySelector.js - v1.0.1 | packed on 2010/10/14 with http://joliclic.free.fr/php/javascript-packer/ */
    2 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(g($){k 1T={2T:g(2w){c b.t(g(){k $b=$(b),e=$b.e(\'6\'),f=$b.e(\'f\'),8=$b.e(\'8\'),6={R:K,1b:K,11:K,17:0,12:0,T:16,10:15,V:18,1d:\'3C/3x/3u.3E\',N:\'2D\',1e:q,13:q,M:q,D:G,1h:\'22\'};$b.e(\'6\',6);a(!8){$b.e(\'8\',{h:-1,F:G,1v:G,u:[],1N:[\'\',\'\'],});8=$b.e(\'8\')}a(!f){f={28:$(\'<O/>\',{\'1f\':\'p-o-m\',I:{1C:\'2U%\'}}).1A(\'2N.1p\',g(){j.1U($b,!$b.e(\'8\').1v)}),1K:$(\'<O/>\',{1a:\'&20;\',\'1f\':\'p-o-m-1c\',}),25:$(\'<O/>\',{\'1f\':\'p-o-m-Z\',I:{2y:\'2z\',1O:(6.11)?\'2Q\':\'1n\'}}),2x:$(\'<O/>\',{1a:\'&3N;\',\'1f\':\'p-o-m-35\',I:{\'2y\':\'2z\',3v:\'3h\'}}),Q:$(\'<O/>\',{1a:"",\'1f\':\'p-o-m-v\',I:{3g:"3f",1O:\'1n\',2i:\'3d\'}}).1A(\'3e.1p\',g(){j.1U($b,G)}),v:$(\'<1z/>\',{I:{2P:\'1n\',1H:\'1I\',2W:\'1I\'}})};$b.1a(\'\').1w(f.28.1w(f.2x).1w(f.25).1w(f.1K)).1w(f.Q.1w(f.v));$b.e(\'f\',f)}j.29($b,2w)})},3o:g(){c b.t(g(){k $b=$(b),f=$b.e(\'f\');f.28.1s().2A();f.v.2J().1s();f.Q.2A();$b.1s(\'.1p\').I({1C:\'\',2g:\'\'})})},6:g(7){c b.t(g(){j.29($(b),7)})},R:g(7){a(7!=q){c b.t(g(){j.2b($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.R)}l{c(K)}}},1b:g(7){a(7!=q){c b.t(g(){j.2a($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.1b)}l{c(K)}}},17:g(7){a(7){c b.t(g(){j.24($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.17)}l{c(0)}}},12:g(7){a(7){c b.t(g(){j.21($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.12)}l{c(0)}}},11:g(7){a(7!=q){c b.t(g(){j.2r($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.11)}l{c(K)}}},T:g(7){a(7){c b.t(g(){j.2s($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.T)}l{c(0)}}},1d:g(7){a(7){c b.t(g(){j.2t($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.1d)}l{c(\'\')}}},N:g(7){a(7){c b.t(g(){j.2q($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.N)}l{c(\'\')}}},3k:g(7){c b.t(g(){a(!7)7=\':1y\';j.2n($(b),7,\'C\')})},3l:g(7){c b.t(g(){a(!7)7=\':1y\';j.2n($(b),7,\'E\')})},10:g(7){a(7){c b.t(g(){j.2v($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.10)}l{c(0)}}},V:g(7){a(7){c b.t(g(){j.1P($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.V)}l{c(0)}}},1h:g(7){a(7){c b.t(g(){j.2h($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.1h)}l{c(0)}}},1c:g(){k 6=b.e(\'6\'),8=b.e(\'8\'),f=b.e(\'f\');a(!6.D){c(8.u[8.h].1c)}l{k 27=[];1u(k i=0;i<8.h.A;i++){27.1i(8.u[8.h[i]].1c)}c(27)}},7:g(7){a(7){c b.t(g(){j.1r($(b),7)})}l{k 8=b.e(\'8\'),6=b.e(\'6\');a(8&&8.h!=q&&!6.D&&8.h>-1&&8.h<8.u.A){c(8.u[8.h].19)}l a(8&&8.h!=q&&6.D){k 1B=[];1u(k i=0;i<8.h.A;i++){a(8.h[i]>-1&&8.h[i]<8.u.A)1B.1i(8.u[8.h[i]].19)}c(1B)}l{c(q)}}},M:g(7){a(7&&$.2d(7)){c b.t(g(){j.1X($(b),7)})}l{j.M(b)}},1e:g(7){a(7&&$.2d(7)){c b.t(g(){j.1Z($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.1e)}l{c(q)}}},13:g(7){a(7&&$.2d(7)){c b.t(g(){j.1V($(b),7)})}l{k 6=b.e(\'6\');a(6){c(6.13)}l{c(q)}}},3b:g(){k 8=b.e(\'8\');a(8){c(8.u.A)}l{c(q)}},8:g(7){k 8=b.e(\'8\');a(8&&7==\':2e\'&&8.u.A>0){c(8.u[0])}l a(8&&8.h!=q&&(7==\':P\'||7==q)&&8.u.A>0){a(!2E.D&&8.h>-1&&8.h<8.u.A){c(8.u[8.h])}l a(2E.D){k 1B=[];1u(k i=0;i<8.h.A;i++){a(8.h[i]>-1&&8.h<8.u.A)1B.1i(8.u[8.h[i]])}c(1B)}c(q)}l a(8&&7>-1){k h=j.1x(b,7);a(h>-1){c(8.u[h])}c(q)}l{c(q)}},};k j={29:g(9,7){k 8=9.e(\'8\'),6=9.e(\'6\');a(!$.2Y(7))c(G);8.F=G;j.2b(9,(7.R!=q)?7.R:6.R);j.2a(9,(7.1b!=q)?7.1b:6.1b);j.2r(9,(7.11!=q)?7.11:6.11);j.24(9,(7.17!=q)?7.17:6.17);j.21(9,(7.12!=q)?7.12:6.12);j.2s(9,(7.T!=q)?7.T:6.T);j.2v(9,(7.10!=q)?7.10:6.10);j.1P(9,(7.V!=q)?7.V:6.V);j.2t(9,(7.1d!=q)?7.1d:6.1d);j.2q(9,(7.N!=q)?7.N:6.N);j.2h(9,(7.1h!=q)?7.1h:6.1h);j.1Z(9,(7.1e!=q)?7.1e:6.1e);j.1V(9,(7.13!=q)?7.13:6.13);j.1X(9,(7.M!=q)?7.M:6.M);j.2G(9,(7.D!=q)?7.D:6.D);a(6.R)j.M(9);8.F=K},2b:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\');a((!8.F||6.R!=7)&&(7==K||7==G)){6.R=7}c(6.R)},2a:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\');a((!8.F||6.1b!=7)&&(7==K||7==G)){6.1b=7;a(6.R&&8.F)j.M(9)}c(6.1b)},24:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.17!=7)&&7>=0){6.17=7;a(6.17>0){f.Q.I(\'1S-1C\',6.17+\'1q\')}l{f.Q.I(\'1S-1C\',\'\')}}c(6.17)},21:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.12!=7)&&7>=0){6.12=7;a(6.12>0){f.Q.I(\'1S-2g\',6.12+\'1q\')}l{f.Q.I(\'1S-2g\',\'\')}}c(6.12)},2r:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.11!=7)&&(7==K||7==G)){6.11=7;a(6.11){9.B(\'.p-o-m-Z\').2f()}l{9.B(\'.p-o-m-Z\').2p()}}c(6.11)},2s:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.T!=7)&&7>=0){6.T=7;f.v.B(\'.p-o-m-r\').t(g(){$(b).I(\'1H-1J\',(6.10+6.V+$(b).H(\'z\')*6.T)+\'1q\')})}c(6.T)},2t:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\');a(!8.F||6.1d!=7){6.1d=7;a(6.R&&8.F)j.M(9)}c(6.1d)},2q:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\');a((!8.F||6.N!=7)&&(7==\'1n\'||7==\'2D\'||7==\'22\')){6.N=7;a(6.R&&8.F)j.M(9)}c(6.N)},2v:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.10!=7)&&7>=0){6.10=7;f.v.B(\'.p-o-m-r\').t(g(){$(b).I(\'1H-1J\',(6.10+6.V+$(b).H(\'z\')*6.T)+\'1q\')})}c(6.N)},1P:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.V!=7)&&(7>=0&&6.D||!6.D&&7==0)){6.V=7;f.v.B(\'.p-o-m-r\').t(g(){$(b).I(\'1H-1J\',(6.10+6.V+$(b).H(\'z\')*6.T)+\'1q\')})}c(6.N)},2G:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.D!=7)&&(7==K||7==G)){a(!7){j.1P(9,0);8.h=-1}l{8.h=[];f.Q.1g(\'p-o-m-D\')}6.D=7}c(6.N)},2h:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a((!8.F||6.1h!=7)&&(7==\'3O\'||7==\'22\')){6.1h=7;a(6.R&&8.F)j.M(9)}c(6.N)},2n:g(9,7,14){k f=9.e(\'f\');1L=/^(?:(:1y)(?:(=|<|>|\\+)(\\d+))?)|(?:(\\d+)(<|>|\\+))?$/i;s=1L.2H(7);a(s!=q){1o(14){x\'C\':X=j.2u;w;x\'E\':X=j.2j;w}a(s[1]==\':1y\'){f.v.B(\'.p-o-m-1k-r, .p-o-m-1j-r\').t(X)}l a(s[4]!=q){1o(s[5]){x\'+\':f.v.B(\'.p-o-m-1k-r, .p-o-m-1j-r\').t(j.2u);f.v.B(\':2I([S=\'+s[4]+\'])\').2B().t(j.2j);f.v.B(\'[S=\'+s[4]+\']\').t(X);w;x\'>\':f.v.B(\'[S=\'+s[4]+\'] + 1z\').B(\'.p-o-m-1k-r, .p-o-m-1j-r\').t(X);f.v.B(\'[S=\'+s[4]+\']\').t(X);w;x\'<\':f.v.B(\':2I([S=\'+s[4]+\'])\').2B().t(X);f.v.B(\'[S=\'+s[4]+\']\').t(X);w;2C:f.v.B(\'[S=\'+s[4]+\']\').t(X);w}}}},2j:g(h,U){j.X(h,U,\'E\')},2u:g(h,U){j.X(h,U,\'C\')},X:g(h,U,14){1m=\'\';k $U=$(U);a(s.A>2&&s[2]!=q&&s[3]!=q){1o(s[2]){x\'=\':a($U.H(\'z\')==s[3])1m=14;w;x\'>\':a($U.H(\'z\')>=s[3])1m=14;w;x\'<\':a($U.H(\'z\')<=s[3])1m=14;w;x\'+\':a((14==\'E\'&&$U.H(\'z\')<=s[3])||(14==\'C\'&&$U.H(\'z\')>=s[3])){1m=14}l{1m=(14==\'C\')?\'E\':\'C\'}w}}l 1m=14;1o(1m){x\'C\':$U.1l(\'p-o-m-1k-r p-o-m-1j-r\').1g(\'p-o-m-1k-r\').1Q().2p();w;x\'E\':$U.1l(\'p-o-m-1k-r p-o-m-1j-r\').1g(\'p-o-m-1j-r\').1Q().2f();w}},1r:g(9,7,1t){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\'),h=-1;1L=/^(:2F|:1y|:1n)(?:(=|<|>)(\\d+))$/i;s=1L.2H(7);a(s!=q)7=s[1];1o(7){x\':2e\':a(8.u.A>0)h=0;w;x\':3y\':h=8.u.A-1;w;x\':2F\':a(!6.D)c(G);8.h=[];f.v.B(\'.p-o-m-r\').t(g(){k $b=$(b),L=K;a(s!=q){1o(s[2]){x\'=\':L=($b.H(\'z\')==s[3]);w;x\'>\':L=($b.H(\'z\')>=s[3]);w;x\'<\':L=($b.H(\'z\')<=s[3]);w}}a(L){a($b.2l(\'p-o-m-P-r\')){$b.1l(\'p-o-m-P-r\')}l{$b.1g(\'p-o-m-P-r\');W=j.1x(9,$b.H(\'S\'));a(W>-1)8.h.1i(W)}}});j.1r(9,[],G);c(G);w;x\':1n\':a(!6.D)c(G);8.h=[];f.v.B(\'.p-o-m-P-r\').t(g(){k $b=$(b),L=K;a(s!=q){1o(s[2]){x\'=\':L=($b.H(\'z\')==s[3]);w;x\'>\':L=($b.H(\'z\')>=s[3]);w;x\'<\':L=($b.H(\'z\')<=s[3]);w}}a(L)$b.1l(\'p-o-m-P-r\')});j.1r(9,[],G);c(G);w;x\':1y\':a(!6.D)c(G);8.h=[];f.v.B(\'.p-o-m-r\').t(g(){k $b=$(b),L=K;a(s!=q){1o(s[2]){x\'=\':L=($b.H(\'z\')==s[3]);w;x\'>\':L=($b.H(\'z\')>=s[3]);w;x\'<\':L=($b.H(\'z\')<=s[3]);w}}a(L){W=j.1x(9,$b.H(\'S\'));a(W>-1)8.h.1i(W);$b.1g(\'p-o-m-P-r\')}});j.1r(9,[],G);c(G);w;2C:a($.1W(7)&&6.D){h=[];1u(k i=0;i<7.A;i++){W=j.1x(9,7[i]);a(W>-1)h.1i(W)}}l{h=j.1x(9,7)}w}a(!6.D&&(!8.F||8.h!=h)&&h>-1){f.v.B(\'.p-o-m-P-r\').1l(\'p-o-m-P-r\');f.v.B(\'[S="\'+7+\'"]\').1g(\'p-o-m-P-r\');8.h=h;f.1K.1a(8.u[8.h].1c);f.25.1a(8.1N[8.u[8.h].Z]);a(1t&&6.13)9.1t(\'1R\',[8.u[8.h].19]);a(8.h>-1)c(8.u[8.h].19)}l a(6.D){a(!$.1W(h)){a(h<0||h==q)c(-1);h=[h]}W=[];1u(k i=0;i<h.A;i++){k r=f.v.B(\'[S="\'+8.u[h[i]].19+\'"]\');a(r.2l(\'p-o-m-P-r\')){r.1l(\'p-o-m-P-r\');26=$.3I(h[i],8.h);a(26>-1)8.h.3J(26,1)}l{r.1g(\'p-o-m-P-r\');8.h.1i(h[i])}W.1i(8.u[h[i]].19)}1G=\'\';f.v.B(\'.p-o-m-P-r O.p-o-m-1c\').t(g(){1G+=((1G==\'\')?\'\':\'&20;; \')+$(b).1a()});a(1G==\'\')1G="&20;";f.1K.1a(1G);a(1t&&6.13)9.1t(\'1R\',[W]);c(W)}c(q)},1U:g(9,7){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');a(8.1v!=7){8.1v=7;a(8.1v&&8.u.A>0){k h=0;f.Q.I({1O:\'2Q\',\'3m-1C\':f.Q.2o().I(\'1C\')});a($.1W(8.h)){a(8.h.A>0)h=8.h[0]}l a(8.h>-1){h=8.h}f.Q.2X(f.Q.2X()+f.v.B(\'[S="\'+8.u[h].19+\'"]\').2i().3c)}l{f.Q.I(\'1O\',\'1n\')}a(6.1e)9.1t(\'1Y\',[8.1v])}c(8.1v)},M:g(9){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');$.36({3Q:"3P",3D:6.1d,3r:K,e:{3s:6.1h+\'.1p.3a\',N:6.N,1b:6.1b?\'y\':\'n\',3z:\'y\'},3A:g(1M){v=$.3B(1M);8.1N=v.Z;j.2V(9);j.2c(9,v.u,f.v);8.F=G;j.1r(9,\':2e\');8.F=K;a(6.M)9.1t(\'23\')},2R:g(1M){f.Q.1a(\'3w ! \'+1M)},})},2V:g(9){k f=9.e(\'f\'),6=9.e(\'6\'),8=9.e(\'8\');f.v.2J().1s();f.v.1a(\'\');a(6.D){8.h=[]}l{8.h=-1}8.u=[]},2c:g(9,J,2o){k 6=9.e(\'6\'),8=9.e(\'8\'),f=9.e(\'f\');k 3t=-1;1u(k i=0;i<J.A;i++){8.u.1i({19:J[i].19,z:J[i].z,1c:J[i].1c,Z:J[i].Z,1E:J[i].1E.A});a(6.11){Z="<O 1f=\'p-o-m-Z\'>"+8.1N[J[i].Z]+"</O>"}l{Z=""}k 2k=(6.10+6.V+J[i].z*6.T),1F=$(\'<1F/>\',{\'1f\':\'p-o-m-r\',1a:"<O>"+Z+"<O 1f=\'p-o-m-1c\'>"+J[i].1c+"</O></O>",S:J[i].19,z:J[i].z,I:{\'1H-1J\':2k+\'1q\'}}).1A(\'2N.1p\',{9:9,2K:2k,2L:J[i].1E.A},g(Y){a(!Y.2m&&Y.2M){Y.2m=Y.2M;Y.3G=Y.3M}a(Y.2m<Y.e.2K&&Y.e.2L>0){a($(b).2l(\'p-o-m-1k-r\')){$(b).1l(\'p-o-m-1k-r\').1g(\'p-o-m-1j-r\').1Q().2f()}l{$(b).1l(\'p-o-m-1j-r\').1g(\'p-o-m-1k-r\').1Q().2p()}}l{j.1r(Y.e.9,$(b).H(\'S\'),K);a(6.D){}l{j.1U(Y.e.9,G)}}});a(J[i].1E.A>0){1F.1g(\'p-o-m-1j-r\').I(\'3K-2i\',(6.V+6.T*J[i].z)+\'1q 1I\')}a(6.D){1F.3L(\'<O 1f="p-o-m-3F"></O>\')}2o.1w(1F);a(J[i].1E.A>0){k 1z=$(\'<1z/>\',{\'1f\':\'p-o-m-3H\',I:{2P:\'1n\',1H:\'1I\',2W:\'1I\',\'3q-3p\':(2U-J[i].z*2)+\'%\'}});1F.37(1z);j.2c(9,J[i].1E,1z)}}},1x:g(9,7){k 8=9.e(\'8\');1u(k i=0;i<8.u.A;i++){a(8.u[i].19==7)c(i)}c(-1)},1Z:g(9,7){k 6=9.e(\'6\');6.1e=7;9.1s(\'1Y\');a(7)9.1A(\'1Y\',6.1e);c(6.1e)},1V:g(9,7){k 6=9.e(\'6\');6.13=7;9.1s(\'1R\');a(7)9.1A(\'1R\',6.13);c(6.13)},1X:g(9,7){k 6=9.e(\'6\');6.M=7;9.1s(\'23\');a(7)9.1A(\'23\',6.M);c(6.M)}};$.39.1p=g(1D){a(1T[1D]){c 1T[1D].L(b,34.33.2Z.30(2S,1))}l a(32 1D===\'9\'||!1D){c 1T.2T.L(b,2S)}l{$.2R(\'3n \'+1D+\' 3j 3i 31 38 2O.1p\')}}})(2O);',62,239,'||||||options|value|properties|object|if|this|return||data|objects|function|index||privateMethods|var|else|selector||category|ui|null|item|target|each|categories|list|break|case||level|length|find||multiple||initialized|false|attr|css|listItems|true|apply|load|filter|div|selected|listContainer|autoLoad|catId|levelIndent|domElt|iconWidthCheck|tmp|applyExpandCollapse|event|status|iconWidthEC|displayStatus|listMaxHeight|change|mode|||listMaxWidth||id|html|galleryRoot|name|serverUrl|popup|class|addClass|userMode|push|collapsable|expandable|removeClass|action|none|switch|categorySelector|px|setValue|unbind|trigger|for|selectorVisible|append|findIndexByValue|all|ul|bind|returned|width|method|childs|li|containerHtml|padding|0px|left|containerName|re|msg|labelStatus|display|setIconWidthCheck|next|categorySelectorChange|max|publicMethods|displaySelector|setEventChange|isArray|setEventLoad|categorySelectorPopup|setEventPopup|nbsp|setListMaxHeight|public|categorySelectorLoad|setListMaxWidth|containerStatus|tmpIndex|listNames|container|setOptions|setGalleryRoot|setAutoLoad|listAddItems|isFunction|first|show|height|setUserMode|position|applyExpand|spaceWidth|hasClass|layerX|setExpandCollapse|parent|hide|setFilter|setDisplayStatus|setLevelIndent|setServerUrl|applyCollapse|setIconWidthEC|opt|containerArrow|float|right|remove|prev|default|accessible|option|invert|setMultiple|exec|has|children|expandArea|nbchilds|offsetX|click|jQuery|listStyle|block|error|arguments|init|100|listClear|margin|scrollTop|isPlainObject|slice|call|exist|typeof|prototype|Array|arrow|ajax|after|on|fn|getList|numberOfCategories|top|absolute|mouseleave|auto|overflow|pointer|not|does|collapse|expand|min|Method|destroy|size|font|async|ajaxfct|previousLevel|gpc_ajax|cursor|Error|GrumPluginClasses|last|tree|success|parseJSON|plugins|url|php|check|layerY|group|inArray|splice|background|prepend|offsetY|dArr|admin|POST|type'.split('|'),0,{}))
     1/* file: ui.categorySelector.js - v1.1.0 | packed on 2011/01/27 with http://joliclic.free.fr/php/javascript-packer/ */
     2eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h($){l 22={2X:h(36){c b.u(h(){l $b=$(b),g=$b.g(\'6\'),f=$b.g(\'f\'),8=$b.g(\'8\'),6={X:L,1a:L,14:L,1c:0,1b:0,Y:16,18:15,1f:\'3s/3r/3t.3u\',1g:\'32\',1n:o,1k:o,R:o,H:w,1h:\'27\',1u:\'1S\',1w:w,1o:\'&3m;\'};$b.g(\'6\',6);a(!8){$b.g(\'8\',{j:-1,G:w,1A:w,v:[],1V:[\'\',\'\'],2a:w,1G:L});8=$b.g(\'8\')}a(!f){f={1L:$(\'<Q/>\',{\'19\':\'p-r-q\',3v:0,M:{1H:\'35%\'}}).12(\'1S.10\',h(){k.1R($b,!$b.g(\'8\').1A);$(b).3n()}),23:$(\'<Q/>\',{K:\'&2k;\',\'19\':\'p-r-q-17\'}),1e:o,2d:$(\'<Q/>\',{\'19\':\'p-r-q-W\',M:{38:\'37\',1Z:(6.14)?\'3k\':\'1q\'}}),2F:$(\'<Q/>\',{K:\'&3m;\',\'19\':\'p-r-q-2r\',M:{\'38\':\'37\',3G:\'3x\'}}).12(\'3F\',h(){$(b).13(\'p-r-q-2r-39\')}).12(\'3H\',h(){$(b).1m(\'p-r-q-2r-39\')}),S:$(\'<Q/>\',{K:"",\'19\':\'p-r-q-B\',M:{2W:"33",1Z:\'1q\',2C:\'3I\'}}),B:$(\'<1F/>\',{M:{2B:\'1q\',1K:\'1D\',2Q:\'1D\'}})}}$b.g(\'f\',f);k.2f($b,36);a($b.K()!=\'\')k.2K($b,$b.K());$b.K(\'\').1l(f.1L.1l(f.2F).1l(f.2d).1l(f.23)).1l(f.S.1l(f.B))})},3J:h(){c b.u(h(){l $b=$(b),f=$b.g(\'f\');f.1L.1p().2N();f.B.28().1p();f.S.2N();$b.1p(\'.10\').M({1H:\'\',2o:\'\'})})},6:h(7){c b.u(h(){k.2f($(b),7)})},X:h(7){a(7!=o){c b.u(h(){k.2l($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.X)}m{c(L)}}},1a:h(7){a(7!=o){c b.u(h(){k.2q($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1a)}m{c(L)}}},1c:h(7){a(7!=o){c b.u(h(){k.2j($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1c)}m{c(0)}}},1b:h(7){a(7!=o){c b.u(h(){k.2n($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1b)}m{c(0)}}},14:h(7){a(7!=o){c b.u(h(){k.2i($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.14)}m{c(L)}}},Y:h(7){a(7!=o){c b.u(h(){k.2h($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.Y)}m{c(0)}}},1f:h(7){a(7!=o){c b.u(h(){k.2e($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1f)}m{c(\'\')}}},1g:h(7){a(7!=o){c b.u(h(){k.2g($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1g)}m{c(\'\')}}},3E:h(7){c b.u(h(){a(!7)7=\':1J\';k.2s($(b),7,\'C\')})},3D:h(7){c b.u(h(){a(!7)7=\':1J\';k.2s($(b),7,\'E\')})},18:h(7){a(7!=o){c b.u(h(){k.2P($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.18)}m{c(0)}}},1h:h(7){a(7!=o){c b.u(h(){k.2y($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1h)}m{c(0)}}},17:h(){l 6=b.g(\'6\'),8=b.g(\'8\');a(!6.H){c(8.v[8.j].17)}m{l 2c=[];1C(l i=0;i<8.j.A;i++){2c.1t(8.v[8.j[i]].17)}c(2c)}},1u:h(7){a(7!=o){c b.u(h(){k.2t($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1u)}m{c(0)}}},1w:h(7){a(7!=o){c b.u(h(){k.2D($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1w)}m{c(0)}}},1o:h(7){a(7!=o){c b.u(h(){k.2G($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1o)}m{c(\'\')}}},7:h(7){a(7!=o){c b.u(h(){k.1s($(b),7)})}m{l 8=b.g(\'8\'),6=b.g(\'6\');a(8&&8.j!=o&&!6.H&&8.j>-1&&8.j<8.v.A){c(8.v[8.j].1i)}m a(8&&8.j!=o&&6.H){l 1Q=[];1C(l i=0;i<8.j.A;i++){a(8.j[i]>-1&&8.j[i]<8.v.A)1Q.1t(8.v[8.j[i]].1i)}c(1Q)}m{c(o)}}},1G:h(7){a(7!=o){c b.u(h(){k.34($(b),7)})}m{l 8=b.g(\'8\');c(8.1G)}},R:h(7){a(7&&$.2b(7)){c b.u(h(){k.2M($(b),7)})}m{k.R(b)}},1n:h(7){a(7&&$.2b(7)){c b.u(h(){k.2H($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1n)}m{c(o)}}},1k:h(7){a(7&&$.2b(7)){c b.u(h(){k.2R($(b),7)})}m{l 6=b.g(\'6\');a(6){c(6.1k)}m{c(o)}}},3z:h(){l 8=b.g(\'8\');a(8){c(8.v.A)}m{c(o)}},8:h(7){l 8=b.g(\'8\'),6=b.g(\'6\');a(8&&7==\':2J\'&&8.v.A>0){c(8.v[0])}m a(8&&8.j!=o&&(7==\':U\'||7==o)&&8.v.A>0){a(!6.H&&8.j>-1&&8.j<8.v.A){c(8.v[8.j])}m a(6.H){l 1Q=[];1C(l i=0;i<8.j.A;i++){a(8.j[i]>-1&&8.j<8.v.A)1Q.1t(8.v[8.j[i]])}c(1Q)}c(o)}m a(8&&7>-1){l j=k.1O(b,7);a(j>-1){c(8.v[j])}c(o)}m{c(o)}},};l k={2f:h(9,7){l 8=9.g(\'8\'),6=9.g(\'6\');a(!$.3y(7))c(w);8.G=w;k.2l(9,(7.X!=o)?7.X:6.X);k.2q(9,(7.1a!=o)?7.1a:6.1a);k.2i(9,(7.14!=o)?7.14:6.14);k.2j(9,(7.1c!=o)?7.1c:6.1c);k.2n(9,(7.1b!=o)?7.1b:6.1b);k.2h(9,(7.Y!=o)?7.Y:6.Y);k.2P(9,(7.18!=o)?7.18:6.18);k.2e(9,(7.1f!=o)?7.1f:6.1f);k.2g(9,(7.1g!=o)?7.1g:6.1g);k.2y(9,(7.1h!=o)?7.1h:6.1h);k.2t(9,(7.1u!=o)?7.1u:6.1u);k.2D(9,(7.1w!=o)?7.1w:6.1w);k.2G(9,(7.1o!=o)?7.1o:6.1o);k.2H(9,(7.1n!=o)?7.1n:6.1n);k.2R(9,(7.1k!=o)?7.1k:6.1k);k.2M(9,(7.R!=o)?7.R:6.R);k.31(9,(7.H!=o)?7.H:6.H);a(6.X)k.R(9);8.G=L},34:h(9,7){l f=9.g(\'f\'),8=9.g(\'8\');a(8.1G!=7){8.1G=7;a(8.1G){f.1L.1m(\'p-1U\')}m{f.1L.13(\'p-1U\')}}c(8.1G)},2l:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\');a((!8.G||6.X!=7)&&(7==L||7==w)){6.X=7}c(6.X)},2q:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\');a((!8.G||6.1a!=7)&&(7==L||7==w)){6.1a=7;a(6.X&&8.G)k.R(9)}c(6.1a)},2j:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.1c!=7)&&7>=0){6.1c=7;a(6.1c>0){f.S.M(\'29-1H\',6.1c+\'1M\')}m{f.S.M(\'29-1H\',\'\')}}c(6.1c)},2n:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.1b!=7)&&7>=0){6.1b=7;a(6.1b>0){f.S.M(\'29-2o\',6.1b+\'1M\')}m{f.S.M(\'29-2o\',\'\')}}c(6.1b)},2i:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.14!=7)&&(7==L||7==w)){6.14=7;a(6.14){9.F(\'.p-r-q-W\').2z()}m{9.F(\'.p-r-q-W\').2A()}}c(6.14)},2h:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.Y!=7)&&7>=0){6.Y=7;f.B.F(\'.p-r-q-s\').u(h(){$(b).M(\'1K-1X\',(6.18+$(b).J(\'I\')*6.Y)+\'1M\')})}c(6.Y)},2e:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\');a(!8.G||6.1f!=7){6.1f=7;a(6.X&&8.G)k.R(9)}c(6.1f)},2g:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\');a((!8.G||6.1g!=7)&&(7==\'1q\'||7==\'32\'||7==\'27\')){6.1g=7;a(6.X&&8.G)k.R(9)}c(6.1g)},2P:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.18!=7)&&7>=0){6.18=7;f.B.F(\'.p-r-q-s\').u(h(){$(b).M(\'1K-1X\',(6.18+$(b).J(\'I\')*6.Y)+\'1M\')})}c(6.18)},31:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.H!=7)&&(7==L||7==w)){a(!7){8.j=-1;a(f.1e!=o){f.1e.2N();f.1e=o}}m{8.j=[];f.S.13(\'p-r-q-H\');a(f.1e==o){f.1e=$(\'<1F/>\',{M:{2B:\'1q\',1K:\'1D\',2Q:\'1D\',2W:"33"},K:\'<1j>&2k;</1j>\'});f.23.K(\'\').1l(f.1e)}}6.H=7}c(6.H)},2y:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\');a((!8.G||6.1h!=7)&&(7==\'3K\'||7==\'27\')){6.1h=7;a(6.X&&8.G)k.R(9)}c(6.1h)},2t:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.1u!=7)&&(7==\'1S\'||7==\'2V\')){6.1u=7;a(7==\'2V\'){f.S.1p(\'24.10\').1p(\'2S.10\').12(\'24.10\',h(){k.1R(9,w)})}m{f.S.1p(\'24.10\').12(\'24.10\',h(){8.2a=w}).12(\'2S.10\',h(){8.2a=L});$(3q).12(\'3A 3U\',h(O){a(!8.2a)k.1R(9,w)})}}c(6.1u)},2D:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a((!8.G||6.1w!=7)&&(7==L||7==w)){6.1w=7}c(6.1h)},2G:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a(!8.G||6.1o!=7){6.1o=7;f.2F.K(6.1o)}c(6.1o)},2K:h(9,7){l 8=9.g(\'8\'),6=9.g(\'6\'),f=9.g(\'f\');a(7==\'\'||7==o){7={W:[\'\',\'\'],v:[]}}m a($.1W(7)){7={W:\'27\',v:7}}m{4g{7=$.4h($.4f(7))}4e(e){c(w)}}8.1V=7.W;k.3a(9);a(7.v.A>0)k.2E(9,7.v,f.B);8.G=w;a(6.H){k.1s(9,\':1q\')}m{k.1s(9,\':2J\')}8.G=L;a(6.R)9.1E(\'2O\')},2s:h(9,7,1d){l f=9.g(\'f\');21=/^(?:(:1J)(?:(=|<|>|\\+)(\\d+))?)|(?:(\\d+)(<|>|\\+))?$/i;t=21.2U(7);a(t!=o){1y(1d){D\'C\':11=k.2w;z;D\'E\':11=k.2v;z}a(t[1]==\':1J\'){f.B.F(\'.p-r-q-1v-s, .p-r-q-1r-s\').u(11)}m a(t[4]!=o){1y(t[5]){D\'+\':f.B.F(\'.p-r-q-1v-s, .p-r-q-1r-s\').u(k.2w);f.B.F(\':30([T=\'+t[4]+\'])\').2m().u(k.2v);f.B.F(\'[T=\'+t[4]+\']\').u(11);z;D\'>\':f.B.F(\'[T=\'+t[4]+\'] + 1F\').F(\'.p-r-q-1v-s, .p-r-q-1r-s\').u(11);f.B.F(\'[T=\'+t[4]+\']\').u(11);z;D\'<\':f.B.F(\':30([T=\'+t[4]+\'])\').2m().u(11);f.B.F(\'[T=\'+t[4]+\']\').u(11);z;2Z:f.B.F(\'[T=\'+t[4]+\']\').u(11);z}}}},2v:h(j,V){k.11(j,V,\'E\')},2w:h(j,V){k.11(j,V,\'C\')},11:h(j,V,1d){1x=\'\';l $V=$(V);a(t.A>2&&t[2]!=o&&t[3]!=o){1y(t[2]){D\'=\':a($V.J(\'I\')==t[3])1x=1d;z;D\'>\':a($V.J(\'I\')>=t[3])1x=1d;z;D\'<\':a($V.J(\'I\')<=t[3])1x=1d;z;D\'+\':a((1d==\'E\'&&$V.J(\'I\')<=t[3])||(1d==\'C\'&&$V.J(\'I\')>=t[3])){1x=1d}m{1x=(1d==\'C\')?\'E\':\'C\'}z}}m 1x=1d;1y(1x){D\'C\':$V.1m(\'p-r-q-1v-s p-r-q-1r-s\').13(\'p-r-q-1v-s\').25().2A();z;D\'E\':$V.1m(\'p-r-q-1v-s p-r-q-1r-s\').13(\'p-r-q-1r-s\').25().2z();z}},1s:h(9,7,1E){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\'),j=-1;21=/^(:2Y|:1J|:1q)(?:(=|<|>)(\\d+))$/i;t=21.2U(7);a(t!=o)7=t[1];1y(7){D\':2J\':a(8.v.A>0)j=0;z;D\':4d\':j=8.v.A-1;z;D\':2Y\':a(!6.H)c(w);8.j=[];f.B.F(\'.p-r-q-s\').u(h(){l $b=$(b),P=L;a(t!=o){1y(t[2]){D\'=\':P=($b.J(\'I\')==t[3]);z;D\'>\':P=($b.J(\'I\')>=t[3]);z;D\'<\':P=($b.J(\'I\')<=t[3]);z}}a(P){a($b.2u(\'p-r-q-U-s\')){$b.1m(\'p-r-q-U-s\')}m{$b.13(\'p-r-q-U-s\');Z=k.1O(9,$b.J(\'T\'));a(Z>-1)8.j.1t(Z)}}});k.1s(9,[],w);c(w);z;D\':1q\':a(!6.H)c(w);8.j=[];f.B.F(\'.p-r-q-U-s\').u(h(){l $b=$(b),P=L;a(t!=o){1y(t[2]){D\'=\':P=($b.J(\'I\')==t[3]);z;D\'>\':P=($b.J(\'I\')>=t[3]);z;D\'<\':P=($b.J(\'I\')<=t[3]);z}}a(P)$b.1m(\'p-r-q-U-s\')});k.1s(9,[],w);c(w);z;D\':1J\':a(!6.H)c(w);8.j=[];f.B.F(\'.p-r-q-s\').u(h(){l $b=$(b),P=L;a(t!=o){1y(t[2]){D\'=\':P=($b.J(\'I\')==t[3]);z;D\'>\':P=($b.J(\'I\')>=t[3]);z;D\'<\':P=($b.J(\'I\')<=t[3]);z}}a(P){Z=k.1O(9,$b.J(\'T\'));a(Z>-1)8.j.1t(Z);$b.13(\'p-r-q-U-s\')}});k.1s(9,[],w);c(w);z;2Z:a($.1W(7)&&6.H){j=[];1C(l i=0;i<7.A;i++){Z=k.1O(9,7[i]);a(Z>-1)j.1t(Z)}}m{j=k.1O(9,7)}z}a(!6.H&&(!8.G||8.j!=j)&&j>-1){f.B.F(\'.p-r-q-U-s\').1m(\'p-r-q-U-s\');f.B.F(\'[T="\'+7+\'"]\').13(\'p-r-q-U-s\');1B=k.1T(9,f.B.F(\'[T="\'+7+\'"] Q.p-r-q-17\')).1N(\'&3b;\',\'&\').1N(\'&3j;\',\'>\').1N(\'&3i;\',\'<\');8.j=j;f.23.K(8.v[8.j].17).J(\'1B\',1B);f.2d.K(8.1V[8.v[8.j].W]);a(1E&&6.1k)9.1E(\'20\',[8.v[8.j].1i]);a(8.j>-1)c(8.v[8.j].1i)}m a(6.H){a(!$.1W(j)){a(j<0||j==o)c(-1);j=[j]}Z=[];1C(l i=0;i<j.A;i++){l s=f.B.F(\'[T="\'+8.v[j[i]].1i+\'"]\');a(s.2u(\'p-r-q-U-s\')){s.1m(\'p-r-q-U-s\');2L=$.3L(j[i],8.j);a(2L>-1)8.j.4i(2L,1)}m{s.13(\'p-r-q-U-s\');8.j.1t(j[i])}Z.1t(8.v[j[i]].1i)}f.1e.K(\'\');f.B.F(\'.p-r-q-U-s Q.p-r-q-17\').u(h(){l 26=\'\';1B=k.1T(9,$(b)).1N(\'&3b;\',\'&\').1N(\'&3j;\',\'>\').1N(\'&3i;\',\'<\');a(!6.1w){26=$(b).K()}m{26=1B}f.1e.1l($(\'<1j/>\',{K:26,1B:1B,\'19\':\'p-r-q-U-4k\'}).3f($(\'<4m/>\',{K:\'x\'}).12(\'1S.10\',{9:9,7:$(b).1z().1z().J(\'4n\')},h(O){O.4o();k.1s(O.g.9,O.g.7)})))});a(f.1e.28().A==0)f.1e.1l(\'<1j>&2k;</1j>\');a(1E&&6.1k)9.1E(\'20\',[Z]);c(Z)}c(o)},1T:h(9,s){a(s==o||s.A==0)c(\'\');2p=s.1z().1z().1z().2m().F(\'Q.p-r-q-17\');a(2p.A==0)c(s.K());c(k.1T(9,2p)+\' / \'+s.K())},1R:h(9,7){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');a(8.1A!=7){8.1A=7;a(8.1A&&8.v.A>0){l j=0;f.S.M({1Z:\'3k\',\'4a-1H\':f.S.1z().M(\'1H\')});a($.1W(8.j)){a(8.j.A>0)j=8.j[0]}m a(8.j>-1){j=8.j}f.S.3l(f.S.3l()+f.B.F(\'[T="\'+8.v[j].1i+\'"]\').2C().3g)}m{f.S.M(\'1Z\',\'1q\')}a(6.1n)9.1E(\'2I\',[8.1A])}c(8.1A)},R:h(9){l 6=9.g(\'6\'),f=9.g(\'f\');a(6.1f==\'\')c(w);$.3W({3S:"3R",3N:6.1f,3O:L,g:{3P:6.1h+\'.10.3Q\',1g:6.1g,1a:6.1a?\'y\':\'n\',3X:\'y\'},3Y:h(1Y){k.2K(9,1Y)},1U:h(1Y){f.S.K(\'45 ! \'+1Y)},})},3a:h(9){l f=9.g(\'f\'),6=9.g(\'6\'),8=9.g(\'8\');f.B.28().1p();f.B.K(\'\');a(6.H){8.j=[]}m{8.j=-1}8.v=[]},2E:h(9,N,1z){l 6=9.g(\'6\'),8=9.g(\'8\'),f=9.g(\'f\');l 46=-1;1C(l i=0;i<N.A;i++){8.v.1t({1i:N[i].1i,I:N[i].I,17:N[i].17,W:N[i].W,1P:N[i].1P.A});a(6.14){W="<Q 19=\'p-r-q-W\'>"+8.1V[N[i].W]+"</Q>"}m{W=""}l 2x=(6.18+N[i].I*6.Y),1j=$(\'<1j/>\',{\'19\':\'p-r-q-s\',K:"<Q>"+W+"<Q 19=\'p-r-q-17\'>"+N[i].17+"</Q></Q>",T:N[i].1i,I:N[i].I,M:{\'1K-1X\':2x+\'1M\'}}).12(\'1S.10\',{9:9,3c:2x,3d:N[i].1P.A},h(O){O.3p=O.44-$(O.3o).3h().1X;O.43=O.3Z-$(O.3o).3h().3g;a(O.3p<O.g.3c&&O.g.3d>0){a($(b).2u(\'p-r-q-1v-s\')){$(b).1m(\'p-r-q-1v-s\').13(\'p-r-q-1r-s\').25().2z()}m{$(b).1m(\'p-r-q-1r-s\').13(\'p-r-q-1v-s\').25().2A()}}m{k.1s(O.g.9,$(b).J(\'T\'),L);a(6.H){}m{k.1R(O.g.9,w)}}a(6.H)f.1L.3n()});a(N[i].1P.A>0){1j.13(\'p-r-q-1r-s\').M(\'42-2C\',(6.Y*N[i].I)+\'1M 1D\')}a(6.H){1j.28().3f(\'<Q 19="p-r-q-40"></Q>\')}1z.1l(1j);a(N[i].1P.A>0){l 1F=$(\'<1F/>\',{\'19\':\'p-r-q-4p\',M:{2B:\'1q\',1K:\'1D\',2Q:\'1D\',\'47-48\':(35-N[i].I*2)+\'%\'}});1j.41(1F);k.2E(9,N[i].1P,1F)}}},1O:h(9,7){l 8=9.g(\'8\');1C(l i=0;i<8.v.A;i++){a(8.v[i].1i==7)c(i)}c(-1)},2H:h(9,7){l 6=9.g(\'6\');6.1n=7;9.1p(\'2I\');a(7)9.12(\'2I\',6.1n);c(6.1n)},2R:h(9,7){l 6=9.g(\'6\');6.1k=7;9.1p(\'20\');a(7)9.12(\'20\',6.1k);c(6.1k)},2M:h(9,7){l 6=9.g(\'6\');6.R=7;9.1p(\'2O\');a(7)9.12(\'2O\',6.R);c(6.R)}};$.3M.10=h(1I){a(22[1I]){c 22[1I].P(b,3V.3T.49.4c(2T,1))}m a(4l 1I===\'9\'||!1I){c 22.2X.P(b,2T)}m{$.1U(\'4j \'+1I+\' 4b 3w 3C 3B 3e.10\')}}})(3e);',62,274,'||||||options|value|properties|object|if|this|return|||objects|data|function||index|privateMethods|var|else||null|ui|selector|category|item|target|each|categories|false|||break|length|list||case||find|initialized|multiple|level|attr|html|true|css|listItems|event|apply|div|load|listContainer|catId|selected|domElt|status|autoLoad|levelIndent|tmp|categorySelector|applyExpandCollapse|bind|addClass|displayStatus|||name|iconWidthEC|class|galleryRoot|listMaxHeight|listMaxWidth|mode|containerList|serverUrl|filter|userMode|id|li|change|append|removeClass|popup|downArrow|unbind|none|collapsable|setValue|push|popupMode|expandable|displayPath|action|switch|parent|selectorVisible|title|for|0px|trigger|ul|isValid|width|method|all|padding|container|px|replace|findIndexByValue|childs|returned|displaySelector|click|getParentName|error|labelStatus|isArray|left|msg|display|categorySelectorChange|re|publicMethods|containerName|mouseleave|next|path|public|children|max|mouseOver|isFunction|listNames|containerStatus|setServerUrl|setOptions|setFilter|setLevelIndent|setDisplayStatus|setListMaxWidth|nbsp|setAutoLoad|prev|setListMaxHeight|height|foundItem|setGalleryRoot|arrow|setExpandCollapse|setPopupMode|hasClass|applyExpand|applyCollapse|spaceWidth|setUserMode|show|hide|listStyle|position|setDisplayPath|listAddItems|containerArrow|setDownArrow|setEventPopup|categorySelectorPopup|first|setItems|tmpIndex|setEventLoad|remove|categorySelectorLoad|setIconWidthEC|margin|setEventChange|mouseenter|arguments|exec|mouseout|overflow|init|invert|default|has|setMultiple|accessible|auto|setIsValid|100|opt|right|float|active|listClear|amp|expandArea|nbchilds|jQuery|prepend|top|offset|lt|gt|block|scrollTop|dArr|focus|currentTarget|layerX|document|GrumPluginClasses|plugins|gpc_ajax|php|tabindex|not|pointer|isPlainObject|numberOfCategories|focusout|on|exist|expand|collapse|mousedown|cursor|mouseup|absolute|destroy|admin|inArray|fn|url|async|ajaxfct|getList|POST|type|prototype|focusin|Array|ajax|tree|success|pageY|check|after|background|layerY|pageX|Error|previousLevel|font|size|slice|min|does|call|last|catch|trim|try|parseJSON|splice|Method|cat|typeof|span|catid|stopPropagation|group'.split('|'),0,{}))
  • extensions/GrumPluginClasses/js/ui.iconSelector.js

    r7175 r8961  
    148148                    container:$('<div/>',
    149149                        {
    150                           'class':' ui-icon-selector ',
     150                          'class':' ui-icon-selector '
    151151                        }
    152152                    ).bind('click.iconSelector',
  • extensions/GrumPluginClasses/js/ui.tagSelector.js

    r7370 r8961  
    2222 *
    2323 * | release | date       |
    24  * | 1.0.0   | 2010/10/10 | first release
     24 * | 1.0.0   | 2010/10/10 | * first release
    2525 * |         |            |
     26 * | 1.1.0   | 2010/11/03 | * add 'isValid' method
    2627 * |         |            |
    2728 * |         |            |
     
    9394                    cache:[],
    9495                    timerHandle:null,
     96                    isValid:true
    9597                  }
    9698                );
     
    118120                      {
    119121                        html: '',
    120                         'class':'ui-tag-selector-selected-tag-list',
     122                        'class':'ui-tag-selector-selected-tag-list'
    121123                      }
    122124                    ),
     
    151153                            display:'none',
    152154                            position:'absolute',
    153                             zIndex:9999,
     155                            zIndex:9999
    154156                          }
    155157                        }
     
    166168                          padding:'0px',
    167169                          margin:'0px',
    168                           overflow:"auto",
     170                          overflow:"auto"
    169171                        }
    170172                      }
     
    217219      options: function (value)
    218220        {
    219           this.each(function()
    220             {
    221               var $this=$(this);
    222               privateMethods.setOptions($this, value);
    223               return($this);
     221          return this.each(function()
     222            {
     223              privateMethods.setOptions($(this), value);
    224224            }
    225225          );
     
    229229      ignoreCase: function (value)
    230230        {
    231           if(value)
    232           {
    233             this.each(function()
    234               {
    235                 var $this=$(this);
    236                 privateMethods.setIgnoreCase($this, value);
    237                 return($this);
     231          if(value!=null)
     232          {
     233            return this.each(function()
     234              {
     235                privateMethods.setIgnoreCase($(this), value);
    238236              }
    239237            );
     
    256254      inputNumCar: function (value)
    257255        {
    258           if(value)
    259           {
    260             this.each(function()
    261               {
    262                 var $this=$(this);
    263                 privateMethods.setInputNumCar($this, value);
    264                 return($this);
     256          if(value!=null)
     257          {
     258            return this.each(function()
     259              {
     260                privateMethods.setInputNumCar($(this), value);
    265261              }
    266262            );
     
    311307      maximumTagLoaded: function (value)
    312308        {
    313           if(value)
    314           {
    315             this.each(function()
    316               {
    317                 var $this=$(this);
    318                 privateMethods.setMaximumTagLoaded($this, value);
    319                 return($this);
     309          if(value!=null)
     310          {
     311            return this.each(function()
     312              {
     313                privateMethods.setMaximumTagLoaded($(this), value);
    320314              }
    321315            );
     
    338332      listMaxWidth: function (value)
    339333        {
    340           if(value)
    341           {
    342             this.each(function()
    343               {
    344                 var $this=$(this);
    345                 privateMethods.setListMaxWidth($this, value);
    346                 return($this);
     334          if(value!=null)
     335          {
     336            return this.each(function()
     337              {
     338                privateMethods.setListMaxWidth($(this), value);
    347339              }
    348340            );
     
    365357      listMaxHeight: function (value)
    366358        {
    367           if(value)
    368           {
    369             this.each(function()
    370               {
    371                 var $this=$(this);
    372                 privateMethods.setListMaxHeight($this, value);
    373                 return($this);
     359          if(value!=null)
     360          {
     361            return this.each(function()
     362              {
     363                privateMethods.setListMaxHeight($(this), value);
    374364              }
    375365            );
     
    393383      serverCallDelay: function (value)
    394384        {
    395           if(value)
    396           {
    397             this.each(function()
    398               {
    399                 var $this=$(this);
    400                 privateMethods.setServerCallDelay($this, value);
    401                 return($this);
     385          if(value!=null)
     386          {
     387            return this.each(function()
     388              {
     389                privateMethods.setServerCallDelay($(this), value);
    402390              }
    403391            );
     
    421409      serverUrl: function (value)
    422410        {
    423           if(value)
    424           {
    425             this.each(function()
    426               {
    427                 var $this=$(this);
    428                 privateMethods.setServerUrl($this, value);
    429                 return($this);
     411          if(value!=null)
     412          {
     413            return this.each(function()
     414              {
     415                privateMethods.setServerUrl($(this), value);
    430416              }
    431417            );
     
    448434      textStart: function (value)
    449435        {
    450           if(value)
    451           {
    452             this.each(function()
    453               {
    454                 var $this=$(this);
    455                 privateMethods.setTextStart($this, value);
    456                 return($this);
     436          if(value!=null)
     437          {
     438            return this.each(function()
     439              {
     440                privateMethods.setTextStart($(this), value);
    457441              }
    458442            );
     
    475459      textFound: function (value)
    476460        {
    477           if(value)
    478           {
    479             this.each(function()
    480               {
    481                 var $this=$(this);
    482                 privateMethods.setTextFound($this, value);
    483                 return($this);
     461          if(value!=null)
     462          {
     463            return this.each(function()
     464              {
     465                privateMethods.setTextFound($(this), value);
    484466              }
    485467            );
     
    502484      textDisplay: function (value)
    503485        {
    504           if(value)
    505           {
    506             this.each(function()
    507               {
    508                 var $this=$(this);
    509                 privateMethods.setTextDisplay($this, value);
    510                 return($this);
     486          if(value!=null)
     487          {
     488            return this.each(function()
     489              {
     490                privateMethods.setTextDisplay($(this), value);
    511491              }
    512492            );
     
    529509      filter: function (value)
    530510        {
    531           if(value)
    532           {
    533             this.each(function()
    534               {
    535                 var $this=$(this);
    536                 privateMethods.setFilter($this, value);
    537                 return($this);
     511          if(value!=null)
     512          {
     513            return this.each(function()
     514              {
     515                privateMethods.setFilter($(this), value);
    538516              }
    539517            );
     
    556534      mode: function (value)
    557535        {
    558           if(value)
    559           {
    560             this.each(function()
    561               {
    562                 var $this=$(this);
    563                 privateMethods.setMode($this, value);
    564                 return($this);
     536          if(value!=null)
     537          {
     538            return this.each(function()
     539              {
     540                privateMethods.setMode($(this), value);
    565541              }
    566542            );
     
    583559      value: function (value)
    584560        {
    585           if(value)
     561          if(value!=null)
    586562          {
    587563            // set selected value
     
    596572            // return the selected tags
    597573            var properties=this.data('properties');
     574
    598575            return(properties.tags);
    599576          }
    600577        }, // value
     578
     579      isValid: function (value)
     580        {
     581          if(value!=null)
     582          {
     583            // set selected value
     584            return this.each(function()
     585              {
     586                privateMethods.setIsValid($(this), value);
     587              }
     588            );
     589          }
     590          else
     591          {
     592            // return the selected tags
     593            var properties=this.data('properties');
     594
     595            return(properties.isValid);
     596          }
     597        }, // isValid
    601598
    602599      load: function (value)
     
    610607          {
    611608            // set selected value
    612             this.each(function()
    613               {
    614                 var $this=$(this);
    615                 privateMethods.setEventLoad($this, value);
    616                 return($this);
     609            return this.each(function()
     610              {
     611                privateMethods.setEventLoad($(this), value);
    617612              }
    618613            );
     
    630625          {
    631626            // set selected value
    632             this.each(function()
    633               {
    634                 var $this=$(this);
    635                 privateMethods.setEventPopup($this, value);
    636                 return($this);
     627            return this.each(function()
     628              {
     629                privateMethods.setEventPopup($(this), value);
    637630              }
    638631            );
     
    658651          {
    659652            // set selected value
    660             this.each(function()
    661               {
    662                 var $this=$(this);
    663                 privateMethods.setEventAdd($this, value);
    664                 return($this);
     653            return this.each(function()
     654              {
     655                privateMethods.setEventAdd($(this), value);
    665656              }
    666657            );
     
    686677          {
    687678            // set selected value
    688             this.each(function()
    689               {
    690                 var $this=$(this);
    691                 privateMethods.setEventRemove($this, value);
    692                 return($this);
     679            return this.each(function()
     680              {
     681                privateMethods.setEventRemove($(this), value);
    693682              }
    694683            );
     
    764753        },
    765754
     755      setIsValid : function (object, value)
     756        {
     757          var objects=object.data('objects'),
     758              properties=object.data('properties');
     759
     760          if(properties.isValid!=value)
     761          {
     762            properties.isValid=value;
     763            if(properties.isValid)
     764            {
     765              objects.container.removeClass('ui-error');
     766              objects.input.removeClass('ui-error');
     767            }
     768            else
     769            {
     770              objects.container.addClass('ui-error');
     771              objects.input.addClass('ui-error');
     772            }
     773          }
     774          return(properties.isValid);
     775        },
     776
    766777      setIgnoreCase : function (object, value)
    767778        {
    768779          var options=object.data('options'),
    769780              properties=object.data('properties');
     781
    770782          if((!properties.initialized || options.ignoreCase!=value) && (value==true || value==false))
    771783          {
     
    780792              objects=object.data('objects'),
    781793              properties=object.data('properties');
     794
    782795          if((!properties.initialized || options.inputNumCar!=value) && value>0)
    783796          {
     
    805818          var options=object.data('options'),
    806819              properties=object.data('properties');
     820
    807821          if((!properties.initialized || options.setMaximumTagLoaded!=value) && value>=0)
    808822          {
     
    817831          var options=object.data('options'),
    818832              properties=object.data('properties');
     833
    819834          if(!properties.initialized || options.textStart!=value)
    820835          {
     
    828843          var options=object.data('options'),
    829844              properties=object.data('properties');
     845
    830846          if(!properties.initialized || options.textFound!=value)
    831847          {
     
    839855          var options=object.data('options'),
    840856              properties=object.data('properties');
     857
    841858          if(!properties.initialized || options.textDisplay!=value)
    842859          {
     
    851868              properties=object.data('properties'),
    852869              objects=object.data('objects');
     870
    853871          if((!properties.initialized || options.listMaxWidth!=value) && value>=0)
    854872          {
     
    871889              properties=object.data('properties'),
    872890              objects=object.data('objects');
     891
    873892          if((!properties.initialized || options.listMaxHeight!=value) && value>=0)
    874893          {
     
    890909          var options=object.data('options'),
    891910              properties=object.data('properties');
     911
    892912          if((!properties.initialized || options.serverCallDelay!=value) && value>0 )
    893913          {
     
    901921          var options=object.data('options'),
    902922              properties=object.data('properties');
     923
    903924          if(!properties.initialized || options.serverUrl!=value)
    904925          {
     
    914935          var options=object.data('options'),
    915936              properties=object.data('properties');
     937
    916938          if((!properties.initialized || options.mode!=value) && (value=='admin' || value=='public'))
    917939          {
     
    925947          var options=object.data('options'),
    926948              properties=object.data('properties');
     949
    927950          if((!properties.initialized || options.filter!=value) && (value=='all' || value=='affected'))
    928951          {
     
    935958      setValue : function (object, value)
    936959        {
    937           var options=object.data('options'),
    938               properties=object.data('properties'),
     960          var properties=object.data('properties'),
    939961              objects=object.data('objects');
    940962
     
    10711093                {
    10721094                  objects.selectorList.html('Error ! '+msg);
    1073                 },
     1095                }
    10741096            }
    10751097         );
     
    10801102          // clear the cache tag list
    10811103          var objects=object.data('objects'),
    1082               options=object.data('options'),
    10831104              properties=object.data('properties');
    10841105
     
    10861107          properties.cache=[];
    10871108        },
     1109
    10881110      cacheAddItems : function (object, listItems)
    10891111        {
     
    10981120              {
    10991121                id:listItems[i].id,
    1100                 name:listItems[i].name,
     1122                name:listItems[i].name
    11011123              }
    11021124            );
     
    12131235        {
    12141236          var options=object.data('options');
     1237
    12151238          options.popup=value;
    12161239          object.unbind('tagSelectorPopup');
     
    12181241          return(options.popup);
    12191242        },
     1243
    12201244      setEventAdd : function (object, value)
    12211245        {
    12221246          var options=object.data('options');
     1247
    12231248          options.add=value;
    12241249          object.unbind('tagSelectorAdd');
     
    12261251          return(options.add);
    12271252        },
     1253
    12281254      setEventRemove : function (object, value)
    12291255        {
    12301256          var options=object.data('options');
     1257
    12311258          options.remove=value;
    12321259          object.unbind('tagSelectorRemove');
     
    12341261          return(options.remove);
    12351262        },
     1263
    12361264      setEventLoad : function (object, value)
    12371265        {
     
    12531281          }
    12541282        },
     1283
    12551284      setTimerHandle : function(object)
    12561285        {
  • extensions/GrumPluginClasses/main.inc.php

    r8809 r8961  
    22/*
    33Plugin Name: Grum Plugins Classes.3
    4 Version: 3.3.4
     4Version: 3.4.0
    55Description: Collection de classes partagées entre mes plugins (existants, ou à venir) / Partaged classes between my plugins (actuals or futures)
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=199
     
    104104|         |            |   . optimization for RBuilder loading language management
    105105|         |            |
    106 | 3.3.4   | 2011/01/20 | * Add languages
    107 |         |            |
     106| 3.4.0   | 2011/01/28 | * mantis bug:1984
     107|         |            |   . RBuilder returns an error message when one picture
     108|         |            |     have multiple categories
     109|         |            |
     110|         |            | * fix bug:2109
     111|         |            |   . Incompatibility with IE8 (rbuilder)
     112|         |            |
     113|         |            | * Fix bug on simpleTip.js (script release 1.0.1)
     114|         |            |
     115|         |            | * GPCCore, GPCTranslate, GPCUsersGroups classes updated
     116|         |            |
     117|         |            | * add jQuery plugin pack & associated css files
     118|         |            |   . inputText
     119|         |            |   . inputList
     120|         |            |   . inputRadio
     121|         |            |   . inputCheckbox
     122|         |            |   . inputColorPicker
     123|         |            |   . inputColorsFB
     124|         |            |   . inputConsole
     125|         |            |   . inputDotArea
     126|         |            |   . inputNum
     127|         |            |   . inputPosition
     128|         |            |   . inputStatusBar
     129|         |            |
     130|         |            | * update categorySelector jQuery plugin
     131|         |            |
     132|         |            | * minify js scripts (larger size than packed files but
     133|         |            |   better performance)
    108134|         |            |
    109135|         |            |
     
    137163    GPCUsersGroups.class.inc.php
    138164
    139     genericjs.class.inc.php  + genericjs.js
    140165
    141166See each file to know more about them
  • extensions/GrumPluginClasses/templates/GPCRequestBuilder_search.tpl

    r7370 r8961  
    1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
    2 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
    3 {known_script id="gpc.pagesNavigator" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/pagesNavigator.packed.js"}
    4 {known_script id="gpc.rbSearch" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/rbSearch.packed.js"}
    51
    62{foreach from=$datas.dialogBox item=dialogBox}
Note: See TracChangeset for help on using the changeset viewer.