Changeset 940411
- Timestamp:
- 06/29/2014 04:03:11 PM (12 years ago)
- Location:
- wp-travelermap/trunk
- Files:
-
- 7 edited
-
admin/js/travelermap-admin.js (modified) (4 diffs)
-
admin/travelermap-admin.php (modified) (1 diff)
-
admin/travelermap-upgrade.php (modified) (3 diffs)
-
frontend/js/travelermap-frontend.js (modified) (6 diffs)
-
frontend/travelermap-frontend.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
wp-travelermap.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-travelermap/trunk/admin/js/travelermap-admin.js
r940337 r940411 169 169 $('#tm_place_at_address').prop('disabled', false); 170 170 $('#tm_save_changes').prop('disabled', false); 171 } else if (data.type === ' startsection') {171 } else if (data.type === 'endsection') { 172 172 $('#tm_type').prop('disabled', false); 173 173 $('#tm_title').prop('disabled', false); … … 179 179 $('#tm_place_at_address').prop('disabled', false); 180 180 $('#tm_save_changes').prop('disabled', false); 181 } else if (data.type === ' endsection' || data.type === 'startendsection') {181 } else if (data.type === 'startsection' || data.type === 'startendsection') { 182 182 $('#tm_type').prop('disabled', false); 183 183 $('#tm_title').prop('disabled', false); … … 311 311 function _tm_generateMap() { 312 312 var obj = {}; 313 obj['version'] = "1. 1.0";313 obj['version'] = "1.3.0"; 314 314 obj['mapid'] = $('#tm_map').data('mapid'); 315 315 obj['name'] = $('#tm_map_name').val(); … … 406 406 return; 407 407 } 408 if ($('#tm_type').val() !== ' endsection') {408 if ($('#tm_type').val() !== 'startsection' && $('#tm_type').val() !== 'startendsection') { 409 409 $('#tm_type').val('post'); 410 410 } -
wp-travelermap/trunk/admin/travelermap-admin.php
r940337 r940411 45 45 wp_enqueue_script('spectrum', TM_URL . "js/spectrum.js" , array('jquery'), '1.3.4', false); 46 46 wp_enqueue_script('json2'); 47 wp_enqueue_script('travelermap-admin', TM_URL . "admin/js/travelermap-admin.js" , array('jquery', 'jquery-ui-core', 'jquery-ui-widget'), '1. 2.0', false);48 wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1. 2.0', false);47 wp_enqueue_script('travelermap-admin', TM_URL . "admin/js/travelermap-admin.js" , array('jquery', 'jquery-ui-core', 'jquery-ui-widget'), '1.3.0', false); 48 wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.3.0', false); 49 49 wp_enqueue_style('tm-admin', TM_URL . "media/tm-admin.css" ); 50 50 wp_enqueue_style('tm-frontend', TM_URL . "media/tm-frontend.css" ); -
wp-travelermap/trunk/admin/travelermap-upgrade.php
r940336 r940411 30 30 travelermap_upgrade_1_0_0_to_1_1_0(); 31 31 } 32 $currentVersion = get_option("travelermap_version"); 32 33 if( version_compare($currentVersion, '1.2.0', '<')) { 33 34 travelermap_upgrade_1_1_0_to_1_2_0(); 35 } 36 $currentVersion = get_option("travelermap_version"); 37 if( version_compare($currentVersion, '1.3.0', '<')) { 38 travelermap_upgrade_1_2_0_to_1_3_0(); 34 39 } 35 40 } 36 41 37 42 function travelermap_upgrade_1_0_0_to_1_1_0() { 38 $settings = get_option('trave rlermap_settings');43 $settings = get_option('travelermap_settings'); 39 44 40 45 if (!$settings) { … … 50 55 51 56 function travelermap_upgrade_1_1_0_to_1_2_0() { 52 $settings = get_option('trave rlermap_settings');57 $settings = get_option('travelermap_settings'); 53 58 54 59 if (!$settings) { … … 63 68 } 64 69 70 function travelermap_upgrade_1_2_0_to_1_3_0() { 71 $settings = get_option('travelermap_settings'); 72 73 if (!$settings) { 74 $settings = array( 75 ); 76 update_option('travelermap_settings', $settings); 77 } 78 79 update_option("travelermap_version", '1.3.0'); 80 update_option("travelermap_db_version", '1.3.0'); 81 82 } 83 65 84 travelermap_upgrade(); 66 85 -
wp-travelermap/trunk/frontend/js/travelermap-frontend.js
r940336 r940411 214 214 evt.target.setStyle({opacity: 0.5}); 215 215 }); 216 currentLine.bindPopup(feature.title); 217 currentLine['tm_data'] = feature; 218 feature['_lf_object'] = currentLine; 216 219 currentLine.addLatLng([feature.lat, feature.lng]); 217 220 isInSection = true; … … 225 228 //var nextPoint = findNextWaypointMarker(data,i); 226 229 currentLine.addLatLng([feature.lat, feature.lng]); 227 currentLine.bindPopup(feature.title);228 currentLine['tm_data'] = feature;229 feature['_lf_object'] = currentLine;230 230 group.addLayer(currentLine); 231 231 currentLine = L.geodesicPolyline([],{color:lineColor}); … … 240 240 } else if(feature.type === 'startendsection') { 241 241 currentLine.addLatLng([feature.lat, feature.lng]); 242 currentLine.bindPopup(feature.title);243 currentLine['tm_data'] = feature;244 242 group.addLayer(currentLine); 245 feature['_lf_object'] = currentLine;246 243 currentLine = L.geodesicPolyline([],{color:lineColor}); 247 244 currentLine.on('mouseover', function(evt) { … … 257 254 evt.target.setStyle({opacity: 0.5}); 258 255 }); 256 currentLine.bindPopup(feature.title); 257 currentLine['tm_data'] = feature; 258 feature['_lf_object'] = currentLine; 259 259 currentLine.addLatLng([feature.lat, feature.lng]); //add as starting point 260 260 var nextPoint = _findNextWaypointMarker(data,i+1); … … 353 353 } 354 354 var dateInfo = '<span>'; 355 if(feature.type === ' endsection' || feature.type === 'startendsection') {356 var start = _findStartSection(data, position-1);357 if( start && start.departure) {358 dateInfo += "Start: " + $.format.date( start.departure, _mapOptions.dateFormat) + ' | ';359 } else if( start && start.arrival) {360 dateInfo += "Start: " + $.format.date( start.arrival, _mapOptions.dateFormat) + ' | ';361 } 362 if( feature.arrival) {363 dateInfo += "End: " + $.format.date( feature.arrival, _mapOptions.dateFormat) + ' | ';364 } else if( feature.departure) {365 dateInfo += "End: " + $.format.date( feature.departure, _mapOptions.dateFormat) + ' | ';355 if(feature.type === 'startsection' || feature.type === 'startendsection') { 356 var end = _findEndSection(data, position+1); 357 if(feature.departure) { 358 dateInfo += "Start: " + $.format.date(feature.departure, _mapOptions.dateFormat) + ' | '; 359 } else if(feature.arrival) { 360 dateInfo += "Start: " + $.format.date(feature.arrival, _mapOptions.dateFormat) + ' | '; 361 } 362 if(end && end.arrival) { 363 dateInfo += "End: " + $.format.date(end.arrival, _mapOptions.dateFormat) + ' | '; 364 } else if(end && end.departure) { 365 dateInfo += "End: " + $.format.date(end.departure, _mapOptions.dateFormat) + ' | '; 366 366 } 367 367 } else { … … 391 391 for(var j = 0; j < data[i].data.length; j++) { 392 392 var feature = data[i].data[j]; 393 if(feature.type === ' startsection' || feature.type === 'waypoint') continue;393 if(feature.type === 'endsection' || feature.type === 'waypoint') continue; 394 394 var markerInfo = _createMarkerInfo(feature, data[i].data, j); 395 395 _markerInfoMapping[data[i].name].push({marker: feature._lf_object, info: markerInfo}); -
wp-travelermap/trunk/frontend/travelermap-frontend.php
r940337 r940411 87 87 wp_enqueue_script('jquery-dateFormat', TM_URL . "js/jquery-dateFormat.min.js" , array('jquery'), '1.0.0', false); 88 88 wp_enqueue_script('json2'); 89 wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1. 2.0', false);89 wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.3.0', false); 90 90 } 91 91 -
wp-travelermap/trunk/readme.txt
r940336 r940411 1 1 === wp-travelermap === 2 Contributors: Mathis Zeiher2 Contributors: der_maddis 3 3 Donate link: http://bitschubser.org 4 4 Tags: travel, map, waypoints 5 5 Requires at least: 3.9.0 6 6 Tested up to: 3.9.1 7 Stable tag: 1. 2.07 Stable tag: 1.3.0 8 8 License: MIT 9 9 License URI: http://opensource.org/licenses/MIT … … 51 51 52 52 == Changelog == 53 54 = 1.3.0 = 55 * Moved Post linking from endsection to startsection 53 56 54 57 = 1.2.0 = -
wp-travelermap/trunk/wp-travelermap.php
r940336 r940411 4 4 Plugin URI: http://bitschubser.org/projects/wp-travelermap 5 5 Description: A simple Plugin to create travel routes and manage maps 6 Version: 1. 2.06 Version: 1.3.0 7 7 Author: Mathis Zeiher 8 8 Author URI: http://bitschubser.org/ … … 32 32 33 33 if ( ! defined( 'TM_VERSION' ) ) 34 define( 'TM_VERSION', '1. 2.0' );34 define( 'TM_VERSION', '1.3.0' ); 35 35 36 36 if ( ! defined( 'TM_URL' ) )
Note: See TracChangeset
for help on using the changeset viewer.