PluginProbe
Booking Calendar / 10.11.2
Booking Calendar v10.11.2
11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 All 203 releases
booking / includes / __js / admin / settings / ui_radio_container.js

ui_radio_container.js in Booking Calendar 10.11.2, at includes/__js/admin/settings/ui_radio_container.js

34 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * On selection of radio button, adjust attributes of radio container
3 *
4 * @param _this
5 */
6 function wpbc_ui_el__radio_container_selection(_this) {
7
8 if ( jQuery( _this ).is( ':checked' ) ) {
9 jQuery( _this ).parents( '.wpbc_ui_radio_section' ).find( '.wpbc_ui_radio_container' ).removeAttr( 'data-selected' );
10 jQuery( _this ).parents( '.wpbc_ui_radio_container:not(.disabled)' ).attr( 'data-selected', true );
11 }
12
13 if ( jQuery( _this ).is( ':disabled' ) ) {
14 jQuery( _this ).parents( '.wpbc_ui_radio_container' ).addClass( 'disabled' );
15 }
16 }
17
18 /**
19 * On click on Radio Container, we will select the radio button and then adjust attributes of radio container
20 *
21 * @param _this
22 */
23 function wpbc_ui_el__radio_container_click(_this) {
24
25 if ( jQuery( _this ).hasClass( 'disabled' ) ) {
26 return false;
27 }
28
29 var j_radio = jQuery( _this ).find( 'input[type=radio]:not(.wpbc-form-radio-internal)' );
30 if ( j_radio.length ) {
31 j_radio.prop( 'checked', true ).trigger( 'change' );
32 }
33
34 }