Changeset 2802161
- Timestamp:
- 10/21/2022 12:28:49 AM (3 years ago)
- Location:
- staffing-engine-chatbot
- Files:
-
- 16 edited
- 1 copied
-
tags/0.4.0 (copied) (copied from staffing-engine-chatbot/trunk)
-
tags/0.4.0/readme.txt (modified) (2 diffs)
-
tags/0.4.0/src/bin/rational-option-pages.php (modified) (2 diffs)
-
tags/0.4.0/src/includes/admin.php (modified) (6 diffs)
-
tags/0.4.0/src/includes/embed.php (modified) (2 diffs)
-
tags/0.4.0/src/public/css/se-chatbot-admin.css (modified) (1 diff)
-
tags/0.4.0/src/public/css/se-chatbot.css (modified) (2 diffs)
-
tags/0.4.0/src/public/js/se-chatbot-admin.js (modified) (3 diffs)
-
tags/0.4.0/staffing-engine-chatbot.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/bin/rational-option-pages.php (modified) (2 diffs)
-
trunk/src/includes/admin.php (modified) (6 diffs)
-
trunk/src/includes/embed.php (modified) (2 diffs)
-
trunk/src/public/css/se-chatbot-admin.css (modified) (1 diff)
-
trunk/src/public/css/se-chatbot.css (modified) (2 diffs)
-
trunk/src/public/js/se-chatbot-admin.js (modified) (3 diffs)
-
trunk/staffing-engine-chatbot.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
staffing-engine-chatbot/tags/0.4.0/readme.txt
r2795262 r2802161 4 4 - Donate Link: https://staffingengine.ai/ 5 5 - Tags: chatbot, live chat, AI, staffing, recruiting 6 - Stable tag: 0. 3.06 - Stable tag: 0.4.0 7 7 - Requires at least: 5.5 8 8 - Tested up to: 6.0.1 … … 48 48 - UI/UX improvements to plugin settings page 49 49 - Bug fixes 50 51 = 0.4.0 : 2022-10-20 = 52 53 - Better settings for auto expand functionality 54 - More fixes for guarding against overzealous wordpress themes 55 - Bug fixes -
staffing-engine-chatbot/tags/0.4.0/src/bin/rational-option-pages.php
r2784220 r2802161 426 426 ! empty( $field['text'] ) ? esc_html( $field['text'] ) : '' // text 427 427 ); 428 if ( ! empty( $field['description'] ) ) { 429 printf( 430 '<p class="se-checkbox-description">%s</p>', 431 esc_html( $field['description'] ) 432 ); 433 } 428 434 break; 429 435 case 'media': … … 535 541 esc_attr( $field['type'] ), // type 536 542 esc_attr( $field['value'] ), // value 537 ! empty( $attributes ) ? esc_attr( implode( ' ', $attributes )) : '', // additional attributes543 ! empty( $attributes ) ? implode( ' ', $attributes ) : '', // additional attributes 538 544 ! empty( $field['text'] ) ? '<p class="help">' . esc_html( $field['text'] ) . '</p>' : '' // text 539 545 ); -
staffing-engine-chatbot/tags/0.4.0/src/includes/admin.php
r2795262 r2802161 192 192 'fields' => array( 193 193 'position' => array( 194 'id' => 'position',195 'title' => __( 'Bot position', Plugin::SLUG ),196 'text' => __( 'Set the location of the bot on your site.', Plugin::SLUG ),197 'type' => 'select',198 'value' => 'bottom-right',199 'choices' => array(194 'id' => 'position', 195 'title' => __( 'Bot position', Plugin::SLUG ), 196 'text' => __( 'Set the location of the bot on your site.', Plugin::SLUG ), 197 'type' => 'select', 198 'value' => 'bottom-right', 199 'choices' => array( 200 200 'bottom-right' => __( 'Bottom Right', Plugin::SLUG ), 201 201 'bottom-left' => __( 'Bottom Left', Plugin::SLUG ), … … 221 221 'id' => 'animation', 222 222 'title' => __( 'Animation type', Plugin::SLUG ), 223 'text' => __( 'Choose an animation style to get the attention of site visitors.', Plugin::SLUG ),223 'text' => __( 'Choose an animation style to get the attention of site visitors.', Plugin::SLUG ), 224 224 'type' => 'select', 225 225 'value' => 'pulse', … … 270 270 'text' => __( 'Show the close icon on the popup. If disabled, it cannot be dismissed.', Plugin::SLUG ), 271 271 'type' => 'radio', 272 'value' => 'yes',272 'value' => 'yes', 273 273 'choices' => array( 274 274 'yes' => __( 'Show', Plugin::SLUG), … … 277 277 ), 278 278 'inviteTimeout' => array( 279 'id' => 'invite_timeout', 280 'title' => __( 'Invite Timeout', Plugin::SLUG ), 281 'text' => __( 'Set how long until the popup appears (in seconds)', Plugin::SLUG ), 282 'type' => 'number', 283 'value' => 6, 279 'id' => 'invite_timeout', 280 'title' => __( 'Invite Timeout', Plugin::SLUG ), 281 'text' => __( 'Set how long until the popup appears (in seconds)', Plugin::SLUG ), 282 'type' => 'number', 283 'value' => 6, 284 'attributes' => array( 285 'min' => 1, 286 'max' => 60, 287 ) 288 ), 289 ), 290 ), 291 'autoExpand' => array( 292 'title' => __( 'Auto Expand', Plugin::SLUG), 293 'text' => __( 'Automatically expand the chatbot sometime after the site has loaded', Plugin::SLUG ), 294 'fields' => array( 295 'autoExpandEnable' => array( 296 'id' => 'auto_expand_enable', 297 'title' => __( 'Enable Auto Expand', Plugin::SLUG ), 298 'text' => __( 'Auto Expand will automatically open the chatbot window after a set amount of time. Use "Enable, excluding small screens" to prevent auto expand from taking over the entire site on mobile devices.', Plugin::SLUG ), 299 'type' => 'select', 300 'value' => 'disable', 301 'choices' => array( 302 'disable' => __( 'Disable', Plugin::SLUG ), 303 'enable-not-mobile' => __( 'Enable, excluding small screens', Plugin::SLUG ), 304 'enable' => __( 'Enable', Plugin::SLUG ), 305 ), 306 ), 307 'autoExpandDelay' => array( 308 'id' => 'auto_expand_delay', 309 'title' => __( 'Auto Expand Delay', Plugin::SLUG ), 310 'text' => __( 'How long to wait (in seconds) before the chatbot window automatically opens.', Plugin::SLUG ), 311 'type' => 'number', 312 'value' => 5, 313 'attributes' => array( 314 'min' => 1, 315 'max' => 60, 316 ) 284 317 ), 285 318 ), … … 287 320 'behavior' => array( 288 321 'title' => __( 'Behavior', Plugin::SLUG), 289 'text' => __( 'Customize the chat widget\'s behavior', Plugin::SLUG ),322 'text' => __( 'Customize how the chatbot acts under certain conditions', Plugin::SLUG ), 290 323 'fields' => array( 291 'autoExpandDelay' => array(292 'id' => 'auto_expand_delay',293 'title' => __( 'Auto Expand Delay', Plugin::SLUG ),294 'text' => __( 'How long to wait (in seconds) before the chatbot window automatically opens. Set to 0 to disable auto expand.', Plugin::SLUG ),295 'type' => 'number',296 'value' => 0,297 ),298 324 'allowStartNewConversation' => array( 299 325 'id' => 'allow_start_new_conversation', … … 301 327 'text' => __( 'Set whether site visitors can start a new conversation or are required to pick up from a previous conversation, if one exists.', Plugin::SLUG ), 302 328 'type' => 'radio', 303 'value' => 'yes',304 'choices' => array(329 'value' => 'yes', 330 'choices' => array( 305 331 'yes' => __( 'Allow', Plugin::SLUG), 306 332 'no' => __( 'Don\'t Allow', Plugin::SLUG ), -
staffing-engine-chatbot/tags/0.4.0/src/includes/embed.php
r2795262 r2802161 129 129 ?> 130 130 <script> 131 const IS_MOBILE = window.innerWidth <= 768; 132 133 const handleAutoExpand = (config, autoExpandState) => { 134 if (autoExpandState === 'disable') { 135 config.autoExpandDelay = 0; 136 } else if (autoExpandState === 'enable-not-mobile' && IS_MOBILE) { 137 config.autoExpandDelay = 0; 138 } 139 }; 140 131 141 const config = <?php echo json_encode( self::$final_options ); ?>; 142 const autoExpandState = <?php echo json_encode( self::$options['auto_expand_enable'] ); ?>; 143 144 handleAutoExpand(config, autoExpandState); 132 145 133 146 const staffingEngineChatConfig = Object.assign(config, { … … 183 196 "inviteTimeout" => array_key_exists( 'invite_timeout', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['invite_timeout'] ) . '000' ) : 5000, 184 197 "showCloseIcon" => array_key_exists( 'invite_show_close_icon', self::$options ) ? $this->parse_radio_setting( esc_attr( self::$options['invite_show_close_icon'] ), true ) : true, 185 "autoExpandDelay" => array_key_exists( 'auto_expand_delay', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['auto_expand_delay'] ) . '000' ) : 0,198 "autoExpandDelay" => array_key_exists( 'auto_expand_delay', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['auto_expand_delay'] ) . '000' ) : '0', 186 199 "allowStartNewConversation" => array_key_exists( 'allow_start_new_conversation', self::$options ) ? $this->parse_radio_setting( esc_attr( self::$options['allow_start_new_conversation'] ), true ) : true, 187 200 ]; -
staffing-engine-chatbot/tags/0.4.0/src/public/css/se-chatbot-admin.css
r2795262 r2802161 34 34 } 35 35 36 #staffing_engine_chatbot-page .se-checkbox-description { 37 margin-top: 8px; 38 } 39 36 40 #staffing_engine_chatbot-page .se-alert-message { 37 41 background-color: #fef08a; -
staffing-engine-chatbot/tags/0.4.0/src/public/css/se-chatbot.css
r2785528 r2802161 17 17 * the rwc iframe. This is particularly a problem with themes like salient 18 18 * that use `!important` on generic elements like `button`. 19 *20 * TODO: We might consider only loading these on demand, or as an option to "resolve21 * common theme conflicts" or something since they aren't always necessary.22 19 */ 20 23 21 #staffing-engine-chatbot .rwc-embed-thumb { 22 background-color: var(--widgetColor) !important; 24 23 border-radius: 50% !important; 25 24 box-shadow: 0 5px 25px 0 rgba(0,0,0,.13) !important; 26 25 transition: transform .4s,opacity .4s,visibility .4s,-webkit-transform .4s !important; 26 border: none !important; 27 outline: none !important; 28 padding: 0 !important; 29 } 30 31 #staffing-engine-chatbot .rwc-embed-welcome__btn button { 32 color: #fff !important; 33 background: var(--widgetColor) !important; 34 border: 1px solid var(--rwcTheme) !important; 35 border-color: var(--widgetColor) !important; 36 border-radius: 8px !important; 37 outline: none !important; 27 38 } 28 39 29 40 #staffing-engine-chatbot .rwc-embed-welcome__close { 41 position: absolute !important; 42 top: -7px !important; 43 right: -7px !important; 44 border: none !important; 30 45 border-radius: 50% !important; 31 46 -webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,.1) !important; … … 36 51 border-radius: 50% !important; 37 52 transition: background .15s ease !important; 53 background-color: rgba(0, 0, 0, 0.3) !important; 54 border: none !important; 55 outline: none !important; 56 padding: 0 !important; 57 color: #fff !important; 38 58 } -
staffing-engine-chatbot/tags/0.4.0/src/public/js/se-chatbot-admin.js
r2795262 r2802161 5 5 manageEnabled(); 6 6 manageInvitation(); 7 manageAutoExpand(); 7 8 } 8 9 … … 48 49 49 50 element.addEventListener(event, (event) => callback(event.target[key])); 51 } 52 53 function setFormElementVisibility(element, visible) { 54 !visible 55 ? element.classList.add('se-hide-form-input') 56 : element.classList.remove('se-hide-form-input'); 50 57 } 51 58 … … 106 113 ]; 107 114 108 if (!shown) { 109 for (let el of invitationElements) { 110 el.classList.add('se-hide-form-input'); 111 } 112 return; 113 } 114 115 for (let el of invitationElements) { 116 el.classList.remove('se-hide-form-input'); 115 for (const el of invitationElements) { 116 setFormElementVisibility(el, shown) 117 117 } 118 118 } 119 119 } 120 121 function manageAutoExpand() { 122 const autoExpandSelect = document.querySelector('#staffing_engine_chatbot-page select[id="auto_expand_enable"]'); 123 124 listenForEvent(autoExpandSelect, 'change', onChanged, 'value', true); 125 126 function onChanged(value) { 127 const autoExpandDelay = document.querySelector('#staffing_engine_chatbot-page input[id="auto_expand_delay"]').parentElement.parentElement 128 setFormElementVisibility(autoExpandDelay, value !== 'disable') 129 } 130 } 120 131 })(); -
staffing-engine-chatbot/tags/0.4.0/staffing-engine-chatbot.php
r2795262 r2802161 5 5 * @copyright (c) 2022 staffing Engine 6 6 * @license GPL-3.0-or-later 7 * @version 0. 3.07 * @version 0.4.0 8 8 * 9 9 * @wordpress-plugin … … 15 15 * License: GPL v3 or later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html 17 * Version: 0. 3.017 * Version: 0.4.0 18 18 * Requires at least: 5.5 19 19 * Requires PHP: 7.1 … … 41 41 } 42 42 43 define( 'SE_CHAT_VERSION', '0. 3.0' );43 define( 'SE_CHAT_VERSION', '0.4.0' ); 44 44 45 45 define( 'SE_CHAT_MIN_PHP', '7.1.0' ); -
staffing-engine-chatbot/trunk/readme.txt
r2795262 r2802161 4 4 - Donate Link: https://staffingengine.ai/ 5 5 - Tags: chatbot, live chat, AI, staffing, recruiting 6 - Stable tag: 0. 3.06 - Stable tag: 0.4.0 7 7 - Requires at least: 5.5 8 8 - Tested up to: 6.0.1 … … 48 48 - UI/UX improvements to plugin settings page 49 49 - Bug fixes 50 51 = 0.4.0 : 2022-10-20 = 52 53 - Better settings for auto expand functionality 54 - More fixes for guarding against overzealous wordpress themes 55 - Bug fixes -
staffing-engine-chatbot/trunk/src/bin/rational-option-pages.php
r2784220 r2802161 426 426 ! empty( $field['text'] ) ? esc_html( $field['text'] ) : '' // text 427 427 ); 428 if ( ! empty( $field['description'] ) ) { 429 printf( 430 '<p class="se-checkbox-description">%s</p>', 431 esc_html( $field['description'] ) 432 ); 433 } 428 434 break; 429 435 case 'media': … … 535 541 esc_attr( $field['type'] ), // type 536 542 esc_attr( $field['value'] ), // value 537 ! empty( $attributes ) ? esc_attr( implode( ' ', $attributes )) : '', // additional attributes543 ! empty( $attributes ) ? implode( ' ', $attributes ) : '', // additional attributes 538 544 ! empty( $field['text'] ) ? '<p class="help">' . esc_html( $field['text'] ) . '</p>' : '' // text 539 545 ); -
staffing-engine-chatbot/trunk/src/includes/admin.php
r2795262 r2802161 192 192 'fields' => array( 193 193 'position' => array( 194 'id' => 'position',195 'title' => __( 'Bot position', Plugin::SLUG ),196 'text' => __( 'Set the location of the bot on your site.', Plugin::SLUG ),197 'type' => 'select',198 'value' => 'bottom-right',199 'choices' => array(194 'id' => 'position', 195 'title' => __( 'Bot position', Plugin::SLUG ), 196 'text' => __( 'Set the location of the bot on your site.', Plugin::SLUG ), 197 'type' => 'select', 198 'value' => 'bottom-right', 199 'choices' => array( 200 200 'bottom-right' => __( 'Bottom Right', Plugin::SLUG ), 201 201 'bottom-left' => __( 'Bottom Left', Plugin::SLUG ), … … 221 221 'id' => 'animation', 222 222 'title' => __( 'Animation type', Plugin::SLUG ), 223 'text' => __( 'Choose an animation style to get the attention of site visitors.', Plugin::SLUG ),223 'text' => __( 'Choose an animation style to get the attention of site visitors.', Plugin::SLUG ), 224 224 'type' => 'select', 225 225 'value' => 'pulse', … … 270 270 'text' => __( 'Show the close icon on the popup. If disabled, it cannot be dismissed.', Plugin::SLUG ), 271 271 'type' => 'radio', 272 'value' => 'yes',272 'value' => 'yes', 273 273 'choices' => array( 274 274 'yes' => __( 'Show', Plugin::SLUG), … … 277 277 ), 278 278 'inviteTimeout' => array( 279 'id' => 'invite_timeout', 280 'title' => __( 'Invite Timeout', Plugin::SLUG ), 281 'text' => __( 'Set how long until the popup appears (in seconds)', Plugin::SLUG ), 282 'type' => 'number', 283 'value' => 6, 279 'id' => 'invite_timeout', 280 'title' => __( 'Invite Timeout', Plugin::SLUG ), 281 'text' => __( 'Set how long until the popup appears (in seconds)', Plugin::SLUG ), 282 'type' => 'number', 283 'value' => 6, 284 'attributes' => array( 285 'min' => 1, 286 'max' => 60, 287 ) 288 ), 289 ), 290 ), 291 'autoExpand' => array( 292 'title' => __( 'Auto Expand', Plugin::SLUG), 293 'text' => __( 'Automatically expand the chatbot sometime after the site has loaded', Plugin::SLUG ), 294 'fields' => array( 295 'autoExpandEnable' => array( 296 'id' => 'auto_expand_enable', 297 'title' => __( 'Enable Auto Expand', Plugin::SLUG ), 298 'text' => __( 'Auto Expand will automatically open the chatbot window after a set amount of time. Use "Enable, excluding small screens" to prevent auto expand from taking over the entire site on mobile devices.', Plugin::SLUG ), 299 'type' => 'select', 300 'value' => 'disable', 301 'choices' => array( 302 'disable' => __( 'Disable', Plugin::SLUG ), 303 'enable-not-mobile' => __( 'Enable, excluding small screens', Plugin::SLUG ), 304 'enable' => __( 'Enable', Plugin::SLUG ), 305 ), 306 ), 307 'autoExpandDelay' => array( 308 'id' => 'auto_expand_delay', 309 'title' => __( 'Auto Expand Delay', Plugin::SLUG ), 310 'text' => __( 'How long to wait (in seconds) before the chatbot window automatically opens.', Plugin::SLUG ), 311 'type' => 'number', 312 'value' => 5, 313 'attributes' => array( 314 'min' => 1, 315 'max' => 60, 316 ) 284 317 ), 285 318 ), … … 287 320 'behavior' => array( 288 321 'title' => __( 'Behavior', Plugin::SLUG), 289 'text' => __( 'Customize the chat widget\'s behavior', Plugin::SLUG ),322 'text' => __( 'Customize how the chatbot acts under certain conditions', Plugin::SLUG ), 290 323 'fields' => array( 291 'autoExpandDelay' => array(292 'id' => 'auto_expand_delay',293 'title' => __( 'Auto Expand Delay', Plugin::SLUG ),294 'text' => __( 'How long to wait (in seconds) before the chatbot window automatically opens. Set to 0 to disable auto expand.', Plugin::SLUG ),295 'type' => 'number',296 'value' => 0,297 ),298 324 'allowStartNewConversation' => array( 299 325 'id' => 'allow_start_new_conversation', … … 301 327 'text' => __( 'Set whether site visitors can start a new conversation or are required to pick up from a previous conversation, if one exists.', Plugin::SLUG ), 302 328 'type' => 'radio', 303 'value' => 'yes',304 'choices' => array(329 'value' => 'yes', 330 'choices' => array( 305 331 'yes' => __( 'Allow', Plugin::SLUG), 306 332 'no' => __( 'Don\'t Allow', Plugin::SLUG ), -
staffing-engine-chatbot/trunk/src/includes/embed.php
r2795262 r2802161 129 129 ?> 130 130 <script> 131 const IS_MOBILE = window.innerWidth <= 768; 132 133 const handleAutoExpand = (config, autoExpandState) => { 134 if (autoExpandState === 'disable') { 135 config.autoExpandDelay = 0; 136 } else if (autoExpandState === 'enable-not-mobile' && IS_MOBILE) { 137 config.autoExpandDelay = 0; 138 } 139 }; 140 131 141 const config = <?php echo json_encode( self::$final_options ); ?>; 142 const autoExpandState = <?php echo json_encode( self::$options['auto_expand_enable'] ); ?>; 143 144 handleAutoExpand(config, autoExpandState); 132 145 133 146 const staffingEngineChatConfig = Object.assign(config, { … … 183 196 "inviteTimeout" => array_key_exists( 'invite_timeout', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['invite_timeout'] ) . '000' ) : 5000, 184 197 "showCloseIcon" => array_key_exists( 'invite_show_close_icon', self::$options ) ? $this->parse_radio_setting( esc_attr( self::$options['invite_show_close_icon'] ), true ) : true, 185 "autoExpandDelay" => array_key_exists( 'auto_expand_delay', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['auto_expand_delay'] ) . '000' ) : 0,198 "autoExpandDelay" => array_key_exists( 'auto_expand_delay', self::$options ) ? $this->parse_ms_setting( esc_attr( self::$options['auto_expand_delay'] ) . '000' ) : '0', 186 199 "allowStartNewConversation" => array_key_exists( 'allow_start_new_conversation', self::$options ) ? $this->parse_radio_setting( esc_attr( self::$options['allow_start_new_conversation'] ), true ) : true, 187 200 ]; -
staffing-engine-chatbot/trunk/src/public/css/se-chatbot-admin.css
r2795262 r2802161 34 34 } 35 35 36 #staffing_engine_chatbot-page .se-checkbox-description { 37 margin-top: 8px; 38 } 39 36 40 #staffing_engine_chatbot-page .se-alert-message { 37 41 background-color: #fef08a; -
staffing-engine-chatbot/trunk/src/public/css/se-chatbot.css
r2785528 r2802161 17 17 * the rwc iframe. This is particularly a problem with themes like salient 18 18 * that use `!important` on generic elements like `button`. 19 *20 * TODO: We might consider only loading these on demand, or as an option to "resolve21 * common theme conflicts" or something since they aren't always necessary.22 19 */ 20 23 21 #staffing-engine-chatbot .rwc-embed-thumb { 22 background-color: var(--widgetColor) !important; 24 23 border-radius: 50% !important; 25 24 box-shadow: 0 5px 25px 0 rgba(0,0,0,.13) !important; 26 25 transition: transform .4s,opacity .4s,visibility .4s,-webkit-transform .4s !important; 26 border: none !important; 27 outline: none !important; 28 padding: 0 !important; 29 } 30 31 #staffing-engine-chatbot .rwc-embed-welcome__btn button { 32 color: #fff !important; 33 background: var(--widgetColor) !important; 34 border: 1px solid var(--rwcTheme) !important; 35 border-color: var(--widgetColor) !important; 36 border-radius: 8px !important; 37 outline: none !important; 27 38 } 28 39 29 40 #staffing-engine-chatbot .rwc-embed-welcome__close { 41 position: absolute !important; 42 top: -7px !important; 43 right: -7px !important; 44 border: none !important; 30 45 border-radius: 50% !important; 31 46 -webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,.1) !important; … … 36 51 border-radius: 50% !important; 37 52 transition: background .15s ease !important; 53 background-color: rgba(0, 0, 0, 0.3) !important; 54 border: none !important; 55 outline: none !important; 56 padding: 0 !important; 57 color: #fff !important; 38 58 } -
staffing-engine-chatbot/trunk/src/public/js/se-chatbot-admin.js
r2795262 r2802161 5 5 manageEnabled(); 6 6 manageInvitation(); 7 manageAutoExpand(); 7 8 } 8 9 … … 48 49 49 50 element.addEventListener(event, (event) => callback(event.target[key])); 51 } 52 53 function setFormElementVisibility(element, visible) { 54 !visible 55 ? element.classList.add('se-hide-form-input') 56 : element.classList.remove('se-hide-form-input'); 50 57 } 51 58 … … 106 113 ]; 107 114 108 if (!shown) { 109 for (let el of invitationElements) { 110 el.classList.add('se-hide-form-input'); 111 } 112 return; 113 } 114 115 for (let el of invitationElements) { 116 el.classList.remove('se-hide-form-input'); 115 for (const el of invitationElements) { 116 setFormElementVisibility(el, shown) 117 117 } 118 118 } 119 119 } 120 121 function manageAutoExpand() { 122 const autoExpandSelect = document.querySelector('#staffing_engine_chatbot-page select[id="auto_expand_enable"]'); 123 124 listenForEvent(autoExpandSelect, 'change', onChanged, 'value', true); 125 126 function onChanged(value) { 127 const autoExpandDelay = document.querySelector('#staffing_engine_chatbot-page input[id="auto_expand_delay"]').parentElement.parentElement 128 setFormElementVisibility(autoExpandDelay, value !== 'disable') 129 } 130 } 120 131 })(); -
staffing-engine-chatbot/trunk/staffing-engine-chatbot.php
r2795262 r2802161 5 5 * @copyright (c) 2022 staffing Engine 6 6 * @license GPL-3.0-or-later 7 * @version 0. 3.07 * @version 0.4.0 8 8 * 9 9 * @wordpress-plugin … … 15 15 * License: GPL v3 or later 16 16 * License URI: https://www.gnu.org/licenses/gpl-3.0.en.html 17 * Version: 0. 3.017 * Version: 0.4.0 18 18 * Requires at least: 5.5 19 19 * Requires PHP: 7.1 … … 41 41 } 42 42 43 define( 'SE_CHAT_VERSION', '0. 3.0' );43 define( 'SE_CHAT_VERSION', '0.4.0' ); 44 44 45 45 define( 'SE_CHAT_MIN_PHP', '7.1.0' );
Note: See TracChangeset
for help on using the changeset viewer.