Changeset 10247


Ignore:
Timestamp:
04/10/11 19:43:33 (9 years ago)
Author:
grum
Message:

bug:2144
Compatibility with Piwigo 2.2

Location:
extensions/AMenuManager
Files:
9 edited

Legend:

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

    r8962 r10247  
    4040    global $template; 
    4141 
    42     $template->append('footer_elements', "<script>$(document).ready(function () { $('li a[href=".$template->get_template_vars('U_CONFIG_MENUBAR')."]').attr('href', '".$this->getAdminLink()."&amp;fAMM_tabsheet=setmenu&amp;fAMM_page=position'); });</script>"); 
     42    $template->append('footer_elements', "<script>$(document).ready(function () { $('li a[href=\"".$template->get_template_vars('U_CONFIG_MENUBAR')."\"]').attr('href', '".$this->getAdminLink()."&amp;fAMM_tabsheet=setmenu&amp;fAMM_page=position'); });</script>"); 
    4343  } 
    4444 
  • extensions/AMenuManager/amm_aip.class.inc.php

    r9002 r10247  
    174174    global $template, $user; 
    175175 
    176     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js'); 
    177     GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/packed/ui.sortable.packed.js'); 
    178     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js'); 
     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')); 
    179179 
    180180    $template->set_filename('body_page', 
     
    212212    global $template, $user; 
    213213 
    214     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js'); 
    215     GPCCore::addHeaderJS('jquery.ui.slider', 'themes/default/js/ui/packed/ui.slider.packed.js'); 
    216     GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js'); 
     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')); 
    217217    GPCCore::addUI('inputList,inputText,inputRadio,categorySelector,googleTranslate'); 
    218     GPCCore::addHeaderJS('amm.rpc', 'plugins/AMenuManager/js/amm_randomPictConfig'.GPCCore::getMinified().'.js'); 
     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')); 
    219219 
    220220    $template->set_filename('body_page', 
     
    228228          'selectMode' => $this->config['amm_randompicture_selectMode'], 
    229229          'selectCat' => json_encode($this->config['amm_randompicture_selectCat']), 
    230           'blockHeight' => ($this->config['amm_randompicture_height']==0)?99:$this->config['amm_randompicture_height'], 
     230          'blockHeight' => $this->config['amm_randompicture_height'], 
    231231          'blockTitles' => array() 
    232232        ), 
     
    256256    global $template, $user; 
    257257 
    258     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js'); 
    259     GPCCore::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/packed/ui.dialog.packed.js'); 
     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')); 
    260260    GPCCore::addUI('inputList,inputText,inputRadio,googleTranslate'); 
    261     GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks'.GPCCore::getMinified().'.js'); 
     261    GPCCore::addHeaderJS('amm.upbm', 'plugins/AMenuManager/js/amm_personalisedBlocks'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate')); 
    262262 
    263263 
     
    284284    global $template, $conf; 
    285285 
    286     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js'); 
    287     GPCCore::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/packed/ui.sortable.packed.js'); 
     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')); 
    288288    GPCCore::addUI('inputList'); 
    289     GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks'.GPCCore::getMinified().'.js'); 
     289    GPCCore::addHeaderJS('amm.cbm', 'plugins/AMenuManager/js/amm_blocks'.GPCCore::getMinified().'.js', array('jquery', 'jquery.ui.sortable', 'gpc.inputList')); 
    290290 
    291291    $template->set_filename('body_page', 
     
    350350 
    351351    GPCCore::addHeaderCSS('gpc.categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css'); 
    352     GPCCore::addHeaderJS('jquery.ui', 'themes/default/js/ui/packed/ui.core.packed.js'); 
    353     GPCCore::addHeaderJS('gpc.categorySelector', 'plugins/GrumPluginClasses/js/ui.categorySelector'.GPCCore::getMinified().'.js'); 
    354     GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig'.GPCCore::getMinified().'.js'); 
     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')); 
    355355 
    356356    $template->set_filename('body_page', 
     
    382382 
    383383    GPCCore::addUI('inputList,inputRadio,inputText,inputCheckbox'); 
    384     GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links'.GPCCore::getMinified().'.js'); 
     384    GPCCore::addHeaderJS('amm.ulm', 'plugins/AMenuManager/js/amm_links'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.inputCheckbox')); 
    385385 
    386386    $template->set_filename('sheet_page', 
     
    431431 
    432432    GPCCore::addUI('inputList,inputRadio,inputText,googleTranslate'); 
    433     GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig'.GPCCore::getMinified().'.js'); 
     433    GPCCore::addHeaderJS('amm.ulc', 'plugins/AMenuManager/js/amm_linksConfig'.GPCCore::getMinified().'.js', array('jquery', 'gpc.inputList', 'gpc.inputText', 'gpc.inputRadio', 'gpc.googleTranslate')); 
    434434 
    435435    $template->set_filename('sheet_page', 
     
    501501} // AMM_AIP class 
    502502 
    503  
    504503?> 
  • extensions/AMenuManager/amm_ajax.php

    r9112 r10247  
    112112          if(!isset($_REQUEST['datas']['mode'])) $_REQUEST['datas']['mode']='0'; 
    113113          if(!isset($_REQUEST['datas']['visible'])) $_REQUEST['datas']['visible']='n'; 
    114           if(!isset($_REQUEST['datas']['accessUsers'])) $_REQUEST['datas']['accessUsers']=array(); 
    115           if(!isset($_REQUEST['datas']['accessGroups'])) $_REQUEST['datas']['accessGroups']=array(); 
     114          if(!isset($_REQUEST['datas']['accessUsers']) or $_REQUEST['datas']['accessUsers']=='') $_REQUEST['datas']['accessUsers']=array(); 
     115          if(!isset($_REQUEST['datas']['accessGroups']) or $_REQUEST['datas']['accessGroups']=='') $_REQUEST['datas']['accessGroups']=array(); 
    116116 
    117117          if($_REQUEST['token']!=get_pwg_token() or 
     
    144144        if($_REQUEST['ajaxfct']=='admin.links.order') 
    145145        { 
    146           if(!isset($_REQUEST['datas']['links'])) $_REQUEST['datas']['links']=array(); 
     146          if(!isset($_REQUEST['datas']['links']) or $_REQUEST['datas']['links']=='') $_REQUEST['datas']['links']=array(); 
    147147 
    148148          if(count($_REQUEST['datas']['links'])<=1 or 
     
    158158        { 
    159159          if(!isset($_REQUEST['datas']['showIcons'])) $_REQUEST['datas']['showIcons']=''; 
    160           if(!isset($_REQUEST['datas']['title'])) $_REQUEST['datas']['title']=array(); 
     160          if(!isset($_REQUEST['datas']['title']) or $_REQUEST['datas']['title']=='') $_REQUEST['datas']['title']=array(); 
    161161 
    162162          if($_REQUEST['token']!=get_pwg_token() or 
     
    174174        { 
    175175          if(!isset($_REQUEST['datas']['blockHeight'])) $_REQUEST['datas']['blockHeight']=''; 
    176           if(!isset($_REQUEST['datas']['blockTitles'])) $_REQUEST['datas']['blockTitles']=array(); 
     176          if(!isset($_REQUEST['datas']['blockTitles']) or $_REQUEST['datas']['blockTitles']=='') $_REQUEST['datas']['blockTitles']=array(); 
    177177          if(!isset($_REQUEST['datas']['infosName'])) $_REQUEST['datas']['infosName']=''; 
    178178          if(!isset($_REQUEST['datas']['infosComment'])) $_REQUEST['datas']['infosComment']=''; 
    179179          if(!isset($_REQUEST['datas']['freqDelay'])) $_REQUEST['datas']['freqDelay']=''; 
    180180          if(!isset($_REQUEST['datas']['selectMode'])) $_REQUEST['datas']['selectMode']=''; 
    181           if(!isset($_REQUEST['datas']['selectCat'])) $_REQUEST['datas']['selectCat']=array(); 
     181          if(!isset($_REQUEST['datas']['selectCat']) or $_REQUEST['datas']['selectCat']=='') $_REQUEST['datas']['selectCat']=array(); 
    182182 
    183183          if($_REQUEST['token']!=get_pwg_token() or 
     
    208208          if(!isset($_REQUEST['datas']['nfo'])) $_REQUEST['datas']['nfo']=''; 
    209209          if(!isset($_REQUEST['datas']['visible'])) $_REQUEST['datas']['visible']=''; 
    210           if(!isset($_REQUEST['datas']['langs'])) $_REQUEST['datas']['langs']=array(); 
     210          if(!isset($_REQUEST['datas']['langs']) or $_REQUEST['datas']['langs']=='') $_REQUEST['datas']['langs']=array(); 
    211211 
    212212          if($_REQUEST['token']!=get_pwg_token() or 
     
    225225        if($_REQUEST['ajaxfct']=='admin.coreBlocks.setConfig') 
    226226        { 
    227           if(!isset($_REQUEST['datas']['menuItems'])) $_REQUEST['datas']['menuItems']=array(); 
    228           if(!isset($_REQUEST['datas']['blocks'])) $_REQUEST['datas']['blocks']=array(); 
     227          if(!isset($_REQUEST['datas']['menuItems']) or $_REQUEST['datas']['menuItems']=='') $_REQUEST['datas']['menuItems']=array(); 
     228          if(!isset($_REQUEST['datas']['blocks']) or $_REQUEST['datas']['blocks']=='') $_REQUEST['datas']['blocks']=array(); 
    229229 
    230230          if($_REQUEST['token']!=get_pwg_token() or 
     
    239239        if($_REQUEST['ajaxfct']=='admin.album.setConfig') 
    240240        { 
    241           if(!isset($_REQUEST['datas']['selectCat'])) $_REQUEST['datas']['selectCat']=array(); 
     241          if(!isset($_REQUEST['datas']['selectCat']) or $_REQUEST['datas']['selectCat']=='') $_REQUEST['datas']['selectCat']=array(); 
    242242 
    243243          if($_REQUEST['token']!=get_pwg_token()) $_REQUEST['ajaxfct']=''; 
     
    330330      $local_tpl->set_filename('body_page', 
    331331                    dirname($this->getFileLocation()).'/admin/amm_linkslinks_detail.tpl'); 
     332 
     333 
    332334 
    333335      $datas['links']=array(); 
     
    596598      foreach($subMenu as $key=>$val) 
    597599      { 
    598         if(!isset($subMenu[$key]['visibilityUser'])) $subMenu[$key]['visibilityUser']=array(); 
    599         if(!isset($subMenu[$key]['visibilityGroup'])) $subMenu[$key]['visibilityGroup']=array(); 
     600        if(!isset($subMenu[$key]['visibilityUser']) or $subMenu[$key]['visibilityUser']=='') $subMenu[$key]['visibilityUser']=array(); 
     601        if(!isset($subMenu[$key]['visibilityGroup']) or $subMenu[$key]['visibilityGroup']=='') $subMenu[$key]['visibilityGroup']=array(); 
    600602 
    601603        $subMenu[$key]['visibility']=implode(',', $subMenu[$key]['visibilityUser']).'/'.implode(',', $subMenu[$key]['visibilityGroup']); 
     
    609611      foreach($menus as $key=>$val) 
    610612      { 
    611         if(!isset($menus[$key]['users'])) $menus[$key]['users']=array(); 
    612         if(!isset($menus[$key]['groups'])) $menus[$key]['groups']=array(); 
     613        if(!isset($menus[$key]['users']) or $menus[$key]['users']=='') $menus[$key]['users']=array(); 
     614        if(!isset($menus[$key]['groups']) or $menus[$key]['groups']=='') $menus[$key]['groups']=array(); 
    613615      } 
    614616      $this->setRegisteredBlocks($menus); 
  • extensions/AMenuManager/amm_install.class.inc.php

    r9113 r10247  
    376376    } 
    377377 
     378 
     379 
    378380  } //class 
    379381 
    380  
    381  
    382  
    383382?> 
  • extensions/AMenuManager/amm_pip.class.inc.php

    r8962 r10247  
    8282      ) 
    8383    { 
    84       GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.packed.js'); 
    85       GPCCore::addHeaderJS('amm.randomPictPublic', 'plugins/AMenuManager/js/amm_randomPictPublic'.GPCCore::getMinified().'.js'); 
     84      GPCCore::addHeaderJS('jquery', 'themes/default/js/jquery.min.js'); 
     85      GPCCore::addHeaderJS('amm.randomPictPublic', 'plugins/AMenuManager/js/amm_randomPictPublic'.GPCCore::getMinified().'.js', array('jquery')); 
    8686 
    8787      $block->set_title(base64_decode($this->config['amm_randompicture_title'][$user['language']])); 
  • extensions/AMenuManager/amm_version.inc.php

    r9113 r10247  
    1515  if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    1616 
    17   define('AMM_VERSION',  '3.0.3'); 
    18   define('AMM_VERSION2', '03.00.03'); 
    19   define('AMM_GPC_NEEDED', '3.4.2'); 
     17  define('AMM_VERSION',  '3.1.0'); 
     18  define('AMM_VERSION2', '03.01.00'); 
     19  define('AMM_GPC_NEEDED', '3.5.0'); 
    2020?> 
  • extensions/AMenuManager/js/amm_personalisedBlocks.js

    r9019 r10247  
    22 * userPersonnalisedBlockManage 
    33 * 
    4  * release 1.0.1 
     4 * release 1.0.2 
    55 */ 
    66function userPersonnalisedBlockManage(opt, keys, token, initValues) 
     
    274274      ); 
    275275 
    276     $('#islang').inputList({popupMode:'mouseout'}); 
     276    $('#islang').inputList({popupMode:'mouseout', listMaxHeight:300}); 
    277277 
    278278 
  • extensions/AMenuManager/js/amm_personalisedBlocks.min.js

    r9019 r10247  
    1 /* file: amm_personalisedBlocks.js - v1.0.1 | minified on 2011/01/31 with http://jscompress.com/ */ 
     1/* file: amm_personalisedBlocks.js - v1.0.2 | minified on 2011/04/10 with http://jscompress.com/ */ 
    22function userPersonnalisedBlockManage(opt,keys,token,initValues) 
    33{var options={ajaxUrl:'plugins/AMenuManager/amm_ajax.php'},translatedKeys={g002_ok:'g002_ok',g002_cancel:'g002_cancel',g002_loading:'g002_loading',g002_editofpersonalised:'g002_editofpersonalised',g002_createofpersonalised:'g002_createofpersonalised'},properties={id:'',token:token},load=function() 
     
    3232{updateDialog(msg);displayProcessing(false);}});} 
    3333else 
    34 {updateDialog('');}});$('#islang').inputList({popupMode:'mouseout'});$('#iamm_personalised_nfo').inputText({displayChar:75,maxChar:255});$('#iamm_personalised_title').inputText({displayChar:75,maxChar:255,languages:initValues.langs,currentLanguage:initValues.userLang,languageSelector:'islang'});$('#iamm_personalised_content').inputText({multilines:true,displayChar:70,numRows:13,languages:initValues.langs,currentLanguage:initValues.userLang,languageSelector:'islang'});$('#islang').inputList('value',initValues.userLang);$('#iamm_personalised_visible').inputRadio();load();};$.extend(options,opt);$.extend(translatedKeys,keys);this.load=function(){load();};this.edit=function(linkId){edit(linkId);};this.remove=function(linkId){remove(linkId);};init(initValues);} 
     34{updateDialog('');}});$('#islang').inputList({popupMode:'mouseout',listMaxHeight:300});$('#iamm_personalised_nfo').inputText({displayChar:75,maxChar:255});$('#iamm_personalised_title').inputText({displayChar:75,maxChar:255,languages:initValues.langs,currentLanguage:initValues.userLang,languageSelector:'islang'});$('#iamm_personalised_content').inputText({multilines:true,displayChar:70,numRows:13,languages:initValues.langs,currentLanguage:initValues.userLang,languageSelector:'islang'});$('#islang').inputList('value',initValues.userLang);$('#iamm_personalised_visible').inputRadio();load();};$.extend(options,opt);$.extend(translatedKeys,keys);this.load=function(){load();};this.edit=function(linkId){edit(linkId);};this.remove=function(linkId){remove(linkId);};init(initValues);} 
  • extensions/AMenuManager/main.inc.php

    r9113 r10247  
    22/* 
    33Plugin Name: Advanced Menu Manager 
    4 Version: 3.0.3 
     4Version: 3.1.0 
    55Description: Gestion avancée du menu / Advanced management of menu 
    66Plugin URI: http://piwigo.org 
     
    173173|         |            |     correctly managed 
    174174|         |            | 
    175 |         |            | 
    176 |         |            | 
     175| 3.1.0   | 2011/04/10 | * mantis: bug 2144 
     176|         |            |   . Compatibility with Piwigo 2.2 
    177177|         |            | 
    178178|         |            | 
Note: See TracChangeset for help on using the changeset viewer.