Changeset 15340


Ignore:
Timestamp:
May 27, 2012, 9:50:54 AM (12 years ago)
Author:
grum
Message:

feature:2436 - Compatibility with Piwigo 2.4

Location:
extensions/GrumPluginClasses
Files:
14 added
27 deleted
10 edited

Legend:

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

    r8961 r15340  
    129129    $this->fileLocation=$filelocation;
    130130    $this->prefixeTable=$prefixeTable;
    131     $this->page_link="admin.php?page=plugin&section=".basename(dirname($this->getFileLocation()))."/admin/".$this->plugin_admin_file.".php";
     131    $this->page_link=get_root_url().'admin.php?page=plugin-'.basename(dirname($this->getFileLocation()));
     132    //$this->page_link="admin.php?page=plugin&section=".basename(dirname($this->getFileLocation()))."/admin/".$this->plugin_admin_file.".php";
    132133    $this->initConfig();
    133134    $this->displayResult_ok="OK";
     
    253254  public function pluginAdminMenu($menu)
    254255  {
     256    array_push(
     257      $menu,
     258      array(
     259        'NAME' => $this->plugin_name,
     260        'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname($this->getFileLocation()))
     261        )
     262    );
     263    /*
    255264    array_push($menu,
    256265               array(
     
    258267                  'URL' => get_admin_plugin_menu_link(dirname($this->getFileLocation()).
    259268                                '/admin/'.$this->plugin_admin_file.'.php')
    260                    ));
     269                   ));*/
    261270    return $menu;
    262271  }
  • extensions/GrumPluginClasses/classes/GPCCore.class.inc.php

    r12215 r15340  
    5656|         |            |
    5757| 1.4.1   | 2011/09/19 | * Add [var] and [form_mail] markup interpreter
     58|         |            |
     59|         | 2012/05/25 | * Add GPCUserAgent class
     60|         |            |
     61|         |            | * Compatibility with jquery 1.7.2 & jquery-ui 1.8.16
     62|         |            |   . implement getMinified() & setMinifiedState() functions
     63|         |            |        (let piwigo combined function manage the minified
     64|         |            |         state)
     65|         |            |   . add manually each component for ui functionnalities
    5866|         |            |
    5967|         |            |
     
    7583    - static function addHeaderJS
    7684    - static function addUI
    77     - static function getMinified
    78     - static function setMinifiedState
    7985    - static function getUserLanguageDesc
    8086    - static function getPiwigoSystemPath
     
    8995{
    9096  static private $piwigoSystemPath;
    91   static private $minified='.min';
    9297
    9398  static public $pluginName = "GPCCore";
     
    102107
    103108    self::$piwigoSystemPath=dirname(dirname(dirname(dirname(__FILE__))));
    104 
    105     if(isset($conf['gpc.script.minify'])) self::setMinifiedState($conf['gpc.script.minify']);
    106109
    107110    if((isset($conf['gpc.markup.bb']) && $conf['gpc.markup.bb']) ||
     
    135138        Array('name' => "GPCTabSheet", 'version' => "1.1.1"),
    136139        Array('name' => "GPCTranslate", 'version' => "2.1.1"),
    137         Array('name' => "GPCUsersGroups", 'version' => "2.1.0")
     140        Array('name' => "GPCUsersGroups", 'version' => "2.1.0"),
     141        Array('name' => "GPCUserAgent", 'version' => "1.0.0")
    138142      )
    139143    );
     
    448452    if(preg_match($patterns[0], $text)>0)
    449453    {
    450       GPCCore::addHeaderJS('gpc.markup.formMail', GPC_PATH.'js/markup.formMail'.self::$minified.'.js', array('jquery'));
     454      GPCCore::addHeaderJS('gpc.markup.formMail', GPC_PATH.'js/markup.formMail.js', array('jquery'));
    451455      return(preg_replace($patterns, $replacements, $text));
    452456    }
     
    490494    if(preg_match($patterns[0], $text)>0)
    491495    {
    492       GPCCore::addHeaderJS('gpc.markup.tabs', GPC_PATH.'js/markup.tabs'.self::$minified.'.js', array('jquery'));
     496      GPCCore::addHeaderJS('gpc.markup.tabs', GPC_PATH.'js/markup.tabs.js', array('jquery'));
    493497      GPCCore::addHeaderCSS('gpc.markup.tabs', GPC_PATH.'css/gpcTabs.css');
    494498      return(preg_replace($patterns, $replacements, $text));
     
    591595        case 'googleTranslate':
    592596          self::addHeaderJS('google.jsapi', 'http://www.google.com/jsapi');
    593           self::addHeaderJS('gpc.googleTranslate', 'plugins/GrumPluginClasses/js/google_translate'.self::$minified.'.js', array('jquery', 'google.jsapi'));
     597          self::addHeaderJS('gpc.googleTranslate', 'plugins/GrumPluginClasses/js/google_translate.js', array('jquery', 'google.jsapi'));
    594598        case 'categorySelector':
    595599          self::addHeaderCSS('gpc.categorySelector', GPC_PATH.'css/categorySelector.css');
    596600          self::addHeaderCSS('gpc.categorySelectorT', sprintf($themeFile, 'categorySelector'));
    597           self::addHeaderJS('gpc.categorySelector', GPC_PATH.'js/ui.categorySelector'.self::$minified.'.js', array('jquery'));
     601          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     602          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     603          self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     604          self::addHeaderJS('gpc.categorySelector', GPC_PATH.'js/ui.categorySelector.js', array('jquery.ui.widget'));
    598605          break;
    599606        case 'inputCheckbox':
    600607          self::addHeaderCSS('gpc.inputCheckbox', GPC_PATH.'css/inputCheckbox.css');
    601           self::addHeaderJS('gpc.inputCheckbox', GPC_PATH.'js/ui.inputCheckbox'.self::$minified.'.js', array('jquery'));
     608          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     609          self::addHeaderJS('gpc.inputCheckbox', GPC_PATH.'js/ui.inputCheckbox.js', array('jquery.ui'));
    602610          break;
    603611        case 'inputColorPicker':
     
    612620          self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
    613621          self::addHeaderCSS('gpc.inputColorPickerT', sprintf($themeFile, 'inputColorPicker'));
    614           self::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    615           self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js', array('jquery.ui'));
    616           self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/minified/jquery.ui.draggable.min.js', array('jquery.ui'));
    617           self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.slider.dialog.js', array('jquery.ui'));
    618           self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js', array('jquery'));
    619           self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js', array('jquery'));
    620           self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js', array('jquery'));
    621           self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js', array('jquery'));
    622           self::addHeaderJS('gpc.inputColorPicker', GPC_PATH.'js/ui.inputColorPicker'.self::$minified.'.js', array('jquery.ui.slider','gpc.inputText','gpc.inputNum','gpc.inputColorsFB','gpc.inputDotArea'));
     622          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     623          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     624          self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     625          self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     626          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.widget'));
     627          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
     628          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/jquery.ui.slider.js', array('jquery.ui.widget'));
     629          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.widget'));
     630          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum.js', array('jquery.ui.widget'));
     631          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB.js', array('jquery.ui.widget'));
     632          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea.js', array('jquery.ui.widget'));
     633          self::addHeaderJS('gpc.inputColorPicker', GPC_PATH.'js/ui.inputColorPicker.js', array('jquery.ui.slider','gpc.inputText','gpc.inputNum','gpc.inputColorsFB','gpc.inputDotArea'));
    623634          break;
    624635        case 'inputColorsFB':
    625636          self::addHeaderCSS('gpc.inputColorsFB', GPC_PATH.'css/inputColorsFB.css');
    626637          self::addHeaderCSS('gpc.inputColorsFBT', sprintf($themeFile, 'inputColorsFB'));
    627           self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB'.self::$minified.'.js', array('jquery'));
     638          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     639          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     640          self::addHeaderJS('gpc.inputColorsFB', GPC_PATH.'js/ui.inputColorsFB.js', array('jquery.ui.widget'));
    628641          break;
    629642        case 'inputConsole':
    630643          self::addHeaderCSS('gpc.inputConsole', GPC_PATH.'css/inputConsole.css');
    631644          self::addHeaderCSS('gpc.inputConsoleT', sprintf($themeFile, 'inputConsole'));
    632           self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole'.self::$minified.'.js', array('jquery'));
     645          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     646          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     647          self::addHeaderJS('gpc.inputConsole', GPC_PATH.'js/ui.inputConsole.js', array('jquery.ui.widget'));
    633648          break;
    634649        case 'inputDotArea':
    635650          self::addHeaderCSS('gpc.inputDotArea', GPC_PATH.'css/inputDotArea.css');
    636651          self::addHeaderCSS('gpc.inputDotAreaT', sprintf($themeFile, 'inputDotArea'));
    637           self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea'.self::$minified.'.js', array('jquery'));
     652          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     653          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     654          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea.js', array('jquery.ui.widget'));
    638655          break;
    639656        case 'inputList':
    640657          self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css');
    641658          self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList'));
    642           self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList'.self::$minified.'.js', array('jquery'));
     659          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     660          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     661          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList.js', array('jquery.ui.widget'));
    643662          break;
    644663        case 'inputNum':
    645664          self::addHeaderCSS('gpc.inputNum', GPC_PATH.'css/inputNum.css');
    646665          self::addHeaderCSS('gpc.inputNumT', sprintf($themeFile, 'inputNum'));
    647           self::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    648           self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js', array('jquery.ui'));
    649           self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum'.self::$minified.'.js', array('jquery','jquery.ui.slider'));
     666          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     667          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     668          self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     669          self::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/jquery.ui.slider.js', array('jquery.ui.widget'));
     670          self::addHeaderJS('gpc.inputNum', GPC_PATH.'js/ui.inputNum.js', array('jquery','jquery.ui.slider'));
    650671          break;
    651672        case 'inputPosition':
    652673          self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css');
    653674          self::addHeaderCSS('gpc.inputPositionT', sprintf($themeFile, 'inputPosition'));
    654           self::addHeaderJS('gpc.inputPosition', GPC_PATH.'js/ui.inputPosition'.self::$minified.'.js', array('jquery'));
     675          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     676          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     677          self::addHeaderJS('gpc.inputPosition', GPC_PATH.'js/ui.inputPosition.js', array('jquery.ui.widget'));
    655678          break;
    656679        case 'inputRadio':
    657           self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio'.self::$minified.'.js', array('jquery'));
     680          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     681          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     682          self::addHeaderJS('gpc.inputRadio', GPC_PATH.'js/ui.inputRadio.js', array('jquery.ui.widget'));
    658683          break;
    659684        case 'inputStatusBar':
    660685          self::addHeaderCSS('gpc.inputStatusBar', GPC_PATH.'css/inputStatusBar.css');
    661686          self::addHeaderCSS('gpc.inputStatusBarT', sprintf($themeFile, 'inputStatusBar'));
    662           self::addHeaderJS('gpc.inputStatusBar', GPC_PATH.'js/ui.inputStatusBar'.self::$minified.'.js', array('jquery'));
     687          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     688          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     689          self::addHeaderJS('gpc.inputStatusBar', GPC_PATH.'js/ui.inputStatusBar.js', array('jquery.ui.widget'));
     690          break;
     691        case 'inputSwitchButton':
     692          self::addHeaderCSS('gpc.inputSwitchButton', GPC_PATH.'css/inputSwitchButton.css');
     693          self::addHeaderCSS('gpc.inputSwitchButtonT', sprintf($themeFile, 'inputSwitchButton'));
     694          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     695          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     696          self::addHeaderJS('gpc.inputSwitchButton', GPC_PATH.'js/ui.inputSwitchButton.js', array('jquery.ui.widget'));
    663697          break;
    664698        case 'inputText':
    665699          self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
    666700          self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
    667           self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText'.self::$minified.'.js', array('jquery'));
     701          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     702          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     703          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.widget'));
     704          break;
     705        case 'simpleTip':
     706          self::addHeaderCSS('gpc.simpleTip', GPC_PATH.'css/simpleTip.css');
     707          self::addHeaderCSS('gpc.simpleTipT', sprintf($themeFile, 'simpleTip'));
     708          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     709          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     710          self::addHeaderJS('gpc.simpleTip', GPC_PATH.'js/simpleTip.js', array('jquery.ui.widget'));
    668711          break;
    669712      }
    670713    }
    671   }
    672 
    673   /**
    674    * return the minified value
    675    *
    676    * @return String
    677    */
    678   static public function getMinified()
    679   {
    680     return(self::$minified);
    681   }
    682 
    683   /**
    684    * set the minified state
    685    *
    686    * @param Bool $state
    687    * @return Bool
    688    */
    689   static public function setMinifiedState($state)
    690   {
    691     if($state)
    692     {
    693       self::$minified='.min';
    694     }
    695     else
    696     {
    697       self::$minified='';
    698     }
    699     return(self::$minified!='');
    700714  }
    701715
  • extensions/GrumPluginClasses/classes/GPCCss.class.inc.php

    r10252 r15340  
    4747  }
    4848
    49   static public function applyCSSFile($fileName="")
     49  static public function applyCSSFile($fileName="", $dependencies=array())
    5050  {
    5151    global $template;
     
    6060    elseif(file_exists($fileName))
    6161    {
    62       GPCCore::addHeaderCSS(basename(dirname($fileName)), 'plugins/'.basename(dirname($fileName)).'/'.basename($fileName).'');
     62      GPCCore::addHeaderCSS(basename(dirname($fileName)), 'plugins/'.basename(dirname($fileName)).'/'.basename($fileName).'', array_merge(array('gpc', 'gpc_theme'),$dependencies) );
    6363    }
    6464  }
  • extensions/GrumPluginClasses/classes/GPCRequestBuilder.class.inc.php

    r10884 r15340  
    541541
    542542    $baseName=basename(dirname(dirname(__FILE__))).'/js/';
    543     GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.min.js');
    544     GPCCore::addHeaderJS('gpc.external.inestedsortable', 'plugins/'.$baseName.'external/iNestedSortablePack'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui'));
    545     GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder'.GPCCore::getMinified().'.js', array('gpc.external.inestedsortable'));
     543    GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.js');
     544    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     545    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     546    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     547    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     548    GPCCore::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.widget'));
     549    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
     550    GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/jquery.ui.slider.js', array('jquery.ui.widget'));
     551
     552    GPCCore::addHeaderJS('gpc.external.inestedsortable', 'plugins/'.$baseName.'external/iNestedSortablePack.js', array('jquery', 'jquery.ui'));
     553    GPCCore::addHeaderJS('gpc.rbCriteriaBuilder', 'plugins/'.$baseName.'rbCriteriaBuilder.js', array('gpc.external.inestedsortable'));
    546554
    547555    $template->append('head_elements',
     
    959967      {
    960968        // affect standard datas
    961         $datas['imageThumbnail']=dirname($row['imagePath'])."/".$conf['dir_thumbnail']."/".$conf['prefix_thumbnail'].basename($row['imagePath']);
     969        $datas['imageThumbnail']=DerivativeImage::thumb_url(array('id'=>$row['imageId'], 'path'=>$row['imagePath']));
    962970        $datas['imageId']=$row['imageId'];
    963971        $datas['imagePath']=$row['imagePath'];
     
    13951403    $filter=array_flip($filter);
    13961404
    1397     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.packed.js');
    1398     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.packed.js');
    1399     GPCCore::addHeaderJS('gpc.pagesNavigator', 'plugins/GrumPluginClasses/js/pagesNavigator'.GPCCore::getMinified().'.js');
    1400     GPCCore::addHeaderJS('gpc.rbSearch', 'plugins/GrumPluginClasses/js/rbSearch'.GPCCore::getMinified().'.js');
    1401 
     1405    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     1406    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     1407    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     1408    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     1409    GPCCore::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.widget'));
     1410    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
     1411    GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/jquery.ui.slider.js', array('jquery.ui.widget'));
     1412    GPCCore::addHeaderJS('gpc.pagesNavigator', 'plugins/GrumPluginClasses/js/pagesNavigator.js');
     1413    GPCCore::addHeaderJS('gpc.rbSearch', 'plugins/GrumPluginClasses/js/rbSearch.js');
    14021414
    14031415    $template->set_filename('gpc_search_page',
  • extensions/GrumPluginClasses/css/gpc.css

    r7310 r15340  
    4141display:table;
    4242font-family:verdana,arial,helvetica,sans-serif; font-size:8px;
    43 list-style:none; padding: 0 0 0 10px; position:relative; text-decoration:none;
    44 white-space:nowrap; margin: 0 0 0 -6px;top:-21px;border-bottom:1px solid;
     43list-style:none; padding: 0 0 0 6px; position:relative; text-decoration:none;
     44white-space:nowrap; margin: 0 0 0 0px;top:-21px;border-bottom:1px solid;
    4545width:100%;
    4646}
     
    9494  color:#800000;
    9595}
     96
     97
     98
     99
     100
  • extensions/GrumPluginClasses/css/gpc_clear.css

    r10252 r15340  
    1313.gcBorder2   { border-color: #666666; }       /* used for widgets borders */
    1414.gcBorderInput { border-color:#777777; }      /* used for inputs */
     15
  • extensions/GrumPluginClasses/js/simpleTip.js

    r8961 r15340  
    7070      offsetY:0,
    7171      classes:'',
    72       arrowImgDir: '',
    7372      arrowWidth: 12,
    7473      arrowHeight: 12
     
    322321        arrowX=-bwX;
    323322        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    324         arrowModel='up';
     323        arrowModel='Up';
    325324        break;
    326325
     
    330329        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2;
    331330        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    332         arrowModel='up';
     331        arrowModel='Up';
    333332        break;
    334333
     
    338337        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
    339338        arrowY=-items[itemIndex].options.arrowHeight+bwY;
    340         arrowModel='up';
     339        arrowModel='Up';
    341340        break;
    342341
     
    346345        arrowX=-items[itemIndex].options.arrowWidth+bwX;
    347346        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    348         arrowModel='left';
     347        arrowModel='Left';
    349348        break;
    350349
     
    359358        arrowX=stWidthI+bwX;
    360359        arrowY=(stHeightI-items[itemIndex].options.arrowHeight)/2+bwY;
    361         arrowModel='right';
     360        arrowModel='Right';
    362361        break;
    363362
     
    367366        arrowX=-bwX;
    368367        arrowY=stHeightI+bwY;
    369         arrowModel='down';
     368        arrowModel='Down';
    370369        break;
    371370
     
    375374        arrowX=(stWidthI-items[itemIndex].options.arrowWidth)/2+bwX;
    376375        arrowY=stHeightI+bwY;
    377         arrowModel='down';
     376        arrowModel='Down';
    378377        break;
    379378
     
    383382        arrowX=stWidthI-items[itemIndex].options.arrowWidth+bwX;
    384383        arrowY=stHeightI+bwY;
    385         arrowModel='down';
     384        arrowModel='Down';
    386385        break;
    387386    }
     
    389388    if(items[itemIndex].options.drawArrow & arrowModel!='')
    390389    {
     390      switch(arrowModel)
     391      {
     392        case 'Up':
     393          bgp='-'+items[itemIndex].options.arrowHeight+'px 0px';
     394          break;
     395        case 'Left':
     396          bgp='0px -'+items[itemIndex].options.arrowWeight+'px';
     397          break;
     398        case 'Down':
     399          bgp='0px 0px';
     400          break;
     401        case 'Right':
     402          bgp='-'+items[itemIndex].options.arrowHeight+'px -'+items[itemIndex].options.arrowWeight+'px';
     403          break;
     404      }
    391405      $('#iSimpleTipArrow'+options.name).css(
    392406        {
    393407          display: 'block',
    394           background: 'url("'+items[itemIndex].options.arrowImgDir+'/arrow_'+arrowModel+'.png") no-repeat scroll 0 0 transparent',
     408          backgroundPosition: bgp,
    395409          marginLeft: arrowX+'px',
    396410          marginTop: arrowY+'px',
     
    434448    if($('#iSimpleTip'+options.name).length==0)
    435449    {
    436       text="<div id='iSimpleTip"+options.name+"' style='z-index:15000;display:none;position:absolute;left:0px;top:0px;'><div id='iSimpleTipShadow"+options.name+"' style='position:absolute;width:100%;height:100%;background:#000000;opacity:0.4;filter:alpha(opacity:40);display:block;z-index:-1;margin-left:2px;margin-top:2px;'></div><div id='iSimpleTipArrow"+options.name+"' style='position:absolute;'></div><div id='iSimpleTipContent"+options.name+"'></div></div>";
     450      text="<div class='cSimpleTip' id='iSimpleTip"+options.name+"' style='z-index:15000;display:none;position:absolute;left:0px;top:0px;'><div class='cSimpleTipShadow' id='iSimpleTipShadow"+options.name+"'></div><div class='cSimpleTipArrow' id='iSimpleTipArrow"+options.name+"'></div><div class='cSimpleTipContent' id='iSimpleTipContent"+options.name+"'></div></div>";
    437451      $('body').append(text);
    438452    }
  • extensions/GrumPluginClasses/js/ui.categorySelector.js

    r8961 r15340  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.categorySelector.js
    4  * file version: 1.1.0
    5  * date: 2011-01-12
     4 * file version: 1.1.1
     5 * date: 2012-05-25
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    4040 * |         |            | * add 'displayPath' property
    4141 * |         |            |
     42 * | 1.1.1   | 2012-05-25 | * fix bug with jquery 1.7.2
     43 * |         |            |   . display list now works :)
     44 * |         |            |
     45 * |         |            |
     46 * |         |            |
    4247 * |         |            |
    4348 *
     
    123128                        {
    124129                          privateMethods.displaySelector($this, !$this.data('properties').selectorVisible);
    125                           $(this).focus();
     130                          //$(this).focus(); // if get the focus, it hide the dorp-down list.. ?
    126131                        }
    127132                      ),
     
    783788            return(null);
    784789          }
    785         } // numberOfCategories
     790        }, // numberOfCategories
    786791    }; // methods
    787792
     
    16181623                {
    16191624                  objects.listContainer.html('Error ! '+msg);
    1620                 }
     1625                },
    16211626            }
    16221627         );
  • extensions/GrumPluginClasses/js/ui.inputList.js

    r8961 r15340  
    22 * -----------------------------------------------------------------------------
    33 * file: ui.inputList.js
    4  * file version: 1.0.0
    5  * date: 2010-11-02
     4 * file version: 1.0.1
     5 * date: 2012-05-25
    66 *
    77 * A jQuery plugin provided by the piwigo's plugin "GrumPluginClasses"
     
    2424 * | 1.0.0   | 2010/10/10 | first release
    2525 * |         |            |
    26  * |         |            |
     26 * | 1.0.1   | 2012/05/25 | fix bug with jquery 1.7.2
     27 * |         |            |  . display list now works :)
    2728 * |         |            |
    2829 * |         |            |
     
    107108                        {
    108109                          privateMethods.displaySelector($this, !$this.data('properties').selectorVisible);
    109                           $(this).focus();
     110                          //$(this).focus();  // if get the focus, it hide the dorp-down list.. ?
    110111                        }
    111112                      ),
     
    166167              privateMethods.setOptions($this, opt);
    167168
    168               if($this.text()!='') 
     169              if($this.text()!='')
    169170              {
    170171                var tmp=$.parseJSON($.trim($this.text())),
     
    180181                  values=tmp.values;
    181182                }
    182                
     183
    183184                if(tmp.selected!=null) selectedValues=tmp.selected;
    184                
    185                 privateMethods.setItems($this, values); 
    186                 privateMethods.setValue($this, selectedValues); 
    187                
     185
     186                privateMethods.setItems($this, values);
     187                privateMethods.setValue($this, selectedValues);
     188
    188189              }
    189190
     
    560561              {
    561562                for(var i=0;i<properties.items.length;i++)
    562                 {   
     563                {
    563564                  if($.inArray(i, properties.index)==-1)
    564565                    returned.push(properties.items[i].value);
  • extensions/GrumPluginClasses/main.inc.php

    r12215 r15340  
    169169|         |            |   . [form_mail]
    170170|         |            |
     171|         |            | * Add UserAgent classes
     172|         |            |
    171173|         |            | * mantis bug:2160
    172174|         |            |   . CategorySelector : extended description are not
    173175|         |            |     managed
     176|         |            |
     177|         |            | * mantis feature:2634
     178|         |            |   . Compatibility with Piwigo 2.4
    174179|         |            |
    175180|         |            |
Note: See TracChangeset for help on using the changeset viewer.