File manager - Edit - /home/jardides/www/Jardi-design/j37/plugins/pagebuilderck/googlemap/layouts/edit_googlemap.php
Back
<?php /** * @name Page Builder CK * @package com_pagebuilderck * @copyright Copyright (C) 2015. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ defined('_JEXEC') or die; $input = JFactory::getApplication()->input; $id = $input->get('ckid', '', 'string'); $plugin = JPluginHelper::getPlugin('pagebuilderck', 'googlemap'); $pluginParams = new JRegistry($plugin->params); ?> <div id="elementscontainer"> <div class="menulink current" tab="tab_map"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_EDITION'); ?></div> <div class="menulink" tab="tab_blocstyles"><?php echo JText::_('CK_STYLES'); ?></div> <div class="clr"></div> <div id="elementscontent"> <div class="tab menustyles current ckproperty" id="tab_map"> <table> <tr> <td style="vertical-align:top;"> <div class="layoutinfos"> <div class="layoutinfostitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_INFOS'); ?></div> <div class="layoutinfosdesc"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_INFOS_DESC'); ?></div> </div> </td> <td style="vertical-align:top;width:800px;"> <div class="menustylesblock" style="width:850px;"> <div class="menustylesblocktitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP') ?></div> <div class="menustylesblockaccordion"> <div class="menupanetitle"> <?php if (! $pluginParams->get('gmapapikey', '')) { ?> <a href="<?php echo JUri::root(true) ?>/administrator/index.php?option=com_plugins&view=plugins&filter_search=Page Builder CK - Google Map" target="_blank" style="color:red;"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_API_KEY_EMPTY') ?></a> <?php } ?> </div> <div class="menupanetitle"><?php echo JText::_('CK_ADDRESS'); ?></div> <div style="text-align:left;"> <input class="inputbox" type="text" value="" name="address" id="address" size="7" style="width:90%; min-width: 200px; clear:both;" onchange="ckSetMarker()" /> <div class="menupanetitle"><?php echo JText::_('CK_LATITUDE'); ?></div> <input class="inputbox" type="text" value="" name="latitude" id="latitude" size="7" style="width:45%; min-width: 200px; clear:both;" onchange="$ck('#address').val('');ckSetMarker()" /> <div class="menupanetitle"><?php echo JText::_('CK_LONGITUDE'); ?></div> <input class="inputbox" type="text" value="" name="longitude" id="longitude" size="7" style="width:45%; min-width: 200px;" onchange="$ck('#address').val('');ckSetMarker()" /> </div> <div class="menupanetitle"><?php echo JText::_('CK_DIMENSIONS'); ?></div> <div style="text-align:left;clear:both;"> <div style="float:left;text-align:right;margin:5px 5px 0 0;line-height: 15px;;"><?php echo JText::_('CK_WIDTH'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>width.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="mapwidth" id="mapwidth" size="2" value="100%" style="" onchange="ckUpdateMapPreview()" /></div><div style="float:left;text-align:left;margin-left:3px;"></div> <div style="float:left;text-align:right;margin:5px 5px 0 10px;line-height: 15px;;"><?php echo JText::_('CK_HEIGHT'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>height.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="mapheight" id="mapheight" size="2" value="480px" style="" onchange="ckUpdateMapPreview()" /></div><div style="float:left;text-align:left;margin-left:3px;"></div> <div style="float:left;text-align:right;margin:5px 5px 0 10px;line-height: 15px;;"><?php echo JText::_('CK_ZOOM'); ?></div><div style="float:left;text-align:right;margin:5px 5px 0 0;"><img src="<?php echo $this->imagespath; ?>magnifier.png" width="15" height="15" align="top" /></div><div style="float:left;"><input class="inputbox" type="text" name="mapzoom" id="mapzoom" size="2" value="8" style="" onchange="ckUpdateMapPreview()" /></div><div style="float:left;text-align:left;margin-left:3px;"></div> <div class="clr"></div> </div> <div style="text-align:left;clear:both;"> <div class="menupanetitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_SCROLL'); ?></div> <select class="inputbox" type="list" value="" name="scroll" id="scroll" style="width:30%; min-width: 200px; clear:both;"> <option value="false"><?php echo JText::_('JNO'); ?></option> <option value="true"><?php echo JText::_('JYES'); ?></option> </select> </div> <div style="text-align:left;clear:both;"> <div class="menupanetitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_MAPTYPE'); ?></div> <select class="inputbox" type="list" value="" name="maptype" id="maptype" style="width:30%; min-width: 200px; clear:both;" onchange="ckUpdateMapPreview()"> <option value="google.maps.MapTypeId.ROADMAP"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_ROADMAP'); ?></option> <option value="google.maps.MapTypeId.SATELLITE"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_SATELLITE'); ?></option> <option value="google.maps.MapTypeId.HYBRID"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_HYBRID'); ?></option> <option value="google.maps.MapTypeId.TERRAIN"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_TERRAIN'); ?></option> </select> </div> <div class="clr"></div> </div> <div class="menustylesblocktitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_MARKER') ?></div> <div class="menustylesblockaccordion"> <div class="menupanetitle"><?php echo JText::_('CK_TITLE'); ?></div> <div style="text-align:left;"> <input class="inputboxfake" type="text" value="" name="markertitle" id="markertitle" size="7" style="width:90%; min-width: 200px; clear:both;" onchange="ckSetMarker()" /> </div> <div class="menupanetitle"><?php echo JText::_('CK_CONTENT'); ?></div> <textarea id="markercontent" name="markercontent"></textarea> <div class="menupanetitle"><?php echo JText::_('CK_SHOWON'); ?></div> <div style="text-align:left;"> <select class="inputbox" type="list" value="" name="markershowon" id="markershowon" style="width:90%; min-width: 200px; clear:both;" onchange="ckSetMarker()" > <option value="mouseover"><?php echo JText::_('CK_MOUSEOVER'); ?></option> <option value="click"><?php echo JText::_('CK_CLICK'); ?></option> </select> </div> <div class="clr"></div> </div> <div class="menustylesblocktitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_SNAZZYMAPS') ?></div> <div class="menustylesblockaccordion"> <div class="menupanetitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_SNAZZYMAPS_TITLE'); ?></div> <p><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_SNAZZYMAPS_DESC'); ?></p> <textarea id="snazzymaps" name="snazzymaps" class="inputbox" style="width:800px;height:200px;"></textarea> <div class="clr"></div> </div> </div> </td> </tr> </table> <div class="clr"></div> </div> <div class="tab menustyles ckproperty" id="tab_blocstyles"> <table> <tr> <td style="vertical-align:top;"> <div class="layoutinfos"> <div class="layoutinfostitle"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_INFOS'); ?></div> <div class="layoutinfosdesc"><?php echo JText::_('PLG_PAGEBUILDERCK_GOOGLEMAP_INFOS_DESC'); ?></div> </div> </td> <td style="vertical-align:top;"> <?php echo $this->menustyles->createBlocStyles('bloc', 'map', '') ?> </td> </tr> </table> <div class="clr"></div> </div> </div> </div> <div id="previewarea" class="clearfix"> <div class="previewareatitle"><?php echo JText::_('CK_PREVIEWAREA_TITLE'); ?></div> <div id="previewareabloc"> <div class="ckstyle"></div> <div class="inner"> <div id="<?php echo $id; ?>_preview_map" class="mapck cktype"> <div id="mapck" style="width: 100%; height: 480px;"></div> </div> </div> </div> </div> <div class="clr"></div> <script language="javascript" type="text/javascript"> function ckLoadEditionPopup() { var focus = $ck('.editfocus'); // set the marker content content = focus.find('.googlemapmarkercontentck').html(); content = ckContentToEditor(content); $ck('#markercontent').val(content); ckLoadEditorOnTheFly('markercontent'); // set the marker title $ck('#markertitle').val(focus.find('.googlemapmarkertitleck').html()); $ck('#previewareabloc .ckstyle').html(focus.find('.ckstyle').html()); ckFillEditionPopup(focus.attr('id')); ckInitializeMap(); ckUpdateMapPreview(); } function ckBeforeSaveEditionPopup() { var focus = $ck('.editfocus'); // save the marker content var textID = 'markercontent'; ckSaveEditorOnTheFly(textID); var content = $ck('#markercontent').val(); content = ckEditorToContent(content); focus.find('.googlemapmarkercontentck').html(content); // save the marker title focus.find('.googlemapmarkertitleck').html($ck('#markertitle').val()); focus.find('.ckstyle').html($ck('#previewareabloc .ckstyle').html()); ckSaveEditionPopup(focus.attr('id')); ckCloseEditionPopup(); } /* * Method automatically called in ckCloseEditionPopup() if exists (needed if you are using an editor !!) */ function ckBeforeCloseEditionPopup() { var textID = 'markercontent'; ckRemoveEditorOnTheFly(textID); } // setup the map instance var geocoder, map, marker; var markers = []; function ckInitializeMap() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(-34.397, 150.644); var mapOptions = { zoom: 8, center: latlng, } map = new google.maps.Map(document.getElementById("mapck"), mapOptions); ckSetMarker(); } // translate the address to the LatLong values function ckSetMarker() { var address = document.getElementById("address").value; if (!address && !$ck('#latitude').val() && !$ck('#longitude').val() ) return; if ($ck('#latitude').val() && $ck('#longitude').val()) { var latlng = new google.maps.LatLng($ck('#latitude').val(), $ck('#longitude').val()); } geoOpts = (latlng && !address) ? { 'location': latlng} : { 'address': address}; geocoder.geocode( geoOpts, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { $ck('#latitude').val(results[0].geometry.location.lat()); $ck('#longitude').val(results[0].geometry.location.lng()); map.setCenter(results[0].geometry.location); deleteMarkers(); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location, title: $ck('#markertitle').val() }); var textID = 'markercontent'; ckSaveEditorOnTheFly(textID); var content = $ck('#markercontent').val(); content = ckEditorToContent(content); var infowindow = new google.maps.InfoWindow({ content: content }); marker.addListener($ck('#markershowon').val(), function() { infowindow.open(map, marker); }); markers.push(marker); } else { alert("Geocode was not successful for the following reason: " + status); } }); } // Sets the map on all markers in the array. function ckSetMapOnAll(map) { for (var i = 0; i < markers.length; i++) { markers[i].setMap(map); } } // Removes the markers from the map, but keeps them in the array. function ckClearMarkers() { ckSetMapOnAll(null); } // Shows any markers currently in the array. function showMarkers() { ckSetMapOnAll(map); } // Deletes all markers in the array by removing references to them. function deleteMarkers() { ckClearMarkers(); markers = []; } function ckUpdateMapPreview() { // ckInitializeMap(); var mapzoom = $ck('#mapzoom').val() ? $ck('#mapzoom').val() : '8'; map.setZoom(parseInt(mapzoom)); switch ($ck('#maptype').val()) { case 'google.maps.MapTypeId.ROADMAP' : default : map.setMapTypeId(google.maps.MapTypeId.ROADMAP); break; case 'google.maps.MapTypeId.SATELLITE' : map.setMapTypeId(google.maps.MapTypeId.SATELLITE); break; case 'google.maps.MapTypeId.HYBRID' : map.setMapTypeId(google.maps.MapTypeId.HYBRID); break; case 'google.maps.MapTypeId.TERRAIN' : map.setMapTypeId(google.maps.MapTypeId.TERRAIN); break; } map.setOptions({styles: $ck('#snazzymaps').val()}); var mapw = $ck('#mapwidth').val() ? $ck('#mapwidth').val() : ''; var maph = $ck('#mapheight').val() ? $ck('#mapheight').val() : ''; $ck('#previewareabloc #mapck').css('width', mapw).css('padding-bottom', maph).height('0'); } /**------- Needed for tabs ----------**/ $ck('#elementscontent div.tab:not(.current)').hide(); $ck('.menulink', $ck('#elementscontainer')).each(function(i, tab) { $ck(tab).click(function() { $ck('#elementscontent div.tab').hide(); $ck('.menulink', $ck('#elementscontainer')).removeClass('current'); if ($ck('#' + $ck(tab).attr('tab')).length) $ck('#' + $ck(tab).attr('tab')).show(); $ck(this).addClass('current'); }); }); ckInitColorPickers(); initModalPopup(); ckInitAccordions(); </script> <style type="text/css"> </style>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings