Plugin Directory

Changeset 3447037


Ignore:
Timestamp:
01/26/2026 11:04:17 AM (2 months ago)
Author:
ZanderZ
Message:

Update to version 6.5.1 from GitHub

Location:
recras
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • recras/tags/6.5.1/changelog.md

    r3435083 r3447037  
    11# Changelog
    22
     3## 6.5.1 (2026-01-26)
     4* Gutenberg editor: Add ID to book processes list
     5* Gutenberg editor: sort selectable items by name instead of creation date
     6*
    37## 6.5.0 (2026-01-08)
    48* Add anti-spam check to contact forms
  • recras/tags/6.5.1/js/gutenberg-bookprocess.js

    r3369571 r3447037  
    3636
    3737        const mapBookprocess = function(idBookprocess) {
    38             return mapSelect(idBookprocess[1].name, idBookprocess[0]);
     38            return mapSelect(
     39                idBookprocess[1].name + ' (ID: ' + idBookprocess[0] + ')',
     40                idBookprocess[0]
     41            );
    3942        };
    4043
     
    4750        );
    4851
     52        const bpSorted = Object.entries(bookprocesses).map(mapBookprocess).toSorted(selectSort);
     53
    4954        const optionsIDControl = {
    5055            value: id,
     
    5661                });
    5762            },
    58             options: Object.entries(bookprocesses).map(mapBookprocess),
     63            options: bpSorted,
    5964            label: wp.i18n.__('Book process', TEXT_DOMAIN),
    6065        };
  • recras/tags/6.5.1/js/gutenberg-contactform.js

    r3369571 r3447037  
    6262        }
    6363
    64         const cfMapped = Object.entries(contactForms).map(mapContactForm);
     64        const cfMapped = Object.entries(contactForms).map(mapContactForm).toSorted(selectSort);
    6565        let retval = [];
    6666        const optionsIDControl = {
  • recras/tags/6.5.1/js/gutenberg-global.js

    r3369571 r3447037  
    115115    return mapSelect(template.name, template.id);
    116116};
     117
     118const selectSort = function(a, b) {
     119    // Sort by label
     120    if (a.label < b.label) {
     121        return -1;
     122    }
     123    if (a.label > b.label) {
     124        return 1;
     125    }
     126    // Sort by ID when label is the same
     127    return parseInt(a.value) < parseInt(b.value) ? 1 : -1;
     128}
    117129
    118130const recrasActions = {
  • recras/tags/6.5.1/js/gutenberg-package.js

    r3369571 r3447037  
    3434            starttime,
    3535        } = props.attributes;
    36         const {
     36        let {
    3737            packages,
    3838        } = props;
     39        if (!Array.isArray(packages)) {
     40            packages = [];
     41        }
    3942
    4043        let retval = [];
     
    4750                });
    4851            },
    49             options: packages,
     52            options: packages.toSorted(selectSort),
    5053            label: wp.i18n.__('Package', TEXT_DOMAIN),
    5154        };
  • recras/tags/6.5.1/js/gutenberg-product.js

    r3369571 r3447037  
    3535        }
    3636
     37        const productsSorted = products.toSorted(selectSort);
     38
    3739        let optionsIDControl;
    3840        if (products.length > 0) {
     
    4547                    });
    4648                },
    47                 options: products,
     49                options: productsSorted,
    4850                label: wp.i18n.__('Product', TEXT_DOMAIN),
    4951            };
  • recras/tags/6.5.1/js/gutenberg-voucher-info.js

    r3369571 r3447037  
    2828            show,
    2929        } = props.attributes;
    30         const {
     30        let {
    3131            voucherTemplates,
    3232        } = props;
     33
     34        if (!Array.isArray(voucherTemplates)) {
     35            voucherTemplates = [];
     36        }
    3337
    3438        let retval = [];
     
    4145                });
    4246            },
    43             options: voucherTemplates,
     47            options: voucherTemplates.toSorted(selectSort),
    4448            label: wp.i18n.__('Voucher template', TEXT_DOMAIN),
    4549        };
  • recras/tags/6.5.1/js/gutenberg-voucher-sales.js

    r3369571 r3447037  
    3232            showquantity,
    3333        } = props.attributes;
    34         const {
     34        let {
    3535            pagesPosts,
    3636            voucherTemplates,
    3737        } = props;
     38
     39        if (!Array.isArray(voucherTemplates)) {
     40            voucherTemplates = [];
     41        }
    3842
    3943        if (pagesPosts === undefined || !pagesPosts.length) {
     
    5256                });
    5357            },
    54             options: voucherTemplates,
     58            options: voucherTemplates.toSorted(selectSort),
    5559            label: wp.i18n.__('Voucher template', TEXT_DOMAIN),
    5660        };
  • recras/tags/6.5.1/readme.txt

    r3435083 r3447037  
    33Tags: recras, recreation, reservation, booking, voucher
    44Tested up to: 6.9
    5 Stable tag: 6.5.0
     5Stable tag: 6.5.1
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575== Changelog ==
     76
     77= 6.5.1 =
     78* Gutenberg editor: Add ID to book processes list
     79* Gutenberg editor: sort selectable items by name instead of creation date
    7680
    7781= 6.5.0 =
  • recras/tags/6.5.1/recras-wordpress-plugin.php

    r3435083 r3447037  
    33Plugin Name: Recras
    44Plugin URI: https://www.recras.com/
    5 Version: 6.5.0
     5Version: 6.5.1
    66Description: Easily integrate your Recras data into your own site
    77Requires at least: 6.7
  • recras/tags/6.5.1/src/Gutenberg.php

    r3432851 r3447037  
    1919                'wp-i18n',
    2020            ],
    21             '6.3.2',
     21            '6.5.1',
    2222            true
    2323        );
     
    4242            'bookprocess' => [
    4343                'callback' => [Bookprocess::class, 'renderBookprocess'],
    44                 'version' => '6.4.0',
     44                'version' => '6.5.1',
    4545            ],
    4646            'contactform' => [
    4747                'callback' => [ContactForm::class, 'renderContactForm'],
    48                 'version' => '6.4.0',
     48                'version' => '6.5.1',
    4949            ],
    5050            'onlinebooking' => [
     
    5454            'package' => [
    5555                'callback' => [Arrangement::class, 'renderPackage'],
    56                 'version' => '6.4.0',
     56                'version' => '6.5.1',
    5757            ],
    5858            'product' => [
    5959                'callback' => [Products::class, 'renderProduct'],
    60                 'version' => '6.4.0',
     60                'version' => '6.5.1',
    6161            ],
    6262            'voucher-info' => [
    6363                'callback' => [Vouchers::class, 'renderVoucherInfo'],
    64                 'version' => '6.4.0',
     64                'version' => '6.5.1',
    6565            ],
    6666            'voucher-sales' => [
    6767                'callback' => [Vouchers::class, 'renderVoucherSales'],
    68                 'version' => '6.4.0',
     68                'version' => '6.5.1',
    6969            ],
    7070        ];
  • recras/trunk/changelog.md

    r3435083 r3447037  
    11# Changelog
    22
     3## 6.5.1 (2026-01-26)
     4* Gutenberg editor: Add ID to book processes list
     5* Gutenberg editor: sort selectable items by name instead of creation date
     6*
    37## 6.5.0 (2026-01-08)
    48* Add anti-spam check to contact forms
  • recras/trunk/js/gutenberg-bookprocess.js

    r3369571 r3447037  
    3636
    3737        const mapBookprocess = function(idBookprocess) {
    38             return mapSelect(idBookprocess[1].name, idBookprocess[0]);
     38            return mapSelect(
     39                idBookprocess[1].name + ' (ID: ' + idBookprocess[0] + ')',
     40                idBookprocess[0]
     41            );
    3942        };
    4043
     
    4750        );
    4851
     52        const bpSorted = Object.entries(bookprocesses).map(mapBookprocess).toSorted(selectSort);
     53
    4954        const optionsIDControl = {
    5055            value: id,
     
    5661                });
    5762            },
    58             options: Object.entries(bookprocesses).map(mapBookprocess),
     63            options: bpSorted,
    5964            label: wp.i18n.__('Book process', TEXT_DOMAIN),
    6065        };
  • recras/trunk/js/gutenberg-contactform.js

    r3369571 r3447037  
    6262        }
    6363
    64         const cfMapped = Object.entries(contactForms).map(mapContactForm);
     64        const cfMapped = Object.entries(contactForms).map(mapContactForm).toSorted(selectSort);
    6565        let retval = [];
    6666        const optionsIDControl = {
  • recras/trunk/js/gutenberg-global.js

    r3369571 r3447037  
    115115    return mapSelect(template.name, template.id);
    116116};
     117
     118const selectSort = function(a, b) {
     119    // Sort by label
     120    if (a.label < b.label) {
     121        return -1;
     122    }
     123    if (a.label > b.label) {
     124        return 1;
     125    }
     126    // Sort by ID when label is the same
     127    return parseInt(a.value) < parseInt(b.value) ? 1 : -1;
     128}
    117129
    118130const recrasActions = {
  • recras/trunk/js/gutenberg-package.js

    r3369571 r3447037  
    3434            starttime,
    3535        } = props.attributes;
    36         const {
     36        let {
    3737            packages,
    3838        } = props;
     39        if (!Array.isArray(packages)) {
     40            packages = [];
     41        }
    3942
    4043        let retval = [];
     
    4750                });
    4851            },
    49             options: packages,
     52            options: packages.toSorted(selectSort),
    5053            label: wp.i18n.__('Package', TEXT_DOMAIN),
    5154        };
  • recras/trunk/js/gutenberg-product.js

    r3369571 r3447037  
    3535        }
    3636
     37        const productsSorted = products.toSorted(selectSort);
     38
    3739        let optionsIDControl;
    3840        if (products.length > 0) {
     
    4547                    });
    4648                },
    47                 options: products,
     49                options: productsSorted,
    4850                label: wp.i18n.__('Product', TEXT_DOMAIN),
    4951            };
  • recras/trunk/js/gutenberg-voucher-info.js

    r3369571 r3447037  
    2828            show,
    2929        } = props.attributes;
    30         const {
     30        let {
    3131            voucherTemplates,
    3232        } = props;
     33
     34        if (!Array.isArray(voucherTemplates)) {
     35            voucherTemplates = [];
     36        }
    3337
    3438        let retval = [];
     
    4145                });
    4246            },
    43             options: voucherTemplates,
     47            options: voucherTemplates.toSorted(selectSort),
    4448            label: wp.i18n.__('Voucher template', TEXT_DOMAIN),
    4549        };
  • recras/trunk/js/gutenberg-voucher-sales.js

    r3369571 r3447037  
    3232            showquantity,
    3333        } = props.attributes;
    34         const {
     34        let {
    3535            pagesPosts,
    3636            voucherTemplates,
    3737        } = props;
     38
     39        if (!Array.isArray(voucherTemplates)) {
     40            voucherTemplates = [];
     41        }
    3842
    3943        if (pagesPosts === undefined || !pagesPosts.length) {
     
    5256                });
    5357            },
    54             options: voucherTemplates,
     58            options: voucherTemplates.toSorted(selectSort),
    5559            label: wp.i18n.__('Voucher template', TEXT_DOMAIN),
    5660        };
  • recras/trunk/readme.txt

    r3435083 r3447037  
    33Tags: recras, recreation, reservation, booking, voucher
    44Tested up to: 6.9
    5 Stable tag: 6.5.0
     5Stable tag: 6.5.1
    66License: GPLv2 or later
    77License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575== Changelog ==
     76
     77= 6.5.1 =
     78* Gutenberg editor: Add ID to book processes list
     79* Gutenberg editor: sort selectable items by name instead of creation date
    7680
    7781= 6.5.0 =
  • recras/trunk/recras-wordpress-plugin.php

    r3435083 r3447037  
    33Plugin Name: Recras
    44Plugin URI: https://www.recras.com/
    5 Version: 6.5.0
     5Version: 6.5.1
    66Description: Easily integrate your Recras data into your own site
    77Requires at least: 6.7
  • recras/trunk/src/Gutenberg.php

    r3432851 r3447037  
    1919                'wp-i18n',
    2020            ],
    21             '6.3.2',
     21            '6.5.1',
    2222            true
    2323        );
     
    4242            'bookprocess' => [
    4343                'callback' => [Bookprocess::class, 'renderBookprocess'],
    44                 'version' => '6.4.0',
     44                'version' => '6.5.1',
    4545            ],
    4646            'contactform' => [
    4747                'callback' => [ContactForm::class, 'renderContactForm'],
    48                 'version' => '6.4.0',
     48                'version' => '6.5.1',
    4949            ],
    5050            'onlinebooking' => [
     
    5454            'package' => [
    5555                'callback' => [Arrangement::class, 'renderPackage'],
    56                 'version' => '6.4.0',
     56                'version' => '6.5.1',
    5757            ],
    5858            'product' => [
    5959                'callback' => [Products::class, 'renderProduct'],
    60                 'version' => '6.4.0',
     60                'version' => '6.5.1',
    6161            ],
    6262            'voucher-info' => [
    6363                'callback' => [Vouchers::class, 'renderVoucherInfo'],
    64                 'version' => '6.4.0',
     64                'version' => '6.5.1',
    6565            ],
    6666            'voucher-sales' => [
    6767                'callback' => [Vouchers::class, 'renderVoucherSales'],
    68                 'version' => '6.4.0',
     68                'version' => '6.5.1',
    6969            ],
    7070        ];
Note: See TracChangeset for help on using the changeset viewer.