Changeset 2493015
- Timestamp:
- 03/11/2021 09:18:56 AM (5 years ago)
- Location:
- redbox-pickup
- Files:
-
- 4 edited
- 6 copied
-
tags/1.3 (copied) (copied from redbox-pickup/trunk)
-
tags/1.3/css/front.css (copied) (copied from redbox-pickup/trunk/css/front.css) (2 diffs)
-
tags/1.3/front/front.php (copied) (copied from redbox-pickup/trunk/front/front.php)
-
tags/1.3/js/front.js (copied) (copied from redbox-pickup/trunk/js/front.js) (4 diffs)
-
tags/1.3/readme.txt (copied) (copied from redbox-pickup/trunk/readme.txt) (3 diffs)
-
tags/1.3/redbox.php (copied) (copied from redbox-pickup/trunk/redbox.php) (2 diffs)
-
trunk/css/front.css (modified) (2 diffs)
-
trunk/js/front.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/redbox.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
redbox-pickup/tags/1.3/css/front.css
r2491692 r2493015 540 540 transition: all 0.1s ease-in-out; 541 541 font-size: 13px; 542 padding-right: 40px 543 } 544 .redbox-rtl .redbox-pickup #pac-input { 545 padding-right: 20px; 546 padding-left: 40px; 542 547 } 543 548 .redbox-pickup #pac-container { … … 547 552 position: absolute; 548 553 right: 20px; 549 top: 1 5px;554 top: 18px; 550 555 color: #989696; 551 556 } -
redbox-pickup/tags/1.3/js/front.js
r2491692 r2493015 14 14 label_accept_payment_no: "No", 15 15 label_restricted_access: "Restried access", 16 label_confirm_can_access_retricted_area: "I confirm that i have access to this loca ltion",16 label_confirm_can_access_retricted_area: "I confirm that i have access to this location", 17 17 day: "days", 18 18 select_other_point: "Select other Pickup point", … … 86 86 }, 87 87 }); 88 marker.setPosition(latlng); 89 map.setCenter(latlng); 90 map.setZoom(17); 88 reRenderMapWithPoint(position.coords.latitude, position.coords.longitude) 91 89 jQuery('#you_location_img').css('background-position', '-144px 0px'); 92 90 }, function (error) { … … 309 307 }); 310 308 } 309 function reRenderMapWithPoint(lat, lng) { 310 var htmlWaiting = '<div class="redbox-waiting-response"><i class="fa fa-spinner fa-spin"></i></div>' 311 jQuery('.redbox-pickup').prepend(htmlWaiting) 312 jQuery.ajax({ 313 url: ajax_url, 314 type:'GET', 315 data:`action=getlispoint&lat=${lat}&lng=${lng}&distance=100000000`, 316 success : function(response) { 317 let data = JSON.parse(response) 318 if (data.success) { 319 var bounds = new google.maps.LatLngBounds(); 320 bounds.extend(new google.maps.LatLng(lat, lng)); 321 bounds.extend(new google.maps.LatLng(data.points[0].location.lat, data.points[0].location.lng)); 322 REDBOX_MAP.fitBounds(bounds); 323 jQuery( "#wrap-area-choose-point" ).animate({ 324 bottom: -400 325 }, 500); 326 } else { 327 alert(data.msg) 328 } 329 jQuery('.redbox-waiting-response').remove() 330 }, 331 error: function(e) { 332 alert('Error occured'); 333 jQuery('.redbox-waiting-response').remove() 334 } 335 }); 336 } 311 337 function setFindAreaMap(map) { 312 338 const card = document.getElementById('pac-card'); … … 323 349 const place = autocomplete.getPlace(); 324 350 if (place) { 325 // callAjaxGetListPoint(place.geometry.location.lat(), place.geometry.location.lng()) 326 var latlng = new google.maps.LatLng(place.geometry.location.lat(), place.geometry.location.lng()); 327 REDBOX_MAP.setCenter(latlng); 328 REDBOX_MAP.setZoom(16); 329 jQuery( "#wrap-area-choose-point" ).animate({ 330 bottom: -400 331 }, 500, function() { 332 // Animation complete. 333 }); 351 reRenderMapWithPoint(place.geometry.location.lat(), place.geometry.location.lng()) 334 352 } 335 353 }); -
redbox-pickup/tags/1.3/readme.txt
r2491692 r2493015 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.1 7 Stable tag: 1. 27 Stable tag: 1.3 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 = 1.1 = 36 36 Update new design. 37 = 1.3 = 38 Bound map when search address or click my location 37 39 38 40 … … 40 42 = 1.1 = 41 43 Please update this version to get new design. 44 = 1.3 = 45 Bound map when search address or click my location 42 46 43 47 -
redbox-pickup/tags/1.3/redbox.php
r2491692 r2493015 4 4 * Description: This plugin allows customers pickup package at RedBox Locker. 5 5 * Plugin URI: https://woocommerce.com/ 6 * Version: 1. 26 * Version: 1.3 7 7 * Author: RedBox 8 8 * Author URI: https://redboxsa.com … … 117 117 function redbox_load_scrip_and_style_front() { 118 118 wp_enqueue_style( 'redbox_font_awesome', 'https://pro.fontawesome.com/releases/v5.10.0/css/all.css' ); 119 wp_enqueue_style( 'redbox_front_css', REDBOX_PLUGIN_DIR . '/css/front.css', false, '1.0. 5' );119 wp_enqueue_style( 'redbox_front_css', REDBOX_PLUGIN_DIR . '/css/front.css', false, '1.0.6' ); 120 120 wp_enqueue_style( 'redbox_font_roboto', 'https://fonts.googleapis.com/css?family=Roboto' ); 121 121 wp_enqueue_style( 'redbox_font_cario', 'https://fonts.googleapis.com/css?family=Cairo' ); 122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0. 5' );122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0.6' ); 123 123 wp_enqueue_script( 'redbox_front_js_map', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBY1xlGe6jLbugOJegCsUGnzlufYWa5CRw&sensor=false&libraries=places' ); 124 124 wp_enqueue_script( 'redbox_front_js_map_clustor', 'https://unpkg.com/@google/markerclustererplus@4.0.1/dist/markerclustererplus.min.js' ); -
redbox-pickup/trunk/css/front.css
r2491692 r2493015 540 540 transition: all 0.1s ease-in-out; 541 541 font-size: 13px; 542 padding-right: 40px 543 } 544 .redbox-rtl .redbox-pickup #pac-input { 545 padding-right: 20px; 546 padding-left: 40px; 542 547 } 543 548 .redbox-pickup #pac-container { … … 547 552 position: absolute; 548 553 right: 20px; 549 top: 1 5px;554 top: 18px; 550 555 color: #989696; 551 556 } -
redbox-pickup/trunk/js/front.js
r2491692 r2493015 14 14 label_accept_payment_no: "No", 15 15 label_restricted_access: "Restried access", 16 label_confirm_can_access_retricted_area: "I confirm that i have access to this loca ltion",16 label_confirm_can_access_retricted_area: "I confirm that i have access to this location", 17 17 day: "days", 18 18 select_other_point: "Select other Pickup point", … … 86 86 }, 87 87 }); 88 marker.setPosition(latlng); 89 map.setCenter(latlng); 90 map.setZoom(17); 88 reRenderMapWithPoint(position.coords.latitude, position.coords.longitude) 91 89 jQuery('#you_location_img').css('background-position', '-144px 0px'); 92 90 }, function (error) { … … 309 307 }); 310 308 } 309 function reRenderMapWithPoint(lat, lng) { 310 var htmlWaiting = '<div class="redbox-waiting-response"><i class="fa fa-spinner fa-spin"></i></div>' 311 jQuery('.redbox-pickup').prepend(htmlWaiting) 312 jQuery.ajax({ 313 url: ajax_url, 314 type:'GET', 315 data:`action=getlispoint&lat=${lat}&lng=${lng}&distance=100000000`, 316 success : function(response) { 317 let data = JSON.parse(response) 318 if (data.success) { 319 var bounds = new google.maps.LatLngBounds(); 320 bounds.extend(new google.maps.LatLng(lat, lng)); 321 bounds.extend(new google.maps.LatLng(data.points[0].location.lat, data.points[0].location.lng)); 322 REDBOX_MAP.fitBounds(bounds); 323 jQuery( "#wrap-area-choose-point" ).animate({ 324 bottom: -400 325 }, 500); 326 } else { 327 alert(data.msg) 328 } 329 jQuery('.redbox-waiting-response').remove() 330 }, 331 error: function(e) { 332 alert('Error occured'); 333 jQuery('.redbox-waiting-response').remove() 334 } 335 }); 336 } 311 337 function setFindAreaMap(map) { 312 338 const card = document.getElementById('pac-card'); … … 323 349 const place = autocomplete.getPlace(); 324 350 if (place) { 325 // callAjaxGetListPoint(place.geometry.location.lat(), place.geometry.location.lng()) 326 var latlng = new google.maps.LatLng(place.geometry.location.lat(), place.geometry.location.lng()); 327 REDBOX_MAP.setCenter(latlng); 328 REDBOX_MAP.setZoom(16); 329 jQuery( "#wrap-area-choose-point" ).animate({ 330 bottom: -400 331 }, 500, function() { 332 // Animation complete. 333 }); 351 reRenderMapWithPoint(place.geometry.location.lat(), place.geometry.location.lng()) 334 352 } 335 353 }); -
redbox-pickup/trunk/readme.txt
r2491692 r2493015 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.1 7 Stable tag: 1. 27 Stable tag: 1.3 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 = 1.1 = 36 36 Update new design. 37 = 1.3 = 38 Bound map when search address or click my location 37 39 38 40 … … 40 42 = 1.1 = 41 43 Please update this version to get new design. 44 = 1.3 = 45 Bound map when search address or click my location 42 46 43 47 -
redbox-pickup/trunk/redbox.php
r2491692 r2493015 4 4 * Description: This plugin allows customers pickup package at RedBox Locker. 5 5 * Plugin URI: https://woocommerce.com/ 6 * Version: 1. 26 * Version: 1.3 7 7 * Author: RedBox 8 8 * Author URI: https://redboxsa.com … … 117 117 function redbox_load_scrip_and_style_front() { 118 118 wp_enqueue_style( 'redbox_font_awesome', 'https://pro.fontawesome.com/releases/v5.10.0/css/all.css' ); 119 wp_enqueue_style( 'redbox_front_css', REDBOX_PLUGIN_DIR . '/css/front.css', false, '1.0. 5' );119 wp_enqueue_style( 'redbox_front_css', REDBOX_PLUGIN_DIR . '/css/front.css', false, '1.0.6' ); 120 120 wp_enqueue_style( 'redbox_font_roboto', 'https://fonts.googleapis.com/css?family=Roboto' ); 121 121 wp_enqueue_style( 'redbox_font_cario', 'https://fonts.googleapis.com/css?family=Cairo' ); 122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0. 5' );122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0.6' ); 123 123 wp_enqueue_script( 'redbox_front_js_map', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBY1xlGe6jLbugOJegCsUGnzlufYWa5CRw&sensor=false&libraries=places' ); 124 124 wp_enqueue_script( 'redbox_front_js_map_clustor', 'https://unpkg.com/@google/markerclustererplus@4.0.1/dist/markerclustererplus.min.js' );
Note: See TracChangeset
for help on using the changeset viewer.