Plugin Directory

Changeset 2493015


Ignore:
Timestamp:
03/11/2021 09:18:56 AM (5 years ago)
Author:
redboxsa
Message:

Version 1.3

Location:
redbox-pickup
Files:
4 edited
6 copied

Legend:

Unmodified
Added
Removed
  • redbox-pickup/tags/1.3/css/front.css

    r2491692 r2493015  
    540540  transition: all 0.1s ease-in-out;
    541541  font-size: 13px;
     542  padding-right: 40px
     543}
     544.redbox-rtl .redbox-pickup #pac-input {
     545  padding-right: 20px;
     546  padding-left: 40px;
    542547}
    543548.redbox-pickup #pac-container {
     
    547552  position: absolute;
    548553  right: 20px;
    549   top: 15px;
     554  top: 18px;
    550555  color: #989696;
    551556}
  • redbox-pickup/tags/1.3/js/front.js

    r2491692 r2493015  
    1414            label_accept_payment_no: "No",
    1515            label_restricted_access: "Restried access",
    16             label_confirm_can_access_retricted_area: "I confirm that i have access to this localtion",
     16            label_confirm_can_access_retricted_area: "I confirm that i have access to this location",
    1717            day: "days",
    1818            select_other_point: "Select other Pickup point",
     
    8686                        },
    8787                    });
    88                     marker.setPosition(latlng);
    89                     map.setCenter(latlng);
    90                     map.setZoom(17);
     88                    reRenderMapWithPoint(position.coords.latitude, position.coords.longitude)
    9189                    jQuery('#you_location_img').css('background-position', '-144px 0px');
    9290                }, function (error) {
     
    309307        });
    310308    }
     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    }
    311337    function setFindAreaMap(map) {
    312338        const card = document.getElementById('pac-card');
     
    323349            const place = autocomplete.getPlace();
    324350            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())
    334352            }
    335353        });
  • redbox-pickup/tags/1.3/readme.txt

    r2491692 r2493015  
    55Requires at least: 3.3
    66Tested up to: 5.5.1
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535= 1.1 =
    3636Update new design.
     37= 1.3 =
     38Bound map when search address or click my location
    3739
    3840
     
    4042= 1.1 =
    4143Please update this version to get new design.
     44= 1.3 =
     45Bound map when search address or click my location
    4246
    4347
  • redbox-pickup/tags/1.3/redbox.php

    r2491692 r2493015  
    44        * Description: This plugin allows customers pickup package at RedBox Locker.
    55        * Plugin URI: https://woocommerce.com/
    6         * Version: 1.2
     6        * Version: 1.3
    77        * Author: RedBox
    88        * Author URI: https://redboxsa.com
     
    117117            function redbox_load_scrip_and_style_front() {
    118118                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' );
    120120                wp_enqueue_style( 'redbox_font_roboto', 'https://fonts.googleapis.com/css?family=Roboto' );
    121121                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' );
    123123                wp_enqueue_script( 'redbox_front_js_map', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBY1xlGe6jLbugOJegCsUGnzlufYWa5CRw&amp;sensor=false&amp;libraries=places' );
    124124                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  
    540540  transition: all 0.1s ease-in-out;
    541541  font-size: 13px;
     542  padding-right: 40px
     543}
     544.redbox-rtl .redbox-pickup #pac-input {
     545  padding-right: 20px;
     546  padding-left: 40px;
    542547}
    543548.redbox-pickup #pac-container {
     
    547552  position: absolute;
    548553  right: 20px;
    549   top: 15px;
     554  top: 18px;
    550555  color: #989696;
    551556}
  • redbox-pickup/trunk/js/front.js

    r2491692 r2493015  
    1414            label_accept_payment_no: "No",
    1515            label_restricted_access: "Restried access",
    16             label_confirm_can_access_retricted_area: "I confirm that i have access to this localtion",
     16            label_confirm_can_access_retricted_area: "I confirm that i have access to this location",
    1717            day: "days",
    1818            select_other_point: "Select other Pickup point",
     
    8686                        },
    8787                    });
    88                     marker.setPosition(latlng);
    89                     map.setCenter(latlng);
    90                     map.setZoom(17);
     88                    reRenderMapWithPoint(position.coords.latitude, position.coords.longitude)
    9189                    jQuery('#you_location_img').css('background-position', '-144px 0px');
    9290                }, function (error) {
     
    309307        });
    310308    }
     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    }
    311337    function setFindAreaMap(map) {
    312338        const card = document.getElementById('pac-card');
     
    323349            const place = autocomplete.getPlace();
    324350            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())
    334352            }
    335353        });
  • redbox-pickup/trunk/readme.txt

    r2491692 r2493015  
    55Requires at least: 3.3
    66Tested up to: 5.5.1
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535= 1.1 =
    3636Update new design.
     37= 1.3 =
     38Bound map when search address or click my location
    3739
    3840
     
    4042= 1.1 =
    4143Please update this version to get new design.
     44= 1.3 =
     45Bound map when search address or click my location
    4246
    4347
  • redbox-pickup/trunk/redbox.php

    r2491692 r2493015  
    44        * Description: This plugin allows customers pickup package at RedBox Locker.
    55        * Plugin URI: https://woocommerce.com/
    6         * Version: 1.2
     6        * Version: 1.3
    77        * Author: RedBox
    88        * Author URI: https://redboxsa.com
     
    117117            function redbox_load_scrip_and_style_front() {
    118118                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' );
    120120                wp_enqueue_style( 'redbox_font_roboto', 'https://fonts.googleapis.com/css?family=Roboto' );
    121121                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' );
    123123                wp_enqueue_script( 'redbox_front_js_map', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBY1xlGe6jLbugOJegCsUGnzlufYWa5CRw&amp;sensor=false&amp;libraries=places' );
    124124                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.