MapPress Easy Google Maps - Version 2.46.6

Version Description

  • Fixed: sorting in editor not working after first re-sort
Download this release

Release Info

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

Code changes from version 2.46.5 to 2.46.6

js/mappress_editor.min.js CHANGED
@@ -1 +1 @@
1
- var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.mapid;f?n("#mapp_m_mapid").text(f):n("#mapp_m_mapid").text("");n("#mapp_m_title").val(t.title);n("#mapp_m_width").val(t.width);n("#mapp_m_height").val(t.height);n("#mapp_m_edit_panel").show();n("#mapp_m_list_panel").hide();i=new mapp.Editor(t)}function e(){i.close();t=null;i=null;n("#mapp_m_edit_panel").hide();n("#mapp_m_list_panel").show()}function s(){mapp.Map.ajaxCreate("mapp0",r,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp0",r,function(n){f(n)})}function c(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function o(){t&&(t.title=n.trim(n("#mapp_m_title").val()),t.width=n("#mapp_m_width").val(),t.height=n("#mapp_m_height").val(),t.ajaxSave(function(t){t.list&&n("#mapp_m_maplist").html(t.list);e()}))}function l(t){confirm(mappl10n.delete_map_prompt)&&(n("#mapp_m_maplist tr[data-mapid='"+t+"']").remove(),mapp.Map.ajaxDelete(t))}var i,t,u,a=n(".mapp-m-panel"),v=this,r;u=n(".mapp-edit").contents().detach();r={directions:"none",editable:!0,initialOpenInfo:!1};n("#mapp_m_list_panel").show();n("#mapp_m_add_map").click(function(n){s();n.preventDefault()});n("#mapp_m_maplist").on("click","tr",function(t){var i=n(this).attr("data-mapid");n(t.target).hasClass("mapp-maplist-edit")&&h(i);n(t.target).hasClass("mapp-maplist-delete")&&l(i);n(t.target).hasClass("mapp-maplist-insert")&&c(i);t.preventDefault()});n(".mapp-m-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n("#mapp_m_width").val(i);n("#mapp_m_height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){o()});n("#mapp_m_save").click(function(n){o();n.preventDefault()});n("#mapp_m_title").keydown(function(t){t.which==13&&(t.preventDefault(),n("#mapp_m_save").click())});n("#mapp_m_cancel").click(function(n){e();n.preventDefault()});n("#mapp_m_insert").click(function(n){var i=t.mapid,r='[mappress mapid="'+t.mapid+'"]';i?send_to_editor(r):alert(mappl10n.save_first);n.preventDefault()});this.getMap=function(){return t}}}(jQuery);+function(n){mapp.Editor=function(t){function o(){i.display();r=new mapp.PoiEditor(i);google.maps.event.addListener(i,"rendered",function(){n(".mapp-list",e).toggle(!!i.getPois().length);i.resize()});n("#mapp_e_poi_list").on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");me.action(i,n(this).attr("data-mapp-"+i),n(this));t.preventDefault()});n(".mapp-pois",e).sortable({axis:"y",cursor:"move",delay:200,update:function(){i.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-poi"}))}});_geocoder=new mapp.Geocoder(i.getMap());_geocoder.autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",s);n("#mapp_e_recenter").click(function(n){i.closeInfoWindow();i.autoCenter(!0);n.preventDefault()});google.maps.event.addListener(i.getMap(),"click",function(t){n("#mapp_e_latlng").text(t.latLng.toUrlValue())})}function s(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),i=n.name?n.name:t.firstLine,f=n.name?t.firstLine+", "+t.secondLine:t.secondLine,e=new mapp.Poi({address:n.formatted_address,body:f,iconid:r.lastIcon,overlay:new google.maps.Marker({position:n.geometry.location}),title:i,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});u(e,!0);return}if(n instanceof google.maps.LatLng)return h(n);alert("Internal error, unable to add location")}}function h(n){poi=new mapp.Poi({body:"",iconid:r.lastIcon,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(6)});u(poi,!0)}function u(n,t){i.closeInfoWindow();f&&f.setDrawingMode(null);i.addPoi(n);t&&n.center(!0)}var f,i=t,r,e=n(".mapp-edit");this.close=function(){i.closeInfoWindow()};o.apply(this)};mapp.PoiEditor=function(t){function h(){u=i.iw.getContent();google.maps.event.addListener(i,"open",f.render);google.maps.event.addListener(i.iw,"domready",f.domReady);google.maps.event.addListener(i.iw,"closed",function(){tinyMCE.get("mapp-poi-body")&&s()});u.on("click","[data-mapp-action]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-action");switch(r){case"poi-cancel":i.closeInfoWindow();break;case"poi-html":s();e=!1;break;case"poi-remove":f.remove();break;case"poi-save":f.save();break;case"poi-visual":o();e=!0}});u.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),f.save())});u.on("change","[data-mapp-iconpicker]",function(){r.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));this.lastIcon=r.iconid;i.renderList()});u.on("change","[data-mapp-colorpicker]",function(){var t=n("[data-mapp-colorpicker]").attr("data-mapp-color"),u=n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),f=n("[data-mapp-colorpicker]").attr("data-mapp-weight"),e=r.type=="polyline"?{strokeColor:t,strokeOpacity:u/100,strokeWeight:f}:{fillColor:t,fillOpacity:u/100,strokeColor:t,strokeWeight:f,strokeOpacity:1};r.setColors(e);i.renderList()})}function c(){typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(l(),e&&o())}function l(){var t="en",n,i;typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,t=typeof n.language!="undefined"?n.language:"en");i={mode:"none",height:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(i)}function o(){tinyMCE.execCommand("mceAddEditor",!1,"mapp-poi-body")}function s(){tinyMCE.execCommand("mceRemoveEditor",!1,"mapp-poi-body")}var e=!0,i=t,r,u,f;this.lastIcon=null;f=this;this.render=function(){var t;r=i.poi;r.isPoly()&&(t=r.getColors(),t=r.type=="polyline"?{color:t.strokeColor,opacity:t.strokeOpacity*100,weight:t.strokeWeight}:{color:t.fillColor,opacity:t.fillOpacity*100,weight:t.strokeWeight});u.html(mapp.lib.template("poi-edit",{poi:r,colors:t}));n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh")};this.domReady=function(){c()};this.remove=function(){confirm(mappl10n.delete_prompt)&&(i.closeInfoWindow(),i.removePoi(r))};this.save=function(){tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();r.title=n(".mapp-poi-title").val();r.body=n(".mapp-poi-body").val();i.renderList();i.closeInfoWindow()};h.apply(this)}}(jQuery)
1
+ var mapp=window.mapp||{};+function(n){mapp.Media=function(){function f(r){t=r;n(".mapp-edit").empty();n(".mapp-edit").append(u.clone());var f=t.mapid;f?n("#mapp_m_mapid").text(f):n("#mapp_m_mapid").text("");n("#mapp_m_title").val(t.title);n("#mapp_m_width").val(t.width);n("#mapp_m_height").val(t.height);n("#mapp_m_edit_panel").show();n("#mapp_m_list_panel").hide();i=new mapp.Editor(t)}function e(){i.close();t=null;i=null;n("#mapp_m_edit_panel").hide();n("#mapp_m_list_panel").show()}function s(){mapp.Map.ajaxCreate("mapp0",r,function(n){f(n)})}function h(n){mapp.Map.ajaxGet(n,"mapp0",r,function(n){f(n)})}function c(n){var t='[mappress mapid="'+n+'"]';send_to_editor(t)}function o(){t&&(t.title=n.trim(n("#mapp_m_title").val()),t.width=n("#mapp_m_width").val(),t.height=n("#mapp_m_height").val(),t.ajaxSave(function(t){t.list&&n("#mapp_m_maplist").html(t.list);e()}))}function l(t){confirm(mappl10n.delete_map_prompt)&&(n("#mapp_m_maplist tr[data-mapid='"+t+"']").remove(),mapp.Map.ajaxDelete(t))}var i,t,u,a=n(".mapp-m-panel"),v=this,r;u=n(".mapp-edit").contents().detach();r={directions:"none",editable:!0,initialOpenInfo:!1};n("#mapp_m_list_panel").show();n("#mapp_m_add_map").click(function(n){s();n.preventDefault()});n("#mapp_m_maplist").on("click","tr",function(t){var i=n(this).attr("data-mapid");n(t.target).hasClass("mapp-maplist-edit")&&h(i);n(t.target).hasClass("mapp-maplist-delete")&&l(i);n(t.target).hasClass("mapp-maplist-insert")&&c(i);t.preventDefault()});n(".mapp-m-size").click(function(t){var i=n(this).data("width"),r=n(this).data("height");n("#mapp_m_width").val(i);n("#mapp_m_height").val(r);t.preventDefault()});n("#publish, #post-preview").click(function(){o()});n("#mapp_m_save").click(function(n){o();n.preventDefault()});n("#mapp_m_title").keydown(function(t){t.which==13&&(t.preventDefault(),n("#mapp_m_save").click())});n("#mapp_m_cancel").click(function(n){e();n.preventDefault()});n("#mapp_m_insert").click(function(n){var i=t.mapid,r='[mappress mapid="'+t.mapid+'"]';i?send_to_editor(r):alert(mappl10n.save_first);n.preventDefault()});this.getMap=function(){return t}}}(jQuery);+function(n){mapp.Editor=function(t){function o(){google.maps.event.addListener(i,"rendered",function(){n(".mapp-list",e).toggle(!!i.getPois().length);i.resize();n(".mapp-pois",e).sortable({axis:"y",cursor:"move",delay:200,update:function(){i.sortPois(n(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})});i.display();r=new mapp.PoiEditor(i);n("#mapp_e_poi_list").on("click","[data-mapp-action]",function(t){var i=n(this).attr("data-mapp-action");me.action(i,n(this).attr("data-mapp-"+i),n(this));t.preventDefault()});_geocoder=new mapp.Geocoder(i.getMap());_geocoder.autocompleteField("#mapp_e_saddr","#mapp_e_saddr_err","#mapp_e_search","#mapp_e_myloc",s);n("#mapp_e_recenter").click(function(n){i.closeInfoWindow();i.autoCenter(!0);n.preventDefault()});google.maps.event.addListener(i.getMap(),"click",function(t){n("#mapp_e_latlng").text(t.latLng.toUrlValue())})}function s(n){if(n){if(n.geometry){var t=mapp.Geocoder.parseAddress(n.formatted_address),i=n.name?n.name:t.firstLine,f=n.name?t.firstLine+", "+t.secondLine:t.secondLine,e=new mapp.Poi({address:n.formatted_address,body:f,iconid:r.lastIcon,overlay:new google.maps.Marker({position:n.geometry.location}),title:i,type:null,viewport:n.geometry.viewport?n.geometry.viewport:null});u(e,!0);return}if(n instanceof google.maps.LatLng)return h(n);alert("Internal error, unable to add location")}}function h(n){poi=new mapp.Poi({body:"",iconid:r.lastIcon,overlay:new google.maps.Marker({position:n}),title:n.toUrlValue(6)});u(poi,!0)}function u(n,t){i.closeInfoWindow();f&&f.setDrawingMode(null);i.addPoi(n);t&&n.center(!0)}var f,i=t,r,e=n(".mapp-edit");this.close=function(){i.closeInfoWindow()};o.apply(this)};mapp.PoiEditor=function(t){function h(){u=i.iw.getContent();google.maps.event.addListener(i,"open",f.render);google.maps.event.addListener(i.iw,"domready",f.domReady);google.maps.event.addListener(i.iw,"closed",function(){tinyMCE.get("mapp-poi-body")&&s()});u.on("click","[data-mapp-action]",function(t){t.preventDefault();var r=n(this).attr("data-mapp-action");switch(r){case"poi-cancel":i.closeInfoWindow();break;case"poi-html":s();e=!1;break;case"poi-remove":f.remove();break;case"poi-save":f.save();break;case"poi-visual":o();e=!0}});u.on("keydown",function(t){t.which==13&&t.target!=n("#mapp-poi-body")&&(t.preventDefault(),f.save())});u.on("change","[data-mapp-iconpicker]",function(){r.setIcon(n("[data-mapp-iconpicker]").attr("data-mapp-iconid"));this.lastIcon=r.iconid;i.renderList()});u.on("change","[data-mapp-colorpicker]",function(){var t=n("[data-mapp-colorpicker]").attr("data-mapp-color"),u=n("[data-mapp-colorpicker]").attr("data-mapp-opacity"),f=n("[data-mapp-colorpicker]").attr("data-mapp-weight"),e=r.type=="polyline"?{strokeColor:t,strokeOpacity:u/100,strokeWeight:f}:{fillColor:t,fillOpacity:u/100,strokeColor:t,strokeWeight:f,strokeOpacity:1};r.setColors(e);i.renderList()})}function c(){typeof tinyMCE!="undefined"&&typeof tinyMCE.init!="undefined"&&(l(),e&&o())}function l(){var t="en",n,i;typeof tinyMCEPreInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit!="undefined"&&typeof window.tinyMCEPreInit.mceInit.content!="undefined"&&(n=window.tinyMCEPreInit.mceInit.content,t=typeof n.language!="undefined"?n.language:"en");i={mode:"none",height:"75px",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link,unlink,image",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(i)}function o(){tinyMCE.execCommand("mceAddEditor",!1,"mapp-poi-body")}function s(){tinyMCE.execCommand("mceRemoveEditor",!1,"mapp-poi-body")}var e=!0,i=t,r,u,f;this.lastIcon=null;f=this;this.render=function(){var t;r=i.poi;r.isPoly()&&(t=r.getColors(),t=r.type=="polyline"?{color:t.strokeColor,opacity:t.strokeOpacity*100,weight:t.strokeWeight}:{color:t.fillColor,opacity:t.fillOpacity*100,weight:t.strokeWeight});u.html(mapp.lib.template("poi-edit",{poi:r,colors:t}));n("[data-mapp-iconpicker]").trigger("refresh");n("[data-mapp-colorpicker]").trigger("refresh")};this.domReady=function(){c()};this.remove=function(){confirm(mappl10n.delete_prompt)&&(i.closeInfoWindow(),i.removePoi(r))};this.save=function(){tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save();r.title=n(".mapp-poi-title").val();r.body=n(".mapp-poi-body").val();i.renderList();i.closeInfoWindow()};h.apply(this)}}(jQuery)
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the MapPress Easy Google Maps package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Easy Google Maps 2.46.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
- "POT-Creation-Date: 2017-09-17 18:57:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the MapPress Easy Google Maps package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Easy Google Maps 2.46.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
+ "POT-Creation-Date: 2017-09-18 20:05:05+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
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.46.5
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -34,7 +34,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
34
  }
35
 
36
  class Mappress {
37
- const VERSION = '2.46.5';
38
 
39
  static
40
  $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.46.6
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
34
  }
35
 
36
  class Mappress {
37
+ const VERSION = '2.46.6';
38
 
39
  static
40
  $baseurl,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
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.5
6
  Tested up to: 4.9
7
- Stable tag: 2.46.5
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
@@ -86,6 +86,9 @@ Please see the plugin documentation pages:
86
 
87
  == Changelog ==
88
 
 
 
 
89
  = 2.46.5 =
90
  * Fixed: javascript error on settings screen
91
  * Fixed: improved check for multiple API keys
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.5
6
  Tested up to: 4.9
7
+ Stable tag: 2.46.6
8
 
9
  MapPress is the most popular and easiest way to create great-looking Google Maps and driving directions in your blog.
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 2.46.6 =
90
+ * Fixed: sorting in editor not working after first re-sort
91
+
92
  = 2.46.5 =
93
  * Fixed: javascript error on settings screen
94
  * Fixed: improved check for multiple API keys