MapPress Easy Google Maps - Version 2.40.1

Version Description

Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.40.1
Comparing to
See all releases

Code changes from version 2.40 to 2.40.1

css/mappress_admin.css CHANGED
@@ -40,22 +40,28 @@ tr:hover > td > .mapp-m-actions {
40
white-space:nowrap;
41
}
42
43
.mapp-e-top-toolbar {
44
font-size: 12px;
45
}
46
47
.mapp-e-canvas {
48
max-width: 100%;
49
border: 1px solid lightgray;
50
}
51
52
.mapp-e-poi-list {
53
border-left: 1px solid lightgray;
54
- border-right: 1px solid lightgray;
55
- border-bottom: 1px solid lightgray;
56
- display: inline-block;
57
- width: 25%;
58
- height: 100%;
59
cursor: move;
60
overflow: auto;
61
}
40
white-space:nowrap;
41
}
42
43
+ table.mapp-e-editor {
44
+ border-collapse: collapse;
45
+ table-layout: fixed;
46
+ width: 100%;
47
+ }
48
+
49
+ .mapp-e-editor td {
50
+ vertical-align: top;
51
+ }
52
+
53
.mapp-e-top-toolbar {
54
font-size: 12px;
55
}
56
57
.mapp-e-canvas {
58
max-width: 100%;
59
+ min-height: 200px; /* Used only if a % height is applied */
60
border: 1px solid lightgray;
61
}
62
63
.mapp-e-poi-list {
64
border-left: 1px solid lightgray;
65
cursor: move;
66
overflow: auto;
67
}
forms/map_editor.php CHANGED
@@ -7,15 +7,20 @@
7
</div>
8
9
<div class='mapp-e-edit-panel'>
10
- <div id='mapp_e_poi_list' class='mapp-e-poi-list'></div>
11
- <div style='display: inline-block; max-width: 75%; vertical-align: top'>
12
- <div class='mapp-e-top-toolbar'>
13
- <a href='#' id='mapp_e_recenter'><?php _e('Center map', 'mappress'); ?></a> |
14
- <?php _e('Click map for lat/lng: ', 'mappress'); ?><span id='mapp_e_latlng'>0,0</span>
15
- </div>
16
- <div id='mapp_edit' class='mapp-e-canvas'></div>
17
- </div>
18
</div>
19
-
20
-
21
<?php require Mappress::$basedir . "/forms/map_editor_infobox.php"; ?>
7
</div>
8
9
<div class='mapp-e-edit-panel'>
10
+ <table class='mapp-e-editor'>
11
+ <tr>
12
+ <td style='width: 25%;'>
13
+ <div id='mapp_e_poi_list' class='mapp-e-poi-list'></div>
14
+ </td>
15
+ <td style='width: 75%;'>
16
+ <div id='mapp_e_top_toolbar' class='mapp-e-top-toolbar'>
17
+ <a href='#' id='mapp_e_recenter'><?php _e('Center map', 'mappress'); ?></a> |
18
+ <?php _e('Click map for lat/lng: ', 'mappress'); ?><span id='mapp_e_latlng'>0,0</span>
19
+ </div>
20
+ <div id='mapp_edit' class='mapp-e-canvas'></div>
21
+ </td>
22
+ </tr>
23
+ </table>
24
</div>
25
+
26
<?php require Mappress::$basedir . "/forms/map_editor_infobox.php"; ?>
js/mappress_editor.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};mapp.Media=function(){function f(i){n=i,jQuery("#mapp_m_editor").empty(),jQuery("#mapp_m_editor").append(e.clone());var r=n.getMapid();r?jQuery("#mapp_m_mapid").text(r):jQuery("#mapp_m_mapid").text(""),jQuery("#mapp_m_title").val(n.getTitle()),jQuery("#mapp_m_width").val(n.getWidth()),jQuery("#mapp_m_height").val(n.getHeight()),jQuery("#mapp_m_edit_panel").show(),jQuery("#mapp_m_list_panel").hide(),t=new mapp.Editor(n)}function u(){t.close(),n=null,t=null,jQuery("#mapp_m_edit_panel").hide(),jQuery("#mapp_m_list_panel").show()}function c(){mapp.Map.ajaxCreate("mapp_edit",i,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp_edit",i,function(n){f(n)})}function o(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function r(){if(n){var t=jQuery.trim(jQuery("#mapp_m_title").val());t=t!=""?t:mappl10n.untitled,n.setTitle(t),n.ajaxSave(function(n){n.list&&jQuery("#mapp_m_maplist").html(n.list),u()})}}function s(n){confirm(mappl10n.delete_map_prompt)&&(jQuery("#mapp_m_maplist tr[data-mapid='"+n+"']").remove(),mapp.Map.ajaxDelete(n))}var t,n,e,l=this,i;e=jQuery("#mapp_m_editor").contents().detach(),i={bicycling:!1,directions:"none",editable:!0,initialOpenInfo:!1,iwDisableAutoPan:!1,iwType:"ib",mapTypeControl:!0,mapTypeControlStyle:2,mapTypeIds:null,navigationControlOptions:{style:0},overviewMapControl:!1,overviewMapControlOptions:{opened:!1},streetViewControl:!1,traffic:!1,transit:!1},jQuery("#mapp_m_list_panel").show(),jQuery("#mapp_m_add_map").click(function(){return c(),!1});jQuery("#mapp_m_maplist").on("click","tr",function(n){var t=jQuery(this).attr("data-mapid");return jQuery(n.target).hasClass("mapp-maplist-edit")?(h(t),!1):jQuery(n.target).hasClass("mapp-maplist-delete")?(s(t),!1):jQuery(n.target).hasClass("mapp-maplist-insert")?(o(t),!1):void 0});jQuery(".mapp-m-size").click(function(){var i=jQuery(this).data("width"),n=jQuery(this).data("height");return jQuery("#mapp_m_width").val(i),jQuery("#mapp_m_height").val(n),t.resize(i,n),!1}),jQuery("#mapp_m_width, #mapp_m_height").change(function(){return jQuery(this).val()<200&&jQuery(this).val(200),t.resize(jQuery("#mapp_m_width").val(),jQuery("#mapp_m_height").val()),!1}),jQuery("#publish, #post-preview").click(function(){r()}),jQuery("#mapp_m_save").click(function(){return r(),!1}),jQuery("#mapp_m_title").keypress(function(n){if(n.which==13)return n.preventDefault(),jQuery("#mapp_m_save").click(),!1}),jQuery("#mapp_m_cancel").click(function(){return u(),!1}),jQuery("#mapp_m_insert").click(function(){var i=n.getMapid(),t='[mappress mapid="'+n.getMapid()+'"]';return i?send_to_editor(t):alert(mappl10n.save_first),!1})},mapp.Editor=function(n){function y(){s=jQuery("#mapp_e_infobox").detach(),t=n,t.display(),this.resize(t.getWidth(),t.getHeight()),i(),typeof mappl10n.id!="undefined"&&(u=new google.maps.drawing.DrawingManager({circleOptions:r,drawingControlOptions:{drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},polygonOptions:r,polylineOptions:r,rectangleOptions:r}),u.setMap(t.getMap()),google.maps.event.addListener(u,"overlaycomplete",function(n){c(n)})),t.getGeocoder().autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",b),google.maps.event.addListener(t,"poicontent",v),google.maps.event.addListener(t,"poidomready",p),jQuery("#mapp_e_recenter").click(function(){return t.closeInfoWindow(),t.autoCenter(!0),!1}),google.maps.event.addListener(t.getMap(),"click",function(n){jQuery("#mapp_e_latlng").text(n.latLng.toUrlValue())})}function i(){for(var r=t.getPois(),u="<table>",n=0;n<r.length;n++){var o=r[n].title.replace(/\'/g,"&rsquo;"),e=r[n].getImage("mapp-e-icon"),f=r[n].address;u+="<tr id='"+n+"'><td>"+e+"<\/td><td style='width:100%'><a href='#' title='"+f+"'><b>"+o+"<\/b><\/a><div class='mapp-e-actions'><a href='#' class='mapp-e-poi-list-zoom' data-idx='"+n+"'>"+mappl10n.zoom+"<\/a> | <a href='#' class='mapp-e-poi-list-delete' data-idx='"+n+"'>"+mappl10n.del+"<\/a><\/div><\/td><\/tr>"}u+="<\/table>",jQuery("#mapp_e_poi_list").html(u),jQuery("#mapp_e_poi_list tbody").sortable({axis:"y",placeholder:"mapp-e-sortable-placeholder",forcePlaceholderSize:!0,delay:200,update:function(){var n=jQuery("#mapp_e_poi_list tbody").sortable("toArray");t.sortPois(n),i()}}),jQuery("#mapp_e_poi_list tr").click(function(n){var r=jQuery(this).attr("id"),i;return jQuery(n.target).hasClass("mapp-e-poi-list-zoom")?(i=t.getPoi(r),i&&i.zoomIn(),!1):jQuery(n.target).hasClass("mapp-e-poi-list-delete")?(i=t.getPoi(r),i&&l(i),!1):(t.getPoi(r).click(),!1)})}function v(n,t){var i=jQuery(s).clone(),r;jQuery("#mapp_e_poi_title",i).val(n.title),jQuery("#mapp_e_poi_body",i).val(n.body),jQuery("#mapp_e_poi_iconid",i).val(n.iconid),n.isPoly()&&(n.type=="polyline"?jQuery("#mapp_e_poi_polyline_fields",i).show():jQuery("#mapp_e_poi_polyline_fields, #mapp_e_poi_polygon_fields",i).show(),r=n.getColors(),jQuery("#mapp_stroke_color",i).val(r.strokeColor),jQuery("#mapp_stroke_weight",i).val(r.strokeWeight),jQuery("#mapp_stroke_opacity",i).val(parseInt(r.strokeOpacity*100)),jQuery("#mapp_fill_color",i).val(r.fillColor),jQuery("#mapp_fill_opacity",i).val(parseInt(r.fillOpacity*100))),n.type=="kml"&&(jQuery("#mapp_e_poi_kml_fields",i).show(),jQuery("#mapp_e_poi_kml_url",i).val(n.overlay.getUrl())),t.content=i}function p(n){var u={title:n.title,body:n.body,iconid:n.iconid,colors:n.getColors()};a(),jQuery("#mapp_e_poi_title").focus(),n.isPoly()?(jQuery("#mapp_stroke_color, #mapp_fill_color, #mapp_stroke_weight, #mapp_stroke_opacity, #mapp_fill_opacity").change(function(){var t={strokeColor:jQuery("#mapp_stroke_color").val(),strokeWeight:parseInt(jQuery("#mapp_stroke_weight").val()),strokeOpacity:jQuery("#mapp_stroke_opacity").val()/100};n.type!="polyline"&&(t.fillColor=jQuery("#mapp_fill_color").val(),t.fillOpacity=jQuery("#mapp_fill_opacity").val()/100),n.setColors(t),r=t}),jQuery("#mapp_stroke_color, #mapp_fill_color").mappColorpicker({})):jQuery("#mapp_e_poi_iconid").mappIconPicker({dialog:jQuery("#mapp_e_poi_icon_picker"),open:function(){jQuery("#mapp_e_poi_fields").hide()},close:function(t){jQuery("#mapp_e_poi_fields").show(),typeof t!="undefined"&&(e=t,n.iconid=t,n.setIcon(t),i())}}),google.maps.event.addListenerOnce(t.getInfoWindow(),"closeclick",function(){jQuery("#mapp_colorpicker").hide(),n.title=jQuery("#mapp_e_poi_title").val(),n.body=jQuery("#mapp_e_poi_body").val(),i()}),jQuery("#mapp_e_save_poi").click(function(){return t.closeInfoWindow(),!1}),jQuery("#mapp_e_cancel_poi").click(function(){return t.closeInfoWindow(),n.title=u.title,n.body=u.body,n.iconid=u.iconid,n.setIcon(u.iconid),n.setColors(u.colors),i(),!1})}function b(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),u=n.name?n.name:t.firstLine,r=n.name?t.firstLine+", "+t.secondLine:t.secondLine,i=new mapp.Poi({address:n.formatted_address,body:r,iconid:e,overlay:new google.maps.Marker({position:n.geometry.location}),title:u,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});f(i,!0);return}if(n instanceof google.maps.LatLng)return h(n);if(typeof n=="string"&&n.substring(0,4)=="http")return w(n);alert("Internal error, unable to add location")}}function w(n){var t=new mapp.Poi({iconid:e,overlay:new google.maps.KmlLayer(n,{suppressInfoWindows:!0}),title:"KML",type:"kml"});google.maps.event.addListener(t.overlay,"status_changed",function(){var r=t.overlay.getStatus(),n;r=="OK"?(n=t.overlay.getMetadata(),t.title=n.name,t.body=n.description,t.viewport=t.overlay.getDefaultViewport(),i()):alert(mappl10n.kml_error+":"+r)}),f(t,!0)}function h(n){poi=new mapp.Poi({body:"",iconid:e,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(4)}),f(poi,!0)}function c(n){var t;u.setDrawingMode(null);switch(n.type){case"polygon":case"polyline":case"circle":case"rectangle":t=new mapp.Poi({body:"",colors:r,iconid:"poly",overlay:n.overlay,title:mappl10n.shape,type:n.type});break;case"marker":default:t=new mapp.Poi({body:"",iconid:null,overlay:n.overlay,title:n.overlay.getPosition().toUrlValue(4),type:null})}f(t,!1)}function f(n,r){t.closeInfoWindow(),u&&u.setDrawingMode(null),t.insertPoi(n),r&&n.center(!0),i()}function a(){var i,n;typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(i="en",typeof window.tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,i=typeof n.language!="undefined"?n.language:"en"),tinyMCE.init({mode:"none",height:"175px",convert_urls:!1,language:i,relative_urls:!1,remove_script_host:!1,theme:"advanced",theme_advanced_toolbar_location:"top",theme_advanced_buttons1:"formatselect, forecolor,|,bold,italic,|,justifyleft,justifycenter,justifyright,|,link,unlink,|,image,separator,undo,redo",theme_advanced_buttons2:"",theme_advanced_buttons3:"",setup:function(n){n.onInit.add(function(n){n.getBody().style.fontSize="12px"})}}),o&&setTimeout(function(){tinyMCE.execCommand("mceAddControl",!1,"mapp_e_poi_body")},2),jQuery("#mapp_e_visual").click(function(){tinyMCE.execCommand("mceAddControl",!1,"mapp_e_poi_body"),o=!0}),jQuery("#mapp_e_html").click(function(){tinyMCE.execCommand("mceRemoveControl",!1,"mapp_e_poi_body"),o=!1}),google.maps.event.addListenerOnce(t.getInfoWindow(),"closeclick",function(){tinyMCE.getInstanceById("mapp_e_poi_body")&&(tinyMCE.getInstanceById("mapp_e_poi_body").save(),tinyMCE.execCommand("mceRemoveControl",!1,"mapp_e_poi_body"))}))}function l(n){return t.closeInfoWindow(),confirm(mappl10n.delete_prompt)?(t.removePoi(n),i(),!0):!1}var u,s,e=null,r={fillColor:"#9FC6E7",fillOpacity:.5,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2},o=!0,t=n;this.close=function(){t.closeInfoWindow()},this.resize=function(n,i){i=parseInt(i),n=parseInt(n),t.resize(n,i),t.closeInfoWindow();var r=jQuery(".mapp-e-top-toolbar").outerHeight(),u=jQuery("#mapp_edit").outerHeight();jQuery("#mapp_e_poi_list").height(i+r)},y.apply(this)}
1
+ var mapp=window.mapp||{};mapp.Media=function(){function f(i){n=i,jQuery("#mapp_m_editor").empty(),jQuery("#mapp_m_editor").append(e.clone());var r=n.getMapid();r?jQuery("#mapp_m_mapid").text(r):jQuery("#mapp_m_mapid").text(""),jQuery("#mapp_m_title").val(n.getTitle()),jQuery("#mapp_m_width").val(n.getWidth()),jQuery("#mapp_m_height").val(n.getHeight()),jQuery("#mapp_m_edit_panel").show(),jQuery("#mapp_m_list_panel").hide(),t=new mapp.Editor(n)}function u(){t.close(),n=null,t=null,jQuery("#mapp_m_edit_panel").hide(),jQuery("#mapp_m_list_panel").show()}function c(){mapp.Map.ajaxCreate("mapp_edit",i,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp_edit",i,function(n){f(n)})}function o(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function r(){if(n){var t=jQuery.trim(jQuery("#mapp_m_title").val());t=t!=""?t:mappl10n.untitled,n.setTitle(t),n.ajaxSave(function(n){n.list&&jQuery("#mapp_m_maplist").html(n.list),u()})}}function s(n){confirm(mappl10n.delete_map_prompt)&&(jQuery("#mapp_m_maplist tr[data-mapid='"+n+"']").remove(),mapp.Map.ajaxDelete(n))}var t,n,e,l=this,i;e=jQuery("#mapp_m_editor").contents().detach(),i={bicycling:!1,directions:"none",editable:!0,initialOpenInfo:!1,iwDisableAutoPan:!1,iwType:"ib",mapTypeControl:!0,mapTypeControlStyle:2,mapTypeIds:null,navigationControlOptions:{style:0},overviewMapControl:!1,overviewMapControlOptions:{opened:!1},streetViewControl:!1,traffic:!1,transit:!1},jQuery("#mapp_m_list_panel").show(),jQuery("#mapp_m_add_map").click(function(){return c(),!1});jQuery("#mapp_m_maplist").on("click","tr",function(n){var t=jQuery(this).attr("data-mapid");return jQuery(n.target).hasClass("mapp-maplist-edit")?(h(t),!1):jQuery(n.target).hasClass("mapp-maplist-delete")?(s(t),!1):jQuery(n.target).hasClass("mapp-maplist-insert")?(o(t),!1):void 0});jQuery(".mapp-m-size").click(function(){var i=jQuery(this).data("width"),n=jQuery(this).data("height");return jQuery("#mapp_m_width").val(i),jQuery("#mapp_m_height").val(n),t.resize(i,n),!1}),jQuery("#mapp_m_width, #mapp_m_height").change(function(){return jQuery(this).val()<200&&jQuery(this).val(200),t.resize(jQuery("#mapp_m_width").val(),jQuery("#mapp_m_height").val()),!1}),jQuery("#publish, #post-preview").click(function(){r()}),jQuery("#mapp_m_save").click(function(){return r(),!1}),jQuery("#mapp_m_title").keypress(function(n){if(n.which==13)return n.preventDefault(),jQuery("#mapp_m_save").click(),!1}),jQuery("#mapp_m_cancel").click(function(){return u(),!1}),jQuery("#mapp_m_insert").click(function(){var i=n.getMapid(),t='[mappress mapid="'+n.getMapid()+'"]';return i?send_to_editor(t):alert(mappl10n.save_first),!1})},mapp.Editor=function(n){function y(){s=jQuery("#mapp_e_infobox").detach(),t=n,t.display(),this.resize(t.getWidth(),t.getHeight()),i(),typeof mappl10n.id!="undefined"&&(u=new google.maps.drawing.DrawingManager({circleOptions:r,drawingControlOptions:{drawingModes:[google.maps.drawing.OverlayType.MARKER,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE,google.maps.drawing.OverlayType.CIRCLE]},polygonOptions:r,polylineOptions:r,rectangleOptions:r}),u.setMap(t.getMap()),google.maps.event.addListener(u,"overlaycomplete",function(n){c(n)})),t.getGeocoder().autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",b),google.maps.event.addListener(t,"poicontent",v),google.maps.event.addListener(t,"poidomready",p),jQuery("#mapp_e_recenter").click(function(){return t.closeInfoWindow(),t.autoCenter(!0),!1}),google.maps.event.addListener(t.getMap(),"click",function(n){jQuery("#mapp_e_latlng").text(n.latLng.toUrlValue())})}function i(){for(var r=t.getPois(),u="<table>",n=0;n<r.length;n++){var o=r[n].title.replace(/\'/g,"&rsquo;"),e=r[n].getImage("mapp-e-icon"),f=r[n].address;u+="<tr id='"+n+"'><td>"+e+"<\/td><td style='width:100%'><a href='#' title='"+f+"'><b>"+o+"<\/b><\/a><div class='mapp-e-actions'><a href='#' class='mapp-e-poi-list-zoom' data-idx='"+n+"'>"+mappl10n.zoom+"<\/a> | <a href='#' class='mapp-e-poi-list-delete' data-idx='"+n+"'>"+mappl10n.del+"<\/a><\/div><\/td><\/tr>"}u+="<\/table>",jQuery("#mapp_e_poi_list").html(u),jQuery("#mapp_e_poi_list tbody").sortable({axis:"y",placeholder:"mapp-e-sortable-placeholder",forcePlaceholderSize:!0,delay:200,update:function(){var n=jQuery("#mapp_e_poi_list tbody").sortable("toArray");t.sortPois(n),i()}}),jQuery("#mapp_e_poi_list tr").click(function(n){var r=jQuery(this).attr("id"),i;return jQuery(n.target).hasClass("mapp-e-poi-list-zoom")?(i=t.getPoi(r),i&&i.zoomIn(),!1):jQuery(n.target).hasClass("mapp-e-poi-list-delete")?(i=t.getPoi(r),i&&l(i),!1):(t.getPoi(r).click(),!1)})}function v(n,t){var i=jQuery(s).clone(),r;jQuery("#mapp_e_poi_title",i).val(n.title),jQuery("#mapp_e_poi_body",i).val(n.body),jQuery("#mapp_e_poi_iconid",i).val(n.iconid),n.isPoly()&&(n.type=="polyline"?jQuery("#mapp_e_poi_polyline_fields",i).show():jQuery("#mapp_e_poi_polyline_fields, #mapp_e_poi_polygon_fields",i).show(),r=n.getColors(),jQuery("#mapp_stroke_color",i).val(r.strokeColor),jQuery("#mapp_stroke_weight",i).val(r.strokeWeight),jQuery("#mapp_stroke_opacity",i).val(parseInt(r.strokeOpacity*100)),jQuery("#mapp_fill_color",i).val(r.fillColor),jQuery("#mapp_fill_opacity",i).val(parseInt(r.fillOpacity*100))),n.type=="kml"&&(jQuery("#mapp_e_poi_kml_fields",i).show(),jQuery("#mapp_e_poi_kml_url",i).val(n.overlay.getUrl())),t.content=i}function p(n){var u={title:n.title,body:n.body,iconid:n.iconid,colors:n.getColors()};a(),jQuery("#mapp_e_poi_title").focus(),n.isPoly()?(jQuery("#mapp_stroke_color, #mapp_fill_color, #mapp_stroke_weight, #mapp_stroke_opacity, #mapp_fill_opacity").change(function(){var t={strokeColor:jQuery("#mapp_stroke_color").val(),strokeWeight:parseInt(jQuery("#mapp_stroke_weight").val()),strokeOpacity:jQuery("#mapp_stroke_opacity").val()/100};n.type!="polyline"&&(t.fillColor=jQuery("#mapp_fill_color").val(),t.fillOpacity=jQuery("#mapp_fill_opacity").val()/100),n.setColors(t),r=t}),jQuery("#mapp_stroke_color, #mapp_fill_color").mappColorpicker({})):jQuery("#mapp_e_poi_iconid").mappIconPicker({dialog:jQuery("#mapp_e_poi_icon_picker"),open:function(){jQuery("#mapp_e_poi_fields").hide()},close:function(t){jQuery("#mapp_e_poi_fields").show(),typeof t!="undefined"&&(e=t,n.iconid=t,n.setIcon(t),i())}}),google.maps.event.addListenerOnce(t.getInfoWindow(),"closeclick",function(){jQuery("#mapp_colorpicker").hide(),n.title=jQuery("#mapp_e_poi_title").val(),n.body=jQuery("#mapp_e_poi_body").val(),i()}),jQuery("#mapp_e_save_poi").click(function(){return t.closeInfoWindow(),!1}),jQuery("#mapp_e_cancel_poi").click(function(){return t.closeInfoWindow(),n.title=u.title,n.body=u.body,n.iconid=u.iconid,n.setIcon(u.iconid),n.setColors(u.colors),i(),!1})}function b(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),u=n.name?n.name:t.firstLine,r=n.name?t.firstLine+", "+t.secondLine:t.secondLine,i=new mapp.Poi({address:n.formatted_address,body:r,iconid:e,overlay:new google.maps.Marker({position:n.geometry.location}),title:u,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});f(i,!0);return}if(n instanceof google.maps.LatLng)return h(n);if(typeof n=="string"&&n.substring(0,4)=="http")return w(n);alert("Internal error, unable to add location")}}function w(n){var t=new mapp.Poi({iconid:e,overlay:new google.maps.KmlLayer(n,{suppressInfoWindows:!0}),title:"KML",type:"kml"});google.maps.event.addListener(t.overlay,"status_changed",function(){var r=t.overlay.getStatus(),n;r=="OK"?(n=t.overlay.getMetadata(),t.title=n.name,t.body=n.description,t.viewport=t.overlay.getDefaultViewport(),i()):alert(mappl10n.kml_error+":"+r)}),f(t,!0)}function h(n){poi=new mapp.Poi({body:"",iconid:e,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(4)}),f(poi,!0)}function c(n){var t;u.setDrawingMode(null);switch(n.type){case"polygon":case"polyline":case"circle":case"rectangle":t=new mapp.Poi({body:"",colors:r,iconid:"poly",overlay:n.overlay,title:mappl10n.shape,type:n.type});break;case"marker":default:t=new mapp.Poi({body:"",iconid:null,overlay:n.overlay,title:n.overlay.getPosition().toUrlValue(4),type:null})}f(t,!1)}function f(n,r){t.closeInfoWindow(),u&&u.setDrawingMode(null),t.insertPoi(n),r&&n.center(!0),i()}function a(){var i,n;typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(i="en",typeof window.tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,i=typeof n.language!="undefined"?n.language:"en"),tinyMCE.init({mode:"none",height:"175px",convert_urls:!1,language:i,relative_urls:!1,remove_script_host:!1,theme:"advanced",theme_advanced_toolbar_location:"top",theme_advanced_buttons1:"formatselect, forecolor,|,bold,italic,|,justifyleft,justifycenter,justifyright,|,link,unlink,|,image,separator,undo,redo",theme_advanced_buttons2:"",theme_advanced_buttons3:"",setup:function(n){n.onInit.add(function(n){n.getBody().style.fontSize="12px"})}}),o&&setTimeout(function(){tinyMCE.execCommand("mceAddControl",!1,"mapp_e_poi_body")},2),jQuery("#mapp_e_visual").click(function(){tinyMCE.execCommand("mceAddControl",!1,"mapp_e_poi_body"),o=!0}),jQuery("#mapp_e_html").click(function(){tinyMCE.execCommand("mceRemoveControl",!1,"mapp_e_poi_body"),o=!1}),google.maps.event.addListenerOnce(t.getInfoWindow(),"closeclick",function(){tinyMCE.getInstanceById("mapp_e_poi_body")&&(tinyMCE.getInstanceById("mapp_e_poi_body").save(),tinyMCE.execCommand("mceRemoveControl",!1,"mapp_e_poi_body"))}))}function l(n){return t.closeInfoWindow(),confirm(mappl10n.delete_prompt)?(t.removePoi(n),i(),!0):!1}var u,s,e=null,r={fillColor:"#9FC6E7",fillOpacity:.5,strokeColor:"#0000FF",strokeOpacity:1,strokeWeight:2},o=!0,t=n;this.close=function(){t.closeInfoWindow()},this.resize=function(n,i){t.resize(n,i),t.closeInfoWindow();var u=jQuery("#mapp_e_top_toolbar").outerHeight(),r=jQuery("#mapp_edit").outerHeight();jQuery("#mapp_e_poi_list").height(u+r)},y.apply(this)}
languages/mappress.mo CHANGED
Binary file
languages/mappress.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
msgstr ""
3
"Project-Id-Version: \n"
4
"Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-02-04 18:05-0800\n"
6
- "PO-Revision-Date: 2013-02-04 18:05-0800\n"
7
"Last-Translator: Plugin Author <donotreply@gmail.com>\n"
8
"Language-Team: \n"
9
"MIME-Version: 1.0\n"
@@ -147,11 +147,6 @@ msgstr ""
147
msgid "Map not found"
148
msgstr ""
149
150
- #: ../mappress_map.php:195
151
- #: ../mappress_map.php:201
152
- msgid "Internal error, your data has not been saved!"
153
- msgstr ""
154
-
155
#: ../mappress_map.php:426
156
msgid "Edit"
157
msgstr ""
@@ -167,7 +162,7 @@ msgstr ""
167
168
#: ../mappress_map.php:479
169
#: ../mappress_settings.php:447
170
- #: ../forms/map_editor.php:13
171
msgid "Center map"
172
msgstr ""
173
@@ -637,11 +632,11 @@ msgstr ""
637
msgid "Settings"
638
msgstr ""
639
640
- #: ../mappress_updater.php:45
641
msgid "download it now"
642
msgstr ""
643
644
- #: ../mappress_updater.php:50
645
#, php-format
646
msgid "A PRO Version update is available for manual installation: %s"
647
msgstr ""
@@ -655,7 +650,7 @@ msgstr ""
655
msgid "My location"
656
msgstr ""
657
658
- #: ../forms/map_editor.php:14
659
msgid "Click map for lat/lng: "
660
msgstr ""
661
2
msgstr ""
3
"Project-Id-Version: \n"
4
"Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-02-15 09:08-0800\n"
6
+ "PO-Revision-Date: 2013-02-15 09:08-0800\n"
7
"Last-Translator: Plugin Author <donotreply@gmail.com>\n"
8
"Language-Team: \n"
9
"MIME-Version: 1.0\n"
147
msgid "Map not found"
148
msgstr ""
149
150
#: ../mappress_map.php:426
151
msgid "Edit"
152
msgstr ""
162
163
#: ../mappress_map.php:479
164
#: ../mappress_settings.php:447
165
+ #: ../forms/map_editor.php:17
166
msgid "Center map"
167
msgstr ""
168
632
msgid "Settings"
633
msgstr ""
634
635
+ #: ../mappress_updater.php:41
636
msgid "download it now"
637
msgstr ""
638
639
+ #: ../mappress_updater.php:46
640
#, php-format
641
msgid "A PRO Version update is available for manual installation: %s"
642
msgstr ""
650
msgid "My location"
651
msgstr ""
652
653
+ #: ../forms/map_editor.php:18
654
msgid "Click map for lat/lng: "
655
msgstr ""
656
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Easy Google Maps
4
Plugin URI: http://www.wphostreviews.com/mappress
5
Author URI: http://www.wphostreviews.com/mappress
6
Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
- Version: 2.40
8
Author: Chris Richardson
9
Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
10
*/
@@ -29,7 +29,7 @@ Thanks to all the translators and to Matthias Stasiak for his wonderful icons (h
29
@include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
30
31
class Mappress {
32
- const VERSION = '2.40';
33
34
static
35
$baseurl,
4
Plugin URI: http://www.wphostreviews.com/mappress
5
Author URI: http://www.wphostreviews.com/mappress
6
Description: MapPress makes it easy to insert Google Maps in WordPress posts and pages.
7
+ Version: 2.40.1
8
Author: Chris Richardson
9
Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
10
*/
29
@include_once dirname( __FILE__ ) . '/pro/mappress_widget.php';
30
31
class Mappress {
32
+ const VERSION = '2.40.1';
33
34
static
35
$baseurl,
mappress_map.php CHANGED
@@ -192,13 +192,13 @@ class Mappress_Map extends Mappress_Obj {
192
$postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
193
194
if (!$mapdata)
195
- Mappress::ajax_response(__('Internal error, your data has not been saved!', 'mappress'));
196
197
$map = new Mappress_Map($mapdata);
198
$mapid = $map->save($postid);
199
200
if ($mapid === false)
201
- Mappress::ajax_response(__('Internal error, your data has not been saved!', 'mappress'));
202
203
do_action('mappress_map_save', $mapid); // Use for your own developments
204
Mappress::ajax_response('OK', array('mapid' => $mapid, 'list' => self::get_map_list($postid)) );
@@ -234,7 +234,7 @@ class Mappress_Map extends Mappress_Obj {
234
$result = Mappress_Map::delete($mapid);
235
236
if (!$result)
237
- Mappress::ajax_response(__("Internal error when deleting map ID '$mapid'!", 'mappress'));
238
239
do_action('mappress_map_delete', $mapid); // Use for your own developments
240
Mappress::ajax_response('OK', array('mapid' => $mapid));
192
$postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
193
194
if (!$mapdata)
195
+ Mappress::ajax_response('Internal error, your data has not been saved!');
196
197
$map = new Mappress_Map($mapdata);
198
$mapid = $map->save($postid);
199
200
if ($mapid === false)
201
+ Mappress::ajax_response('Internal error, your data has not been saved!');
202
203
do_action('mappress_map_save', $mapid); // Use for your own developments
204
Mappress::ajax_response('OK', array('mapid' => $mapid, 'list' => self::get_map_list($postid)) );
234
$result = Mappress_Map::delete($mapid);
235
236
if (!$result)
237
+ Mappress::ajax_response("Internal error when deleting map ID '$mapid'!");
238
239
do_action('mappress_map_delete', $mapid); // Use for your own developments
240
Mappress::ajax_response('OK', array('mapid' => $mapid));
mappress_updater.php CHANGED
@@ -28,15 +28,11 @@ class Mappress_Updater {
28
*/
29
function site_transient_update_plugins($value) {
30
if (isset($value->response[$this->basename])) {
31
// Remove the proposed update
32
- unset($value->response[$this->basename]);
33
-
34
- // Suggest Pro update if not a minor versions
35
- $dots = substr_count($value->response[$this->basename]->new_version, '.');
36
- if ($dots < 2) {
37
- if (!has_filter( "after_plugin_row_$this->basename" ))
38
- add_filter("after_plugin_row_$this->basename", array(&$this, 'after_plugin_row_pro'), 20);
39
- }
40
}
41
return $value;
42
}
28
*/
29
function site_transient_update_plugins($value) {
30
if (isset($value->response[$this->basename])) {
31
+ if (!has_filter( "after_plugin_row_$this->basename" ))
32
+ add_filter("after_plugin_row_$this->basename", array(&$this, 'after_plugin_row_pro'), 20);
33
+
34
// Remove the proposed update
35
+ unset($value->response[$this->basename]);
36
}
37
return $value;
38
}
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === MapPress Easy Google Maps ===
2
Contributors: chrisvrichardson
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
Requires at least: 3.3
6
Tested up to: 3.5
7
- Stable tag: 2.40
8
9
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
@@ -95,6 +95,12 @@ See full [installation intructions and Documentation](http://www.wphostreviews.c
95
96
The fulll MapPress change log available here: [Change Log](http://wphostreviews.com/mappress-changelog)
97
98
2.40
99
=
100
* Added: an 'insert into post' link is now available in the map list as well as the map editor
1
+ === MapPress Easy Google Maps ===
2
Contributors: chrisvrichardson
3
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
Tags: google maps,google,map,maps,easy,poi,mapping,mapper,gps,lat,lon,latitude,longitude,geocoder,geocoding,georss,geo rss,geo,v3,marker,mashup,mash,api,v3,buddypress,mashup,geo,wp-geo,geo mashup,simplemap,simple,wpml
5
Requires at least: 3.3
6
Tested up to: 3.5
7
+ Stable tag: 2.40.1
8
9
MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
95
96
The fulll MapPress change log available here: [Change Log](http://wphostreviews.com/mappress-changelog)
97
98
+ 2.40.1
99
+ =
100
+ * Fixed: % width and % height were not working in the editor since 2.40
101
+ * Fixed: PHP notice when upgrade available
102
+ * Fixed: removed internal errors from language files
103
+
104
2.40
105
=
106
* Added: an 'insert into post' link is now available in the map list as well as the map editor