Plugin Directory

Changeset 3439349


Ignore:
Timestamp:
01/14/2026 09:41:30 AM (3 months ago)
Author:
rankauthority
Message:

Design fix, toggle fix

Location:
rank-authority
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • rank-authority/tags/1.0.3/rank-authority.php

    r3439340 r3439349  
    194194        }
    195195
    196         .rank-authority-status-banner:hover {
     196        .rank-authority-status-banner:hover:not(.active) {
    197197            background: #f8fafc;
    198198        }
     
    200200        .rank-authority-status-banner.active {
    201201            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
     202        }
     203
     204        .rank-authority-status-banner.active:hover {
     205            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    202206        }
    203207
     
    236240            transition: background 0.3s;
    237241            flex-shrink: 0;
     242            pointer-events: auto;
    238243        }
    239244
     
    500505            margin-right: 8px;
    501506            animation: rank-authority-pulse 2s infinite;
     507            display: inline-block;
    502508        }
    503509
     
    644650                            <p id="rank-authority-status-desc"><?php echo $script_enabled === '1' ? 'Your site is being monitored' : 'Click to enable tracking scripts'; ?></p>
    645651                        </div>
    646                         <div class="rank-authority-big-toggle">
     652                        <label class="rank-authority-big-toggle" for="ra_script_enabled" style="cursor: pointer;">
    647653                            <div class="rank-authority-toggle-knob" style="<?php echo $script_enabled === '1' ? 'transform: translateX(36px);' : ''; ?>"></div>
    648                         </div>
     654                        </label>
    649655                        <input
    650656                            type="checkbox"
     
    784790            const checkbox = document.getElementById('ra_script_enabled');
    785791            const form = document.getElementById('rank-authority-settings-form');
     792            const toggleLabel = statusBanner ? statusBanner.querySelector('.rank-authority-big-toggle') : null;
    786793           
    787             if (statusBanner && checkbox) {
     794            if (statusBanner && checkbox && form) {
     795                // Handle click on banner (but not on toggle label itself)
    788796                statusBanner.addEventListener('click', function(e) {
    789                     // Don't submit if clicking the toggle itself
     797                    // If clicking the toggle label, let it handle the click
    790798                    if (e.target.closest('.rank-authority-big-toggle')) {
    791799                        return;
    792800                    }
    793801                   
     802                    e.preventDefault();
     803                    e.stopPropagation();
     804                   
     805                    // Toggle checkbox
    794806                    checkbox.checked = !checkbox.checked;
    795807                   
    796                     // Auto-submit form when toggling
    797                     if (form) {
     808                    // Submit form
     809                    form.submit();
     810                });
     811               
     812                // Handle click on toggle label
     813                if (toggleLabel) {
     814                    toggleLabel.addEventListener('click', function(e) {
     815                        e.preventDefault();
     816                        e.stopPropagation();
     817                       
     818                        // Toggle checkbox
     819                        checkbox.checked = !checkbox.checked;
     820                       
     821                        // Submit form
    798822                        form.submit();
    799                     }
    800                 });
     823                    });
     824                }
    801825            }
    802826        })();
  • rank-authority/trunk/rank-authority.php

    r3439340 r3439349  
    44 * Plugin URI: https://rankauthority.com/plugins/rankauthority
    55 * Description: Secure API connector to publish posts / overwrite posts from the RA Dashboard to WordPress.
    6  * Version: 1.0.3
     6 * Version: 1.0.4
    77 * Author: Rank Authority
    88 * Author URI: https://rankauthority.com
     
    194194        }
    195195
    196         .rank-authority-status-banner:hover {
     196        .rank-authority-status-banner:hover:not(.active) {
    197197            background: #f8fafc;
    198198        }
     
    200200        .rank-authority-status-banner.active {
    201201            background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
     202        }
     203
     204        .rank-authority-status-banner.active:hover {
     205            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    202206        }
    203207
     
    236240            transition: background 0.3s;
    237241            flex-shrink: 0;
     242            pointer-events: auto;
    238243        }
    239244
     
    500505            margin-right: 8px;
    501506            animation: rank-authority-pulse 2s infinite;
     507            display: inline-block;
    502508        }
    503509
     
    620626        $website_id = get_option($this->option_website_id);
    621627        $token = get_option($this->option_token);
    622         $plugin_version = get_file_data(__FILE__, array('Version' => 'Version'), false)['Version'] ?? '1.0.3';
     628        $plugin_version = get_file_data(__FILE__, array('Version' => 'Version'), false)['Version'] ?? '1.0.4';
    623629
    624630        ?>
     
    644650                            <p id="rank-authority-status-desc"><?php echo $script_enabled === '1' ? 'Your site is being monitored' : 'Click to enable tracking scripts'; ?></p>
    645651                        </div>
    646                         <div class="rank-authority-big-toggle">
     652                        <label class="rank-authority-big-toggle" for="ra_script_enabled" style="cursor: pointer;">
    647653                            <div class="rank-authority-toggle-knob" style="<?php echo $script_enabled === '1' ? 'transform: translateX(36px);' : ''; ?>"></div>
    648                         </div>
     654                        </label>
    649655                        <input
    650656                            type="checkbox"
     
    784790            const checkbox = document.getElementById('ra_script_enabled');
    785791            const form = document.getElementById('rank-authority-settings-form');
     792            const toggleLabel = statusBanner ? statusBanner.querySelector('.rank-authority-big-toggle') : null;
    786793           
    787             if (statusBanner && checkbox) {
     794            if (statusBanner && checkbox && form) {
     795                // Handle click on banner (but not on toggle label itself)
    788796                statusBanner.addEventListener('click', function(e) {
    789                     // Don't submit if clicking the toggle itself
     797                    // If clicking the toggle label, let it handle the click
    790798                    if (e.target.closest('.rank-authority-big-toggle')) {
    791799                        return;
    792800                    }
    793801                   
     802                    e.preventDefault();
     803                    e.stopPropagation();
     804                   
     805                    // Toggle checkbox
    794806                    checkbox.checked = !checkbox.checked;
    795807                   
    796                     // Auto-submit form when toggling
    797                     if (form) {
     808                    // Submit form
     809                    form.submit();
     810                });
     811               
     812                // Handle click on toggle label
     813                if (toggleLabel) {
     814                    toggleLabel.addEventListener('click', function(e) {
     815                        e.preventDefault();
     816                        e.stopPropagation();
     817                       
     818                        // Toggle checkbox
     819                        checkbox.checked = !checkbox.checked;
     820                       
     821                        // Submit form
    798822                        form.submit();
    799                     }
    800                 });
     823                    });
     824                }
    801825            }
    802826        })();
  • rank-authority/trunk/readme.txt

    r3439340 r3439349  
    88Tested up to: 6.9
    99Requires PHP: 7.4
    10 Stable tag: 1.0.3
     10Stable tag: 1.0.4
    1111License: GPLv2 or later
    1212License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    139139== Changelog ==
    140140
     141= 1.0.4 =
     142* Fixed AI SEO Tracking toggle functionality - now works correctly when clicking toggle button
     143* Improved toggle button interaction - both banner and toggle button clicks now work properly
     144* Enhanced visual feedback for active/inactive states
     145* Fixed toggle button label implementation for better accessibility
     146* Improved form submission handling for status changes
     147
    141148= 1.0.3 =
    142149* Complete UI redesign with modern, beautiful interface
     
    167174== Upgrade Notice ==
    168175
     176= 1.0.4 =
     177Fixed toggle functionality bug. The AI SEO Tracking toggle now works correctly when clicking the toggle button.
     178
    169179= 1.0.3 =
    170180Major UI update with modern design. All functionality remains the same - only visual improvements.
Note: See TracChangeset for help on using the changeset viewer.