Changeset 16012
- Timestamp:
- Jun 24, 2012, 9:18:26 PM (12 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 27 added
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/CommonPlugin.class.inc.php
r15340 r16012 2 2 /* ----------------------------------------------------------------------------- 3 3 class name: CommonPlugin 4 class version : 2. 2.05 plugin version : 3. 2.06 date : 201 0-07-284 class version : 2.3.0 5 plugin version : 3.5.2 6 date : 2012-06-24 7 7 8 8 ------------------------------------------------------------------------------ … … 51 51 | | | function 52 52 | | | 53 | 2.3.0 | 2012/06/24 | * Add loadCSS() function 54 | | | 53 55 | | | 54 56 | | | … … 64 66 private $page_link; //link to admin page 65 67 private $fileLocation; //files plugin location on server 68 private $pluginDirectory; //directory of plugin 66 69 private $displayResult_ok; 67 70 private $displayResult_ko; … … 122 125 } 123 126 124 /* constructor allows to initialize $prefixeTable value */ 127 /** 128 * constructor allows to initialize $prefixeTable value 129 * @param String $prefixeTable: prefix used for tables 130 * @param String $filelocation: file calling the constructor (__FILE__) 131 */ 125 132 public function __construct($prefixeTable, $filelocation) 126 133 { … … 129 136 $this->fileLocation=$filelocation; 130 137 $this->prefixeTable=$prefixeTable; 138 $this->pluginDirectory=basename(dirname($filelocation)); 131 139 $this->page_link=get_root_url().'admin.php?page=plugin-'.basename(dirname($this->getFileLocation())); 132 140 //$this->page_link="admin.php?page=plugin§ion=".basename(dirname($this->getFileLocation()))."/admin/".$this->plugin_admin_file.".php"; … … 150 158 } 151 159 160 /** 161 * return the file location 162 * @return String: file location 163 */ 152 164 public function getFileLocation() 153 165 { … … 155 167 } 156 168 169 /** 170 * return the plugin directory 171 * @return String: directory 172 */ 173 public function getDirectory() 174 { 175 return($this->pluginDirectory); 176 } 177 178 /** 179 * return the link of plugin in admin pages 180 * @return String: url 181 */ 157 182 public function getAdminLink() 158 183 { … … 160 185 } 161 186 187 /** 188 * set the link of plugin in admin pages 189 * @param String $link: url to set 190 * @return String: url 191 */ 162 192 public function setAdminLink($link) 163 193 { … … 166 196 } 167 197 198 /** 199 * set the plugin name 200 * @param String $name: plugin's name 201 * @return String: plugin's name 202 */ 168 203 public function setPluginName($name) 169 204 { … … 172 207 } 173 208 209 /** 210 * set the plugin name for file system useage 211 * @param String $name: plugin's name 212 * @return String: plugin's name 213 */ 174 214 public function setPluginNameFiles($name) 175 215 { … … 178 218 } 179 219 220 /** 221 * get the plugin name 222 * @return String: plugin's name 223 */ 180 224 public function getPluginName() 181 225 { … … 183 227 } 184 228 229 /** 230 * get the plugin name for file system useage 231 * @return String: plugin's name 232 */ 185 233 public function getPluginNameFiles() 186 234 { … … 192 240 --------------------------------------------------------------------------- */ 193 241 194 /* this function initialize var $config with default values */ 242 /** 243 * this function initialize var $this->config with default values 244 */ 195 245 public function initConfig() 196 246 { … … 198 248 } 199 249 200 /* load config from CONFIG_TABLE into var $my_config */ 250 /** 251 * load config from CONFIG_TABLE into var $this->config 252 * @return Boolean: true if config is loaded, otherwiser false 253 */ 201 254 public function loadConfig() 202 255 { … … 206 259 207 260 /** 208 * load config from a file into var $ my_config261 * load config from a file into var $this->config 209 262 * 210 263 * this function don't initialize the default value ! … … 212 265 * 213 266 * @param String $fileName : name of file to load 267 * @return Boolean: true if file is loaded, otherwise false 214 268 */ 215 269 public function loadConfigFromFile($fileName) … … 218 272 } 219 273 220 /* save var $my_config into CONFIG_TABLE */ 274 /** 275 * save var $this->config into CONFIG_TABLE 276 * @return Boolean: true if config is saved, otherwise false 277 */ 221 278 public function saveConfig() 222 279 { … … 224 281 } 225 282 226 /* delete config from CONFIG_TABLE */ 283 /** 284 * delete config from CONFIG_TABLE 285 * @return Boolean: true if config is deleted, otherwise false 286 */ 227 287 public function deleteConfig() 228 288 { … … 234 294 --------------------------------------------------------------------------- */ 235 295 236 /* 237 initialize tables list used by the plugin 238 $list = array('table1', 'table2') 239 $this->tables_list['table1'] = $prefixeTable.$plugin_name.'_table1' 240 */ 296 /** 297 * initialize tables list used by the plugin; tables name will be prefixed 298 * automatically 299 * $list = array('table1', 'table2') 300 * $this->tables_list['table1'] = $prefixeTable.$plugin_name.'_table1' 301 * @param Array $list: a list of table name 302 */ 241 303 protected function setTablesList($list) 242 304 { … … 251 313 --------------------------------------------------------------------------- */ 252 314 253 /* add plugin into administration menu */ 315 /** 316 * add plugin into administration menu; url is built automatically 317 * @param String $menu: 318 */ 254 319 public function pluginAdminMenu($menu) 255 320 { … … 261 326 ) 262 327 ); 263 /* 264 array_push($menu, 265 array( 266 'NAME' => $this->plugin_name, 267 'URL' => get_admin_plugin_menu_link(dirname($this->getFileLocation()). 268 '/admin/'.$this->plugin_admin_file.'.php') 269 ));*/ 270 return $menu; 271 } 272 273 /* 274 manage plugin integration into piwigo's admin interface 275 276 to be surcharged by child's classes 277 */ 328 return($menu); 329 } 330 331 /** 332 * manage plugin integration into piwigo's admin interface 333 * 334 * to be surcharged by child's classes 335 */ 278 336 public function manage() 279 337 { 280 338 } 281 339 282 /* 283 initialize plugin's events 284 to be surcharged by child's classes 285 */ 340 /** 341 * initialize plugin's events 342 * by default, call the loadCSS() function on the 'loc_begin_page_header' events 343 * 344 * to be surcharged by child's classes 345 */ 286 346 public function initEvents() 287 347 { 288 } 348 global $plugin_id; 349 350 if($plugin_id==$this->getDirectory() or !defined('IN_ADMIN')) 351 add_event_handler('loc_begin_page_header', array(&$this, 'loadCSS')); 352 } 353 354 /** 355 * called on the 'loc_begin_page_header' event 356 * 357 * to be surcharged by child's classes 358 */ 359 public function loadCSS() 360 { 361 } 362 289 363 290 364 protected function debug($text, $rewrite=false) … … 306 380 } 307 381 308 /*309 manage infos & errors display310 */311 382 protected function displayResult($action_msg, $result) 312 383 { -
extensions/GrumPluginClasses/classes/GPCAjax.class.inc.php
r5550 r16012 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCAjax 5 class version : 3. 0.06 plugin version : 3. 0.07 date : 201 0-03-305 class version : 3.1.0 6 plugin version : 3.5.2 7 date : 2012-06-19 8 8 ------------------------------------------------------------------------------ 9 9 author: grum at piwigo.org … … 15 15 | release | date | 16 16 | 3.0.0 | 2010/03/30 | * Update class & function names 17 | | | 18 | 3.1.0 | 2012/06/19 | * Check token request 19 | | | 17 20 | | | 18 21 | | | … … 27 30 ---------------------------------------------------------------------- */ 28 31 29 32 define('GPC_AJAX', 'ajaxfct'); 30 33 31 34 class GPCAjax … … 39 42 exit(strtr($str, $chars)); 40 43 } 44 45 /** 46 * check if there's a valid token in $_REQUEST 47 * if no, the GPC_AJAX call is set to empty value 48 * 49 * @param String $fct: the ajax function field (GPC_AJAX by default) 50 * @param String $token: the token field ('token' by default) to check 51 * @return Boolean: true if ok, otherwise false 52 */ 53 static public function checkToken($fct=GPC_AJAX, $token='token') 54 { 55 if(!isset($_REQUEST[$token])) $_REQUEST[$token]=''; 56 if($fct!='' && !isset($_REQUEST[$fct])) $_REQUEST[$fct]=''; 57 58 if($_REQUEST[$token]==get_pwg_token()) return(true); 59 60 if($fct!='') $_REQUEST[$fct]=''; 61 return(false); 62 } 41 63 } //class 42 64 -
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r15373 r16012 67 67 | | | * Remove google translate connector (google has changed the useage 68 68 | | | and now an API key is needed) 69 | | | 70 | | | * Add js objects: inputDate, inputFilterBox, inputPages, inputSortBox, inputTag 71 | | | dynamicTable 72 | | | 73 | | | * AddHeaderCSS and AddJS are ignored if called in an ajax session (AJAX_CALL defined) 74 | | | 75 | | | 76 | | | 69 77 | | | 70 78 … … 81 89 - static function BBtoHTML 82 90 - static function VarToHTML 91 - static function TabsToHTML 83 92 - static function FormMailToHTML 84 93 - static function addHeaderCSS … … 90 99 - static function rmDir 91 100 - static function applyMarkups 101 - static function setTemplateToken 102 - static function addHeaderContent 92 103 ---------------------------------------------------------------------- */ 93 104 … … 129 140 return( 130 141 Array( 131 Array('name' => "CommonPlugin", 'version' => "2. 2.0"),132 Array('name' => "GPCAjax", 'version' => "3. 0.0"),142 Array('name' => "CommonPlugin", 'version' => "2.3.0"), 143 Array('name' => "GPCAjax", 'version' => "3.1.0"), 133 144 Array('name' => "GPCCategorySelector", 'version' => "1.0.1"), 134 145 Array('name' => "GPCCore", 'version' => "1.4.1"), 135 Array('name' => "GPCCss", 'version' => "3.1.0"),146 //Array('name' => "GPCCss", 'version' => "3.1.0"), removed with v1.4.1 136 147 Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"), 137 148 Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"), 138 Array('name' => "GPCRequestBuilder", 'version' => "1.1. 2"),149 Array('name' => "GPCRequestBuilder", 'version' => "1.1.7"), 139 150 Array('name' => "GPCTables", 'version' => "1.5.0"), 140 151 Array('name' => "GPCTabSheet", 'version' => "1.1.1"), … … 205 216 206 217 /** 218 * return the list of registered plugins 207 219 * @return Array : list of registered plugins 208 220 */ … … 503 515 } 504 516 517 /** 518 * analyze and replace markups by their value, according to $conf parameted 519 * @param String $text: text to analyze 520 * @return String: analyzed text 521 */ 505 522 static public function applyMarkups($text) 506 523 { … … 532 549 533 550 /** 534 * used to add a css filein the header551 * used to add a js or css directly in the header 535 552 * 536 553 * @param String $id : a unique id for the file 537 554 * @param String $file : the css file 555 * @param String $order: priority 556 */ 557 static public function addHeaderContent($type, $content) 558 { 559 global $template; 560 $null=null; 561 562 if(defined('AJAX_CALL')) return(false); // not needed for an ajax call 563 564 switch($type) 565 { 566 case 'css': 567 $template->block_html_style(null, $content, $null, $null); 568 break; 569 case 'js': 570 $template->block_html_head(null, '<script type="text/javascript">'.$content.'</script>', $null, $null); 571 break; 572 } 573 } 574 575 /** 576 * used to add a css file in the header 577 * 578 * @param String $id : a unique id for the file 579 * @param String $file : the css file 580 * @param String $order: priority 538 581 */ 539 582 static public function addHeaderCSS($id, $file, $order=0) … … 541 584 global $template; 542 585 543 if(!array_key_exists($file, self::$headerItems['css']) and file_exists($file)) 586 if(defined('AJAX_CALL')) return(false); // no CSS needed for an ajax call 587 if(!array_key_exists($id, self::$headerItems['css']) and file_exists($file)) 544 588 { 545 589 self::$headerItems['css'][$id]=$file; … … 547 591 } 548 592 } 593 594 /** 595 * used to add a js file in the header 596 * 597 * @param String $id : a unique id for the file 598 * @param String $file : the js file 599 * @param Array $require : list of required files 600 */ 549 601 static public function addHeaderJS($id, $file, $require=array()) 550 602 { 551 603 global $template; 552 604 553 if(!array_key_exists($file, self::$headerItems['js']) and file_exists($file)) 605 if(defined('AJAX_CALL')) return(false); // no JS needed for an ajax call 606 if(!array_key_exists($id, self::$headerItems['js']) and file_exists($file)) 554 607 { 555 608 self::$headerItems['js'][$id]=$file; … … 562 615 * 563 616 * @param Array $list : possibles values are 617 * - categorySelector 618 * - dynamicTable 564 619 * - inputCheckbox 565 620 * - inputColorPicker 566 621 * - inputColorsFB 567 622 * - inputConsole 623 * - inputDate 568 624 * - inputDotArea 625 * - inputFilterBox 569 626 * - inputList 570 627 * - inputNum 571 628 * - inputPosition 572 629 * - inputRadio 630 * - inputSortBox 573 631 * - inputStatusBar 632 * - inputTag 574 633 * - inputText 575 * - categorySelector576 634 */ 577 635 static public function addUI($list) … … 595 653 switch($ui) 596 654 { 655 case 'gpcCSS': 656 $fileName='./plugins/'.basename(dirname(dirname(__FILE__))).'/css/gpc'; 657 self::addHeaderCSS('gpc.css', $fileName.'.css', 10); 658 self::addHeaderCSS('gpc.cssT', $fileName.'_'.$template->get_themeconf('name').'.css', 15); 659 break; 597 660 case 'categorySelector': 598 661 self::addHeaderCSS('gpc.categorySelector', GPC_PATH.'css/categorySelector.css'); … … 646 709 self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole.js', array('jquery.ui.widget')); 647 710 break; 711 case 'inputDate': 712 self::addHeaderCSS('gpc.inputDate', GPC_PATH.'css/inputDate.css'); 713 self::addHeaderCSS('gpc.inputDateT', sprintf($themeFile, 'inputDate')); 714 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 715 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 716 self::addHeaderJS('jquery.ui.datepicker', 'themes/default/js/ui/jquery.ui.datepicker.js', array('jquery.ui.widget')); 717 self::addHeaderJS('gpc.inputDate', GPC_PATH.'js/ui.inputDate.js', array('jquery.ui.widget')); 718 break; 648 719 case 'inputDotArea': 649 720 self::addHeaderCSS('gpc.inputDotArea', GPC_PATH.'css/inputDotArea.css'); … … 653 724 self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea.js', array('jquery.ui.widget')); 654 725 break; 726 case 'inputFilterBox': 727 self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css'); 728 self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum')); 729 self::addHeaderCSS('gpc.inputDate', GPC_PATH.'css/inputDate.css'); 730 self::addHeaderCSS('gpc.inputDateT', sprintf($themeFile, 'inputDate')); 731 self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css'); 732 self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText')); 733 self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css'); 734 self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList')); 735 self::addHeaderCSS('gpc.inputFilterBox', GPC_PATH.'css/inputFilterBox.css'); 736 self::addHeaderCSS('gpc.inputFilterBoxT', sprintf($themeFile, 'inputFilterBox')); 737 738 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 739 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 740 741 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 742 self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget')); 743 self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.mouse')); 744 self::addHeaderJS('jquery.ui.resizable', 'themes/default/js/ui/jquery.ui.resizable.js', array('jquery.ui.position')); 745 self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.resizable')); 746 self::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.draggable')); 747 self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.sortable')); 748 749 self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum.js', array('jquery.ui.dialog')); 750 self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList.js', array('jquery.ui.dialog')); 751 self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.dialog')); 752 self::addHeaderJS('gpc.inputDate', GPC_PATH.'js/ui.inputDate.js', array('jquery.ui.dialog')); 753 self::addHeaderJS('gpc.inputFilterBox', GPC_PATH.'js/ui.inputFilterBox.js', array('jquery.ui.dialog')); 754 break; 655 755 case 'inputList': 656 756 self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css'); … … 669 769 self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum.js', array('jquery','jquery.ui.slider')); 670 770 break; 771 case 'inputPages': 772 self::addHeaderCSS('gpc.inputPages', GPC_PATH.'css/inputPages.css'); 773 self::addHeaderCSS('gpc.inputPagesT', sprintf($themeFile, 'inputPages')); 774 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 775 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 776 self::addHeaderJS('gpc.inputPages', GPC_PATH.'js/ui.inputPages.js', array('jquery','jquery.ui.widget')); 777 break; 671 778 case 'inputPosition': 672 779 self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css'); … … 681 788 self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio.js', array('jquery.ui.widget')); 682 789 break; 790 case 'inputSortBox': 791 self::addHeaderCSS('gpc.inputSortBox', GPC_PATH.'css/inputSortBox.css'); 792 self::addHeaderCSS('gpc.inputSortBoxT', sprintf($themeFile, 'inputSortBox')); 793 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 794 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 795 self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget')); 796 self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.mouse')); 797 self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.position')); 798 self::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.draggable')); 799 self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.sortable')); 800 self::addHeaderJS('gpc.inputSortBox', GPC_PATH.'js/ui.inputSortBox.js', array('jquery.ui.dialog')); 801 break; 683 802 case 'inputStatusBar': 684 803 self::addHeaderCSS('gpc.inputStatusBar', GPC_PATH.'css/inputStatusBar.css'); … … 695 814 self::addHeaderJS('gpc.inputSwitchButton', GPC_PATH.'js/ui.inputSwitchButton.js', array('jquery.ui.widget')); 696 815 break; 816 case 'inputTag': 817 self::addHeaderCSS('gpc.inputTag', GPC_PATH.'css/inputTag.css'); 818 self::addHeaderCSS('gpc.inputTagT', sprintf($themeFile, 'inputTag')); 819 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 820 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 821 self::addHeaderJS('gpc.inputTag', GPC_PATH.'js/ui.inputTag.js', array('jquery.ui.widget')); 822 break; 697 823 case 'inputText': 698 824 self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css'); … … 708 834 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 709 835 self::addHeaderJS('gpc.simpleTip', GPC_PATH.'js/simpleTip.js', array('jquery.ui.widget')); 836 break; 837 case 'dynamicTable': 838 self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css'); 839 self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum')); 840 self::addHeaderCSS('gpc.inputDate', GPC_PATH.'css/inputDate.css'); 841 self::addHeaderCSS('gpc.inputDateT', sprintf($themeFile, 'inputDate')); 842 self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css'); 843 self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText')); 844 self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css'); 845 self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList')); 846 self::addHeaderCSS('gpc.inputSortBox', GPC_PATH.'css/inputSortBox.css'); 847 self::addHeaderCSS('gpc.inputSortBoxT', sprintf($themeFile, 'inputSortBox')); 848 self::addHeaderCSS('gpc.inputFilterBox', GPC_PATH.'css/inputFilterBox.css'); 849 self::addHeaderCSS('gpc.inputFilterBoxT', sprintf($themeFile, 'inputFilterBox')); 850 self::addHeaderCSS('gpc.inputPages', GPC_PATH.'css/inputPages.css'); 851 self::addHeaderCSS('gpc.inputPagesT', sprintf($themeFile, 'inputPages')); 852 self::addHeaderCSS('gpc.inputDynamicTable', GPC_PATH.'css/inputDynamicTable.css'); 853 self::addHeaderCSS('gpc.inputDynamicTableT', sprintf($themeFile, 'inputDynamicTable')); 854 855 self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery')); 856 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 857 858 self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui')); 859 self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget')); 860 self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.mouse')); 861 self::addHeaderJS('jquery.ui.resizable', 'themes/default/js/ui/jquery.ui.resizable.js', array('jquery.ui.position')); 862 self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.resizable')); 863 self::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.draggable')); 864 self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.sortable')); 865 866 self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum.js', array('jquery.ui.dialog')); 867 self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList.js', array('jquery.ui.dialog')); 868 self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.dialog')); 869 self::addHeaderJS('gpc.inputDate', GPC_PATH.'js/ui.inputDate.js', array('jquery.ui.dialog')); 870 self::addHeaderJS('gpc.inputFilterBox', GPC_PATH.'js/ui.inputFilterBox.js', array('jquery.ui.dialog')); 871 self::addHeaderJS('gpc.inputSortBox', GPC_PATH.'js/ui.inputSortBox.js', array('jquery.ui.dialog')); 872 self::addHeaderJS('gpc.inputPages', GPC_PATH.'js/ui.inputPages.js', array('jquery.ui.dialog')); 873 self::addHeaderJS('gpc.dynamicTable', GPC_PATH.'js/ui.dynamicTable.js', array('jquery.ui.dialog')); 710 874 break; 711 875 } … … 852 1016 853 1017 1018 /** 1019 * affect a valid token in a template var {$token} 1020 */ 1021 static public function setTemplateToken() 1022 { 1023 global $template; 1024 1025 $template->assign('token', get_pwg_token()); 1026 } 1027 1028 854 1029 } //class 855 1030 856 //add_event_handler('loc_begin_page_header', array('GPCCore', 'applyHeaderItems'), 10);857 858 1031 GPCCore::init(); 859 1032 -
extensions/GrumPluginClasses/classes/GPCPublicIntegration.class.inc.php
r7449 r16012 41 41 class GPCPublicIntegration 42 42 { 43 var$section; //section applied to the page viewed44 var$callback_page_function; //called function to display page43 private $section; //section applied to the page viewed 44 private $callback_page_function; //called function to display page 45 45 46 46 public function __construct($section) -
extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php
r15352 r16012 2 2 /* ----------------------------------------------------------------------------- 3 3 class name: GCPRequestBuilder 4 class version : 1.1. 65 plugin version : 3.5. 16 date : 201 1-05-154 class version : 1.1.7 5 plugin version : 3.5.2 6 date : 2012-06-24 7 7 8 8 ------------------------------------------------------------------------------ … … 89 89 | | | . Request builder user interface don't work 90 90 | | | 91 | 1.1.7 | 2012/06/24 | * use some GPCCore function instead of code 91 92 | | | 92 93 | | | … … 539 540 540 541 //$template->append('head_elements', '<link href="plugins/'.$baseName.'rbuilder.css" type="text/css" rel="stylesheet"/>'); 541 if(defined('IN_ADMIN')) GPCCore::addHeaderCSS('gpc.rbuilder ', 'plugins/'.$baseName.'rbuilder_'.$template->get_themeconf('name').'.css', 26);542 if(defined('IN_ADMIN')) GPCCore::addHeaderCSS('gpc.rbuilderT', 'plugins/'.$baseName.'rbuilder_'.$template->get_themeconf('name').'.css', 26); 542 543 //$template->append('head_elements', '<link href="plugins/'.$baseName.'rbuilder_'.$template->get_themeconf('name').'.css" type="text/css" rel="stylesheet"/>'); 543 544 … … 556 557 GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder.js', array('gpc.external.inestedsortable')); 557 558 558 $template->append('head_elements', 559 "<script type=\"text/javascript\"> 560 requestBuilderOptions = { 561 textAND:\"".l10n('gpc_rb_textAND')."\", 562 textOR:\"".l10n('gpc_rb_textOR')."\", 563 textNoCriteria:\"".l10n('There is no criteria ! At least, one criteria is required to do search...')."\", 564 textSomethingWrong:\"".l10n('gpc_something_is_wrong_on_the_server_side')."\", 565 textCaddieUpdated:\"".l10n('gpc_the_caddie_is_updated')."\", 566 helpEdit:\"".l10n('gpc_help_edit_criteria')."\", 567 helpDelete:\"".l10n('gpc_help_delete_criteria')."\", 568 helpMove:\"".l10n('gpc_help_move_criteria')."\", 569 helpSwitchCondition:\"".l10n('gpc_help_switch_condition')."\", 570 ajaxUrl:'plugins/GrumPluginClasses/gpc_ajax.php', 571 } 572 </script>"); 559 GPCCore::addHeaderContent('js', 560 " 561 var requestBuilderOptions = { 562 textAND:\"".l10n('gpc_rb_textAND')."\", 563 textOR:\"".l10n('gpc_rb_textOR')."\", 564 textNoCriteria:\"".l10n('There is no criteria ! At least, one criteria is required to do search...')."\", 565 textSomethingWrong:\"".l10n('gpc_something_is_wrong_on_the_server_side')."\", 566 textCaddieUpdated:\"".l10n('gpc_the_caddie_is_updated')."\", 567 helpEdit:\"".l10n('gpc_help_edit_criteria')."\", 568 helpDelete:\"".l10n('gpc_help_delete_criteria')."\", 569 helpMove:\"".l10n('gpc_help_move_criteria')."\", 570 helpSwitchCondition:\"".l10n('gpc_help_switch_condition')."\", 571 ajaxUrl:'plugins/GrumPluginClasses/gpc_ajax.php', 572 token:'".get_pwg_token()."' 573 }; 574 " 575 ); 573 576 } 574 577 -
extensions/GrumPluginClasses/classes/GPCUserAgent.class.inc.php
r15340 r16012 1 1 <?php 2 /* -----------------------------------------------------------------------------3 class name: GPCUserAgent4 class version : 1.0.05 plugin version : 3.5.26 date : 2012-05-257 ------------------------------------------------------------------------------8 author: grum at piwog.org9 << May the Little SpaceFrog be with you >>10 ------------------------------------------------------------------------------11 12 this classes provides base functions to parse User Agent string and retrieve13 properties: Browser, OS, Engine14 15 16 (static public) function parse($userAgent)17 18 | release | date |19 | 1.0.0 | 2012-05-25 | * implementation of the class20 | | |21 | | |22 | | |23 | | |24 | | |25 | | |26 27 ----------------------------------------------------------------------------- */28 2 29 3 require_once('GPCUserAgent.const.inc.php'); 30 31 4 32 5 class GPCUserAgent 33 6 { 34 /**35 * returned result is ana array with the following properties:36 * 'os' => Operating System id on which the browser run; integer => UA_OS_*37 * 'os_version' => Version of the OS; string38 *39 * 'browser' => browser id; integer => UA_BROWSER_*40 * 'brower_name' => browser name; string41 * 'browser_type' => browser type id (crawler, computer, mobile, ...); integer => UA_PROP_TYPE_*42 * 'browser_version' => browser version; string43 *44 * 'engine' => engine used by the browser (gecko, khtml, ...); integer => UA_ENGINE_*45 *46 * @param String $userAgent: a user agent string47 * @return Array: array of properties48 */49 7 static public function parse($userAgent) 50 8 { … … 258 216 if(is_array($result) and count($result)>2) 259 217 { 218 if($browser==UA_BROWSER_SAFARI and preg_match('/iphone|ipad|ipod/i', $userAgent)) 219 $browser=UA_BROWSER_SAFARI_MOBILE; 220 260 221 $returned=array( 261 222 'browser' => $browser, -
extensions/GrumPluginClasses/classes/GPCUserAgent.const.inc.php
r15340 r16012 117 117 define('UA_BROWSER_FIREFOX', 0x1034); 118 118 define('UA_BROWSER_OPERA_WII', 0x1035); 119 define('UA_BROWSER_SAFARI_MOBILE', 0x1036); 119 120 120 121 … … 242 243 UA_BROWSER_LINKS => array(UA_PROP_NAME => 'Links', UA_PROP_TYPE=>UA_PROP_TYPE_BROWSER_COMPUTER, UA_PROP_URL => ''), 243 244 UA_BROWSER_LYNX => array(UA_PROP_NAME => 'Lynx', UA_PROP_TYPE=>UA_PROP_TYPE_BROWSER_COMPUTER, UA_PROP_URL => ''), 244 UA_BROWSER_SAFARI => array(UA_PROP_NAME => 'Safari', UA_PROP_TYPE=>UA_PROP_TYPE_BROWSER_COMPUTER, UA_PROP_URL => '') 245 UA_BROWSER_SAFARI => array(UA_PROP_NAME => 'Safari', UA_PROP_TYPE=>UA_PROP_TYPE_BROWSER_COMPUTER, UA_PROP_URL => ''), 246 UA_BROWSER_SAFARI_MOBILE => array(UA_PROP_NAME => 'Safari', UA_PROP_TYPE=>UA_PROP_TYPE_BROWSER_MOBILE, UA_PROP_URL => '') 245 247 ), 246 248 -
extensions/GrumPluginClasses/css/categorySelector_clear.css
r15347 r16012 22 22 } 23 23 24 .ui-category-selector-arrow { 25 background-image:url(./../icons/buttons.png); 26 background-repeat:no-repeat; 27 width:15px; 28 height:15px; 29 } 24 30 .ui-category-selector-expandable-item { 25 31 background-image:url(./../icons/expand_clear.png); … … 52 58 53 59 .ui-category-selector-arrow { 54 background:none repeat scroll 0 0 #999999; 55 border-color:#DDDDDD #666666 #666666 #DDDDDD; 60 background-position:-30px -90px; 61 -moz-border-radius:2px; 62 -webkit-border-radius:2px; 63 -khtml-border-radius:2px; 64 border-radius:2px; 56 65 color:#005E89; 66 border:0px; 57 67 } 58 59 .ui-category-selector-arrow-active { 60 b order-color:#666666 #DDDDDD #DDDDDD #666666;68 .ui-category-selector-arrow:hover { 69 background-position:-30px -105px; 70 background-color:#999999; 61 71 } -
extensions/GrumPluginClasses/css/categorySelector_roma.css
r15347 r16012 16 16 } 17 17 18 .ui-category-selector-arrow { 19 background-image:url(./../icons/buttons.png); 20 background-repeat:no-repeat; 21 width:15px; 22 height:15px; 23 } 18 24 .ui-category-selector-expandable-item { 19 25 background-image:url(./../icons/expand_roma.png); … … 46 52 47 53 .ui-category-selector-arrow { 48 background:none repeat scroll 0 0 #666666; 49 border-color:#999999 #444444 #444444 #999999; 50 color:#FF3363; 54 background-position:-30px -15px; 55 -moz-border-radius:2px; 56 -webkit-border-radius:2px; 57 -khtml-border-radius:2px; 58 border-radius:2px; 59 color:#FF7700; 60 border:0px; 51 61 } 52 53 .ui-category-selector-arrow-active { 54 b order-color:#444444 #999999 #999999 #444444;62 .ui-category-selector-arrow:hover { 63 background-position:-30px 0px; 64 background-color:#222222; 55 65 } -
extensions/GrumPluginClasses/css/inputColorPicker.css
r8961 r16012 61 61 } 62 62 table.ui-inputColorPicker-inputContainer div.ui-inputNum div.ui-slider-horizontal { 63 height: 9px;63 height:8px; 64 64 } 65 65 … … 67 67 height:7px; 68 68 margin-top:0; 69 top:-2px; 69 70 } 71 table.ui-inputColorPicker-inputContainer div.ui-inputNum-btInc { 72 background-position: -212px -17px; 73 } 74 table.ui-inputColorPicker-inputContainer div.ui-inputNum-btInc:hover { 75 background-position: -212px -2px; 76 } 77 table.ui-inputColorPicker-inputContainer div.ui-inputNum-btDec { 78 background-position: -227px -17px; 79 } 80 table.ui-inputColorPicker-inputContainer div.ui-inputNum-btDec:hover { 81 background-position: -227px -2px; 82 } 83 84 70 85 71 86 .ui-inputNum-btDec, .ui-inputNum-btInc { -
extensions/GrumPluginClasses/css/inputColorPicker_roma.css
r8961 r16012 16 16 background:none repeat scroll 0 0 #666666; 17 17 border-color:#999999 #444444 #444444 #999999; 18 color:# ff3363;18 color:#222222; 19 19 } 20 20 .ui-inputDialogColor div.ui-dialog-buttonpane button:active { -
extensions/GrumPluginClasses/css/inputConsole.css
r8961 r16012 16 16 display:inline-block; 17 17 padding-right:2px; 18 font-family:monospace; 18 19 } 19 20 .ui-inputConsole-history ul { … … 21 22 padding:0 0 0 20px; 22 23 } 24 .ui-inputConsole-history ul li { 25 font-family:monospace; 26 } 23 27 .ui-inputConsole-history { 24 overflow:auto;25 28 border:1px solid; 26 29 border-bottom:1px dotted; 27 30 position:absolute; 31 z-index:1000; 28 32 } 33 span.ui-inputConsole-historyResult { 34 display:block; 35 margin-left:15px; 36 font-style:italic; 37 } 38 .ui-inputConsole-historyBg { 39 position:absolute; 40 width:100%; 41 height:100%; 42 z-index:-1; 43 opacity:0.85; 44 filter:alpha(opacity:85); 45 } 46 .ui-inputConsole-historyListContainer { 47 width:100%; 48 height:100%; 49 position:absolute; 50 overflow:auto; 51 z-index:-1; 52 } -
extensions/GrumPluginClasses/css/inputConsole_roma.css
r8961 r16012 7 7 .ui-inputConsole-history { 8 8 border-color:#666666; 9 background:#444444; 10 color:#999999; 9 color:#dddddd; 11 10 } 12 11 … … 16 15 color:#800000; 17 16 } 17 .ui-inputConsole-historyBg { 18 background:#444444; 19 } 20 .ui-inputConsole-history ul li:hover { 21 background:#444444; 22 cursor:pointer; 23 color:#cccccc; 24 } -
extensions/GrumPluginClasses/css/inputList.css
r8961 r16012 7 7 } 8 8 .ui-inputList-arrow { 9 border-style:solid;10 border-width:1px;11 9 cursor:pointer; 12 10 font-weight:bold; 13 width:1 4px;11 width:15px; 14 12 margin-top:1px; 15 height:1 4px;13 height:15px; 16 14 text-align:center; 17 15 display:inline-block; -
extensions/GrumPluginClasses/css/inputList_clear.css
r8961 r16012 9 9 10 10 .ui-inputList-arrow { 11 background:none repeat scroll 0 0 #999999; 12 border-color:#DDDDDD #666666 #666666 #DDDDDD; 13 color:#005E89; 11 border:0px; 12 color:#FF7700; 13 background-image:url(./../icons/buttons.png); 14 background-repeat:no-repeat; 15 background-position:-30px -90px; 16 -moz-border-radius:2px; 17 -webkit-border-radius:2px; 18 -khtml-border-radius:2px; 19 border-radius:2px; 14 20 } 15 16 .ui-inputList-arrow-active { 17 b order-color:#666666 #DDDDDD #DDDDDD #666666;21 .ui-inputList-arrow:hover { 22 background-position:-30px -105px; 23 background-color:#999999; 18 24 } 19 25 … … 25 31 .ui-inputList-selected-item { 26 32 background-color:#999999; 27 color:#DDDDDD; 33 } 34 35 li.ui-inputList-item div.ui-inputList-check, 36 li.ui-inputList-selected-item div.ui-inputList-check { 37 background-image:url(./../icons/buttons.png); 38 background-repeat:no-repeat; 28 39 } 29 40 30 41 li.ui-inputList-item div.ui-inputList-check { 31 background- image:url(./../icons/check_notchecked_clear.png);42 background-position:-180px -90px; 32 43 } 44 li.ui-inputList-item:hover div.ui-inputList-check { 45 background-position:-180px -105px; 46 } 47 33 48 li.ui-inputList-selected-item div.ui-inputList-check { 34 background- image:url(./../icons/check_checked_clear.png);49 background-position:-195px -90px; 35 50 } 51 li.ui-inputList-selected-item:hover div.ui-inputList-check { 52 background-position:-195px -105px; 53 } 54 55 36 56 37 57 .ui-error, input[type='text'].ui-error { -
extensions/GrumPluginClasses/css/inputList_roma.css
r8961 r16012 9 9 10 10 .ui-inputList-arrow { 11 background:none repeat scroll 0 0 #666666; 12 border-color:#999999 #444444 #444444 #999999; 13 color:#FF3363; 11 border:0px; 12 color:#FF7700; 13 background-image:url(./../icons/buttons.png); 14 background-repeat:no-repeat; 15 background-position:-30px -15px; 16 -moz-border-radius:2px; 17 -webkit-border-radius:2px; 18 -khtml-border-radius:2px; 19 border-radius:2px; 14 20 } 15 16 .ui-inputList-arrow-active { 17 b order-color:#444444 #999999 #999999 #444444;21 .ui-inputList-arrow:hover { 22 background-position:-30px 0px; 23 background-color:#222222; 18 24 } 19 25 … … 26 32 } 27 33 34 li.ui-inputList-item div.ui-inputList-check, 35 li.ui-inputList-selected-item div.ui-inputList-check { 36 background-image:url(./../icons/buttons.png); 37 background-repeat:no-repeat; 38 } 39 28 40 li.ui-inputList-item div.ui-inputList-check { 29 background- image:url(./../icons/check_notchecked_roma.png);41 background-position:-180px -15px; 30 42 } 43 li.ui-inputList-item:hover div.ui-inputList-check { 44 background-position:-180px 0px; 45 } 46 31 47 li.ui-inputList-selected-item div.ui-inputList-check { 32 background- image:url(./../icons/check_checked_roma.png);48 background-position:-195px -15px; 33 49 } 50 li.ui-inputList-selected-item:hover div.ui-inputList-check { 51 background-position:-195px 0px; 52 } 53 54 34 55 35 56 .ui-error, input[type='text'].ui-error { -
extensions/GrumPluginClasses/css/inputNum.css
r8961 r16012 19 19 cursor:pointer; 20 20 font-weight:bold; 21 width:1 4px;21 width:15px; 22 22 margin-top:1px; 23 height:1 4px;23 height:15px; 24 24 text-align:center; 25 25 display:inline-block; … … 28 28 margin-right:4px; 29 29 display:inline-block; 30 position:relative; 31 top:-2px; 30 32 } 31 33 -
extensions/GrumPluginClasses/css/inputNum_clear.css
r8961 r16012 8 8 .ui-inputNum-btDec, .ui-inputNum-btInc , 9 9 div.ui-inputNum a.ui-slider-handle { 10 background:none repeat scroll 0 0 #999999; 11 border-color:#DDDDDD #666666 #666666 #DDDDDD; 12 color:#005E89; 10 background:#005e89; 11 border:1px solid #005e89; 12 -moz-border-radius:2px; 13 -webkit-border-radius:2px; 14 -khtml-border-radius:2px; 15 border-radius:2px; 16 } 17 div.ui-inputNum a.ui-slider-handle:hover { 18 background:#d54e21; 19 border-color:#d54e21; 13 20 } 14 21 15 .ui-inputNum-btDec-active, .ui-inputNum-btInc-active { 16 border-color:#666666 #DDDDDD #DDDDDD #666666; 22 .ui-inputNum-btDec, 23 .ui-inputNum-btInc { 24 background-color:transparent; 25 background-image:url(./../icons/buttons.png); 26 background-repeat:no-repeat; 27 color:#005e89; 28 border:0px; 29 -moz-border-radius:2px; 30 -webkit-border-radius:2px; 31 -khtml-border-radius:2px; 32 border-radius:2px; 33 } 34 35 .ui-inputNum-btDec { 36 background-position:-225px -90px; 37 } 38 .ui-inputNum-btDec:hover { 39 background-position:-225px -105px; 40 background-color:#999999; 41 } 42 43 .ui-inputNum-btInc { 44 background-position:-210px -90px; 45 } 46 .ui-inputNum-btInc:hover { 47 background-position:-210px -105px; 48 background-color:#999999; 49 } 50 51 div.ui-error div.ui-inputNum-btDec { 52 background-position:-225px -75px; 53 } 54 div.ui-error div.ui-inputNum-btInc { 55 background-position: -210px -75px; 56 } 57 58 div.ui-error div.ui-inputNum-btDec:hover, 59 div.ui-error div.ui-inputNum-btInc:hover { 60 background-color:#EE4040; 17 61 } 18 62 -
extensions/GrumPluginClasses/css/inputNum_roma.css
r8961 r16012 8 8 } 9 9 10 .ui-inputNum-btDec, .ui-inputNum-btInc ,11 10 div.ui-inputNum a.ui-slider-handle { 12 background:none repeat scroll 0 0 #666666; 13 border-color:#999999 #444444 #444444 #999999; 14 color:#ff3363; 11 background:#ff7700; 12 border:1px solid #ff7700; 13 -moz-border-radius:2px; 14 -webkit-border-radius:2px; 15 -khtml-border-radius:2px; 16 border-radius:2px; 17 } 18 div.ui-inputNum a.ui-slider-handle:hover { 19 background:#ff3363; 20 border-color:#ff3363; 15 21 } 16 22 17 .ui-inputNum-btDec-active, .ui-inputNum-btInc-active { 18 border-color:#444444 #999999 #999999 #444444; 23 .ui-inputNum-btDec, 24 .ui-inputNum-btInc { 25 background-image:url(./../icons/buttons.png); 26 background-repeat:no-repeat; 27 color:#ff7700; 28 border:0px; 29 -moz-border-radius:2px; 30 -webkit-border-radius:2px; 31 -khtml-border-radius:2px; 32 border-radius:2px; 19 33 } 34 35 .ui-inputNum-btDec { 36 background-position:-225px -15px; 37 } 38 .ui-inputNum-btDec:hover { 39 background-position:-225px 0px; 40 background-color:#222222; 41 } 42 43 .ui-inputNum-btInc { 44 background-position:-210px -15px; 45 } 46 .ui-inputNum-btInc:hover { 47 background-position:-210px 0px; 48 background-color:#222222; 49 } 50 51 52 div.ui-error div.ui-inputNum-btDec { 53 background-position:-225px -75px; 54 } 55 div.ui-error div.ui-inputNum-btInc { 56 background-position: -210px -75px; 57 } 58 59 div.ui-error div.ui-inputNum-btDec:hover, 60 div.ui-error div.ui-inputNum-btInc:hover { 61 background-color:#EE4040; 62 } 63 20 64 21 65 .ui-error, input[type='text'].ui-error { -
extensions/GrumPluginClasses/css/inputSwitchButton_clear.css
r15340 r16012 2 2 /* clear css */ 3 3 .ui-inputSwitchButton-unchecked { 4 background:none repeat scroll 0 0 #999999; 5 border-color:#DDDDDD #666666 #666666 #DDDDDD; 6 color:#005E89; 4 background:#005e89; 5 border: 0px; 6 -moz-border-radius:2px; 7 -webkit-border-radius:2px; 8 -khtml-border-radius:2px; 9 border-radius:2px; 10 color: #FFFFFF; 7 11 } 8 12 9 13 .ui-inputSwitchButton-checked { 10 background:none repeat scroll 0 0 #666666; 11 border-color:#666666 #DDDDDD #DDDDDD #666666; 12 color:#ff3363; 14 background:#d54e21; 15 border: 0px; 16 -moz-border-radius:2px; 17 -webkit-border-radius:2px; 18 -khtml-border-radius:2px; 19 border-radius:2px; 20 color: #FFFFFF; 13 21 } 22 -
extensions/GrumPluginClasses/css/inputSwitchButton_roma.css
r15340 r16012 3 3 4 4 .ui-inputSwitchButton-unchecked { 5 background:none repeat scroll 0 0 #666666; 6 border-color:#999999 #444444 #444444 #999999; 7 color:#ff3363; 5 background:#FF7700; 6 border: 0px; 7 -moz-border-radius:2px; 8 -webkit-border-radius:2px; 9 -khtml-border-radius:2px; 10 border-radius:2px; 11 color: #FFFFFF; 8 12 } 9 13 10 14 .ui-inputSwitchButton-checked { 11 background:none repeat scroll 0 0 #555555; 12 border-color:#444444 #999999 #999999 #444444; 13 color:#ff3363; 15 background:#FF3363; 16 border: 0px; 17 -moz-border-radius:2px; 18 -webkit-border-radius:2px; 19 -khtml-border-radius:2px; 20 border-radius:2px; 21 color: #FFFFFF; 14 22 } 15 23 -
extensions/GrumPluginClasses/css/rbuilder.css
r7370 r16012 48 48 position:absolute; 49 49 padding:0px; 50 margin-top:-1 px;50 margin-top:-15px; 51 51 z-index:949; 52 52 } … … 91 91 div#iMenuCaddieBar ul li { list-style-type:none; padding:4px; } 92 92 div#iMenuCaddieBar:hover div#iMenuCaddieItems { cursor:pointer; display:block; } 93 .iconEdit, .iconDelete, .iconSwitchCondition { width:18px; height:18px; cursor:pointer; display:inline-block; } 94 .iconMove { width:18px; height:18px; cursor:move; display:inline-block; } 93 94 .iconMove, 95 .iconEdit, 96 .iconDelete, 97 .iconSwitchCondition { 98 width:15px; 99 height:15px; 100 cursor:pointer; 101 display:inline-block; 102 } 103 .iconMove { cursor:move; } 95 104 .itemContent { padding-left:24px; } 96 105 .cbItemUnique { border:none; } 97 106 .cbItemMultiple { border:1px solid; } 107 108 .ui-dialog-titlebar-close { 109 display: none; 110 } -
extensions/GrumPluginClasses/css/rbuilder_clear.css
r7370 r16012 2 2 .pnActive { background:#F1F1F1; } 3 3 div.cbOperatorBg { background:#dbe8f3; } 4 .iconEdit { background:url(./../../../admin/themes/clear/icon/edit_s.png) no-repeat 0 0 transparent; } 5 .iconDelete { background:url(./../../../admin/themes/clear/icon/delete.png) no-repeat 0 0 transparent; } 6 .iconMove { background:url(./../../../admin/themes/clear/icon/cat_move.png) no-repeat 0 0 transparent; } 7 .iconSwitchCondition { background:url(./../icons/switch_clear.png) no-repeat 0 0 transparent; } 4 .iconSwitchCondition, 5 .iconMove, 6 .iconDelete, 7 .iconEdit { 8 background:url(./../icons/buttons.png) no-repeat 0 0 transparent; 9 } 10 .iconSwitchCondition { 11 background-position:-300px -90px; 12 } 13 .iconSwitchCondition:hover { 14 background-position:-300px -105px; 15 } 16 17 .iconMove { 18 background-position:-285px -90px; 19 } 20 .iconMove:hover { 21 background-position:-285px -105px; 22 } 23 24 .iconDelete { 25 background-position:-255px -90px; 26 } 27 .iconDelete:hover { 28 background-position:-255px -105px; 29 } 30 31 .iconEdit { 32 background-position:-240px -90px; 33 } 34 .iconEdit:hover { 35 background-position:-240px -105px; 36 } 8 37 .cbItemMultiple { border:1px solid #999999; } 9 38 .cbItemOverGroup { border:1px dotted #999999; } -
extensions/GrumPluginClasses/css/rbuilder_roma.css
r7370 r16012 2 2 .pnActive { background:#999999; color:#444444; } 3 3 div.cbOperatorBg { background:#333333; } 4 .iconEdit { background:url(./../../../admin/themes/default/icon/edit_s.png) no-repeat 0 0 transparent; } 5 .iconDelete { background:url(./../../../admin/themes/default/icon/delete.png) no-repeat 0 0 transparent; } 6 .iconMove { background:url(./../../../admin/themes/default/icon/cat_move.png) no-repeat 0 0 transparent; } 7 .iconSwitchCondition { background:url(./../icons/switch_roma.png) no-repeat 0 0 transparent; } 4 .iconSwitchCondition, 5 .iconMove, 6 .iconDelete, 7 .iconEdit { 8 background:url(./../icons/buttons.png) no-repeat 0 0 transparent; 9 } 10 .iconSwitchCondition { 11 background-position:-300px -15px; 12 } 13 .iconSwitchCondition:hover { 14 background-position:-300px -0px; 15 } 16 17 .iconMove { 18 background-position:-285px -15px; 19 } 20 .iconMove:hover { 21 background-position:-285px -0px; 22 } 23 24 .iconDelete { 25 background-position:-255px -15px; 26 } 27 .iconDelete:hover { 28 background-position:-255px -0px; 29 } 30 31 .iconEdit { 32 background-position:-240px -15px; 33 } 34 .iconEdit:hover { 35 background-position:-240px -0px; 36 } 37 8 38 .cbItemMultiple { border:1px solid #666666; } 9 39 .cbItemOverGroup { border:1px dotted #666666; } -
extensions/GrumPluginClasses/gpc_aim.class.inc.php
r6948 r16012 17 17 18 18 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 19 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');20 19 21 20 class GPC_AIM extends CommonPlugin 22 21 { 23 protected $css = null;24 25 22 public function __construct($prefixeTable, $filelocation) 26 23 { … … 28 25 $this->setPluginNameFiles("gpc"); 29 26 parent::__construct($prefixeTable, $filelocation); 30 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");31 }32 33 public function __destruct()34 {35 unset($this->css);36 parent::__destruct();37 27 } 38 28 … … 40 30 initialize events call for the plugin 41 31 */ 42 function initEvents()32 public function initEvents() 43 33 { 34 parent::initEvents(); 44 35 add_event_handler('get_admin_plugin_menu_links', array(&$this, 'pluginAdminMenu') ); 45 36 } 46 37 47 38 public function loadCSS() 39 { 40 parent::loadCSS(); 41 GPCCore::addUI('gpcCSS'); 42 } 48 43 49 44 /* --------------------------------------------------------------------------- -
extensions/GrumPluginClasses/gpc_aip.class.inc.php
r5550 r16012 35 35 ''); 36 36 } 37 38 public function __destruct()39 {40 parent::__destruct();41 }42 43 /*44 initialize events call for the plugin45 */46 function initEvents()47 {48 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));49 }50 51 37 52 38 /* --------------------------------------------------------------------------- -
extensions/GrumPluginClasses/gpc_ajax.php
r12215 r16012 23 23 * - public.rbuilder.searchExecute 24 24 * - public.rbuilder.searchGetPage 25 * - public. tagSelector.get26 * - admin. tagSelector.get25 * - public.inputTag.get 26 * - admin.inputTag.get 27 27 * - public.contact.sendMsg 28 28 * … … 32 32 33 33 define('PHPWG_ROOT_PATH',dirname(dirname(dirname(__FILE__))).'/'); 34 34 if(!defined('AJAX_CALL')) define('AJAX_CALL', true); 35 35 36 36 /* … … 38 38 */ 39 39 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 40 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) 41 { 42 define('IN_ADMIN', true); 43 } 40 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true); 44 41 45 42 // the common.inc.php file loads all the main.inc.php plugins files 46 43 include_once(PHPWG_ROOT_PATH.'include/common.inc.php' ); 47 44 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php' ); 45 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php'); 48 46 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 49 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');50 47 51 48 global $page; … … 77 74 $tableList=array('result_cache'); 78 75 $this->setTablesList($tableList); 79 80 76 $this->loadConfig(); 81 77 $this->checkRequest(); … … 100 96 $_REQUEST['ajaxfct']=='admin.categorySelector.getList' or 101 97 $_REQUEST['ajaxfct']=='public.categorySelector.getList' or 102 $_REQUEST['ajaxfct']=='public. tagSelector.get' or103 $_REQUEST['ajaxfct']=='admin. tagSelector.get' or98 $_REQUEST['ajaxfct']=='public.inputTag.get' or 99 $_REQUEST['ajaxfct']=='admin.inputTag.get' or 104 100 $_REQUEST['ajaxfct']=='public.contact.sendMsg' 105 101 ) … … 149 145 150 146 /* 151 * check admin. tagSelector.get values147 * check admin.inputTag.get values 152 148 */ 153 if($_REQUEST['ajaxfct']=="admin. tagSelector.get" or154 $_REQUEST['ajaxfct']=="public. tagSelector.get")149 if($_REQUEST['ajaxfct']=="admin.inputTag.get" or 150 $_REQUEST['ajaxfct']=="public.inputTag.get") 155 151 { 156 152 if(!isset($_REQUEST['letters'])) $_REQUEST['ajaxfct']=""; … … 236 232 $result=$this->ajax_gpc_public_CategorySelectorGetList($_REQUEST['filter'], $_REQUEST['galleryRoot'], $_REQUEST['tree']); 237 233 break; 238 case 'admin. tagSelector.get':239 $result=$this->ajax_gpc_both_ TagSelectorGet('admin', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);240 break; 241 case 'public. tagSelector.get':242 $result=$this->ajax_gpc_both_ TagSelectorGet('public', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']);234 case 'admin.inputTag.get': 235 $result=$this->ajax_gpc_both_InputTagGet('admin', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']); 236 break; 237 case 'public.inputTag.get': 238 $result=$this->ajax_gpc_both_InputTagGet('public', $_REQUEST['letters'], $_REQUEST['filter'], $_REQUEST['maxTags'], $_REQUEST['ignoreCase']); 243 239 break; 244 240 case 'public.contact.sendMsg': … … 408 404 * @return String : json string 409 405 */ 410 private function ajax_gpc_both_ TagSelectorGet($mode, $letters, $filter, $maxTags, $ignoreCase)406 private function ajax_gpc_both_InputTagGet($mode, $letters, $filter, $maxTags, $ignoreCase) 411 407 { 412 408 global $user; … … 482 478 483 479 return(json_encode($returned)); 484 } //ajax_gpc_both_ TagSelectorGet480 } //ajax_gpc_both_InputTagGet 485 481 486 482 -
extensions/GrumPluginClasses/js/rbCriteriaBuilder.js
r10884 r16012 109 109 helpMove:'', 110 110 helpSwitchCondition:'', 111 ajaxUrl:'' 111 ajaxUrl:'', 112 token:'' 112 113 }, 113 114 extraData = new Array(); … … 590 591 } 591 592 592 var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute& requestName='+itemsId.container+'&'+getItems());593 var datas=encodeURI('ajaxfct=public.rbuilder.searchExecute&token='+options.token+'&requestName='+itemsId.container+'&'+getItems()); 593 594 $.ajax( 594 595 { … … 621 622 url: options.ajaxUrl, 622 623 async: true, 623 data: {ajaxfct:'public.rbuilder.searchGetPage', page:pageNumber, requestNumber:requestNumber, numPerPage:numberPerPage}, 624 data: { 625 ajaxfct:'public.rbuilder.searchGetPage', 626 page:pageNumber, 627 requestNumber:requestNumber, 628 numPerPage:numberPerPage, 629 token:options.token 630 }, 624 631 success: function(msg) 625 632 { -
extensions/GrumPluginClasses/js/rbSearch.js
r10884 r16012 52 52 requestResultRequestNumber:0, 53 53 onPageChange:null, 54 numberPerPage:30 54 numberPerPage:30, 55 token:'' 55 56 }; 56 57 … … 245 246 url: "plugins/GrumPluginClasses/gpc_ajax.php", 246 247 async: true, 247 data: { ajaxfct:"admin.rbuilder.fillCaddie", fillMode:mode, requestNumber:requestNumber }, 248 data: { 249 ajaxfct:"admin.rbuilder.fillCaddie", 250 fillMode:mode, 251 requestNumber:requestNumber, 252 token:options.token 253 }, 248 254 success: 249 255 function(msg) -
extensions/GrumPluginClasses/js/simpleTip.js
r15340 r16012 391 391 { 392 392 case 'Up': 393 bgp=' -'+items[itemIndex].options.arrowHeight+'px 0px';393 bgp='0px -'+items[itemIndex].options.arrowHeight+'px'; 394 394 break; 395 395 case 'Left': 396 bgp=' 0px -'+items[itemIndex].options.arrowWeight+'px';396 bgp='-'+items[itemIndex].options.arrowWidth+'px 0px'; 397 397 break; 398 398 case 'Down': … … 400 400 break; 401 401 case 'Right': 402 bgp='-'+items[itemIndex].options.arrowHeight+'px -'+items[itemIndex].options.arrowW eight+'px';402 bgp='-'+items[itemIndex].options.arrowHeight+'px -'+items[itemIndex].options.arrowWidth+'px'; 403 403 break; 404 404 } -
extensions/GrumPluginClasses/js/ui.categorySelector.js
r15340 r16012 3 3 * file: ui.categorySelector.js 4 4 * file version: 1.1.1 5 * date: 2012-0 5-255 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 40 39 * | | | * add 'displayPath' property 41 40 * | | | 42 * | 1.1.1 | 2012-0 5-25| * fix bug with jquery 1.7.241 * | 1.1.1 | 2012-06-18 | * fix bug with jquery 1.7.2 43 42 * | | | . display list now works :) 44 43 * | | | 44 * | | | * improve memory managment 45 45 * | | | 46 46 * | | | … … 65 65 // default values for the plugin 66 66 var $this=$(this), 67 timeStamp=new Date(), 67 68 data = $this.data('options'), 68 69 objects = $this.data('objects'), … … 79 80 iconWidthEC:15, 80 81 serverUrl:'plugins/GrumPluginClasses/gpc_ajax.php', 82 postData:{}, 81 83 filter:'accessible', 82 84 popup:null, … … 87 89 popupMode:'click', 88 90 displayPath:false, 89 downArrow:' ⇓'91 downArrow:'' //'⇓' 90 92 }; 91 93 … … 100 102 $this.data('properties', 101 103 { 104 objectId:'cs'+Math.ceil(timeStamp.getTime()*Math.random()), 102 105 index:-1, 103 106 initialized:false, … … 142 145 'class':'ui-category-selector-status', 143 146 css: { 144 float:'right',147 'float':'right', 145 148 display:(options.displayStatus)?'block':'none' 146 149 } … … 213 216 var $this=$(this), 214 217 objects = $this.data('objects'); 218 objects.containerName.unbind().remove(); 219 objects.containerList.unbind().remove(); 220 objects.containerStatus.unbind().remove(); 221 objects.containerArrow.unbind().remove(); 215 222 objects.container.unbind().remove(); 216 223 objects.list.children().unbind(); 217 224 objects.listContainer.remove(); 225 $(document).unbind('focusout.'+properties.objectId+' focusin.'+properties.objectId); 218 226 $this 227 .removeData() 219 228 .unbind('.categorySelector') 220 229 .css( … … 224 233 } 225 234 ); 235 delete $this; 226 236 } 227 237 ); … … 412 422 } 413 423 }, // serverUrl 424 425 postData: function (value) 426 { 427 if(value!=null) 428 { 429 // set selected value 430 return( 431 this.each( 432 function() 433 { 434 privateMethods.setPostData($(this), value, true); 435 } 436 ) 437 ); 438 } 439 else 440 { 441 var options=this.data('options'); 442 return(options.postData); 443 } 444 }, // postData 414 445 415 446 filter: function (value) … … 813 844 privateMethods.setLevelIndent(object, (value.levelIndent!=null)?value.levelIndent:options.levelIndent); 814 845 privateMethods.setIconWidthEC(object, (value.iconWidthEC!=null)?value.iconWidthEC:options.iconWidthEC); 846 privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData); 815 847 privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl); 816 848 privateMethods.setFilter(object, (value.filter!=null)?value.filter:options.filter); … … 968 1000 return(options.serverUrl); 969 1001 }, 1002 1003 setPostData : function (object, value) 1004 { 1005 var properties=object.data('properties'), 1006 options=object.data('options'); 1007 1008 if(!properties.initialized || value!=options.postData) 1009 { 1010 options.postData=value; 1011 } 1012 1013 return(options.postData); 1014 }, // setPostData 970 1015 971 1016 setFilter : function (object, value) … … 1094 1139 } 1095 1140 ); 1096 $(document).bind('focusout focusin',1141 $(document).bind('focusout.'+properties.objectId+' focusin.'+properties.objectId, 1097 1142 function (event) 1098 1143 { … … 1614 1659 filter:options.filter, 1615 1660 galleryRoot:options.galleryRoot?'y':'n', 1616 tree:'y' 1661 tree:'y', 1662 data:options.postData 1617 1663 }, 1618 1664 success: function(msg) -
extensions/GrumPluginClasses/js/ui.iconSelector.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.iconSelector.js 4 * file version: 1.0. 05 * date: 201 0-10-104 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 87 86 * | 1.0.0 | 2010/10/10 | first release 88 87 * | | | 88 * | 1.0.1 | 2012/06/18 | * imoprove memory managment 89 89 * | | | 90 90 * | | | … … 220 220 $this 221 221 .unbind('.iconSelector') 222 .removeData() 222 223 .css( 223 224 { … … 227 228 } 228 229 ); 230 delete $this; 229 231 } 230 232 ); -
extensions/GrumPluginClasses/js/ui.inputCheckbox.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputCheckbox.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 22 21 * 23 22 * | release | date | 24 * | 1.0.0 | 2010/11/04 | first release23 * | 1.0.0 | 2010/11/04 | * first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 53 52 properties = $this.data('properties'), 54 53 options = 55 { 54 { 56 55 values: 57 56 { … … 111 110 { 112 111 // default values for the plugin 113 var properties=this.data('properties'); 112 var $this=$(this), 113 properties=$this.data('properties'); 114 114 properties.checkboxList.unbind('.inputCheckbox'); 115 this.removeClass('ui-inputCheckbox'); 115 116 $this 117 .unbind('.inputCheckbox') 118 .removeData() 119 .removeClass('ui-inputCheckbox'); 120 delete $this; 116 121 } 117 122 ); … … 416 421 break; 417 422 } 418 } 423 } 419 424 else if($.isArray(value) && !properties.isCB) 420 425 { … … 425 430 */ 426 431 properties.checkboxList.attr('checked', false); 427 432 428 433 for(var i=0;i<value.length;i++) 429 434 { … … 437 442 } 438 443 } 439 440 } 441 else 444 445 } 446 else 442 447 { 443 448 // a single value 444 449 445 450 if(options.values.checked==value) 446 451 { … … 453 458 if(id=='') 454 459 { 455 properties.checkboxList.attr('checked', true); 460 properties.checkboxList.attr('checked', true); 456 461 } 457 462 else … … 471 476 if(id=='') 472 477 { 473 properties.checkboxList.attr('checked', false); 478 properties.checkboxList.attr('checked', false); 474 479 } 475 480 else -
extensions/GrumPluginClasses/js/ui.inputColorPicker.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputColorPicker.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 22 21 * 23 22 * | release | date | 24 * | 1.0.0 | 2010/11/04 | first release23 * | 1.0.0 | 2010/11/04 | * first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 201 200 numDec:0, 202 201 unitValue:'', 203 btInc:'+',204 btDec:'-',202 //btInc:'+', 203 //btDec:'-', 205 204 value:0, 206 205 showSlider:'auto', … … 218 217 numDec:0, 219 218 unitValue:'', 220 btInc:'+',221 btDec:'-',219 //btInc:'+', 220 //btDec:'-', 222 221 value:0, 223 222 showSlider:'auto', … … 235 234 numDec:0, 236 235 unitValue:'', 237 btInc:'+',238 btDec:'-',236 //btInc:'+', 237 //btDec:'-', 239 238 value:0, 240 239 showSlider:'auto', … … 252 251 numDec:0, 253 252 unitValue:'', 254 btInc:'+',255 btDec:'-',253 //btInc:'+', 254 //btDec:'-', 256 255 value:0, 257 256 showSlider:'auto', … … 269 268 numDec:0, 270 269 unitValue:'', 271 btInc:'+',272 btDec:'-',270 //btInc:'+', 271 //btDec:'-', 273 272 value:0, 274 273 showSlider:'auto', … … 286 285 numDec:0, 287 286 unitValue:'', 288 btInc:'+',289 btDec:'-',287 //btInc:'+', 288 //btDec:'-', 290 289 value:0, 291 290 showSlider:'auto', … … 303 302 numDec:0, 304 303 unitValue:'', 305 btInc:'+',306 btDec:'-',304 //btInc:'+', 305 //btDec:'-', 307 306 value:0, 308 307 showSlider:'auto', … … 373 372 objects.inputContainer.remove(); 374 373 objects.container.remove(); 374 375 $this 376 .unbind() 377 .removeData(); 378 379 delete $this; 375 380 } 376 381 ); … … 1115 1120 { 1116 1121 objects.colorPicker.inputColorPicker('destroy').remove(); 1117 $(this).dialog('destroy') ;1122 $(this).dialog('destroy').remove(); 1118 1123 } 1119 1124 }; … … 1121 1126 if(options.modal) 1122 1127 { 1123 dialogOpt.buttons= 1124 { 1125 'ok' : function (event) 1126 { 1127 if(options.change) 1128 { 1129 if(options.mode==1) 1130 { 1131 options.change(event, objects.colorPicker.inputColorPicker('colors').fg ); 1132 } 1133 else 1134 { 1135 options.change(event, objects.colorPicker.inputColorPicker('colors') ); 1136 } 1137 } 1138 $(this).dialog('close'); 1139 }, 1140 'cancel' : function (event) 1141 { 1142 $(this).dialog('close'); 1143 } 1128 dialogOpt.buttons[options.buttons.ok]=function (event) 1129 { 1130 if(options.change) 1131 { 1132 if(options.mode==1) 1133 { 1134 options.change(event, objects.colorPicker.inputColorPicker('colors').fg ); 1135 } 1136 else 1137 { 1138 options.change(event, objects.colorPicker.inputColorPicker('colors') ); 1139 } 1140 } 1141 $(this).dialog('close'); 1144 1142 }; 1143 1144 dialogOpt.buttons[options.buttons.cancel]=function (event) 1145 { 1146 $(this).dialog('close'); 1147 }; 1148 1145 1149 dialogOpt.open= function () 1146 1150 { -
extensions/GrumPluginClasses/js/ui.inputColorsFB.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputColorsFB.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/11/04 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 155 154 var $this=$(this), 156 155 objects = $this.data('objects'); 157 objects.dot.remove(); 156 objects.fg.remove(); 157 objects.bg.remove(); 158 objects.fgopacity.remove(); 159 objects.bgopacity.remove(); 158 160 objects.container.unbind().remove(); 159 161 $this 160 162 .unbind('.inputColorsFB') 163 .removeData() 161 164 .css( 162 165 { … … 165 168 } 166 169 ); 170 delete $this; 167 171 } 168 172 ); -
extensions/GrumPluginClasses/js/ui.inputConsole.js
r12215 r16012 3 3 * file: ui.inputConsole.js 4 4 * file version: 1.0.1 5 * date: 201 0-11-055 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/10/10 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 207 206 objects = $this.data('objects'); 208 207 objects.input.unbind().remove(); 208 objects.prompt.unbind().remove(); 209 objects.inputContainer.unbind().remove(); 210 objects.historyList.unbind().remove(); 211 objects.historyListContainer.unbind().remove(); 212 objects.historyBackground.unbind().remove(); 213 objects.historyContainer.unbind().remove(); 209 214 objects.container.unbind().remove(); 210 215 $this 211 216 .unbind('.inputConsole') 217 .removeData() 212 218 .css( 213 219 { … … 216 222 } 217 223 ); 224 delete $this; 218 225 } 219 226 ); -
extensions/GrumPluginClasses/js/ui.inputDotArea.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputDotArea.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/11/04 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 149 148 $this 150 149 .unbind('.inputDotArea') 150 .removeData() 151 151 .css( 152 152 { … … 155 155 } 156 156 ); 157 delete $this; 157 158 } 158 159 ); -
extensions/GrumPluginClasses/js/ui.inputList.js
r15340 r16012 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/10/10 | first release 25 24 * | | | 26 * | 1.0.1 | 2012/0 5/25 |fix bug with jquery 1.7.227 * | | | . display list now works :)25 * | 1.0.1 | 2012/06/18 | * fix bug with jquery 1.7.2 26 * | | | . display list now works :) 28 27 * | | | 28 * | | | * improve memory managment 29 29 * | | | 30 30 * | | | … … 49 49 // default values for the plugin 50 50 var $this=$(this), 51 timeStamp=new Date(), 51 52 data = $this.data('options'), 52 53 objects = $this.data('objects'), … … 55 56 { 56 57 serverUrl:'', 58 postData:{}, 57 59 autoLoad:true, 58 60 listMaxWidth:0, 59 61 listMaxHeight:0, 60 62 multiple:false, 61 downArrow:' ⇓',63 downArrow:'', //⇓ 62 64 popupMode:'click', 63 65 colsWidth:[], … … 80 82 $this.data('properties', 81 83 { 84 objectId:'il'+Math.ceil(timeStamp.getTime()*Math.random()), 82 85 index:-1, 83 86 initialized:false, … … 204 207 // default values for the plugin 205 208 var $this=$(this), 209 properties = $this.data('properties'), 206 210 objects = $this.data('objects'); 207 211 objects.container.unbind().remove(); 208 212 objects.list.children().unbind(); 209 objects.listContainer.remove(); 213 objects.listContainer.unbind().remove(); 214 $(document).unbind('focusout.'+properties.objectId+' focusin.'+properties.objectId); 210 215 $this 216 .removeData() 211 217 .unbind('.inputList') 212 218 .css( … … 216 222 } 217 223 ); 224 delete $this; 218 225 } 219 226 ); … … 328 335 } 329 336 }, // serverUrl 337 338 postData: function (value) 339 { 340 if(value!=null) 341 { 342 // set selected value 343 return( 344 this.each( 345 function() 346 { 347 privateMethods.setPostData($(this), value, true); 348 } 349 ) 350 ); 351 } 352 else 353 { 354 var options=this.data('options'); 355 return(options.postData); 356 } 357 }, // postData 330 358 331 359 cols: function () … … 747 775 privateMethods.setListMaxWidth(object, (value.listMaxWidth!=null)?value.listMaxWidth:options.listMaxWidth); 748 776 privateMethods.setListMaxHeight(object, (value.listMaxHeight!=null)?value.listMaxHeight:options.listMaxHeight); 777 privateMethods.setPostData(object, (value.postData!=null)?value.postData:options.postData); 749 778 privateMethods.setServerUrl(object, (value.serverUrl!=null)?value.serverUrl:options.serverUrl); 750 779 privateMethods.setPopupMode(object, (value.popupMode!=null)?value.popupMode:options.popupMode); … … 759 788 privateMethods.setMultiple(object, (value.multiple!=null)?value.multiple:options.multiple); // can be set only at the initialization 760 789 761 if(options.autoLoad) privateMethods.load(object); 790 if(options.autoLoad && options.serverUrl!='') 791 { 792 privateMethods.load(object, (value.value!=null)?value.value:null); 793 } 794 else 795 { 796 privateMethods.setValue(object, (value.value!=null)?value.value:null); 797 } 762 798 763 799 properties.initialized=true; … … 899 935 return(options.serverUrl); 900 936 }, 937 938 setPostData : function (object, value) 939 { 940 var properties=object.data('properties'), 941 options=object.data('options'); 942 943 if(!properties.initialized || value!=options.postData) 944 { 945 options.postData=value; 946 } 947 948 return(options.postData); 949 }, // setPostData 901 950 902 951 setMultiple : function (object, value) … … 974 1023 } 975 1024 ); 976 $(document).bind('focusout focusin',977 function (event)978 {979 if(!properties.mouseOver) privateMethods.displaySelector(object, false);980 event.stopPropagation();981 }1025 $(document).bind('focusout.'+properties.objectId+' focusin.'+properties.objectId, 1026 function (event) 1027 { 1028 if($.isPlainObject(properties) && !properties.mouseOver) privateMethods.displaySelector(object, false); 1029 event.stopPropagation(); 1030 } 982 1031 ); 983 1032 } … … 1297 1346 }, 1298 1347 1299 load : function (object )1348 load : function (object, defaultValue) 1300 1349 { 1301 1350 // load datas from server through an asynchronous ajax call … … 1310 1359 type: "POST", 1311 1360 url: options.serverUrl, 1361 data:options.postData, 1312 1362 async: true, 1313 1363 success: function(msg) … … 1318 1368 if(options.multiple) 1319 1369 { 1320 privateMethods.setValue(object, ':none'); 1370 if(defaultValue!=null) 1371 { 1372 privateMethods.setValue(object, defaultValue); 1373 } 1374 else 1375 { 1376 privateMethods.setValue(object, ':none'); 1377 } 1321 1378 } 1322 1379 else 1323 1380 { 1324 privateMethods.setValue(object, ':first'); 1381 if(defaultValue!=null) 1382 { 1383 privateMethods.setValue(object, defaultValue); 1384 } 1385 else 1386 { 1387 privateMethods.setValue(object, ':first'); 1388 } 1325 1389 } 1326 1390 properties.initialized=true; -
extensions/GrumPluginClasses/js/ui.inputNum.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputNum.js 4 * file version: 1.0. 05 * date: 201 0-11-024 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/10/10 | first release 25 24 * | | | 25 * | 1.0.1 | 2012/06/18 | * improve memory managment 26 26 * | | | 27 27 * | | | … … 60 60 disabled:false, 61 61 textAlign:'right', 62 btInc:' +',63 btDec:' -',62 btInc:'', // + 63 btDec:'', // - 64 64 unitValue:'', 65 65 change:null … … 226 226 $this 227 227 .unbind('.inputNum') 228 .removeData() 228 229 .css( 229 230 { … … 232 233 } 233 234 ); 235 delete $this; 234 236 } 235 237 ); … … 647 649 var objects=object.data('objects'), 648 650 properties=object.data('properties'); 651 652 if(value=='check') 653 value=privateMethods.isValid(object, properties.value); 649 654 650 655 if(properties.isValid!=value) … … 1043 1048 { 1044 1049 var objects=object.data('objects'), 1045 properties=object.data('properties'); 1046 1050 properties=object.data('properties'); 1051 1047 1052 objects.input.css('width', (objects.container.width()-objects.extraContainer.outerWidth()-properties.inputMargins)+'px'); 1048 1053 } -
extensions/GrumPluginClasses/js/ui.inputPosition.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputPosition.js 4 * file version: 1.0. 05 * date: 201 0-11-054 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/10/10 | first release 25 24 * | | | 25 * | 1.0.1 | 2012/06/18 | * improve memory managment 26 26 * | | | 27 27 * | | | … … 183 183 $this 184 184 .unbind('.inputPosition') 185 .removeData() 185 186 .css( 186 187 { … … 189 190 } 190 191 ); 192 delete $this; 191 193 } 192 194 ); -
extensions/GrumPluginClasses/js/ui.inputRadio.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputRadio.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/11/04 | first release 25 24 * | | | 25 * | 1.0.1 | 2012/06/18 | * improve memory managment 26 26 * | | | 27 27 * | | | … … 119 119 $this 120 120 .unbind('.inputRadio') 121 .removeData() 121 122 .css( 122 123 { … … 125 126 } 126 127 ); 128 delete $this; 127 129 } 128 130 ); -
extensions/GrumPluginClasses/js/ui.inputStatusBar.js
r8961 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputStatusBar.js 4 * file version: 1.0. 05 * date: 201 0-11-044 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2010/11/04 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 115 114 var $this=$(this), 116 115 objects = $this.data('objects'); 116 117 117 objects.tr.remove(); 118 118 objects.table.remove(); 119 119 $this 120 120 .unbind('.inputStatusBar') 121 .removeData() 121 122 .css( 122 123 { … … 125 126 } 126 127 ); 128 delete $this; 127 129 } 128 130 ); -
extensions/GrumPluginClasses/js/ui.inputSwitchButton.js
r12215 r16012 1 1 /** 2 2 * ----------------------------------------------------------------------------- 3 * file: ui.input Checkbox.js4 * file version: 1.0. 05 * date: 201 1-06-183 * file: ui.inputSwitchButton.js 4 * file version: 1.0.1 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 24 23 * | 1.0.0 | 2011/06/18 | first release 25 24 * | | | 26 * | | |25 * | 1.0.1 | 2012/06/18 | * improve memory managment 27 26 * | | | 28 27 * | | | … … 53 52 properties = $this.data('properties'), 54 53 options = 55 { 54 { 56 55 values: 57 56 { … … 99 98 { 100 99 // default values for the plugin 101 var properties=this.data('properties'); 102 $this.unbind('.inputSwitchButton'); 103 this.removeClass('ui-inputSwitchButton'); 100 var $this=$(this); 101 102 $this 103 .unbind('.inputSwitchButton') 104 .removeData() 105 .removeClass('ui-inputSwitchButton ui-inputSwitchButton-unchecked ui-inputSwitchButton-checked'); 106 delete $this; 104 107 } 105 108 ); … … 136 139 } 137 140 }, // disabled 138 141 139 142 values: function (values) 140 143 { … … 191 194 { 192 195 var options = this.data('options'); 193 196 194 197 return(properties.checked?options.values.checked:options.values.unchecked); 195 198 } … … 283 286 return(options.values); 284 287 }, //setValues 285 286 288 289 287 290 setGroup: function (object, value) 288 291 { … … 298 301 if(listGroup==null) listGroup=[]; 299 302 p=$.inArray(object.attr('id'), listGroup); 300 if(p>-1) listGroup.splice(p,1); 303 if(p>-1) listGroup.splice(p,1); 301 304 $(document).data('isbGroup_'+options.group, listGroup); 302 } 305 } 303 306 options.group=value; 304 307 listGroup=$(document).data('isbGroup_'+value); … … 307 310 $(document).data('isbGroup_'+value, listGroup); 308 311 } 309 }, 310 312 }, 313 311 314 switchValue: function (object) 312 315 { … … 340 343 } 341 344 } 342 345 343 346 object 344 347 .addClass('ui-inputSwitchButton-checked') -
extensions/GrumPluginClasses/js/ui.inputText.js
r15373 r16012 2 2 * ----------------------------------------------------------------------------- 3 3 * file: ui.inputText.js 4 * file version: 1.1. 15 * date: 201 1-01-094 * file version: 1.1.2 5 * date: 2012-06-18 6 6 * 7 7 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses" … … 11 11 * email : grum@piwigo.com 12 12 * website : http://photos.grum.fr 13 * PWG user : http://forum.phpwebgallery.net/profile.php?id=370614 13 * 15 14 * << May the Little SpaceFrog be with you ! >> … … 31 30 * | 1.1.1 | 2011/01/31 | * add function ':clear' for 'languagesValues' method 32 31 * | | | 32 * | 1.1.2 | 2012/06/18 | * improve memory managment 33 33 * | | | 34 * | | | 34 * | | | * fix bug on regExp option 35 35 * | | | 36 36 * | | | … … 139 139 $this 140 140 .unbind('.inputText') 141 .removeData() 141 142 .css( 142 143 { … … 145 146 } 146 147 ); 148 delete $this; 147 149 } 148 150 ); … … 539 541 var properties=object.data('properties'); 540 542 541 return(properties.re. exec(value))543 return(properties.re.test(value)); 542 544 }, 543 545 … … 570 572 privateMethods.setTextAlign(object, (value.textAlign!=null)?value.textAlign:options.textAlign); 571 573 574 privateMethods.setDisabled(object, (value.disabled!=null)?value.disabled:options.disabled); 575 572 576 privateMethods.setEventChange(object, (value.change!=null)?value.change:options.change); 573 577 … … 598 602 var objects=object.data('objects'), 599 603 properties=object.data('properties'); 604 605 if(value=='check') 606 value=privateMethods.isValid(object, properties.value); 600 607 601 608 if(properties.isValid!=value && properties.initialized) … … 892 899 } 893 900 894 privateMethods.setIsValid(object, true);901 privateMethods.setIsValid(object, privateMethods.isValid(object, value)); 895 902 896 903 properties.value=value; -
extensions/GrumPluginClasses/main.inc.php
r15340 r16012 178 178 | | | . Compatibility with Piwigo 2.4 179 179 | | | 180 | | | 180 | | | * optimization & rename of some JS framework components 181 181 | | | 182 182 | | | … … 199 199 GPCCategorySelector.class.inc.php 200 200 GPCCore.class.php 201 GPCCss.class.php202 201 GPCPagesNavigation.class.php 203 202 GPCPublicIntegration.class.php … … 241 240 } 242 241 243 244 if(defined('IN_ADMIN')) 242 if(defined('IN_ADMIN') && !defined('AJAX_CALL')) 245 243 { 246 244 //GPC admin interface is loaded and active only if in admin page -
extensions/GrumPluginClasses/templates/GPCRequestBuilder_result.tpl
r6208 r16012 4 4 <table> 5 5 <tr> 6 <td >6 <td class="rbResultItemImg"> 7 7 <img class="thumbnail" src='{$row.imageThumbnail}'> 8 8 </td>
Note: See TracChangeset
for help on using the changeset viewer.