Changeset 15366 for extensions/AMenuManager/amm_aip.class.inc.php
- Timestamp:
- May 28, 2012, 10:12:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMenuManager/amm_aip.class.inc.php
r10255 r15366 24 24 class AMM_AIP extends AMM_root 25 25 { 26 protected $googleTranslate;27 26 protected $tabsheet; 28 27 protected $blocksId=array('menu' => 'Menu', 'special' => 'Specials'); … … 39 38 $this->tabsheet->add('setmenu', 40 39 l10n('g002_setmenu'), 41 $this->getAdminLink().' &fAMM_tabsheet=setmenu');40 $this->getAdminLink().'-setmenu'); 42 41 $this->tabsheet->add('links', 43 42 l10n('g002_addlinks'), 44 $this->getAdminLink().' &fAMM_tabsheet=links');43 $this->getAdminLink().'-links'); 45 44 $this->tabsheet->add('randompict', 46 45 l10n('g002_randompict'), 47 $this->getAdminLink().' &fAMM_tabsheet=randompict');46 $this->getAdminLink().'-randompict'); 48 47 $this->tabsheet->add('personnalblock', 49 48 l10n('g002_personnalblock'), 50 $this->getAdminLink().' &fAMM_tabsheet=personnalblock');49 $this->getAdminLink().'-personnalblock'); 51 50 $this->tabsheet->add('album', 52 51 l10n('g002_album'), 53 $this->getAdminLink().' &fAMM_tabsheet=album');52 $this->getAdminLink().'-album'); 54 53 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css"); 55 54 } … … 67 66 $this->initRequest(); 68 67 69 $this->tabsheet->select($_ REQUEST['fAMM_tabsheet']);68 $this->tabsheet->select($_GET['tab']); 70 69 $this->tabsheet->assign(); 71 70 $selected_tab=$this->tabsheet->get_selected(); … … 73 72 74 73 $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']; 76 75 $template_plugin["PATH"] = AMM_PATH; 77 76 … … 80 79 81 80 82 switch($_ REQUEST['fAMM_tabsheet'])81 switch($_GET['tab']) 83 82 { 84 83 case 'links': 85 $this->displayLinksPage($_REQUEST[' fAMM_page']);84 $this->displayLinksPage($_REQUEST['t']); 86 85 break; 87 86 … … 95 94 96 95 case 'setmenu': 97 $this->displayBlocksPage($_REQUEST[' fAMM_page']);96 $this->displayBlocksPage($_REQUEST['t']); 98 97 break; 99 98 … … 126 125 { 127 126 //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' 135 138 ) 136 ) $_ REQUEST['fAMM_tabsheet']='setmenu';139 ) $_GET['tab']='setmenu'; 137 140 138 141 … … 140 143 * checks for links page 141 144 */ 142 if($_ REQUEST['fAMM_tabsheet']=='links')143 { 144 if(!isset($_REQUEST[' fAMM_page'])) $_REQUEST['fAMM_page']='links';145 146 if(!($_REQUEST[' fAMM_page']=='links' or147 $_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' 148 151 ) 149 ) $_REQUEST[' fAMM_page']='config';152 ) $_REQUEST['t']='config'; 150 153 } 151 154 … … 154 157 * checks for blocks menu page 155 158 */ 156 if($_ REQUEST['fAMM_tabsheet']=='setmenu')157 { 158 if(!isset($_REQUEST[' fAMM_page'])) $_REQUEST['fAMM_page']='position';159 160 if(!($_REQUEST[' fAMM_page']=='position' or161 $_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' 162 165 ) 163 ) $_REQUEST[' fAMM_page']='position';166 ) $_REQUEST['t']='position'; 164 167 } 165 168 … … 174 177 global $template, $user; 175 178 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')); 179 185 180 186 $template->set_filename('body_page', … … 185 191 $linksTabsheet->add('links', 186 192 l10n('g002_setting_link_links'), 187 $this->getAdminLink().' &fAMM_tabsheet=links&fAMM_page=links');193 $this->getAdminLink().'-links/links'); 188 194 $linksTabsheet->add('config', 189 195 l10n('g002_configlinks'), 190 $this->getAdminLink().' &fAMM_tabsheet=links&fAMM_page=config');196 $this->getAdminLink().'-links/config'); 191 197 $linksTabsheet->assign(); 192 198 … … 212 218 global $template, $user; 213 219 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')); 219 229 220 230 $template->set_filename('body_page', … … 256 266 global $template, $user; 257 267 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')); 262 276 263 277 … … 284 298 global $template, $conf; 285 299 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')); 288 305 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')); 290 307 291 308 $template->set_filename('body_page', … … 349 366 global $template, $user; 350 367 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')); 355 370 356 371 $template->set_filename('body_page', … … 382 397 383 398 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')); 385 400 386 401 $template->set_filename('sheet_page', … … 430 445 global $template, $user; 431 446 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')); 434 449 435 450 $template->set_filename('sheet_page',
Note: See TracChangeset
for help on using the changeset viewer.