Ignore:
Timestamp:
May 28, 2012, 10:12:38 AM (13 years ago)
Author:
grum
Message:

feature:2642 - Compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMenuManager/amm_aip.class.inc.php

    r10255 r15366  
    2424class AMM_AIP extends AMM_root
    2525{
    26   protected $googleTranslate;
    2726  protected $tabsheet;
    2827  protected $blocksId=array('menu' => 'Menu', 'special' => 'Specials');
     
    3938    $this->tabsheet->add('setmenu',
    4039                          l10n('g002_setmenu'),
    41                           $this->getAdminLink().'&fAMM_tabsheet=setmenu');
     40                          $this->getAdminLink().'-setmenu');
    4241    $this->tabsheet->add('links',
    4342                          l10n('g002_addlinks'),
    44                           $this->getAdminLink().'&fAMM_tabsheet=links');
     43                          $this->getAdminLink().'-links');
    4544    $this->tabsheet->add('randompict',
    4645                          l10n('g002_randompict'),
    47                           $this->getAdminLink().'&fAMM_tabsheet=randompict');
     46                          $this->getAdminLink().'-randompict');
    4847    $this->tabsheet->add('personnalblock',
    4948                          l10n('g002_personnalblock'),
    50                           $this->getAdminLink().'&fAMM_tabsheet=personnalblock');
     49                          $this->getAdminLink().'-personnalblock');
    5150    $this->tabsheet->add('album',
    5251                          l10n('g002_album'),
    53                           $this->getAdminLink().'&fAMM_tabsheet=album');
     52                          $this->getAdminLink().'-album');
    5453    $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css");
    5554  }
     
    6766    $this->initRequest();
    6867
    69     $this->tabsheet->select($_REQUEST['fAMM_tabsheet']);
     68    $this->tabsheet->select($_GET['tab']);
    7069    $this->tabsheet->assign();
    7170    $selected_tab=$this->tabsheet->get_selected();
     
    7372
    7473    $template_plugin["AMM_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('g002_version').AMM_VERSION;
    75     $template_plugin["AMM_PAGE"] = $_REQUEST['fAMM_tabsheet'];
     74    $template_plugin["AMM_PAGE"] = $_GET['tab'];
    7675    $template_plugin["PATH"] = AMM_PATH;
    7776
     
    8079
    8180
    82     switch($_REQUEST['fAMM_tabsheet'])
     81    switch($_GET['tab'])
    8382    {
    8483      case 'links':
    85         $this->displayLinksPage($_REQUEST['fAMM_page']);
     84        $this->displayLinksPage($_REQUEST['t']);
    8685        break;
    8786
     
    9594
    9695      case 'setmenu':
    97         $this->displayBlocksPage($_REQUEST['fAMM_page']);
     96        $this->displayBlocksPage($_REQUEST['t']);
    9897        break;
    9998
     
    126125  {
    127126    //initialise $REQUEST values if not defined
    128     if(!array_key_exists('fAMM_tabsheet', $_REQUEST)) $_REQUEST['fAMM_tabsheet']='setmenu';
    129 
    130     if(!($_REQUEST['fAMM_tabsheet']=='links' or
    131          $_REQUEST['fAMM_tabsheet']=='randompict' or
    132          $_REQUEST['fAMM_tabsheet']=='personnalblock' or
    133          $_REQUEST['fAMM_tabsheet']=='setmenu' or
    134          $_REQUEST['fAMM_tabsheet']=='album'
     127    if(!array_key_exists('tab', $_GET)) $_GET['tab']='setmenu';
     128
     129    $tmp=explode('/', $_GET['tab'].'/');
     130    $_GET['tab']=$tmp[0];
     131    $_REQUEST['t']=$tmp[1];
     132
     133    if(!($_GET['tab']=='links' or
     134         $_GET['tab']=='randompict' or
     135         $_GET['tab']=='personnalblock' or
     136         $_GET['tab']=='setmenu' or
     137         $_GET['tab']=='album'
    135138        )
    136       ) $_REQUEST['fAMM_tabsheet']='setmenu';
     139      ) $_GET['tab']='setmenu';
    137140
    138141
     
    140143     * checks for links page
    141144     */
    142     if($_REQUEST['fAMM_tabsheet']=='links')
    143     {
    144       if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='links';
    145 
    146       if(!($_REQUEST['fAMM_page']=='links' or
    147            $_REQUEST['fAMM_page']=='config'
     145    if($_GET['tab']=='links')
     146    {
     147      if(!isset($_REQUEST['t'])) $_REQUEST['t']='links';
     148
     149      if(!($_REQUEST['t']=='links' or
     150           $_REQUEST['t']=='config'
    148151          )
    149         ) $_REQUEST['fAMM_page']='config';
     152        ) $_REQUEST['t']='config';
    150153    }
    151154
     
    154157     * checks for blocks menu page
    155158     */
    156     if($_REQUEST['fAMM_tabsheet']=='setmenu')
    157     {
    158       if(!isset($_REQUEST['fAMM_page'])) $_REQUEST['fAMM_page']='position';
    159 
    160       if(!($_REQUEST['fAMM_page']=='position' or
    161            $_REQUEST['fAMM_page']=='blocksContent'
     159    if($_GET['tab']=='setmenu')
     160    {
     161      if(!isset($_REQUEST['t'])) $_REQUEST['t']='position';
     162
     163      if(!($_REQUEST['t']=='position' or
     164           $_REQUEST['t']=='blocksContent'
    162165          )
    163         ) $_REQUEST['fAMM_page']='position';
     166        ) $_REQUEST['t']='position';
    164167    }
    165168
     
    174177    global $template, $user;
    175178
    176     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    177     GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
    178     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery.ui'));
     179    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     180    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery'));
     181    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     182    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     183    GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.widget'));
     184    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
    179185
    180186    $template->set_filename('body_page',
     
    185191    $linksTabsheet->add('links',
    186192                          l10n('g002_setting_link_links'),
    187                           $this->getAdminLink().'&amp;fAMM_tabsheet=links&amp;fAMM_page=links');
     193                          $this->getAdminLink().'-links/links');
    188194    $linksTabsheet->add('config',
    189195                          l10n('g002_configlinks'),
    190                           $this->getAdminLink().'&amp;fAMM_tabsheet=links&amp;fAMM_page=config');
     196                          $this->getAdminLink().'-links/config');
    191197    $linksTabsheet->assign();
    192198
     
    212218    global $template, $user;
    213219
    214     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    215     GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/minified/jquery.ui.slider.min.js');
    216     GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
    217     GPCCore::addUI('inputList,inputText,inputRadio,categorySelector,googleTranslate');
    218     GPCCore::addHeaderJS('amm.rpc', 'plugins/AMenuManager/js/amm_randomPictConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.categorySelector', 'gpc.googleTranslate'));
     220    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     221    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery'));
     222    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery'));
     223    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery'));
     224    GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.widget'));
     225    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
     226    GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/jquery.ui.slider.js', array('jquery.ui.widget'));
     227    GPCCore::addUI('inputList,inputText,inputRadio,categorySelector');
     228    GPCCore::addHeaderJS('amm.rpc', 'plugins/AMenuManager/js/amm_randomPictConfig.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.categorySelector'));
    219229
    220230    $template->set_filename('body_page',
     
    256266    global $template, $user;
    257267
    258     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    259     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/minified/jquery.ui.dialog.min.js', array('jquery'));
    260     GPCCore::addUI('inputList,inputText,inputRadio,googleTranslate');
    261     GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
     268    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     269    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     270    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     271    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     272    GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.widget'));
     273    GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.widget'));
     274    GPCCore::addUI('inputList,inputText,inputRadio');
     275    GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio'));
    262276
    263277
     
    284298    global $template, $conf;
    285299
    286     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    287     GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/minified/jquery.ui.sortable.min.js', array('jquery.ui'));
     300    GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     301    GPCCore::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery'));
     302    GPCCore::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     303    GPCCore::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.widget'));
     304    GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.widget'));
    288305    GPCCore::addUI('inputList');
    289     GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui.sortable', 'gpc.inputList'));
     306    GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks.js', array('jquery', 'jquery.ui.sortable', 'gpc.inputList'));
    290307
    291308    $template->set_filename('body_page',
     
    349366    global $template, $user;
    350367
    351     GPCCore::addHeaderCSS('gpc.categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');
    352     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/minified/jquery.ui.core.min.js', array('jquery'));
    353     GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js', array('jquery.ui'));
    354     GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig'.GPCCore::getMinified().'.js', array('jquery','gpc.categorySelector'));
     368    GPCCore::addUI('categorySelector');
     369    GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig.js', array('jquery','gpc.categorySelector'));
    355370
    356371    $template->set_filename('body_page',
     
    382397
    383398    GPCCore::addUI('inputList,inputRadio,inputText,inputCheckbox');
    384     GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.inputCheckbox'));
     399    GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.inputCheckbox'));
    385400
    386401    $template->set_filename('sheet_page',
     
    430445    global $template, $user;
    431446
    432     GPCCore::addUI('inputList,inputRadio,inputText,googleTranslate');
    433     GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate'));
     447    GPCCore::addUI('inputList,inputRadio,inputText');
     448    GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio'));
    434449
    435450    $template->set_filename('sheet_page',
Note: See TracChangeset for help on using the changeset viewer.