Plugin Directory

Changeset 3475331


Ignore:
Timestamp:
03/05/2026 08:57:13 AM (3 weeks ago)
Author:
turboaddons
Message:

update overright menu and optimized modal

Location:
header-footer-builder-for-elementor
Files:
285 added
8 edited

Legend:

Unmodified
Added
Removed
  • header-footer-builder-for-elementor/trunk/README.MD

    r3462382 r3475331  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv3 
    99License URI: https://opensource.org/licenses/GPL-3.0 
     
    170170
    171171== Changelog ==
     172== 1.1.2 ==
     173- Performance: Instant modal loading with pre-cached data (no AJAX delay)
     174- Performance: No page reload after saving - instant updates
     175- UX: Real-time save feedback with "Saving..." and "✓ Saved" states
     176- Fix: Mobile menu z-index - dropdown now appears above content
     177- Fix: Header z-index when sticky/animation disabled
     178- Fix: Elementor preview mode rendering for templates
     179- Security: Enhanced nonce verification
     180
     181
    172182== 1.1.1 ==
    173183- Fix: Solved error with header/footer templates not rendering in Elementor preview mode—no more blank headers/footers when editing templates.
  • header-footer-builder-for-elementor/trunk/assets/css/navigation-menu-hf.css

    r3437017 r3475331  
    269269}
    270270
     271.tahefobu-mobile-nav-menu-container {
     272    position: relative;
     273    z-index: 99999;
     274}
     275
    271276.tahefobu-mobile-nav-menu:not(.tahefobu-mobile-mega-menu) {
    272277    position: absolute;
    273     z-index: 9999;
     278    z-index: 99999;
     279    background: inherit;
    274280}
    275281
    276282.tahefobu-mobile-menu-full-width .tahefobu-mobile-mega-menu-wrap {
    277283    width: 100vw;
     284}
     285
     286.tahefobu-mobile-nav-menu {
     287    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
     288}
     289
     290.tahefobu-mobile-nav-menu:not(.tahefobu-mobile-mega-menu) {
     291    min-width: 200px;
    278292}
    279293
     
    397411    display: block;
    398412    width: 100%;
     413    transition: all 0.3s ease;
    399414}
    400415
    401416.tahefobu-mobile-toggle-line:last-child {
    402417    margin-bottom: 0 !important;
     418}
     419
     420/* Transform hamburger to cross icon when menu is open */
     421.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(1) {
     422    transform: rotate(45deg) translate(5px, 5px);
     423}
     424
     425.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(2) {
     426    opacity: 0;
     427}
     428
     429.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(3) {
     430    transform: rotate(-45deg) translate(5px, -5px);
    403431}
    404432
     
    415443    width: 78%;
    416444    margin-left: 24%;
     445    transition: all 0.3s ease;
    417446}
    418447
     
    420449    width: 45%;
    421450    margin-left: 57%;
     451    transition: all 0.3s ease;
     452}
     453
     454.tahefobu-mobile-toggle-v2.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(2),
     455.tahefobu-mobile-toggle-v2.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(3) {
     456    width: 100%;
     457    margin-left: 0;
    422458}
    423459
     
    425461    width: 75%;
    426462    margin-left: 15%;
     463    transition: all 0.3s ease;
     464}
     465
     466.tahefobu-mobile-toggle-v3.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(2) {
     467    width: 100%;
     468    margin-left: 0;
    427469}
    428470
     
    431473    width: 75%;
    432474    margin-left: 25%;
     475    transition: all 0.3s ease;
    433476}
    434477
     
    436479    width: 75%;
    437480    margin-right: 25%;
     481    transition: all 0.3s ease;
     482}
     483
     484.tahefobu-mobile-toggle-v4.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(1),
     485.tahefobu-mobile-toggle-v4.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(2),
     486.tahefobu-mobile-toggle-v4.tahefobu-mobile-toggle-open .tahefobu-mobile-toggle-line:nth-child(3) {
     487    width: 100%;
     488    margin-left: 0;
     489    margin-right: 0;
    438490}
    439491
  • header-footer-builder-for-elementor/trunk/assets/css/turbo-header-style.css

    r3368800 r3475331  
    11/* header style  */
     2
     3/* Base header z-index - ensures header is always above content even without sticky/animation */
     4.turbo-header-template,
     5#tahefobu-header {
     6    position: relative;
     7    z-index: 9999;
     8}
     9
    210/* Sticky Header */
    311.ta-sticky-header {
  • header-footer-builder-for-elementor/trunk/assets/js/navigation-menu-hf.js

    r3406564 r3475331  
    147147
    148148                // Show Menu
    149                 $(this).parent().next().stop().slideToggle();
     149                    $(this).parent().next().stop().slideToggle();       
    150150
    151151                // Fix Width
  • header-footer-builder-for-elementor/trunk/assets/js/turbo-header-template-popup.js

    r3456366 r3475331  
    3838    // 3. Create template via AJAX
    3939    $('#tahefobu-create-template').on('click', function () {
     40    const $button = $(this);
    4041    const title = $('#tahefobu-header-template-title').val().trim();
    4142    const includePages = $('#tahefobu_include_pages').val() || [];
     
    4950        return;
    5051    }
     52
     53    // Disable button and show loading state
     54    $button.prop('disabled', true).text('Creating...');
    5155
    5256    $.post(ajaxurl, {
     
    6165    }, function (response) {
    6266        if (response.success && response.data.edit_link) {
    63             window.location.href = response.data.edit_link;
     67            // Show success state briefly before redirect
     68            $button.text('✓ Created').addClass('button-primary');
     69            setTimeout(function() {
     70                window.location.href = response.data.edit_link;
     71            }, 500);
    6472        } else {
    6573            alert(response.data.message || 'Something went wrong.');
    66         }
     74            $button.prop('disabled', false).text('Create');
     75        }
     76    }).fail(function() {
     77        alert('Error creating template. Please try again.');
     78        $button.prop('disabled', false).text('Create');
    6779    });
    6880});
     
    93105    $(document).on('click', '.tahefobu-edit-conditions-button', function () {
    94106        const postId = $(this).data('post-id');
     107        const conditions = $(this).data('conditions');
     108       
    95109        $('#tahefobu_conditions_post_id').val(postId);
    96110       
    97         // Load existing conditions
    98         $.post(ajaxurl, {
    99             action: 'tahefobu_get_header_conditions',
    100             post_id: postId,
    101             _ajax_nonce: tahefobu_header_condition_nonce.nonce
    102         }, function (response) {
    103             if (response.success) {
    104                 const data = response.data;
    105                
    106                 // Set include pages
    107                 $('#tahefobu_edit_include_pages').val(data.include).trigger('change');
    108                
    109                 // Set exclude pages
    110                 $('#tahefobu_edit_exclude_pages').val(data.exclude).trigger('change');
    111                
    112                 // Set display targets
    113                 $('#tahefobu_edit_display_targets').val(data.display_targets).trigger('change');
    114                
    115                 // Set checkboxes
    116                 $('#tahefobu_edit_is_sticky').prop('checked', data.is_sticky == 1);
    117                 $('#tahefobu_edit_has_animation').prop('checked', data.has_animation == 1);
    118                
    119                 // Show modal
    120                 $('#tahefobu-conditions-modal').fadeIn();
    121             }
    122         });
     111        // Set values from cached data
     112        if (conditions) {
     113            // Set include pages
     114            $('#tahefobu_edit_include_pages').val(conditions.include || []).trigger('change');
     115           
     116            // Set exclude pages
     117            $('#tahefobu_edit_exclude_pages').val(conditions.exclude || []).trigger('change');
     118           
     119            // Set display targets
     120            $('#tahefobu_edit_display_targets').val(conditions.display_targets || []).trigger('change');
     121           
     122            // Set checkboxes
     123            $('#tahefobu_edit_is_sticky').prop('checked', conditions.is_sticky == 1);
     124            $('#tahefobu_edit_has_animation').prop('checked', conditions.has_animation == 1);
     125        }
     126       
     127        // Show modal immediately with data already loaded
     128        $('#tahefobu-conditions-modal').fadeIn();
    123129    });
    124130
     
    130136    // Save Edit Conditions
    131137    $('#tahefobu-save-condition-edit').on('click', function () {
     138        const $button = $(this);
    132139        const postId = $('#tahefobu_conditions_post_id').val();
    133140        const includePages = $('#tahefobu_edit_include_pages').val() || [];
     
    136143        const hasAnimation = $('#tahefobu_edit_has_animation').is(':checked') ? 1 : 0;
    137144        const displayTargets = $('#tahefobu_edit_display_targets').val() || [];
     145
     146        // Disable button and show loading state
     147        $button.prop('disabled', true).text('Saving...');
    138148
    139149        $.post(ajaxurl, {
     
    148158        }, function (response) {
    149159            if (response.success) {
    150                 $('#tahefobu-conditions-modal').fadeOut();
    151                 location.reload(); // Refresh to show updated data
     160                // Update the button's data attribute with new values
     161                const $editButton = $('.tahefobu-edit-conditions-button[data-post-id="' + postId + '"]');
     162                const newData = {
     163                    include: includePages.map(Number), // Convert to numbers
     164                    exclude: excludePages.map(Number), // Convert to numbers
     165                    is_sticky: isSticky,
     166                    has_animation: hasAnimation,
     167                    display_targets: displayTargets
     168                };
     169               
     170                // Update using jQuery data() method which updates the internal cache
     171                $editButton.data('conditions', newData);
     172               
     173                // Also update the attribute for persistence
     174                $editButton.attr('data-conditions', JSON.stringify(newData));
     175               
     176                // Show success feedback
     177                $button.text('✓ Saved').addClass('button-primary');
     178               
     179                // Close modal after short delay
     180                setTimeout(function() {
     181                    $('#tahefobu-conditions-modal').fadeOut();
     182                    $button.prop('disabled', false).text('Update').removeClass('button-primary');
     183                }, 800);
    152184            } else {
    153185                alert('Error saving conditions');
     186                $button.prop('disabled', false).text('Update');
    154187            }
     188        }).fail(function() {
     189            alert('Error saving conditions');
     190            $button.prop('disabled', false).text('Update');
    155191        });
    156192    });
  • header-footer-builder-for-elementor/trunk/header-footer-builder-for-elementor.php

    r3462382 r3475331  
    44 * Plugin URI: https://wp-turbo.com/header-footer-builder-for-elementor/
    55 * Description: Header Footer Builder for Elementor & WooCommerce. Easy, customizable plugin for headers/footers with display rules, sticky header & include/exclude.
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Requires Plugins: elementor
    88 * Author: turbo addons
     
    1111 * License URI: https://opensource.org/licenses/GPL-3.0
    1212 * Text Domain: header-footer-builder-for-elementor
    13  * Elementor tested up to: 3.35.0
    14  * Elementor Pro tested up to: 3.35.0  
     13 * Elementor tested up to: 3.35.6
     14 * Elementor Pro tested up to: 3.35.6 
    1515 */
    1616
     
    7272        if ( ! function_exists( 'hfbfe_fs' ) ) {
    7373            // Create a helper function for easy SDK access.
     74            // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- Freemius SDK function
    7475            function hfbfe_fs() {
     76                // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Freemius SDK variable
    7577                global $hfbfe_fs;
    7678
     
    7981                    require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
    8082
     83                    // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Freemius SDK variable
    8184                    $hfbfe_fs = fs_dynamic_init( array(
    8285                        'id'                  => '22909',
     
    134137           
    135138            // Signal that SDK was initiated.
     139            // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Freemius SDK hook
    136140            do_action( 'hfbfe_fs_loaded' );
    137141        }
     
    159163        define( 'TAHEFOBU_HEADER_FOOTER_BUILDER_FOR_ELEMENTOR_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) );
    160164        define( 'TAHEFOBU_HEADER_FOOTER_BUILDER_FOR_ELEMENTOR_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
    161         define( 'TAHEFOBU_HEADER_FOOTER_BUILDER_FOR_ELEMENTOR_PLUGIN_VERSION', '1.1.1' );
     165        define( 'TAHEFOBU_HEADER_FOOTER_BUILDER_FOR_ELEMENTOR_PLUGIN_VERSION', '1.1.2' );
    162166    }
    163167
     
    271275                false, // no file, just for inline use
    272276                [],
    273                 '1.1.1'
     277                '1.1.2'
    274278            );
    275279            wp_enqueue_style( 'tahefobu-frontend' );
  • header-footer-builder-for-elementor/trunk/header-footer-template/header-builder/turbo-header-template.php

    r3437017 r3475331  
    527527add_action('manage_tahefobu_header_posts_custom_column', function ($column, $post_id) {
    528528    if ($column === 'tahefobu_display_conditions') {
    529         echo '<button type="button" class="button tahefobu-edit-conditions-button" data-post-id="' . esc_attr($post_id) . '">'.esc_html__('Edit Conditions','header-footer-builder-for-elementor').'</button>';
     529        // Get all condition data
     530        $include = get_post_meta($post_id, '_tahefobu_include_pages', true) ?: [];
     531        $exclude = get_post_meta($post_id, '_tahefobu_exclude_pages', true) ?: [];
     532        $is_sticky = (int) get_post_meta($post_id, '_tahefobu_is_sticky', true);
     533        $has_animation = (int) get_post_meta($post_id, '_tahefobu_has_animation', true);
     534        $display_targets = get_post_meta($post_id, '_tahefobu_display_targets', true) ?: [];
     535       
     536        // Encode data as JSON for the button
     537        // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Not a query parameter, just data storage
     538        $data = [
     539            'include' => $include,
     540            'exclude' => $exclude,
     541            'is_sticky' => $is_sticky,
     542            'has_animation' => $has_animation,
     543            'display_targets' => $display_targets,
     544        ];
     545       
     546        echo '<button type="button" class="button tahefobu-edit-conditions-button"
     547            data-post-id="' . esc_attr($post_id) . '"
     548            data-conditions="' . esc_attr(wp_json_encode($data)) . '">'.esc_html__('Edit Conditions','header-footer-builder-for-elementor').'</button>';
    530549    }
    531550}, 10, 2);
  • header-footer-builder-for-elementor/trunk/widgets/navigation-menu-hf.php

    r3437017 r3475331  
    12541254                ],
    12551255                'default' => [
    1256                     'size' => 4,
     1256                    'size' => 3,
    12571257                ],
    12581258                'selectors' => [
     
    12751275                ],
    12761276                'default' => [
    1277                     'size' => 6,
     1277                    'size' => 5,
    12781278                ],
    12791279                'selectors' => [
     
    12951295                ],
    12961296                'default' => [
    1297                     'size' => 50,
     1297                    'size' => 45,
    12981298                ],
    12991299                'selectors' => [
Note: See TracChangeset for help on using the changeset viewer.