Changeset 8961
- Timestamp:
- Jan 28, 2011, 4:54:02 PM (13 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 63 added
- 5 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/CommonPlugin.class.inc.php
r7310 r8961 8 8 ------------------------------------------------------------------------------ 9 9 Author : Grum 10 email : grum@ grum.dnsalias.com11 website : http://photos.grum. dnsalias.com10 email : grum@piwigo.org 11 website : http://photos.grum.fr 12 12 PWG user : http://forum.phpwebgallery.net/profile.php?id=3706 13 13 -
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r7387 r8961 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCCore 5 class version : 1.3. 16 plugin version : 3. 3.27 date : 201 0-10-205 class version : 1.3.2 6 plugin version : 3.4.0 7 date : 2011-01-28 8 8 ------------------------------------------------------------------------------ 9 9 author: grum at piwigo.org … … 28 28 | | | extended description function if present 29 29 | | | 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 | | | 33 38 | | | 34 39 | | | … … 47 52 - static function addHeaderCSS 48 53 - static function addHeaderJS 54 - static function addUI 55 - static function getMinified 56 - static function setMinifiedState 49 57 - static function getUserLanguageDesc 50 58 - static function getPiwigoSystemPath … … 58 66 { 59 67 static private $piwigoSystemPath; 68 static private $minified='.min'; 60 69 61 70 static public $pluginName = "GPCCore"; … … 79 88 Array('name' => "CommonPlugin", 'version' => "2.2.0"), 80 89 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"), 82 92 Array('name' => "GPCCss", 'version' => "3.0.0"), 83 Array('name' => "GPCPagesNavigation s", 'version' => "2.0.0"),93 Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"), 84 94 Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"), 85 Array('name' => "GPCRequestBuilder", 'version' => "1.1. 0"),95 Array('name' => "GPCRequestBuilder", 'version' => "1.1.2"), 86 96 Array('name' => "GPCTables", 'version' => "1.5.0"), 87 97 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") 90 100 ) 91 101 ); … … 365 375 { 366 376 global $template; 377 $dummy1=null; 378 $dummy2=null; 367 379 368 380 foreach(self::$headerItems['css'] as $file) … … 373 385 foreach(self::$headerItems['js'] as $file) 374 386 { 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 378 540 379 541 /** -
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r7451 r8961 2 2 /* ----------------------------------------------------------------------------- 3 3 class name: GCPRequestBuilder 4 class version : 1.1. 15 plugin version : 3.3. 24 class version : 1.1.2 5 plugin version : 3.3.3 6 6 date : 2010-09-08 7 7 … … 75 75 | | | * fix bug on user level access to picture 76 76 | | | 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 79 80 | | | 80 81 | | | … … 522 523 GPCCore::addHeaderJS('gpc.interface', 'plugins/'.$baseName.'external/interface/interface.js'); 523 524 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'); 525 526 526 527 $template->append('head_elements', … … 829 830 'SELECT' => Array( 830 831 '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( DISTINCTpic.category_id SEPARATOR ',') AS imageCategoriesId", // from the piwigo's image_category table832 'RB_PCT' => "GROUP_CONCAT( DISTINCTCASE WHEN pct.name IS NULL THEN '' ELSE pct.name END SEPARATOR '#sep#') AS imageCategoriesNames,833 GROUP_CONCAT( DISTINCTCASE WHEN pct.permalink IS NULL THEN '' ELSE pct.permalink END SEPARATOR '#sep#') AS imageCategoriesPLink,834 GROUP_CONCAT( DISTINCTCASE WHEN pct.dir IS NULL THEN 'V' ELSE 'P' END) AS imageCategoriesDir", //from the piwigo's categories table832 '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 835 836 ), 836 837 'FROM' => Array( … … 1374 1375 $filter=array_flip($filter); 1375 1376 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 1376 1383 $template->set_filename('gpc_search_page', 1377 1384 dirname(dirname(__FILE__)).'/templates/GPCRequestBuilder_search.tpl'); -
extensions/GrumPluginClasses/classes/GPCTranslate.class.inc.php
r5550 r8961 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCTranslate 5 class version : 2.1. 06 plugin version : 3. 0.07 date : 201 0-03-315 class version : 2.1.1 6 plugin version : 3.4.0 7 date : 2011-01-28 8 8 ------------------------------------------------------------------------------ 9 9 author: grum at piwigo.org 10 10 << May the Little SpaceFrog be with you >> 11 11 ------------------------------------------------------------------------------ 12 13 12 14 13 ------------------------------------------------------------------------------ … … 19 18 | 2.1.0 | 2010/03/31 | * update class & functions names 20 19 | | | 20 | 2.1.1 | 2011/01/09 | * fixbug on js loading 21 21 | | | 22 | | | 22 | | | * use GPCCore::addUI function (the class is kept for 23 | | | compatibility with older plugins) 23 24 | | | 24 25 | | | 25 26 26 27 ------------------------------------------------------------------------------ 27 28 29 28 class call API in HTML header, and provide a .js file manage API call 30 29 >> http://code.google.com/apis/ajaxlanguage/ 31 30 32 31 - constructor 33 34 32 ---------------------------------------------------------------------- */ 35 33 class GPCTranslate … … 37 35 public function __construct() 38 36 { 39 add_event_handler('loc_end_page_header', array(&$this, 'loadJS'));37 GPCCore::addUI('googleTranslate'); 40 38 } 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 53 39 } //class 54 40 -
extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php
r5550 r8961 3 3 /* ----------------------------------------------------------------------------- 4 4 class name: GPCAllowedAccess, GPCGroups, GPCUsers 5 class version : 2. 0.06 plugin version : 3. 0.05 class version : 2.1.0 6 plugin version : 3.4.0 7 7 date : 2010-03-30 8 8 ------------------------------------------------------------------------------ … … 14 14 groups and users classes extends GPCAllowedAccess classes 15 15 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') 19 19 - (public) function getList() 20 20 - (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() 23 23 - (public) function isAllowed($id) 24 - (public) function htmlView($sep=", ", $empty="")25 - (public) function htmlForm($basename)26 24 - (private) function initList() 27 25 … … 34 32 | | | * update classes & functions names 35 33 | | | 34 | 2.1.0 | 2011/01/15 | * remove html function 35 | | | 36 | | | * implement accessMode 37 | | | 36 38 | | | 37 39 … … 39 41 class GPCAllowedAccess 40 42 { 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') 47 57 { 48 58 $this->initList(); 49 $this->setAlloweds($alloweds );59 $this->setAlloweds($alloweds, $accessMode=='n'); 50 60 } 51 61 52 62 public function __destruct() 53 63 { 54 unset($this->access _list);55 } 56 57 /* 58 initializethe groups list59 */64 unset($this->accessList); 65 } 66 67 /** 68 * destroy the groups list 69 */ 60 70 protected function initList() 61 71 { 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 */ 68 84 function getList() 69 85 { 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 */ 76 95 function setAllowed($id, $allowed) 77 96 { 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])) 106 121 { 107 $this->access _list[$key]['allowed']=true;122 $this->accessList[$key]['allowed']=$allowed; 108 123 } 109 124 else 110 125 { 111 $this->access _list[$key]['allowed']=false;126 $this->accessList[$key]['allowed']=!$allowed; 112 127 } 113 128 } 114 129 } 115 130 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; 127 144 } 128 145 return($returned); … … 130 147 131 148 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 */ 135 155 function isAllowed($id) 136 156 { 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 } 139 161 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}/> {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 '.$val['name'].'</label> '; 225 } 226 return($text); 227 } 162 { 163 return($this->accessMode=='a'); 164 } 165 } 166 228 167 } //GPCAllowedAccess 229 168 … … 235 174 236 175 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 */ 241 182 class GPCGroups extends GPCAllowedAccess 242 183 { 243 /* 244 initialize the groups list245 */184 /** 185 * initialize the groups list 186 */ 246 187 protected function initList() 247 188 { 248 $this->access _list=array();189 $this->accessList=array(); 249 190 $sql="SELECT id, name FROM ".GROUPS_TABLE." ORDER BY name"; 250 191 $result=pwg_query($sql); … … 253 194 while($row=pwg_db_fetch_assoc($result)) 254 195 { 255 $this->access _list[$row['id']] =256 array('id' => $row['id'],257 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 ); 260 201 } 261 202 } … … 270 211 271 212 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 */ 275 219 class GPCUsers extends GPCAllowedAccess 276 220 { 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 */ 290 224 protected function initList() 291 225 { 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 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 ); 301 235 } 302 236 } -
extensions/GrumPluginClasses/classes/genericjs.class.inc.php
r5958 r8961 1 1 <?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 */ 41 7 ?> -
extensions/GrumPluginClasses/css/categorySelector_clear.css
r7349 r8961 2 2 .ui-category-selector { 3 3 cursor:default; 4 padding:2px; 4 min-height:17px; 5 padding:0; 6 } 7 div.ui-category-selector:focus { 8 outline:none; 5 9 } 6 10 … … 10 14 float:right; 11 15 font-size:8px; 16 max-height:8px; 12 17 } 13 18 … … 17 22 font-size:14px; 18 23 font-family:sans-serif; 24 z-index:9999; 19 25 } 20 26 … … 23 29 } 24 30 25 li.ui-category-selector-item div { 26 margin:2px; 31 div.ui-category-selector-multiple div.ui-category-selector-check, 32 div.ui-category-selector-multiple div.ui-category-selector-name { 33 display:inline-block; 27 34 } 28 29 35 .ui-category-selector-expandable-item, 30 36 .ui-category-selector-collapsable-item { … … 33 39 34 40 .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; 40 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; 83 } 84 85 41 86 42 87 /* clear css */ … … 77 122 background-image:url(./../icons/check_checked_clear.png); 78 123 } 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 2 2 .ui-category-selector { 3 3 cursor:default; 4 padding:2px; 4 min-height:17px; 5 padding:0; 6 } 7 div.ui-category-selector:focus { 8 outline:none; 5 9 } 6 10 … … 10 14 float:right; 11 15 font-size:8px; 16 max-height:8px; 12 17 } 13 18 … … 17 22 font-size:14px; 18 23 font-family:sans-serif; 24 z-index:9999; 19 25 } 20 26 … … 23 29 } 24 30 25 li.ui-category-selector-item div { 26 margin:2px; 31 div.ui-category-selector-multiple div.ui-category-selector-check, 32 div.ui-category-selector-multiple div.ui-category-selector-name { 33 display:inline-block; 27 34 } 28 29 35 .ui-category-selector-expandable-item, 30 36 .ui-category-selector-collapsable-item { … … 33 39 34 40 .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; 40 83 } 41 84 42 85 /* roma css */ 43 44 .ui-category-selector-arrow {45 color:#FF3363;46 }47 86 48 87 .ui-category-selector, … … 75 114 background-image:url(./../icons/check_checked_roma.png); 76 115 } 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 59 59 background:#666666; 60 60 } 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 15 15 if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 16 16 17 if(!defined('GPC_VERSION')) define('GPC_VERSION', '3. 3.4');18 if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.0 3.04');17 if(!defined('GPC_VERSION')) define('GPC_VERSION', '3.4.0'); 18 if(!defined('GPC_VERSION2')) define('GPC_VERSION2', '03.04.00'); 19 19 ?> -
extensions/GrumPluginClasses/js/google_translate.js
r5550 r8961 1 1 /* ----------------------------------------------------------------------------- 2 2 file: google_translate.js 3 file version: 2. 0.04 date: 20 08-05-253 file version: 2.1.0 4 date: 2011-01-09 5 5 ------------------------------------------------------------------------------ 6 6 author: grum at piwigo.org … … 12 12 HISTORY VERSION 13 13 v2.0.0 + 14 v2.1.0 + add googleTranslate function with callback parameter 14 15 --------------------------------------------------------------------------- */ 15 16 … … 17 18 18 19 var global_google_translate_plugin_objdest; 20 var global_google_translate_plugin_callback; 19 21 var global_google_translate_plugin_objproperty; 20 22 … … 40 42 } 41 43 } 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 2 2 * ----------------------------------------------------------------------------- 3 3 * file: criteriaBuilder.js 4 * file version: 1.1. 05 * date: 2010- 10-214 * file version: 1.1.1 5 * date: 2010-01-13 6 6 * 7 7 * JS file provided by the piwigo's plugin "GrumPluginClasses" … … 58 58 * | | | request 59 59 * | | | 60 * | | |61 * | | | 60 * | 1.1.1 | 2011/01/13 | * fix bug:2109 61 * | | | . Incompatibility with IE8 62 62 * | | | 63 63 * | | | … … 354 354 var serializeData=function(prefix, value) 355 355 { 356 returned='';356 var returned=''; 357 357 if(typeof value =='object') 358 358 { … … 363 363 returned+=serializeData(prefix+'['+key+']', value[key]); 364 364 } 365 else 365 else if(typeof value[key] =='string' || typeof value[key] =='number' || typeof value[key] =='boolean') 366 366 { 367 367 returned+='&'+prefix+'['+key+']='+value[key]; … … 369 369 } 370 370 } 371 else 371 else if(typeof value =='string' || typeof value =='number' || typeof value =='boolean') 372 372 { 373 373 returned+='&'+prefix+'='+value; -
extensions/GrumPluginClasses/js/simpleTip.js
r7175 r8961 2 2 * ----------------------------------------------------------------------------- 3 3 * file: simpleTip.js 4 * file version: 1.0. 05 * date: 2010- 07-104 * file version: 1.0.1 5 * date: 2010-12-23 6 6 * 7 7 * JS file provided by the piwigo's plugin "GrumPluginClasses" … … 30 30 * 31 31 * | release | date | 32 * | 1.0.0 | 2010 /07/10 | start to coding32 * | 1.0.0 | 2010-07-10 | start to coding 33 33 * | | | 34 * | | |34 * | 1.0.1 | 2010-12-23 | fix minor bugs 35 35 * | | | 36 36 * | | | … … 70 70 offsetY:0, 71 71 classes:'', 72 arrowImgDir: ' ./plugins/GrumPluginClasses/icons/',72 arrowImgDir: '', 73 73 arrowWidth: 12, 74 arrowHeight: 12 ,74 arrowHeight: 12 75 75 }, 76 76 options … … 84 84 itemIndexInc = 0, 85 85 options={ 86 name:'' ,86 name:'' 87 87 }; 88 88 … … 150 150 { 151 151 title: '', 152 simpleTip: tip.index ,152 simpleTip: tip.index 153 153 } 154 154 ) … … 253 253 left: '-1500px', 254 254 top: '-1500px', 255 display: 'block' ,255 display: 'block' 256 256 } 257 257 ); … … 306 306 307 307 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(); 312 312 bwX=(stWidth-stWidthI)/2; 313 313 bwY=(stHeight-stHeightI)/2; … … 321 321 y+=items[itemIndex].options.offsetY; 322 322 arrowX=-bwX; 323 arrowY=- 10-bwY;323 arrowY=-items[itemIndex].options.arrowHeight+bwY; 324 324 arrowModel='up'; 325 325 break; … … 328 328 x-=stWidth/2; 329 329 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; 332 332 arrowModel='up'; 333 333 break; … … 336 336 x-=stWidth+items[itemIndex].options.offsetX; 337 337 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; 340 340 arrowModel='up'; 341 341 break; 342 342 343 343 case 'middle-left': 344 x+=items[itemIndex].options.offsetX; 344 345 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; 347 348 arrowModel='left'; 348 349 break; … … 357 358 y-=stHeight/2; 358 359 arrowX=stWidthI+bwX; 359 arrowY=(stHeightI- 10)/2;360 arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY; 360 361 arrowModel='right'; 361 362 break; 362 363 363 364 case 'bottom-left': 365 x+=items[itemIndex].options.offsetX; 364 366 y-=stHeight+items[itemIndex].options.offsetY; 365 367 arrowX=-bwX; … … 371 373 x-=stWidth/2; 372 374 y-=stHeight+items[itemIndex].options.offsetY; 373 arrowX=(stWidthI- 10)/2;375 arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2+bwX; 374 376 arrowY=stHeightI+bwY; 375 377 arrowModel='down'; … … 379 381 x-=stWidth+items[itemIndex].options.offsetX; 380 382 y-=stHeight+items[itemIndex].options.offsetY; 381 arrowX=stWidthI- 10+bwX;383 arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX; 382 384 arrowY=stHeightI+bwY; 383 385 arrowModel='down'; … … 394 396 marginTop: arrowY+'px', 395 397 width: items[itemIndex].options.arrowWidth+'px', 396 height: items[itemIndex].options.arrowHeight+'px' ,398 height: items[itemIndex].options.arrowHeight+'px' 397 399 } 398 400 ); … … 409 411 left: x+'px', 410 412 top: y+'px', 411 display: 'none' ,413 display: 'none' 412 414 } 413 415 ) -
extensions/GrumPluginClasses/js/ui.categorySelector.js
r7181 r8961 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.categorySelector.js 4 * file version: 1. 0.15 * date: 201 0-10-104 * file version: 1.1.0 5 * date: 2011-01-12 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 28 28 * | | | * add 'name' property 29 29 * | | | 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 * | | | 30 42 * | | | 31 43 * … … 61 73 levelIndent:16, 62 74 iconWidthEC:15, 63 iconWidthCheck:18,64 75 serverUrl:'plugins/GrumPluginClasses/gpc_ajax.php', 65 76 filter:'accessible', … … 68 79 load:null, 69 80 multiple:false, 70 userMode:'public' 81 userMode:'public', 82 popupMode:'click', 83 displayPath:false, 84 downArrow:'⇓' 71 85 }; 72 86 … … 86 100 categories:[], 87 101 labelStatus:['', ''], 102 mouseOver:false, 103 isValid:true 88 104 } 89 105 ); … … 98 114 { 99 115 'class':'ui-category-selector', 116 tabindex:0, 100 117 css:{ 101 118 width:'100%' … … 106 123 { 107 124 privateMethods.displaySelector($this, !$this.data('properties').selectorVisible); 125 $(this).focus(); 108 126 } 109 127 ), … … 111 129 { 112 130 html: ' ', 113 'class':'ui-category-selector-name' ,131 'class':'ui-category-selector-name' 114 132 } 115 133 ), 134 containerList:null, 116 135 containerStatus:$('<div/>', 117 136 { … … 132 151 } 133 152 } 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 } 134 163 ), 135 136 164 listContainer:$('<div/>', 137 165 { … … 144 172 } 145 173 } 146 ).bind('mouseleave.categorySelector', 147 function () 148 { 149 privateMethods.displaySelector($this, false); 150 } 151 ), 174 ), 152 175 list:$('<ul/>', 153 176 { … … 160 183 ) 161 184 }; 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); 170 188 171 189 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 172 199 } 173 200 ); … … 258 285 listMaxWidth: function (value) 259 286 { 260 if(value )287 if(value!=null) 261 288 { 262 289 return this.each(function() … … 283 310 listMaxHeight: function (value) 284 311 { 285 if(value )312 if(value!=null) 286 313 { 287 314 return this.each(function() … … 333 360 levelIndent: function (value) 334 361 { 335 if(value )362 if(value!=null) 336 363 { 337 364 return this.each(function() … … 358 385 serverUrl: function (value) 359 386 { 360 if(value )387 if(value!=null) 361 388 { 362 389 return this.each(function() … … 383 410 filter: function (value) 384 411 { 385 if(value )412 if(value!=null) 386 413 { 387 414 return this.each(function() … … 428 455 iconWidthEC: function (value) 429 456 { 430 if(value )457 if(value!=null) 431 458 { 432 459 return this.each(function() … … 451 478 }, // iconWidthEC 452 479 453 iconWidthCheck: function (value)454 { 455 if(value )480 userMode: function (value) 481 { 482 if(value!=null) 456 483 { 457 484 return this.each(function() 458 485 { 459 privateMethods.set IconWidthCheck($(this), value);486 privateMethods.setUserMode($(this), value); 460 487 } 461 488 ); … … 467 494 if(options) 468 495 { 469 return(options. iconWidthCheck);496 return(options.userMode); 470 497 } 471 498 else … … 474 501 } 475 502 } 476 }, // iconWidthCheck477 478 userMode: function (value)479 {480 if(value)481 {482 return this.each(function()483 {484 privateMethods.setUserMode($(this), value);485 }486 );487 }488 else489 {490 var options = this.data('options');491 492 if(options)493 {494 return(options.userMode);495 }496 else497 {498 return(0);499 }500 }501 503 }, // userMode 502 504 … … 504 506 { 505 507 var options=this.data('options'), 506 properties=this.data('properties'), 507 objects=this.data('objects'); 508 properties=this.data('properties'); 508 509 509 510 if(!options.multiple) … … 522 523 }, // userMode 523 524 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 524 600 value: function (value) 525 601 { 526 if(value )602 if(value!=null) 527 603 { 528 604 // set selected value … … 559 635 } 560 636 }, // 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 561 655 load: function (value) 562 656 { … … 634 728 } 635 729 }, // popup 730 636 731 numberOfCategories: function () 637 732 { … … 647 742 } 648 743 }, // numberOfCategories 744 649 745 properties: function (value) 650 746 { 651 var properties=this.data('properties'); 747 var properties=this.data('properties'), 748 options=this.data('options'); 652 749 653 750 if(properties && value==':first' && properties.categories.length>0) … … 657 754 else if(properties && properties.index!=null && (value==':selected' || value==null) && properties.categories.length>0) 658 755 { 659 if(!option .multiple && properties.index>-1 && properties.index<properties.categories.length)756 if(!options.multiple && properties.index>-1 && properties.index<properties.categories.length) 660 757 { 661 758 return(properties.categories[properties.index]); 662 759 } 663 else if(option .multiple)760 else if(options.multiple) 664 761 { 665 762 var returned=[]; … … 686 783 return(null); 687 784 } 688 } ,// numberOfCategories785 } // numberOfCategories 689 786 }; // methods 690 787 … … 711 808 privateMethods.setLevelIndent(object, (value.levelIndent!=null)?value.levelIndent:options.levelIndent); 712 809 privateMethods.setIconWidthEC(object, (value.iconWidthEC!=null)?value.iconWidthEC:options.iconWidthEC); 713 privateMethods.setIconWidthCheck(object, (value.iconWidthCheck!=null)?value.iconWidthCheck:options.iconWidthCheck);714 810 privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl); 715 811 privateMethods.setFilter(object, (value.filter!=null)?value.filter:options.filter); 716 812 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); 717 816 privateMethods.setEventPopup(object, (value.popup!=null)?value.popup:options.popup); 718 817 privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change); … … 725 824 }, 726 825 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 727 846 setAutoLoad : function (object, value) 728 847 { 729 848 var options=object.data('options'), 730 849 properties=object.data('properties'); 850 731 851 if((!properties.initialized || options.autoLoad!=value) && (value==true || value==false)) 732 852 { … … 740 860 var options=object.data('options'), 741 861 properties=object.data('properties'); 862 742 863 if((!properties.initialized || options.galleryRoot!=value) && (value==true || value==false)) 743 864 { … … 753 874 properties=object.data('properties'), 754 875 objects=object.data('objects'); 876 755 877 if((!properties.initialized || options.listMaxWidth!=value) && value>=0) 756 878 { … … 773 895 properties=object.data('properties'), 774 896 objects=object.data('objects'); 897 775 898 if((!properties.initialized || options.listMaxHeight!=value) && value>=0) 776 899 { … … 793 916 properties=object.data('properties'), 794 917 objects=object.data('objects'); 918 795 919 if((!properties.initialized || options.displayStatus!=value) && (value==true || value==false)) 796 920 { … … 813 937 properties=object.data('properties'), 814 938 objects=object.data('objects'); 939 815 940 if((!properties.initialized || options.levelIndent!=value) && value>=0) 816 941 { … … 819 944 function () 820 945 { 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'); 822 947 } 823 948 ); … … 830 955 var options=object.data('options'), 831 956 properties=object.data('properties'); 957 832 958 if(!properties.initialized || options.serverUrl!=value) 833 959 { … … 838 964 }, 839 965 840 841 966 setFilter : function (object, value) 842 967 { 843 968 var options=object.data('options'), 844 969 properties=object.data('properties'); 970 845 971 if((!properties.initialized || options.filter!=value) && (value=='none' || value=='accessible' || value=='public')) 846 972 { … … 856 982 properties=object.data('properties'), 857 983 objects=object.data('objects'); 984 858 985 if((!properties.initialized || options.iconWidthEC!=value) && value>=0) 859 986 { … … 862 989 function () 863 990 { 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 set IconWidthCheck: 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) 872 999 { 873 1000 var options=object.data('options'), 874 1001 properties=object.data('properties'), 875 1002 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> </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) 890 1054 { 891 1055 var options=object.data('options'), 892 1056 properties=object.data('properties'), 893 1057 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) 912 1104 { 913 1105 var options=object.data('options'), 914 1106 properties=object.data('properties'), 915 1107 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 }, 923 1181 924 1182 /** … … 1198 1456 if(!options.multiple && (!properties.initialized || properties.index!=index) && index>-1) 1199 1457 { 1458 1200 1459 objects.list.find('.ui-category-selector-selected-item').removeClass('ui-category-selector-selected-item'); 1201 1460 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('&', '&').replace('>', '>').replace('<', '<'); 1202 1462 properties.index=index; 1203 objects.containerName.html(properties.categories[properties.index].name) ;1463 objects.containerName.html(properties.categories[properties.index].name).attr('title', title); 1204 1464 objects.containerStatus.html(properties.labelStatus[properties.categories[properties.index].status]); 1205 1465 if(trigger && options.change) object.trigger('categorySelectorChange', [properties.categories[properties.index].id]); … … 1232 1492 tmp.push(properties.categories[index[i]].id); 1233 1493 } 1234 containerHtml='';1494 objects.containerList.html(''); 1235 1495 objects.list.find('.ui-category-selector-selected-item div.ui-category-selector-name').each( 1236 1496 function () 1237 1497 { 1238 containerHtml+=((containerHtml=='')?'':' ; ')+$(this).html(); 1239 } 1240 ); 1241 if(containerHtml=='') containerHtml=" "; 1242 objects.containerName.html(containerHtml); 1498 var path=''; 1499 1500 title=privateMethods.getParentName(object, $(this)).replace('&', '&').replace('>', '>').replace('<', '<'); 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> </li>'); 1536 1243 1537 if(trigger && options.change) object.trigger('categorySelectorChange', [tmp]); 1244 1538 return(tmp); … … 1246 1540 return(null); 1247 1541 }, 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 }, 1248 1552 1249 1553 displaySelector : function (object, value) … … 1252 1556 properties=object.data('properties'), 1253 1557 objects=object.data('objects'); 1558 1254 1559 if(properties.selectorVisible!=value) 1255 1560 { … … 1266 1571 } 1267 1572 ); 1573 1268 1574 if($.isArray(properties.index)) 1269 1575 { … … 1289 1595 // load datas from server through an asynchronous ajax call 1290 1596 var options=object.data('options'), 1291 properties=object.data('properties'),1292 1597 objects=object.data('objects'); 1598 1599 if(options.serverUrl=='') return(false); 1293 1600 1294 1601 $.ajax( … … 1306 1613 success: function(msg) 1307 1614 { 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); 1319 1616 }, 1320 1617 error: function(msg) 1321 1618 { 1322 1619 objects.listContainer.html('Error ! '+msg); 1323 } ,1620 } 1324 1621 } 1325 1622 ); … … 1345 1642 properties.categories=[]; 1346 1643 }, 1644 1347 1645 listAddItems : function (object, listItems, parent) 1348 1646 { … … 1374 1672 } 1375 1673 1376 var spaceWidth = (options.iconWidthEC+ options.iconWidthCheck+listItems[i].level*options.levelIndent),1674 var spaceWidth = (options.iconWidthEC+listItems[i].level*options.levelIndent), 1377 1675 li=$('<li/>', 1378 1676 { … … 1389 1687 function (event) 1390 1688 { 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; 1397 1691 1398 1692 if(event.layerX<event.data.expandArea && event.data.nbchilds>0 ) … … 1424 1718 } 1425 1719 } 1720 1721 if(options.multiple) objects.container.focus(); 1426 1722 } 1427 1723 ); 1428 1724 if(listItems[i].childs.length>0) 1429 1725 { 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'); 1431 1727 } 1432 1728 1433 1729 if(options.multiple) 1434 1730 { 1435 li. prepend('<div class="ui-category-selector-check"></div>');1731 li.children().prepend('<div class="ui-category-selector-check"></div>'); 1436 1732 } 1437 1733 … … 1465 1761 */ 1466 1762 var properties=object.data('properties'); 1763 1467 1764 for(var i=0;i<properties.categories.length;i++) 1468 1765 { … … 1471 1768 return(-1); 1472 1769 }, 1770 1473 1771 setEventPopup : function (object, value) 1474 1772 { 1475 1773 var options=object.data('options'); 1774 1476 1775 options.popup=value; 1477 1776 object.unbind('categorySelectorPopup'); … … 1479 1778 return(options.popup); 1480 1779 }, 1780 1481 1781 setEventChange : function (object, value) 1482 1782 { 1483 1783 var options=object.data('options'); 1784 1484 1785 options.change=value; 1485 1786 object.unbind('categorySelectorChange'); … … 1487 1788 return(options.change); 1488 1789 }, 1790 1489 1791 setEventLoad : function (object, value) 1490 1792 { 1491 1793 var options=object.data('options'); 1794 1492 1795 options.load=value; 1493 1796 object.unbind('categorySelectorLoad'); -
extensions/GrumPluginClasses/js/ui.categorySelector.packed.js
r7181 r8961 1 /* file: ui.categorySelector.js - v1. 0.1 | packed on 2010/10/14with 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/ */ 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}('(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 148 148 container:$('<div/>', 149 149 { 150 'class':' ui-icon-selector ' ,150 'class':' ui-icon-selector ' 151 151 } 152 152 ).bind('click.iconSelector', -
extensions/GrumPluginClasses/js/ui.tagSelector.js
r7370 r8961 22 22 * 23 23 * | release | date | 24 * | 1.0.0 | 2010/10/10 | first release24 * | 1.0.0 | 2010/10/10 | * first release 25 25 * | | | 26 * | 1.1.0 | 2010/11/03 | * add 'isValid' method 26 27 * | | | 27 28 * | | | … … 93 94 cache:[], 94 95 timerHandle:null, 96 isValid:true 95 97 } 96 98 ); … … 118 120 { 119 121 html: '', 120 'class':'ui-tag-selector-selected-tag-list' ,122 'class':'ui-tag-selector-selected-tag-list' 121 123 } 122 124 ), … … 151 153 display:'none', 152 154 position:'absolute', 153 zIndex:9999 ,155 zIndex:9999 154 156 } 155 157 } … … 166 168 padding:'0px', 167 169 margin:'0px', 168 overflow:"auto" ,170 overflow:"auto" 169 171 } 170 172 } … … 217 219 options: function (value) 218 220 { 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); 224 224 } 225 225 ); … … 229 229 ignoreCase: function (value) 230 230 { 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); 238 236 } 239 237 ); … … 256 254 inputNumCar: function (value) 257 255 { 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); 265 261 } 266 262 ); … … 311 307 maximumTagLoaded: function (value) 312 308 { 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); 320 314 } 321 315 ); … … 338 332 listMaxWidth: function (value) 339 333 { 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); 347 339 } 348 340 ); … … 365 357 listMaxHeight: function (value) 366 358 { 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); 374 364 } 375 365 ); … … 393 383 serverCallDelay: function (value) 394 384 { 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); 402 390 } 403 391 ); … … 421 409 serverUrl: function (value) 422 410 { 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); 430 416 } 431 417 ); … … 448 434 textStart: function (value) 449 435 { 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); 457 441 } 458 442 ); … … 475 459 textFound: function (value) 476 460 { 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); 484 466 } 485 467 ); … … 502 484 textDisplay: function (value) 503 485 { 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); 511 491 } 512 492 ); … … 529 509 filter: function (value) 530 510 { 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); 538 516 } 539 517 ); … … 556 534 mode: function (value) 557 535 { 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); 565 541 } 566 542 ); … … 583 559 value: function (value) 584 560 { 585 if(value )561 if(value!=null) 586 562 { 587 563 // set selected value … … 596 572 // return the selected tags 597 573 var properties=this.data('properties'); 574 598 575 return(properties.tags); 599 576 } 600 577 }, // 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 601 598 602 599 load: function (value) … … 610 607 { 611 608 // 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); 617 612 } 618 613 ); … … 630 625 { 631 626 // 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); 637 630 } 638 631 ); … … 658 651 { 659 652 // 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); 665 656 } 666 657 ); … … 686 677 { 687 678 // 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); 693 682 } 694 683 ); … … 764 753 }, 765 754 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 766 777 setIgnoreCase : function (object, value) 767 778 { 768 779 var options=object.data('options'), 769 780 properties=object.data('properties'); 781 770 782 if((!properties.initialized || options.ignoreCase!=value) && (value==true || value==false)) 771 783 { … … 780 792 objects=object.data('objects'), 781 793 properties=object.data('properties'); 794 782 795 if((!properties.initialized || options.inputNumCar!=value) && value>0) 783 796 { … … 805 818 var options=object.data('options'), 806 819 properties=object.data('properties'); 820 807 821 if((!properties.initialized || options.setMaximumTagLoaded!=value) && value>=0) 808 822 { … … 817 831 var options=object.data('options'), 818 832 properties=object.data('properties'); 833 819 834 if(!properties.initialized || options.textStart!=value) 820 835 { … … 828 843 var options=object.data('options'), 829 844 properties=object.data('properties'); 845 830 846 if(!properties.initialized || options.textFound!=value) 831 847 { … … 839 855 var options=object.data('options'), 840 856 properties=object.data('properties'); 857 841 858 if(!properties.initialized || options.textDisplay!=value) 842 859 { … … 851 868 properties=object.data('properties'), 852 869 objects=object.data('objects'); 870 853 871 if((!properties.initialized || options.listMaxWidth!=value) && value>=0) 854 872 { … … 871 889 properties=object.data('properties'), 872 890 objects=object.data('objects'); 891 873 892 if((!properties.initialized || options.listMaxHeight!=value) && value>=0) 874 893 { … … 890 909 var options=object.data('options'), 891 910 properties=object.data('properties'); 911 892 912 if((!properties.initialized || options.serverCallDelay!=value) && value>0 ) 893 913 { … … 901 921 var options=object.data('options'), 902 922 properties=object.data('properties'); 923 903 924 if(!properties.initialized || options.serverUrl!=value) 904 925 { … … 914 935 var options=object.data('options'), 915 936 properties=object.data('properties'); 937 916 938 if((!properties.initialized || options.mode!=value) && (value=='admin' || value=='public')) 917 939 { … … 925 947 var options=object.data('options'), 926 948 properties=object.data('properties'); 949 927 950 if((!properties.initialized || options.filter!=value) && (value=='all' || value=='affected')) 928 951 { … … 935 958 setValue : function (object, value) 936 959 { 937 var options=object.data('options'), 938 properties=object.data('properties'), 960 var properties=object.data('properties'), 939 961 objects=object.data('objects'); 940 962 … … 1071 1093 { 1072 1094 objects.selectorList.html('Error ! '+msg); 1073 } ,1095 } 1074 1096 } 1075 1097 ); … … 1080 1102 // clear the cache tag list 1081 1103 var objects=object.data('objects'), 1082 options=object.data('options'),1083 1104 properties=object.data('properties'); 1084 1105 … … 1086 1107 properties.cache=[]; 1087 1108 }, 1109 1088 1110 cacheAddItems : function (object, listItems) 1089 1111 { … … 1098 1120 { 1099 1121 id:listItems[i].id, 1100 name:listItems[i].name ,1122 name:listItems[i].name 1101 1123 } 1102 1124 ); … … 1213 1235 { 1214 1236 var options=object.data('options'); 1237 1215 1238 options.popup=value; 1216 1239 object.unbind('tagSelectorPopup'); … … 1218 1241 return(options.popup); 1219 1242 }, 1243 1220 1244 setEventAdd : function (object, value) 1221 1245 { 1222 1246 var options=object.data('options'); 1247 1223 1248 options.add=value; 1224 1249 object.unbind('tagSelectorAdd'); … … 1226 1251 return(options.add); 1227 1252 }, 1253 1228 1254 setEventRemove : function (object, value) 1229 1255 { 1230 1256 var options=object.data('options'); 1257 1231 1258 options.remove=value; 1232 1259 object.unbind('tagSelectorRemove'); … … 1234 1261 return(options.remove); 1235 1262 }, 1263 1236 1264 setEventLoad : function (object, value) 1237 1265 { … … 1253 1281 } 1254 1282 }, 1283 1255 1284 setTimerHandle : function(object) 1256 1285 { -
extensions/GrumPluginClasses/main.inc.php
r8809 r8961 2 2 /* 3 3 Plugin Name: Grum Plugins Classes.3 4 Version: 3. 3.44 Version: 3.4.0 5 5 Description: Collection de classes partagées entre mes plugins (existants, ou à venir) / Partaged classes between my plugins (actuals or futures) 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=199 … … 104 104 | | | . optimization for RBuilder loading language management 105 105 | | | 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) 108 134 | | | 109 135 | | | … … 137 163 GPCUsersGroups.class.inc.php 138 164 139 genericjs.class.inc.php + genericjs.js140 165 141 166 See 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"}5 1 6 2 {foreach from=$datas.dialogBox item=dialogBox}
Note: See TracChangeset
for help on using the changeset viewer.