Changeset 2889178
- Timestamp:
- 03/29/2023 11:59:13 AM (3 years ago)
- Location:
- involve-me/trunk
- Files:
-
- 6 edited
-
assets/js/involveme-post-admin.js (modified) (5 diffs)
-
involveme.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/class-involvemepost.php (modified) (9 diffs)
-
views/embed.php (modified) (2 diffs)
-
views/settings.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
involve-me/trunk/assets/js/involveme-post-admin.js
r2794370 r2889178 27 27 toggleStopShowing(); 28 28 }); 29 30 $('input:checkbox[name=involveme_iframe_hide_once_viewed]').change(function() { 31 toggleHideViewedDuration(); 32 }); 33 34 $('input:checkbox[name=involveme_iframe_transparent_background]').change(function() { 35 toggleBackgroundColor(); 36 }); 37 29 38 $('select[name=involveme_iframe_show_popup_side]').change(function() { 30 39 onShowChange(); … … 42 51 var showElementsConfig = { 43 52 'standard':[ 53 'transparent_background', 44 54 'dynamic_height_resize', 45 55 'minimal_height', … … 109 119 'exit':[ 110 120 'stop_showing_once_completed', 121 'hide_once_viewed', 111 122 ], 112 123 'load':[ 113 'stop_showing_once_completed' 124 'stop_showing_once_completed', 125 'hide_once_viewed', 114 126 ], 115 127 'timer':[ 116 128 'stop_showing_once_completed', 129 'hide_once_viewed', 117 130 'trigger_delay' 118 131 ], 119 132 'fixedButton':[ 120 133 'stop_showing_once_completed', 134 'hide_once_viewed', 121 135 'icon_side', 122 136 'button_text', … … 142 156 toggleTimeDelay(); 143 157 toggleStopShowing(); 158 toggleBackgroundColor(); 159 toggleHideViewedDuration(); 144 160 } 145 161 … … 165 181 } 166 182 183 function toggleHideViewedDuration(){ 184 if ($('#involveme_iframe_hide_once_viewed').is(":checked") && $('#involveme_iframe_hide_once_viewed').is(":visible")) { 185 $('#involveme_iframe_hide_once_viewed_duration').parents('tr').show(); 186 $('#involveme_iframe_hide_once_viewed_warning').show(); 187 }else{ 188 $('#involveme_iframe_hide_once_viewed_duration').parents('tr').hide(); 189 $('#involveme_iframe_hide_once_viewed_warning').hide(); 190 } 191 } 192 193 function toggleBackgroundColor(){ 194 if ($('#involveme_iframe_transparent_background').is(":checked") && $('#involveme_iframe_transparent_background').is(":visible")) { 195 $('#involveme_iframe_background_color').parents('tr').hide(); 196 }else{ 197 $('#involveme_iframe_background_color').parents('tr').show(); 198 } 199 } 200 167 201 function getSelectedMode(){ 168 202 -
involve-me/trunk/involveme.php
r2794545 r2889178 8 8 * Text Domain: involveme 9 9 * Domain Path: /languages 10 * Version: 1.1. 310 * Version: 1.1.4 11 11 * 12 12 * @package Involveme -
involve-me/trunk/readme.txt
r2794553 r2889178 3 3 Tags: form builder, quiz maker, survey maker, funnel builder, form, survey, quiz, calculator, NPS, payment form 4 4 Requires at least: 4.5 5 Tested up to: 6. 0.25 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 99 99 == Changelog == 100 100 101 = 1.1.4 102 * Add transparent background option 103 * Add hide once viewed option 104 101 105 = 1.1.3 102 106 * Update name -
involve-me/trunk/src/class-involvemepost.php
r2794370 r2889178 142 142 $this->key('minimal_height') => 'auto', 143 143 $this->key('background_color') => '#ffffff', 144 $this->key('transparent_background') => false, 144 145 $this->key('dynamic_height_resize') => true, 145 146 $this->key('show_popup') => 'button', … … 148 149 $this->key('button_text') => '', 149 150 $this->key('close_popup_on_completion') => false, 151 $this->key('hide_once_viewed') => false, 152 $this->key('hide_once_viewed_duration') => 'indefinite', 150 153 $this->key('time_delay_to_close') => 5, 151 154 $this->key('icon') => 'speech-bubble', … … 167 170 $this->key('minimal_height') => $this->get_post_meta($post_id, 'minimal_height','auto'), 168 171 $this->key('background_color') => $this->get_post_meta($post_id, 'background_color', '#ffffff'), 172 $this->key('transparent_background') => $this->get_post_meta($post_id, 'transparent_background', false), 169 173 $this->key('dynamic_height_resize') => $this->get_post_meta($post_id, 'dynamic_height_resize', true), 170 174 $this->key('show_popup') => $this->get_post_meta($post_id, 'show_popup', 'button'), … … 173 177 $this->key('button_text') => $this->get_post_meta($post_id, 'button_text', 'Launch popup'), 174 178 $this->key('close_popup_on_completion') => $this->get_post_meta($post_id, 'close_popup_on_completion', false), 179 $this->key('hide_once_viewed') => $this->get_post_meta($post_id, 'hide_once_viewed', false), 180 $this->key('hide_once_viewed_duration') => $this->get_post_meta($post_id, 'hide_once_viewed_duration', 'indefinite'), 175 181 $this->key('time_delay_to_close') => $this->get_post_meta($post_id, 'time_delay_to_close', 5), 176 182 $this->key('icon') => $this->get_post_meta($post_id, 'icon', 'speech-bubble'), … … 346 352 update_post_meta($post_id, $this->key('minimal_height', '_'), $height); 347 353 348 $this->saveCheckboxFields(array('dynamic_height_resize' ),$post_id);354 $this->saveCheckboxFields(array('dynamic_height_resize','transparent_background'),$post_id); 349 355 } 350 356 … … 355 361 private function savePopup($post_id) 356 362 { 357 $this->saveTextFields(array('show_popup', 'popup_size', 'button_text', 'time_delay_to_close', 'stop_showing_duration',' trigger_delay'), $post_id);358 $this->saveCheckboxFields(array('close_popup_on_completion', 'stop_showing_once_completed' ), $post_id);363 $this->saveTextFields(array('show_popup', 'popup_size', 'button_text', 'time_delay_to_close', 'stop_showing_duration','hide_once_viewed_duration','trigger_delay'), $post_id); 364 $this->saveCheckboxFields(array('close_popup_on_completion', 'stop_showing_once_completed','hide_once_viewed'), $post_id); 359 365 } 360 366 … … 365 371 private function saveChatButton($post_id) 366 372 { 367 $this->saveTextFields(array('popup_size', 'icon', 'button_color', 'time_delay_to_close', 'stop_showing_duration',' trigger_delay'), $post_id);368 $this->saveCheckboxFields(array('stop_showing_once_completed','close_popup_on_completion' ), $post_id);373 $this->saveTextFields(array('popup_size', 'icon', 'button_color', 'time_delay_to_close', 'stop_showing_duration','hide_once_viewed_duration','trigger_delay'), $post_id); 374 $this->saveCheckboxFields(array('stop_showing_once_completed','close_popup_on_completion','hide_once_viewed'), $post_id); 369 375 } 370 376 … … 375 381 private function saveSidePanel($post_id) 376 382 { 377 $this->saveTextFields(array('show_popup_side','position','icon_side', 'button_color','popup_size', 'button_text', 'time_delay_to_close','stop_showing_duration', 'trigger_delay'), $post_id);378 $this->saveCheckboxFields(array('close_popup_on_completion','stop_showing_once_completed' ), $post_id);383 $this->saveTextFields(array('show_popup_side','position','icon_side', 'button_color','popup_size', 'button_text', 'time_delay_to_close','stop_showing_duration', 'hide_once_viewed_duration','trigger_delay'), $post_id); 384 $this->saveCheckboxFields(array('close_popup_on_completion','stop_showing_once_completed','hide_once_viewed'), $post_id); 379 385 } 380 386 … … 385 391 private function saveSideTab($post_id) 386 392 { 387 $this->saveTextFields(array('show_popup_side','position','icon_side', 'button_color','popup_size', 'button_text', 'time_delay_to_close', 'stop_showing_duration','trigger_delay' ), $post_id);388 $this->saveCheckboxFields(array('close_popup_on_completion','stop_showing_once_completed' ), $post_id);393 $this->saveTextFields(array('show_popup_side','position','icon_side', 'button_color','popup_size', 'button_text', 'time_delay_to_close', 'stop_showing_duration','trigger_delay', 'hide_once_viewed_duration'), $post_id); 394 $this->saveCheckboxFields(array('close_popup_on_completion','stop_showing_once_completed','hide_once_viewed'), $post_id); 389 395 } 390 396 -
involve-me/trunk/views/embed.php
r2794538 r2889178 3 3 <?php if(${InvolvemePost::$input_prefix . 'width'} != 'auto') echo 'data-width=' . esc_attr(${InvolvemePost::$input_prefix . 'width'}) ?> 4 4 <?php if(${InvolvemePost::$input_prefix . 'minimal_height'} != 'auto') echo 'data-min-height=' . esc_attr(${InvolvemePost::$input_prefix . 'minimal_height'}) ?> 5 <?php if(${InvolvemePost::$input_prefix . 'background_color'} && ${InvolvemePost::$input_prefix . 'background_color'} != '#ffffff') echo 'data-loadcolor=' . esc_attr(${InvolvemePost::$input_prefix . 'background_color'}) ?> 5 <?php if(${InvolvemePost::$input_prefix . 'background_color'} && ${InvolvemePost::$input_prefix . 'background_color'} != '#ffffff' && !${InvolvemePost::$input_prefix . 'transparent_background'}) echo 'data-loadcolor=' . esc_attr(${InvolvemePost::$input_prefix . 'background_color'}) ?> 6 <?php if(${InvolvemePost::$input_prefix . 'transparent_background'}) echo 'data-transparent-embed="true"' ?> 6 7 <?php if(!${InvolvemePost::$input_prefix . 'dynamic_height_resize'}) echo 'data-noresize="true"' ?> 7 8 <?php if(${InvolvemePost::$input_prefix . 'embed_mode'} == 'full-page' && !${InvolvemePost::$input_prefix . 'preview'}) echo 'data-embed-mode="fullscreen"' ?> … … 38 39 position: "<?php echo ${InvolvemePost::$input_prefix . 'position'} ?>", 39 40 <?php if(${InvolvemePost::$input_prefix . 'stop_showing_once_completed'}) echo 'stopShowingDuration:"'.${InvolvemePost::$input_prefix . 'stop_showing_duration'}.'",' ?> 41 <?php if(${InvolvemePost::$input_prefix . 'hide_once_viewed'}) echo 'hideAfterViewedFor:"'.${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}.'",' ?> 40 42 <?php if(${InvolvemePost::$input_prefix . 'close_popup_on_completion'}) echo 'closeOnCompletionTimer:"'.${InvolvemePost::$input_prefix . 'time_delay_to_close'}.'",' ?> 41 43 <?php if(${InvolvemePost::$input_prefix . 'show_popup_side'} ==='timer' && in_array(${InvolvemePost::$input_prefix . 'embed_mode'},array('sideTab','sidePanel'))) echo 'triggerTimer:"'.${InvolvemePost::$input_prefix . 'trigger_delay'}.'",' ?> -
involve-me/trunk/views/settings.php
r2794370 r2889178 47 47 <label title='<?php esc_attr_e('Standard', 'involveme'); ?>'> 48 48 <input 49 type="radio" <?php checked(${InvolvemePost::$input_prefix . 'embed_mode'}, 'standard'); ?>50 name="involveme_iframe_embed_mode" id="involveme_iframe_standard"51 value="standard" />49 type="radio" <?php checked(${InvolvemePost::$input_prefix . 'embed_mode'}, 'standard'); ?> 50 name="involveme_iframe_embed_mode" id="involveme_iframe_standard" 51 value="standard" /> 52 52 <span><?php esc_attr_e('Standard', 'involveme'); ?></span> 53 53 </label><br> … … 85 85 <td> 86 86 <input 87 id="involveme_iframe_dynamic_height_resize" <?php checked(${InvolvemePost::$input_prefix . 'dynamic_height_resize'}); ?>88 name="involveme_iframe_dynamic_height_resize" type="checkbox"89 class="involveme_setting"90 id="involveme_iframe_dynamic_height_resize" value="1"/>87 id="involveme_iframe_dynamic_height_resize" <?php checked(${InvolvemePost::$input_prefix . 'dynamic_height_resize'}); ?> 88 name="involveme_iframe_dynamic_height_resize" type="checkbox" 89 class="involveme_setting" 90 id="involveme_iframe_dynamic_height_resize" value="1"/> 91 91 </td> 92 92 </tr> … … 114 114 <td><select id="involveme_iframe_show_popup" 115 115 class="involveme_setting" 116 name="involveme_iframe_show_popup">116 name="involveme_iframe_show_popup"> 117 117 <option value="button" <?php selected(${InvolvemePost::$input_prefix . 'show_popup'}, 'button_click'); ?>> 118 118 <?php esc_attr_e('On button click', 'involveme'); ?> … … 284 284 ); ?></label></td> 285 285 <td><input id="involveme_iframe_trigger_delay" type="text" 286 name="involveme_iframe_trigger_delay"287 class="involveme_setting"288 value="<?php echo esc_attr(${InvolvemePost::$input_prefix . 'trigger_delay'}) ?>"/>286 name="involveme_iframe_trigger_delay" 287 class="involveme_setting" 288 value="<?php echo esc_attr(${InvolvemePost::$input_prefix . 'trigger_delay'}) ?>"/> 289 289 </td> 290 290 </tr> … … 335 335 name="involveme_iframe_stop_showing_duration"> 336 336 <option value="midnight" <?php selected(${InvolvemePost::$input_prefix . 'stop_showing_duration'}, 'midnight'); ?>> 337 <?php esc_attr_e('Midnight ', 'involveme'); ?>337 <?php esc_attr_e('Midnight in user’s local time', 'involveme'); ?> 338 338 </option> 339 339 <option value="24hours" <?php selected(${InvolvemePost::$input_prefix . 'stop_showing_duration'}, '24hours'); ?>> … … 357 357 </select> 358 358 359 </td> 360 </tr> 361 <tr valign="top"> 362 <td scope="row"><label for="involveme_iframe_hide_once_viewed"><?php esc_attr_e( 363 'Hide once viewed', 'involveme' 364 ); ?></label></td> 365 <td> 366 <input 367 id="involveme_iframe_hide_once_viewed" <?php checked(${InvolvemePost::$input_prefix . 'hide_once_viewed'}); ?> 368 name="involveme_iframe_hide_once_viewed" type="checkbox" 369 class="involveme_setting" id="involveme_iframe_hide_once_viewed" value="1"/> 370 <small id="involveme_iframe_hide_once_viewed_warning" class="warning" style="padding-bottom: 5px; display: inline-block"><?php esc_attr_e( 371 'This feature requires a Professional subscription or higher plan.', 'involveme' 372 ); ?></small> 373 </td> 374 </tr> 375 <tr valign="top"> 376 <td scope="row"><label for="involveme_iframe_hide_once_viewed_duration"><?php esc_attr_e( 377 'Duration', 'involveme' 378 ); ?></label></td> 379 <td><select id="involveme_iframe_hide_once_viewed_duration" 380 class="involveme_setting" 381 name="involveme_iframe_hide_once_viewed_duration"> 382 <option value="midnight" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, 'midnight'); ?>> 383 <?php esc_attr_e('Midnight in user’s local time', 'involveme'); ?> 384 </option> 385 <option value="24hours" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, '24hours'); ?>> 386 <?php esc_attr_e('24 Hours', 'involveme'); ?> 387 </option> 388 <option value="7days" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, '7days'); ?>> 389 <?php esc_attr_e('7 Days', 'involveme'); ?> 390 </option> 391 <option value="14days" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, '14days'); ?>> 392 <?php esc_attr_e('14 Days', 'involveme'); ?> 393 </option> 394 <option value="30days" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, '30days'); ?>> 395 <?php esc_attr_e('30 Days', 'involveme'); ?> 396 </option> 397 <option value="60days" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, '60days'); ?>> 398 <?php esc_attr_e('60 Days', 'involveme'); ?> 399 </option> 400 <option value="notes" <?php selected(${InvolvemePost::$input_prefix . 'hide_once_viewed_duration'}, 'indefinite'); ?>> 401 <?php esc_attr_e('Indefinite', 'involveme'); ?> 402 </option> 403 </select> 404 405 </td> 406 </tr> 407 <tr valign="top"> 408 <td scope="row"><label for="involveme_iframe_transparent_background"><?php esc_attr_e( 409 'Transparent Background', 'involveme' 410 ); ?></label></td> 411 <td> 412 <input 413 id="involveme_iframe_transparent_background" <?php checked(${InvolvemePost::$input_prefix . 'transparent_background'}); ?> 414 name="involveme_iframe_transparent_background" type="checkbox" 415 class="involveme_setting" id="involveme_iframe_transparent_background" value="1"/> 359 416 </td> 360 417 </tr>
Note: See TracChangeset
for help on using the changeset viewer.