Changeset 16011
- Timestamp:
- Jun 24, 2012, 9:17:04 PM (12 years ago)
- Location:
- extensions/GMaps
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/admin/gmaps_category_maps.tpl
r15345 r16011 8 8 9 9 {combine_script id="gpc.ui.iconSelector" path="plugins/GrumPluginClasses/js/ui.iconSelector.js" require="jquery.ui"} 10 {combine_script id="gpc.ui.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.js" require="jquery.ui"}11 10 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"} 12 11 … … 204 203 url: "{/literal}{$datas.urlRequest}{literal}", 205 204 async: true, 206 data: { ajaxfct:"admin.assoc.getAssoc", id:properties.id },205 data: { ajaxfct:"admin.assoc.getAssoc", token:'{/literal}{$token}{literal}', id:properties.id }, 207 206 success: 208 207 function(msg) … … 245 244 url: "{/literal}{$datas.urlRequest}{literal}", 246 245 async: true, 247 data: { ajaxfct:"admin.assoc.deleteAssoc", id:id },246 data: { ajaxfct:"admin.assoc.deleteAssoc", token:'{/literal}{$token}{literal}', id:id }, 248 247 success: 249 248 function(msg) … … 328 327 url: "{/literal}{$datas.urlRequest}{literal}", 329 328 async: true, 330 data: { ajaxfct:"admin.assoc.getList" },329 data: { ajaxfct:"admin.assoc.getList", token:'{/literal}{$token}{literal}' }, 331 330 success: 332 331 function(msg) … … 383 382 url: "{/literal}{$datas.urlRequest}{literal}", 384 383 async: true, 385 data: { ajaxfct:"admin.assoc.setAssoc", id:properties.id, datas:datas },384 data: { ajaxfct:"admin.assoc.setAssoc", token:'{/literal}{$token}{literal}', id:properties.id, datas:datas }, 386 385 success: 387 386 function(msg) -
extensions/GMaps/admin/gmaps_category_maps_iListMaps.tpl
r7132 r16011 15 15 16 16 <td width="40px"> 17 <img src="{$themeconf.admin_icon_dir}/edit_s.png" 18 class="button" alt="{'gmaps_edit'|@translate}" 19 title="{'gmaps_edit'|@translate}" 20 onclick='am.editAssoc({$data.id});'/> 21 <img src="{$themeconf.admin_icon_dir}/delete.png" 22 class="button" 23 alt="{'gmaps_delete'|@translate}" 24 title="{'gmaps_delete'|@translate}" 25 onclick='am.deleteAssoc({$data.id});'/> 17 <span class="buttonEdit" 18 title="{'gmaps_edit'|@translate}" 19 onclick='am.editAssoc({$data.id});'/> 20 <span class="buttonDelete" 21 title="{'gmaps_delete'|@translate}" 22 onclick='am.deleteAssoc({$data.id});'/> 26 23 </td> 27 24 </tr> -
extensions/GMaps/admin/gmaps_kmlfiles.tpl
r15345 r16011 79 79 url: "{/literal}{$datas.urlRequest}{literal}", 80 80 async: true, 81 data: { ajaxfct:"admin.kmlFiles.getFile", id:properties.id },81 data: { ajaxfct:"admin.kmlFiles.getFile", token:'{/literal}{$token}{literal}', id:properties.id }, 82 82 success: 83 83 function(msg) … … 122 122 url: "{/literal}{$datas.urlRequest}{literal}", 123 123 async: true, 124 data: { ajaxfct:"admin.kmlFiles.deleteFile", id:id },124 data: { ajaxfct:"admin.kmlFiles.deleteFile", token:'{/literal}{$token}{literal}', id:id }, 125 125 success: 126 126 function(msg) … … 181 181 url: "{/literal}{$datas.urlRequest}{literal}", 182 182 async: true, 183 data: { ajaxfct:"admin.kmlFiles.getList" },183 data: { ajaxfct:"admin.kmlFiles.getList", token:'{/literal}{$token}{literal}' }, 184 184 success: 185 185 function(msg) … … 243 243 url: "{/literal}{$datas.urlRequest}{literal}", 244 244 async: true, 245 data: { ajaxfct:"admin.kmlFiles.setFile", id:properties.id, name:$('#iBDKmlName').val() },245 data: { ajaxfct:"admin.kmlFiles.setFile", token:'{/literal}{$token}{literal}', id:properties.id, name:$('#iBDKmlName').val() }, 246 246 success: 247 247 function(msg) … … 333 333 <td>{'gmaps_name'|@translate}</td> 334 334 <td> 335 <input type='hidden' id='iToken' name ="token" value='{$token}'> 335 336 <input type='hidden' id='iBDKmlId' name ="id" value=''> 336 337 <input type='hidden' id='iBDKmlAjaxFct' name="ajaxfct" value='admin.kmlFiles.setFile'> -
extensions/GMaps/admin/gmaps_kmlfiles_iListFiles.tpl
r7567 r16011 9 9 10 10 <td width="40px"> 11 <img src="{$themeconf.admin_icon_dir}/edit_s.png" 12 class="button" alt="{'gmaps_edit'|@translate}" 13 title="{'gmaps_edit'|@translate}" 14 onclick='km.editKmlFile({$data.id});'/> 15 <img src="{$themeconf.admin_icon_dir}/delete.png" 16 class="button" 17 alt="{'gmaps_delete'|@translate}" 18 title="{'gmaps_delete'|@translate}" 19 onclick='km.deleteKmlFile({$data.id});'/> 11 <span class="buttonEdit" 12 title="{'gmaps_edit'|@translate}" 13 onclick='km.editKmlFile({$data.id});'/> 14 <span class="buttonDelete" 15 title="{'gmaps_delete'|@translate}" 16 onclick='km.deleteKmlFile({$data.id});'/> 20 17 </td> 21 18 </tr> -
extensions/GMaps/admin/gmaps_maps.tpl
r15345 r16011 435 435 url: "{/literal}{$datas.urlRequest}{literal}", 436 436 async: true, 437 data: { ajaxfct:"admin.maps.getMap", id:properties.id },437 data: { ajaxfct:"admin.maps.getMap", token:'{/literal}{$token}{literal}', id:properties.id }, 438 438 success: 439 439 function(msg) … … 481 481 url: "{/literal}{$datas.urlRequest}{literal}", 482 482 async: true, 483 data: { ajaxfct:"admin.maps.deleteMap", id:id },483 data: { ajaxfct:"admin.maps.deleteMap", token:'{/literal}{$token}{literal}', id:id }, 484 484 success: 485 485 function(msg) … … 603 603 url: "{/literal}{$datas.urlRequest}{literal}", 604 604 async: true, 605 data: { ajaxfct:"admin.maps.getList" },605 data: { ajaxfct:"admin.maps.getList", token:'{/literal}{$token}{literal}' }, 606 606 success: 607 607 function(msg) … … 670 670 url: "{/literal}{$datas.urlRequest}{literal}", 671 671 async: true, 672 data: { ajaxfct:"admin.maps.setMap", id:properties.id, datas:datas },672 data: { ajaxfct:"admin.maps.setMap", token:'{/literal}{$token}{literal}', id:properties.id, datas:datas }, 673 673 success: 674 674 function(msg) -
extensions/GMaps/admin/gmaps_maps_iListMaps.tpl
r7567 r16011 13 13 14 14 <td width="40px"> 15 <img src="{$themeconf.admin_icon_dir}/edit_s.png" 16 class="button" alt="{'gmaps_edit'|@translate}" 15 <span class="buttonEdit" 17 16 title="{'gmaps_edit'|@translate}" 18 17 onclick='udm.editMap({$data.id});'/> 19 <img src="{$themeconf.admin_icon_dir}/delete.png" 20 class="button" 21 alt="{'gmaps_delete'|@translate}" 18 <span class="buttonDelete" 22 19 title="{'gmaps_delete'|@translate}" 23 20 onclick='udm.deleteMap({$data.id});'/> -
extensions/GMaps/gmaps.css
r7308 r16011 7 7 #iListKml table { width:100%; text-align:left; border-collapse: collapse; } 8 8 9 #iListMaps.roma table tr:hover,10 #iListAssoc.roma table tr:hover,11 #iListKml.roma table tr:hover { cursor:pointer; background:#303030; }12 9 13 #iListMaps.clear table tr:hover,14 #iListAssoc.clear table tr:hover,15 #iListKml.clear table tr:hover { cursor:pointer; color: #D54E21; background:#dbe8f3; }16 10 17 11 #iBDAssocCatId { … … 76 70 } 77 71 78 / / fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release)72 /* fix IE8 compatibility bugs from GPC 3.2.0 (fixed in next release) */ 79 73 .formtable, .formtable P { margin-left:0px; } 80 74 .tabsheet2 { list-style:none; } 75 76 .buttonEdit, 77 .buttonDelete { 78 width:15px; 79 height:15px; 80 display:inline-block; 81 background:url(./../GrumPluginClasses/icons/buttons.png) no-repeat 0 0 transparent; 82 } -
extensions/GMaps/gmaps2.css
r7308 r16011 137 137 } 138 138 139 139 .icon_gmaps { 140 border:none; 141 } -
extensions/GMaps/gmaps_aip.class.inc.php
r15345 r16011 78 78 public function initEvents() 79 79 { 80 global $template; 81 80 82 parent::initEvents(); 81 83 … … 85 87 GPCRequestBuilder::loadJSandCSS(); 86 88 } 87 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); 88 GPCCss::applyGpcCss(); 89 } 89 } 90 90 91 91 92 /** … … 100 101 101 102 $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/gmaps_admin.tpl"); 103 GPCCore::setTemplateToken(); 102 104 103 105 switch($_GET['tab']) … … 232 234 global $template; 233 235 236 GPCCore::addUI('categorySelector'); 234 237 GPCCore::addHeaderCSS('iconSelector', 'plugins/GrumPluginClasses/css/iconSelector_'.$template->get_themeconf('name').'.css'); 235 GPCCore::addHeaderCSS('categorySelector', 'plugins/GrumPluginClasses/css/categorySelector_'.$template->get_themeconf('name').'.css');236 238 237 239 $template->set_filename('body_page', -
extensions/GMaps/gmaps_aip_release.class.inc.php
r7398 r16011 35 35 36 36 /* 37 initialize events call for the plugin38 */39 public function initEvents()40 {41 parent::initEvents();42 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));43 }44 45 /*46 37 display administration page 47 38 */ -
extensions/GMaps/gmaps_ajax.php
r15345 r16011 25 25 */ 26 26 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) 28 { 29 define('IN_ADMIN', true); 30 } 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true); 28 if(!defined('AJAX_CALL')) define('AJAX_CALL', true); 31 29 32 30 // the common.inc.php file loads all the main.inc.php plugins files … … 59 57 global $user; 60 58 61 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';62 59 if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']=''; 60 GPCAjax::checkToken(); 63 61 64 62 // check if asked function is valid 65 if(!($_REQUEST[ 'ajaxfct']=='admin.maps.getList' or66 $_REQUEST[ 'ajaxfct']=='admin.maps.setMap' or67 $_REQUEST[ 'ajaxfct']=='admin.maps.getMap' or68 $_REQUEST[ 'ajaxfct']=='admin.maps.deleteMap' or69 $_REQUEST[ 'ajaxfct']=='admin.assoc.getList' or70 $_REQUEST[ 'ajaxfct']=='admin.assoc.setAssoc' or71 $_REQUEST[ 'ajaxfct']=='admin.assoc.getAssoc' or72 $_REQUEST[ 'ajaxfct']=='admin.assoc.deleteAssoc' or73 $_REQUEST[ 'ajaxfct']=='admin.kmlFiles.getList' or74 $_REQUEST[ 'ajaxfct']=='admin.kmlFiles.setFile' or75 $_REQUEST[ 'ajaxfct']=='admin.kmlFiles.getFile' or76 $_REQUEST[ 'ajaxfct']=='admin.kmlFiles.deleteFile' or77 78 $_REQUEST[ 'ajaxfct']=='public.maps.init' or79 $_REQUEST[ 'ajaxfct']=='public.maps.getMarkers'80 )) $_REQUEST[ 'ajaxfct']='';81 82 if(preg_match('/^admin\./i', $_REQUEST[ 'ajaxfct']) and !is_admin()) $_REQUEST['ajaxfct']='';83 84 85 if($_REQUEST[ 'ajaxfct']!='')63 if(!($_REQUEST[GPC_AJAX]=='admin.maps.getList' or 64 $_REQUEST[GPC_AJAX]=='admin.maps.setMap' or 65 $_REQUEST[GPC_AJAX]=='admin.maps.getMap' or 66 $_REQUEST[GPC_AJAX]=='admin.maps.deleteMap' or 67 $_REQUEST[GPC_AJAX]=='admin.assoc.getList' or 68 $_REQUEST[GPC_AJAX]=='admin.assoc.setAssoc' or 69 $_REQUEST[GPC_AJAX]=='admin.assoc.getAssoc' or 70 $_REQUEST[GPC_AJAX]=='admin.assoc.deleteAssoc' or 71 $_REQUEST[GPC_AJAX]=='admin.kmlFiles.getList' or 72 $_REQUEST[GPC_AJAX]=='admin.kmlFiles.setFile' or 73 $_REQUEST[GPC_AJAX]=='admin.kmlFiles.getFile' or 74 $_REQUEST[GPC_AJAX]=='admin.kmlFiles.deleteFile' or 75 76 $_REQUEST[GPC_AJAX]=='public.maps.init' or 77 $_REQUEST[GPC_AJAX]=='public.maps.getMarkers' 78 )) $_REQUEST[GPC_AJAX]=''; 79 80 if(preg_match('/^admin\./i', $_REQUEST[GPC_AJAX]) and !is_admin()) $_REQUEST[GPC_AJAX]=''; 81 82 83 if($_REQUEST[GPC_AJAX]!='') 86 84 { 87 85 /* … … 96 94 * admin.kmlFiles.getFile 97 95 */ 98 if($_REQUEST[ 'ajaxfct']=="admin.maps.getMap" or99 $_REQUEST[ 'ajaxfct']=="admin.assoc.getAssoc" or100 $_REQUEST[ 'ajaxfct']=="admin.kmlFiles.getFile")96 if($_REQUEST[GPC_AJAX]=="admin.maps.getMap" or 97 $_REQUEST[GPC_AJAX]=="admin.assoc.getAssoc" or 98 $_REQUEST[GPC_AJAX]=="admin.kmlFiles.getFile") 101 99 { 102 100 if(!isset($_REQUEST['id']) or 103 101 !is_numeric($_REQUEST['id']) or 104 $_REQUEST['id']=='') $_REQUEST[ 'ajaxfct']='';102 $_REQUEST['id']=='') $_REQUEST[GPC_AJAX]=''; 105 103 } 106 104 … … 111 109 * admin.kmlFiles.deleteFile 112 110 */ 113 if($_REQUEST[ 'ajaxfct']=="admin.maps.deleteMap" or114 $_REQUEST[ 'ajaxfct']=="admin.assoc.deleteAssoc" or115 $_REQUEST[ 'ajaxfct']=="admin.kmlFiles.deleteFile")111 if($_REQUEST[GPC_AJAX]=="admin.maps.deleteMap" or 112 $_REQUEST[GPC_AJAX]=="admin.assoc.deleteAssoc" or 113 $_REQUEST[GPC_AJAX]=="admin.kmlFiles.deleteFile") 116 114 { 117 115 if(!isset($_REQUEST['id']) or 118 116 !is_numeric($_REQUEST['id']) or 119 $_REQUEST['id']=='') $_REQUEST[ 'ajaxfct']='';117 $_REQUEST['id']=='') $_REQUEST[GPC_AJAX]=''; 120 118 } 121 119 … … 123 121 * check admin.maps.setMap values 124 122 */ 125 if($_REQUEST[ 'ajaxfct']=="admin.maps.setMap")123 if($_REQUEST[GPC_AJAX]=="admin.maps.setMap") 126 124 { 127 125 if(!isset($_REQUEST['id']) or 128 126 !isset($_REQUEST['datas']) or !is_array($_REQUEST['datas'])) 129 127 { 130 $_REQUEST[ 'ajaxfct']='';128 $_REQUEST[GPC_AJAX]=''; 131 129 } 132 130 else … … 147 145 )) 148 146 { 149 $_REQUEST[ 'ajaxfct']='';147 $_REQUEST[GPC_AJAX]=''; 150 148 } 151 149 else … … 153 151 if(!($_REQUEST['datas']['displayType']=='IC' or 154 152 $_REQUEST['datas']['displayType']=='IP' or 155 $_REQUEST['datas']['displayType']=='MP')) $_REQUEST[ 'ajaxfct']='';153 $_REQUEST['datas']['displayType']=='MP')) $_REQUEST[GPC_AJAX]=''; 156 154 157 155 if(!($_REQUEST['datas']['sizeMode']=='A' or 158 $_REQUEST['datas']['sizeMode']=='F')) $_REQUEST[ 'ajaxfct']='';156 $_REQUEST['datas']['sizeMode']=='F')) $_REQUEST[GPC_AJAX]=''; 159 157 160 158 if(!is_numeric($_REQUEST['datas']['width']) or … … 199 197 * check admin.maps.setAssoc values 200 198 */ 201 if($_REQUEST[ 'ajaxfct']=="admin.assoc.setAssoc")199 if($_REQUEST[GPC_AJAX]=="admin.assoc.setAssoc") 202 200 { 203 201 if(!isset($_REQUEST['id']) or 204 202 !isset($_REQUEST['datas']) or !is_array($_REQUEST['datas'])) 205 203 { 206 $_REQUEST[ 'ajaxfct']='';204 $_REQUEST[GPC_AJAX]=''; 207 205 } 208 206 else … … 217 215 isset($_REQUEST['datas']['title']) )) 218 216 { 219 $_REQUEST[ 'ajaxfct']='';217 $_REQUEST[GPC_AJAX]=''; 220 218 } 221 219 else 222 220 { 223 221 if($_REQUEST['datas']['categoryId']=='' or 224 $_REQUEST['datas']['categoryId']<0) $_REQUEST[ 'ajaxfct']='';225 226 if($_REQUEST['datas']['mapId']=='') $_REQUEST[ 'ajaxfct']='';222 $_REQUEST['datas']['categoryId']<0) $_REQUEST[GPC_AJAX]=''; 223 224 if($_REQUEST['datas']['mapId']=='') $_REQUEST[GPC_AJAX]=''; 227 225 228 226 if(!($_REQUEST['datas']['applySubCat']=='y' or … … 240 238 * check admin.kmlFiles.setFile values 241 239 */ 242 if($_REQUEST[ 'ajaxfct']=="admin.kmlFiles.setFile")240 if($_REQUEST[GPC_AJAX]=="admin.kmlFiles.setFile") 243 241 { 244 242 if(!isset($_REQUEST['id']) ) 245 243 { 246 $_REQUEST[ 'ajaxfct']='';244 $_REQUEST[GPC_AJAX]=''; 247 245 } 248 246 else … … 251 249 { 252 250 if(!(isset($_FILES['file']['name']) and 253 isset($_FILES['file']['tmp_name']))) $_REQUEST[ 'ajaxfct']='';251 isset($_FILES['file']['tmp_name']))) $_REQUEST[GPC_AJAX]=''; 254 252 } 255 253 } … … 261 259 * check public.maps.getMarkers values 262 260 */ 263 if($_REQUEST[ 'ajaxfct']=="public.maps.getMarkers")261 if($_REQUEST[GPC_AJAX]=="public.maps.getMarkers") 264 262 { 265 263 if(!isset($_REQUEST['datas']) or 266 264 !is_array($_REQUEST['datas'])) 267 265 { 268 $_REQUEST[ 'ajaxfct']='';266 $_REQUEST[GPC_AJAX]=''; 269 267 } 270 268 else … … 281 279 isset($_REQUEST['datas']['bounds']['west']) )) 282 280 { 283 $_REQUEST[ 'ajaxfct']='';281 $_REQUEST[GPC_AJAX]=''; 284 282 } 285 283 if(!isset($_REQUEST['datas']['loadIndex'])) $_REQUEST['datas']['loadIndex']=''; … … 290 288 * check public.maps.getMarkerInfos values 291 289 */ 292 if($_REQUEST[ 'ajaxfct']=="public.maps.init")293 { 294 if(!isset($_REQUEST['category'])) $_REQUEST[ 'ajaxfct']='';290 if($_REQUEST[GPC_AJAX]=="public.maps.init") 291 { 292 if(!isset($_REQUEST['category'])) $_REQUEST[GPC_AJAX]=''; 295 293 if(!isset($_REQUEST['mapId'])) $_REQUEST['mapId']=null; 296 294 } … … 305 303 { 306 304 $result="<p class='errors'>An error has occured</p>"; 307 switch($_REQUEST[ 'ajaxfct'])305 switch($_REQUEST[GPC_AJAX]) 308 306 { 309 307 case 'admin.maps.getList': … … 539 537 { 540 538 $sql="DELETE FROM ".$this->tables['category_maps']." 541 WHERE map _id='$id';";539 WHERE mapId='$id';"; 542 540 $result=pwg_query($sql); 543 541 if($result) return('ok'); -
extensions/GMaps/gmaps_pip.class.inc.php
r15345 r16011 52 52 ) 53 53 ); 54 protected $css2;55 54 56 55 public function __construct($prefixeTable, $filelocation) 57 56 { 58 57 parent::__construct($prefixeTable, $filelocation); 59 $this->css2 = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."2.css");60 58 $this->loadConfig(); 61 59 $this->initEvents(); … … 86 84 { 87 85 parent::initEvents(); 88 89 86 add_event_handler('loc_begin_index', array(&$this, 'displayCategoryPageMap')); 90 87 if(!isset($_GET['slideshow'])) add_event_handler('loc_begin_picture', array(&$this, 'displayPicturePageMap'), EVENT_HANDLER_PRIORITY_NEUTRAL+5); 91 88 add_event_handler('amd_jpegMD_loaded', array(&$this, 'preparePictureMaps')); 92 add_event_handler('loc_end_page_header', array(&$this->css2, 'applyCSS'));93 89 add_event_handler('render_category_description', array(&$this, 'categoryMarkup'), EVENT_HANDLER_PRIORITY_NEUTRAL-5, 2); 94 90 } 95 91 96 92 93 public function loadCSS() 94 { 95 //parent::loadCSS(); // -- do not call ancestor! 96 GPCCore::addHeaderCSS('gmaps.css2', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."2.css"); 97 } 97 98 98 99 /* ------------------------------------------------------------------------- … … 213 214 gmaps = 214 215 { 216 token:'".get_pwg_token()."', 215 217 lang:{ 216 218 boundmap:'".l10n('gmaps_i_boundmap')."', … … 306 308 var gmaps = 307 309 { 310 token:'".get_pwg_token()."', 308 311 geolocated:".($nb>0?'true':'false').", 309 312 forceDisplay:".($nb==0?'true':'false').", … … 503 506 var gmaps = 504 507 { 508 token:'".get_pwg_token()."', 505 509 geolocated:".($this->picture['geolocated']?'true':'false').", 506 510 forceDisplay:".($this->picture['forceDisplay']?'true':'false').", -
extensions/GMaps/gmaps_root.class.inc.php
r12213 r16011 14 14 --------------------------------------------------------------------------- */ 15 15 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 16 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');17 16 18 17 class GMaps_root extends CommonPlugin … … 22 21 const ID_MODE_MAP='M'; 23 22 24 protected $css;25 23 protected $maps=array(); 26 24 protected $forceDisplay=0; … … 86 84 87 85 $this->setTablesList(array('maps', 'category_maps', 'cache', 'cache_id', 'kmlfiles')); 88 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css"); 89 } 90 91 public function __destruct() 92 { 93 parent::__destruct(); 94 } 95 96 public function initEvents() 97 { 98 } 99 100 101 /* 102 surchage of CommonPlugin->saveConfig function 103 */ 104 public function saveConfig() 105 { 106 if(parent::saveConfig()) 107 { 108 return(true); 109 } 110 return(false); 111 } 112 113 /* 114 surchage of CommonPlugin->saveConfig function 115 */ 116 public function loadConfig() 117 { 118 parent::loadConfig(); 119 } 86 } 87 88 public function loadCSS() 89 { 90 global $template; 91 92 parent::loadCSS(); 93 GPCCore::addUI('gpcCSS'); 94 GPCCore::addHeaderCSS('gmaps.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css"); 95 GPCCore::addHeaderCSS('gmaps.cssT', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().'_'.$template->get_themeconf('name').".css"); 96 } 97 120 98 121 99 /* … … 129 107 ); 130 108 } 131 132 109 133 110 /** -
extensions/GMaps/js/gmapsCategory.js
r15345 r16011 121 121 url: "plugins/GMaps/gmaps_ajax.php", 122 122 async: true, 123 data: { ajaxfct:"public.maps.getMarkers", datas:datas },123 data: { ajaxfct:"public.maps.getMarkers", token:gmaps.token, datas:datas }, 124 124 success: 125 125 function(msg) … … 548 548 url: "plugins/GMaps/gmaps_ajax.php", 549 549 async: true, 550 data: { ajaxfct:"public.maps.init", category:gmaps.categoryId, mapId:'n' },550 data: { ajaxfct:"public.maps.init", token:gmaps.token, category:gmaps.categoryId, mapId:'n' }, 551 551 success: 552 552 function(msg) -
extensions/GMaps/js/gmapsMarkup.js
r15345 r16011 147 147 url: "plugins/GMaps/gmaps_ajax.php", 148 148 async: true, 149 data: { ajaxfct:"public.maps.getMarkers", datas:datas },149 data: { ajaxfct:"public.maps.getMarkers", token:gmaps.token, datas:datas }, 150 150 success: 151 151 function(msg) … … 498 498 url: "plugins/GMaps/gmaps_ajax.php", 499 499 async: true, 500 data: { ajaxfct:"public.maps.init", category:gmapsMarkup.categoryId, mapId:'y' },500 data: { ajaxfct:"public.maps.init", token:gmaps.token, category:gmapsMarkup.categoryId, mapId:'y' }, 501 501 success: 502 502 function(msg) -
extensions/GMaps/main.inc.php
r15345 r16011 160 160 global $prefixeTable; 161 161 162 if( defined('IN_ADMIN'))162 if(!defined('AJAX_CALL')) 163 163 { 164 //GMaps admin interface loaded and active only if in admin page 165 include_once("gmaps_aim.class.inc.php"); 166 $obj=new GMaps_AIM($prefixeTable, __FILE__); 167 $obj->initEvents(); 168 } 169 else 170 { 171 if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED)) 164 if(defined('IN_ADMIN')) 172 165 { 173 //GMaps public interface loaded and active only if in public page 174 include_once("gmaps_pip.class.inc.php"); 175 $obj=new GMaps_PIP($prefixeTable, __FILE__); 166 //GMaps admin interface loaded and active only if in admin page 167 include_once("gmaps_aim.class.inc.php"); 168 $obj=new GMaps_AIM($prefixeTable, __FILE__); 169 $obj->initEvents(); 170 } 171 else 172 { 173 if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED) and !mobile_theme()) 174 { 175 //GMaps public interface loaded and active only if in public page 176 include_once("gmaps_pip.class.inc.php"); 177 $obj=new GMaps_PIP($prefixeTable, __FILE__); 178 } 176 179 } 177 180 } -
extensions/GMaps/templates/gmaps_dialog_area_choose.tpl
r15345 r16011 46 46 url: "plugins/GMaps/gmaps_ajax.php", 47 47 async: true, 48 data: { ajaxfct:"public.maps.init", category:0 },48 data: { ajaxfct:"public.maps.init", token:'{/literal}{$token}{literal}', category:0 }, 49 49 success: function (msg) 50 50 { … … 224 224 url: "plugins/GMaps/gmaps_ajax.php", 225 225 async: true, 226 data: { ajaxfct:"public.maps.getMarkers", datas:datas },226 data: { ajaxfct:"public.maps.getMarkers", token:'{/literal}{$token}{literal}', datas:datas }, 227 227 success: 228 228 function(msg)
Note: See TracChangeset
for help on using the changeset viewer.