Changeset 3417851
- Timestamp:
- 12/12/2025 03:02:59 AM (4 months ago)
- Location:
- ry-wc-city-select/trunk
- Files:
-
- 6 edited
-
assets-src/ry-city-select.js (modified) (1 diff)
-
assets/ry-city-select.asset.php (modified) (1 diff)
-
assets/ry-city-select.js (modified) (1 diff)
-
languages/ry-wc-city-select.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
ry-wc-city-select.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ry-wc-city-select/trunk/assets-src/ry-city-select.js
r3412724 r3417851 97 97 } 98 98 } else { 99 disableCity($citybox);99 cityToInput($citybox); 100 100 } 101 101 } else { -
ry-wc-city-select/trunk/assets/ry-city-select.asset.php
r3412724 r3417851 1 <?php return array('dependencies' => array('jquery'), 'version' => ' 3e9645b9ebe8f14c71e8');1 <?php return array('dependencies' => array('jquery'), 'version' => '5e63f8915f53f8596131'); -
ry-wc-city-select/trunk/assets/ry-city-select.js
r3412724 r3417851 1 (()=>{"use strict";window.jQuery,jQuery(function(t){if("undefined"==typeof wc_country_select_params||"undefined"==typeof ry_wc_city_select_params)return!1;if(t().selectWoo){const e=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){const e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){const e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},n=function(){t("select.city_select:visible").each(function(){const n=t.extend({placeholder:t(this).attr("data-placeholder")||t(this).attr("placeholder")||"",width:"100%"},e());t(this).on("select2:select",function(){t(this).trigger("focus")}).selectWoo(n)})};n(),t(document.body).on("city_to_select",function(){n()})} function e(e){if(e.is("input"))return void e.prop("disabled",!1);const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t('<input type="text">');o.prop("id",c).prop("name",n).prop("placeholder",i).addClass("input-text"),e.parent().find(".select2-container").remove(),e.replaceWith(o),t("#"+c).closest(".form-row").parent().find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}t(document.body).on("country_to_state_changing",function(e,n,c){const i=c.find("#billing_state, #shipping_state, #calc_shipping_state").val();t(document.body).trigger("state_changing",[n,i,c])}),t(document.body).on("change","select.state_select, #calc_shipping_state",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_country, #shipping_country, #calc_shipping_country").val(),c=t(this).val();t(document.body).trigger("state_changing",[n,c,e])}),t(document.body).on("state_changing",function(n,c,i,o){const s=o.find("#billing_city, #shipping_city, #calc_shipping_city");ry_wc_city_select_params.cities[c]?i?ry_wc_city_select_params.cities[c][i]?function(e,n){const c=e.val();if(e.is("input")){const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t("<select></select>");o.prop("id",c).prop("name",n).data("placeholder",i).addClass("city_select"),e.replaceWith(o),e=t("#"+c)}else e.prop("disabled",!1);e.empty();for(const c in n)if(n.hasOwnProperty(c)){const i=t("<option></option>");let o;n[c]instanceof Array?(o=n[c][0],i.attr("data-postcode",n[c][1])):o=n[c],i.prop("value",o).text(o),e.append(i)}let i=e.find('option[value="'+c+'"]');i.length?i.prop("selected",!0):e.find("option:first").prop("selected",!0),e.trigger("change"),t(document.body).trigger("city_to_select")}(s,ry_wc_city_select_params.cities[c][i]):e(s):function(t){t.val("").trigger("change"),t.prop("disabled",!0)}(s):e(s)}),t(document.body).on("change","select.city_select",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_city, #shipping_city, #calc_shipping_city").find(":selected").data("postcode");void 0!==n?e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val(n):e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}),t(".cart-collaterals").length&&t("#calc_shipping_state").length&&new MutationObserver(function(){t("#calc_shipping_state").trigger("change")}).observe(document.querySelector(".cart-collaterals"),{childList:!0})})})();1 (()=>{"use strict";window.jQuery,jQuery(function(t){if("undefined"==typeof wc_country_select_params||"undefined"==typeof ry_wc_city_select_params)return!1;if(t().selectWoo){const e=function(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(t){const e=t.input.length-t.maximum;return 1===e?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(t){const e=t.minimum-t.input.length;return 1===e?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(t){return 1===t.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",t.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}},n=function(){t("select.city_select:visible").each(function(){const n=t.extend({placeholder:t(this).attr("data-placeholder")||t(this).attr("placeholder")||"",width:"100%"},e());t(this).on("select2:select",function(){t(this).trigger("focus")}).selectWoo(n)})};n(),t(document.body).on("city_to_select",function(){n()})}t(document.body).on("country_to_state_changing",function(e,n,c){const i=c.find("#billing_state, #shipping_state, #calc_shipping_state").val();t(document.body).trigger("state_changing",[n,i,c])}),t(document.body).on("change","select.state_select, #calc_shipping_state",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_country, #shipping_country, #calc_shipping_country").val(),c=t(this).val();t(document.body).trigger("state_changing",[n,c,e])}),t(document.body).on("state_changing",function(e,n,c,i){const o=i.find("#billing_city, #shipping_city, #calc_shipping_city");ry_wc_city_select_params.cities[n]&&c&&ry_wc_city_select_params.cities[n][c]?function(e,n){const c=e.val();if(e.is("input")){const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t("<select></select>");o.prop("id",c).prop("name",n).data("placeholder",i).addClass("city_select"),e.replaceWith(o),e=t("#"+c)}else e.prop("disabled",!1);e.empty();for(const c in n)if(n.hasOwnProperty(c)){const i=t("<option></option>");let o;n[c]instanceof Array?(o=n[c][0],i.attr("data-postcode",n[c][1])):o=n[c],i.prop("value",o).text(o),e.append(i)}let i=e.find('option[value="'+c+'"]');i.length?i.prop("selected",!0):e.find("option:first").prop("selected",!0),e.trigger("change"),t(document.body).trigger("city_to_select")}(o,ry_wc_city_select_params.cities[n][c]):function(e){if(e.is("input"))return void e.prop("disabled",!1);const n=e.attr("name"),c=e.attr("id"),i=e.attr("placeholder"),o=t('<input type="text">');o.prop("id",c).prop("name",n).prop("placeholder",i).addClass("input-text"),e.parent().find(".select2-container").remove(),e.replaceWith(o),t("#"+c).closest(".form-row").parent().find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}(o)}),t(document.body).on("change","select.city_select",function(){const e=t(this).closest(".form-row").parent(),n=e.find("#billing_city, #shipping_city, #calc_shipping_city").find(":selected").data("postcode");void 0!==n?e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val(n):e.find("#billing_postcode, #shipping_postcode, #calc_shipping_postcode").val("")}),t(".cart-collaterals").length&&t("#calc_shipping_state").length&&new MutationObserver(function(){t("#calc_shipping_state").trigger("change")}).observe(document.querySelector(".cart-collaterals"),{childList:!0})})})(); -
ry-wc-city-select/trunk/languages/ry-wc-city-select.pot
r3412724 r3417851 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: RY City Select for WooCommerce 2.1.1 0\n"5 "Project-Id-Version: RY City Select for WooCommerce 2.1.11\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ry-wc-city-select\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-12- 06T11:25:16+08:00\n"12 "POT-Creation-Date: 2025-12-12T10:57:08+08:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
ry-wc-city-select/trunk/readme.txt
r3412724 r3417851 3 3 Donate link: https://www.paypal.me/RicherYang 4 4 Tags: woocommerce, city, select, dropdown 5 Requires at least: 6. 65 Requires at least: 6.7 6 6 Requires PHP: 8.0 7 Tested up to: 6. 88 Stable tag: 2.1.1 07 Tested up to: 6.9 8 Stable tag: 2.1.11 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.txt … … 91 91 == Changelog == 92 92 93 = 2.1.10- 2025/12/06 = 93 = 2.1.11 - 2025/12/07= 94 * Fixed - When country change maybe set error city info. 95 96 = 2.1.10 - 2025/12/06 = 94 97 * Change - when user change state auto-select first city. 95 98 * Change - city required info to WooCommerce (Version 10.3) html tage style. -
ry-wc-city-select/trunk/ry-wc-city-select.php
r3412724 r3417851 5 5 * Plugin URI: https://ry-plugin.com/ry-wc-city-select 6 6 * Description: Show a dropdown select as the cities input on WooCommerce. Auto set the postcode for selected city. 7 * Version: 2.1.1 07 * Version: 2.1.11 8 8 * Requires at least: 6.7 9 9 * Requires PHP: 8.0 … … 19 19 function_exists('plugin_dir_url') or exit('No direct script access allowed'); 20 20 21 define('RY_WCS_VERSION', '2.1.1 0');21 define('RY_WCS_VERSION', '2.1.11'); 22 22 define('RY_WCS_PLUGIN_URL', plugin_dir_url(__FILE__)); 23 23 define('RY_WCS_PLUGIN_DIR', plugin_dir_path(__FILE__));
Note: See TracChangeset
for help on using the changeset viewer.