Changeset 2536298
- Timestamp:
- 05/24/2021 07:34:51 AM (5 years ago)
- Location:
- redbox-pickup
- Files:
-
- 4 edited
- 6 copied
-
tags/1.8 (copied) (copied from redbox-pickup/trunk)
-
tags/1.8/css/front.css (copied) (copied from redbox-pickup/trunk/css/front.css)
-
tags/1.8/front/front.php (copied) (copied from redbox-pickup/trunk/front/front.php) (1 diff)
-
tags/1.8/js/front.js (copied) (copied from redbox-pickup/trunk/js/front.js) (4 diffs)
-
tags/1.8/readme.txt (copied) (copied from redbox-pickup/trunk/readme.txt) (3 diffs)
-
tags/1.8/redbox.php (copied) (copied from redbox-pickup/trunk/redbox.php) (2 diffs)
-
trunk/front/front.php (modified) (1 diff)
-
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.8/front/front.php
r2515504 r2536298 99 99 'headers' => array( 100 100 'Authorization' => 'Bearer ' . $this->redboxKey 101 ) 101 ), 102 'timeout' => 10 102 103 ); 103 104 $response = wp_remote_get($urlQuery, $options); -
redbox-pickup/tags/1.8/js/front.js
r2517378 r2536298 157 157 let LAT = 24.7135517 158 158 let LNG = 46.6752957 159 callAjaxGetListPoint(LAT, LNG) 159 if (REDBOX_LIST_POINT.length) { 160 activeInputConfirm() 161 drawMapInThis(REDBOX_LIST_POINT, LAT, LNG) 162 jQuery('.redbox-waiting-response').remove() 163 } else { 164 callAjaxGetListPoint(LAT, LNG) 165 } 160 166 jQuery('#close-wrap-choose-point').off() 161 167 jQuery('#close-wrap-choose-point').click(function(){ … … 321 327 function reRenderMapWithPoint(lat, lng) { 322 328 var htmlWaiting = '<div class="redbox-waiting-response"><i class="fa fa-spinner fa-spin"></i></div>' 323 jQuery('.redbox-pickup').prepend(htmlWaiting) 324 jQuery.ajax({ 325 url: ajax_url, 326 type:'GET', 327 data:`action=getlispoint&lat=${lat}&lng=${lng}&distance=100000000`, 328 success : function(response) { 329 let data = JSON.parse(response) 330 if (data.success) { 331 var bounds = new google.maps.LatLngBounds(); 332 bounds.extend(new google.maps.LatLng(lat, lng)); 333 bounds.extend(new google.maps.LatLng(data.points[0].location.lat, data.points[0].location.lng)); 334 REDBOX_MAP.fitBounds(bounds); 335 jQuery( "#wrap-area-choose-point" ).animate({ 336 bottom: -400 337 }, 500); 338 } else { 339 alert(data.msg) 340 } 341 jQuery('.redbox-waiting-response').remove() 342 }, 343 error: function(e) { 344 alert('Error occured'); 345 jQuery('.redbox-waiting-response').remove() 346 } 347 }); 329 var bounds = new google.maps.LatLngBounds(); 330 bounds.extend(new google.maps.LatLng(lat, lng)); 331 bounds.extend(new google.maps.LatLng(REDBOX_LIST_POINT[0].location.lat, REDBOX_LIST_POINT[0].location.lng)); 332 REDBOX_MAP.fitBounds(bounds); 333 jQuery( "#wrap-area-choose-point" ).animate({ 334 bottom: -400 335 }, 500); 348 336 } 349 337 function setFindAreaMap(map) { … … 381 369 }); 382 370 } 371 372 function loadListPoint() { 373 if (!REDBOX_LIST_POINT.length) { 374 let LAT = 24.7135517 375 let LNG = 46.6752957 376 jQuery.ajax({ 377 url: ajax_url, 378 type:'GET', 379 data:`action=getlispoint&lat=${LAT}&lng=${LNG}&distance=100000000`, 380 success : function(response) { 381 let data = JSON.parse(response) 382 if (data.success) { 383 REDBOX_LIST_POINT = data.points 384 } else { 385 alert(data.msg) 386 } 387 }, 388 error: function(e) { 389 alert('Error occured'); 390 } 391 }); 392 } 393 } 394 383 395 jQuery('#area-point-selected .bt-change-point').click(function(){ 384 396 openModalRedbox() … … 400 412 REDBOX_METHOD_SELECTED = false 401 413 jQuery("#area-point-selected").hide() 414 loadListPoint() 402 415 } 403 416 } -
redbox-pickup/tags/1.8/readme.txt
r2517378 r2536298 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.1 7 Stable tag: 1. 77 Stable tag: 1.8 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 = 1.5 = 42 42 Edit marker icon. Now there are 3 types of Redbox point: Locker, Counter and Locker and Counter. 43 = 1.8 = 44 Make page load list point after load checkout page. 43 45 44 46 … … 52 54 = 1.5 = 53 55 Edit marker icon 56 = 1.8 = 57 Enhance performance load point 54 58 55 59 -
redbox-pickup/tags/1.8/redbox.php
r2517378 r2536298 4 4 * Description: This plugin allows customers pickup package at RedBox Locker. 5 5 * Plugin URI: https://woocommerce.com/ 6 * Version: 1. 76 * Version: 1.8 7 7 * Author: RedBox 8 8 * Author URI: https://redboxsa.com … … 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. 9' );122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0.10' ); 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/front/front.php
r2515504 r2536298 99 99 'headers' => array( 100 100 'Authorization' => 'Bearer ' . $this->redboxKey 101 ) 101 ), 102 'timeout' => 10 102 103 ); 103 104 $response = wp_remote_get($urlQuery, $options); -
redbox-pickup/trunk/js/front.js
r2517378 r2536298 157 157 let LAT = 24.7135517 158 158 let LNG = 46.6752957 159 callAjaxGetListPoint(LAT, LNG) 159 if (REDBOX_LIST_POINT.length) { 160 activeInputConfirm() 161 drawMapInThis(REDBOX_LIST_POINT, LAT, LNG) 162 jQuery('.redbox-waiting-response').remove() 163 } else { 164 callAjaxGetListPoint(LAT, LNG) 165 } 160 166 jQuery('#close-wrap-choose-point').off() 161 167 jQuery('#close-wrap-choose-point').click(function(){ … … 321 327 function reRenderMapWithPoint(lat, lng) { 322 328 var htmlWaiting = '<div class="redbox-waiting-response"><i class="fa fa-spinner fa-spin"></i></div>' 323 jQuery('.redbox-pickup').prepend(htmlWaiting) 324 jQuery.ajax({ 325 url: ajax_url, 326 type:'GET', 327 data:`action=getlispoint&lat=${lat}&lng=${lng}&distance=100000000`, 328 success : function(response) { 329 let data = JSON.parse(response) 330 if (data.success) { 331 var bounds = new google.maps.LatLngBounds(); 332 bounds.extend(new google.maps.LatLng(lat, lng)); 333 bounds.extend(new google.maps.LatLng(data.points[0].location.lat, data.points[0].location.lng)); 334 REDBOX_MAP.fitBounds(bounds); 335 jQuery( "#wrap-area-choose-point" ).animate({ 336 bottom: -400 337 }, 500); 338 } else { 339 alert(data.msg) 340 } 341 jQuery('.redbox-waiting-response').remove() 342 }, 343 error: function(e) { 344 alert('Error occured'); 345 jQuery('.redbox-waiting-response').remove() 346 } 347 }); 329 var bounds = new google.maps.LatLngBounds(); 330 bounds.extend(new google.maps.LatLng(lat, lng)); 331 bounds.extend(new google.maps.LatLng(REDBOX_LIST_POINT[0].location.lat, REDBOX_LIST_POINT[0].location.lng)); 332 REDBOX_MAP.fitBounds(bounds); 333 jQuery( "#wrap-area-choose-point" ).animate({ 334 bottom: -400 335 }, 500); 348 336 } 349 337 function setFindAreaMap(map) { … … 381 369 }); 382 370 } 371 372 function loadListPoint() { 373 if (!REDBOX_LIST_POINT.length) { 374 let LAT = 24.7135517 375 let LNG = 46.6752957 376 jQuery.ajax({ 377 url: ajax_url, 378 type:'GET', 379 data:`action=getlispoint&lat=${LAT}&lng=${LNG}&distance=100000000`, 380 success : function(response) { 381 let data = JSON.parse(response) 382 if (data.success) { 383 REDBOX_LIST_POINT = data.points 384 } else { 385 alert(data.msg) 386 } 387 }, 388 error: function(e) { 389 alert('Error occured'); 390 } 391 }); 392 } 393 } 394 383 395 jQuery('#area-point-selected .bt-change-point').click(function(){ 384 396 openModalRedbox() … … 400 412 REDBOX_METHOD_SELECTED = false 401 413 jQuery("#area-point-selected").hide() 414 loadListPoint() 402 415 } 403 416 } -
redbox-pickup/trunk/readme.txt
r2517378 r2536298 5 5 Requires at least: 3.3 6 6 Tested up to: 5.5.1 7 Stable tag: 1. 77 Stable tag: 1.8 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 41 41 = 1.5 = 42 42 Edit marker icon. Now there are 3 types of Redbox point: Locker, Counter and Locker and Counter. 43 = 1.8 = 44 Make page load list point after load checkout page. 43 45 44 46 … … 52 54 = 1.5 = 53 55 Edit marker icon 56 = 1.8 = 57 Enhance performance load point 54 58 55 59 -
redbox-pickup/trunk/redbox.php
r2517378 r2536298 4 4 * Description: This plugin allows customers pickup package at RedBox Locker. 5 5 * Plugin URI: https://woocommerce.com/ 6 * Version: 1. 76 * Version: 1.8 7 7 * Author: RedBox 8 8 * Author URI: https://redboxsa.com … … 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. 9' );122 wp_enqueue_script( 'redbox_front_js', REDBOX_PLUGIN_DIR . '/js/front.js', false, '1.0.10' ); 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.