| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @version 1.0 |
| 4 | 4 | * @package Booking Calendar |
| @@ -16,17 +16,25 @@ | ||
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | // <editor-fold defaultstate="collapsed" desc=" == Welcome Content 2 == 2024-11-06 " > |
| 19 | 19 | |
| 20 | -function wpbc_welcome_panel() { | |
| 21 | - | |
| 22 | - if ( ! wpbc_is_user_can_access_wizard_page() ){ | |
| 23 | - return; | |
| 24 | - } | |
| 25 | - | |
| 26 | - ?><script type="text/javascript"> | |
| 27 | - jQuery( document ).ready( function (){ | |
| 28 | - setTimeout( function (){ | |
| 20 | +function wpbc_welcome_panel() { | |
| 21 | + | |
| 22 | + if ( ! wpbc_is_user_can_access_wizard_page() ){ | |
| 23 | + return; | |
| 24 | + } | |
| 25 | + | |
| 26 | + $is_live_demo = wpbc_is_this_demo(); | |
| 27 | + | |
| 28 | + ?><script type="text/javascript"> | |
| 29 | + jQuery( document ).ready( function (){ | |
| 30 | + jQuery( document ).on( 'click.wpbcWelcomePanelDemo', '[data-wpbc-welcome-panel-demo-dismiss]', function () { | |
| 31 | + jQuery( '#wpbc_welcome_panel__version2' ).slideUp( 500 ); | |
| 32 | + } ); | |
| 33 | + setTimeout( function (){ | |
| 34 | + if ( jQuery( '[data-wpbc-booking-pages-open-dialog]' ).length ) { | |
| 35 | + return; | |
| 36 | + } | |
| 29 | 37 | if ( jQuery( '#wpbc_welcome_panel__version2' ).is( ':visible' ) ){ |
| 30 | 38 | jQuery( '#wpbc_welcome_panel__version2' ).slideUp( 1000 ); |
| 31 | 39 | } |
| 32 | 40 | }, 60000 ); |
| @@ -31,27 +39,45 @@ | ||
| 31 | 39 | } |
| 32 | 40 | }, 60000 ); |
| 33 | 41 | } ); |
| 34 | 42 | </script> |
| 35 | - <div id="wpbc_welcome_panel__version2" style="display:none;"> | |
| 36 | - <?php | |
| 37 | - $is_panel_visible = wpbc_is_dismissed( 'wpbc_welcome_panel__version2', array( | |
| 38 | - 'title' => '<i class="menu_icon icon-1x wpbc_icn_close"></i> ', | |
| 39 | - 'hint' => __( 'Dismiss', 'booking' ), | |
| 40 | - 'class' => 'wpbc_panel_get_started_dismiss0', | |
| 41 | - 'css' => 'text-decoration: none;font-weight: 600;float:right;background: #fff;border-radius: 7px;z-index: 1;position: relative;margin: 16px 15px 0 -32px;' | |
| 42 | - )); | |
| 43 | - if ( $is_panel_visible ) { | |
| 44 | - wpbc_welcome_panel__version2__content(); | |
| 45 | - } | |
| 43 | + <div id="wpbc_welcome_panel__version2" style="display:<?php echo esc_attr( $is_live_demo ? 'block' : 'none' ); ?>;"> | |
| 44 | + <?php | |
| 45 | + if ( $is_live_demo ) { | |
| 46 | + $is_panel_visible = true; | |
| 47 | + ?> | |
| 48 | + <button | |
| 49 | + type="button" | |
| 50 | + class="wpbc_panel_get_started_dismiss0 wpbc_welcome_panel__dismiss" | |
| 51 | + data-wpbc-welcome-panel-demo-dismiss="1" | |
| 52 | + aria-label="<?php esc_attr_e( 'Dismiss', 'booking' ); ?>" | |
| 53 | + title="<?php esc_attr_e( 'Dismiss', 'booking' ); ?>" | |
| 54 | + > | |
| 55 | + <i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i> | |
| 56 | + </button> | |
| 57 | + <?php | |
| 58 | + } else { | |
| 59 | + $is_panel_visible = wpbc_is_dismissed( | |
| 60 | + 'wpbc_welcome_panel__version2', | |
| 61 | + array( | |
| 62 | + 'title' => '<i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'booking' ) . '</span>', | |
| 63 | + 'hint' => __( 'Dismiss', 'booking' ), | |
| 64 | + 'class' => 'wpbc_panel_get_started_dismiss0 wpbc_welcome_panel__dismiss', | |
| 65 | + 'css' => '', | |
| 66 | + ) | |
| 67 | + ); | |
| 68 | + } | |
| 69 | + if ( $is_panel_visible ) { | |
| 70 | + wpbc_welcome_panel__version2__content(); | |
| 71 | + } | |
| 46 | 72 | ?> |
| 47 | 73 | </div><?php |
| 48 | 74 | } |
| 49 | 75 | |
| 50 | -function wpbc_welcome_panel__version2__content() { | |
| 76 | +function wpbc_welcome_panel__version2__content() { | |
| 77 | + | |
| 78 | + ?><div class="wpbc_welcome_panel"><?php | |
| 51 | 79 | |
| 52 | - ?><div class="wpbc_welcome_panel" style="margin: 1px 0 20px;"><?php | |
| 53 | - | |
| 54 | 80 | wpbc_ui_settings__panel__welcome(); |
| 55 | 81 | |
| 56 | 82 | ?></div><?php |
| 57 | 83 | } |
| @@ -65,83 +91,46 @@ | ||
| 65 | 91 | * Show Settings Statistic | Agenda Panel |
| 66 | 92 | * |
| 67 | 93 | * @return void |
| 68 | 94 | */ |
| 69 | -function wpbc_ui_settings__panel__welcome(){ | |
| 95 | +function wpbc_ui_settings__panel__welcome(){ | |
| 96 | + | |
| 97 | + ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__welcome"><?php | |
| 70 | 98 | |
| 71 | - | |
| 72 | - ?><style type="text/css"> | |
| 73 | - .wpbc_ui_settings__panel__welcome .wpbc_ajx_toolbar.wpbc_no_borders{ | |
| 74 | - margin-top: 5px !important; | |
| 75 | - } | |
| 76 | - .wpbc_ui_settings__panel__welcome .wpbc_ui_settings__card_text_small h1{ | |
| 77 | - line-height: 1.2; | |
| 78 | - margin: 0; | |
| 79 | - } | |
| 80 | - .wpbc_ui_settings__panel__welcome .about-description { | |
| 81 | - flex: 100%; | |
| 82 | - margin: 0; | |
| 83 | - color: #8a8a8a; | |
| 84 | - font-size: 20px; | |
| 85 | - font-weight: 600; | |
| 86 | - border-bottom: 1px solid #eee; | |
| 87 | - padding: 10px 20px; | |
| 88 | - } | |
| 89 | - .wpbc_ui_settings__panel__welcome .wpbc_ajx_toolbar .ui_container.ui_container_small .ui_group .ui_element .wpbc_ui_button { | |
| 90 | - white-space: wrap; | |
| 91 | - flex-flow: row nowrap; | |
| 92 | - height: auto; | |
| 93 | - padding: 5px 15px; | |
| 94 | - line-height: 1.74; | |
| 95 | - } | |
| 96 | - .wpbc_ui_settings__panel__welcome .wpbc_ui_settings__panel h1 { | |
| 97 | - margin: 0; | |
| 98 | - } | |
| 99 | - </style><?php | |
| 100 | - | |
| 101 | - ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__welcome"><?php | |
| 102 | - | |
| 103 | 99 | wpbc_ui_settings__panel_start(); |
| 104 | 100 | |
| 105 | 101 | wpbc_ui_settings__panel__welcome__header(); |
| 106 | 102 | |
| 107 | - // wpbc_ui_settings_panel__card__setup_wizard(); | |
| 108 | 103 | |
| 109 | - wpbc_ui_settings_panel__card__version( array( 'is_show_wizard_button' => true ) ); | |
| 104 | + wpbc_ui_settings_panel__card__open_test_pages_popup(); | |
| 110 | 105 | |
| 111 | - if ( ! empty( wpbc_stp_wiz__is_exist_published_page_with_booking_form() ) ) { | |
| 112 | - wpbc_ui_settings_panel__card__publish_into_exist( array() ); | |
| 113 | - } | |
| 106 | + wpbc_ui_settings_panel__card__setup_wizard(); | |
| 114 | 107 | |
| 108 | + wpbc_ui_settings_panel__card__version(); | |
| 115 | 109 | |
| 116 | - //Info: If needs to show "Shortcode Popup Dialog" and create new Pages, please uncomment all rows marked with: // FixIn: 10.6.6.2. | |
| 117 | - // wpbc_ui_settings_panel__card__publish_into_new( array() ); // FixIn: 10.6.6.2. | |
| 118 | - | |
| 119 | 110 | ?><div style="flex:100%;border-bottom: 1px solid #eeeff1;"></div><?php // Divider |
| 120 | 111 | |
| 121 | - | |
| 122 | 112 | wpbc_ui_settings_panel__card__integreate_into_new(); |
| 123 | 113 | wpbc_ui_settings_panel__card__shortcodes_help(); |
| 124 | 114 | wpbc_ui_settings_panel__card__welcome__have_questions(); |
| 125 | 115 | |
| 126 | 116 | //wpbc_ui_settings_panel__card__welcome__next_steps(); |
| 117 | + wpbc_ui_settings__panel_end(); | |
| 127 | 118 | |
| 128 | - | |
| 129 | - | |
| 130 | - | |
| 131 | - | |
| 132 | - wpbc_ui_settings__panel_end(); | |
| 133 | - | |
| 134 | 119 | ?></div><?php |
| 135 | 120 | } |
| 136 | 121 | |
| 137 | 122 | |
| 138 | - function wpbc_ui_settings__panel__welcome__header() { | |
| 123 | + function wpbc_ui_settings__panel__welcome__header() { | |
| 124 | + | |
| 125 | + ?><div class="wpbc_ui_settings__panel__welcome_header"> | |
| 126 | + <p class="about-description"><?php esc_html_e( 'We’ve assembled some links to get you started:', 'booking' ); ?></p> | |
| 127 | + </div><?php | |
| 128 | + } | |
| 139 | 129 | |
| 140 | - ?><p class="about-description"><?php esc_html_e( 'We’ve assembled some links to get you started:', 'booking' ); ?></p><?php | |
| 141 | - } | |
| 142 | 130 | |
| 143 | 131 | |
| 132 | + | |
| 144 | 133 | /** |
| 145 | 134 | * Show == Dashboard Card - integreate into new == |
| 146 | 135 | * |
| 147 | 136 | * @return void |
| @@ -275,9 +264,9 @@ | ||
| 275 | 264 | ?></div></li> |
| 276 | 265 | <li><div class="welcome-icon"><?php |
| 277 | 266 | /* translators: 1: ... */ |
| 278 | 267 | echo esc_html( sprintf( __( 'Configure %1$sForm Fields%2$s, %3$sEmails%4$s and other %5$sSettings%6$s.', 'booking' ) |
| 279 | - , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=form' ) . '">', '</a>' | |
| 268 | + , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=builder_booking_form' ) . '">', '</a>' | |
| 280 | 269 | , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=email' ) . '">', '</a>' |
| 281 | 270 | , '<a href="' . esc_url( wpbc_get_settings_url(true, false) ) . '">', '</a>' |
| 282 | 271 | ) ); |
| 283 | 272 | ?></div></li> |