Changeset 3396885
- Timestamp:
- 11/17/2025 05:00:00 AM (5 months ago)
- Location:
- pistonui
- Files:
-
- 65 added
- 6 edited
-
tags/1.2.2/pistonui.php (modified) (2 diffs)
-
tags/1.2.2/readme.txt (modified) (2 diffs)
-
tags/1.2.2/widgets/scroll-reveal-cards.php (modified) (3 diffs)
-
tags/1.2.3 (added)
-
tags/1.2.3/LICENSE (added)
-
tags/1.2.3/admin (added)
-
tags/1.2.3/admin/dashboard.php (added)
-
tags/1.2.3/assets (added)
-
tags/1.2.3/assets/css (added)
-
tags/1.2.3/assets/css/admin-dashboard.css (added)
-
tags/1.2.3/assets/css/style.css (added)
-
tags/1.2.3/assets/css/template-manager-minimal.css (added)
-
tags/1.2.3/assets/img (added)
-
tags/1.2.3/assets/img/pistonui-icon.svg (added)
-
tags/1.2.3/assets/js (added)
-
tags/1.2.3/assets/js/admin-dashboard.js (added)
-
tags/1.2.3/assets/js/hero-slider.js (added)
-
tags/1.2.3/assets/js/logo-slider.js (added)
-
tags/1.2.3/assets/js/script.js (added)
-
tags/1.2.3/assets/js/template-manager-minimal.js (added)
-
tags/1.2.3/assets/scss (added)
-
tags/1.2.3/assets/scss/widgets (added)
-
tags/1.2.3/assets/scss/widgets/_sliding-text-bar.scss (added)
-
tags/1.2.3/assets/vendor (added)
-
tags/1.2.3/assets/vendor/bootstrap (added)
-
tags/1.2.3/assets/vendor/bootstrap/bootstrap-grid.min.css (added)
-
tags/1.2.3/assets/vendor/owlcarousel (added)
-
tags/1.2.3/assets/vendor/owlcarousel/assets (added)
-
tags/1.2.3/assets/vendor/owlcarousel/assets/owl.carousel.min.css (added)
-
tags/1.2.3/assets/vendor/owlcarousel/assets/owl.theme.default.min.css (added)
-
tags/1.2.3/assets/vendor/owlcarousel/owl.carousel.min.js (added)
-
tags/1.2.3/includes (added)
-
tags/1.2.3/includes/class-template-exporter-minimal.php (added)
-
tags/1.2.3/includes/class-template-manager-minimal.php (added)
-
tags/1.2.3/languages (added)
-
tags/1.2.3/languages/pistonui.pot (added)
-
tags/1.2.3/notice.php (added)
-
tags/1.2.3/pistonui.php (added)
-
tags/1.2.3/readme.txt (added)
-
tags/1.2.3/templates (added)
-
tags/1.2.3/templates/Template-save2.json (added)
-
tags/1.2.3/templates/Template.json (added)
-
tags/1.2.3/templates/Templateee.json (added)
-
tags/1.2.3/templates/simple-test.json (added)
-
tags/1.2.3/uninstall.php (added)
-
tags/1.2.3/widgets (added)
-
tags/1.2.3/widgets/accordion.php (added)
-
tags/1.2.3/widgets/category_icons_grid.php (added)
-
tags/1.2.3/widgets/counter-stats.php (added)
-
tags/1.2.3/widgets/feature-cards.php (added)
-
tags/1.2.3/widgets/image-comparison.php (added)
-
tags/1.2.3/widgets/logo-slider.php (added)
-
tags/1.2.3/widgets/posts-grid.php (added)
-
tags/1.2.3/widgets/promo-banner.php (added)
-
tags/1.2.3/widgets/rich-title.php (added)
-
tags/1.2.3/widgets/scroll-reveal-cards.php (added)
-
tags/1.2.3/widgets/skills-tabs.php (added)
-
tags/1.2.3/widgets/sliding-hero.php (added)
-
tags/1.2.3/widgets/sliding-text-bar.php (added)
-
tags/1.2.3/widgets/sticky-content.php (added)
-
tags/1.2.3/widgets/tiktok_videos.php (added)
-
tags/1.2.3/widgets/user_reviews.php (added)
-
tags/1.2.3/widgets/video-hero.php (added)
-
tags/1.2.3/widgets/woo (added)
-
tags/1.2.3/widgets/woo/Product_Slider.php (added)
-
tags/1.2.3/widgets/woo/category_showcase.php (added)
-
tags/1.2.3/widgets/woo/products-grid.php (added)
-
tags/1.2.3/widgets/youtube-popup.php (added)
-
trunk/pistonui.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/widgets/scroll-reveal-cards.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pistonui/tags/1.2.2/pistonui.php
r3396877 r3396885 3 3 Plugin Name: PistonUI 4 4 Description: High-performance custom widgets for Elementor. 5 Version: 1.2. 25 Version: 1.2.3 6 6 Author: Lasindu Nadishan 7 7 Author URI: https://pistonui.com/lasindu … … 19 19 20 20 // Define plugin constants 21 define( 'PISTONUI_VERSION', '1.2. 2' );21 define( 'PISTONUI_VERSION', '1.2.3' ); 22 22 define( 'PISTONUI_PATH', plugin_dir_path( __FILE__ ) ); 23 23 define( 'PISTONUI_URL', plugin_dir_url( __FILE__ ) ); -
pistonui/tags/1.2.2/readme.txt
r3396877 r3396885 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 27 Stable tag: 1.2.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 125 125 126 126 == Changelog == 127 = 1.2.3 = 128 - Fix: Scroll Reveal Cards widget - Critical JavaScript scoping issue that caused layout breaking on live sites 129 - Fix: JavaScript now properly scoped to widget instance using unique widget ID to prevent conflicts 130 - Fix: Replaced inline script tag with wp_add_inline_script for better WordPress compatibility 131 - Fix: Changed from ES6 arrow functions to ES5 for broader browser compatibility 132 127 133 = 1.2.2 = 128 134 - Fix: Scroll Reveal Cards widget - Corrected HTML structure for button anchor tag to ensure proper validation -
pistonui/tags/1.2.2/widgets/scroll-reveal-cards.php
r3396877 r3396885 744 744 $layout_direction = !empty($settings['layout_direction']) ? $settings['layout_direction'] : 'left-right'; 745 745 $layout_class = $layout_direction === 'right-left' ? 'layout-reversed' : 'layout-normal'; 746 $widget_id = $this->get_id(); 746 747 ?> 747 <div class="scroll-reveal-wrapper <?php echo esc_attr($layout_class); ?>" >748 <div class="scroll-reveal-wrapper <?php echo esc_attr($layout_class); ?>" data-widget-id="<?php echo esc_attr($widget_id); ?>"> 748 749 <div class="scroll-reveal-container"> 749 750 <!-- LEFT CONTENT --> … … 805 806 </div> 806 807 807 <script> 808 (function() { 809 const cards = document.querySelectorAll('.scroll-reveal-card'); 808 <?php 809 // Properly scoped JavaScript for this widget instance 810 $widget_id_json = wp_json_encode($widget_id); 811 812 $inline_js = "(function() { 813 var widgetId = {$widget_id_json}; 814 var wrapper = document.querySelector('.scroll-reveal-wrapper[data-widget-id=\"' + widgetId + '\"]'); 815 816 if (!wrapper) return; 817 818 var cards = wrapper.querySelectorAll('.scroll-reveal-card'); 810 819 811 820 if (!cards.length) return; 812 821 813 822 // Simple fade-in on initial load 814 cards.forEach( (card, index) =>{823 cards.forEach(function(card, index) { 815 824 card.style.opacity = '1'; 816 825 }); 817 826 818 827 // Add scale effect when cards overlap 819 letticking = false;820 window.addEventListener('scroll', () =>{828 var ticking = false; 829 window.addEventListener('scroll', function() { 821 830 if (!ticking) { 822 window.requestAnimationFrame( () =>{823 cards.forEach( (card, index) =>{824 constrect = card.getBoundingClientRect();825 constisStuck = rect.top <= 100;831 window.requestAnimationFrame(function() { 832 cards.forEach(function(card, index) { 833 var rect = card.getBoundingClientRect(); 834 var isStuck = rect.top <= 100; 826 835 827 836 if (isStuck && index < cards.length - 1) { 828 constnextCard = cards[index + 1];829 constnextRect = nextCard.getBoundingClientRect();837 var nextCard = cards[index + 1]; 838 var nextRect = nextCard.getBoundingClientRect(); 830 839 831 840 // Calculate overlap 832 constoverlap = Math.max(0, 100 - nextRect.top + rect.height);833 constmaxOverlap = rect.height;834 constprogress = Math.min(overlap / maxOverlap, 1);841 var overlap = Math.max(0, 100 - nextRect.top + rect.height); 842 var maxOverlap = rect.height; 843 var progress = Math.min(overlap / maxOverlap, 1); 835 844 836 845 // Scale down current card as next card covers it 837 const scale = 1 - (progress * 0.05); 838 const opacity = 1 - (progress * 0.3); 846 var scale = 1 - (progress * 0.05); 839 847 840 card.style.transform = `scale(${scale})`;841 card.style.filter = `brightness(${1 - progress * 0.2})`;848 card.style.transform = 'scale(' + scale + ')'; 849 card.style.filter = 'brightness(' + (1 - progress * 0.2) + ')'; 842 850 } else if (!isStuck) { 843 851 card.style.transform = 'scale(1)'; … … 850 858 } 851 859 }); 852 })(); 853 </script> 860 })();"; 861 862 wp_enqueue_script('pistonui-script'); 863 wp_add_inline_script('pistonui-script', $inline_js, 'after'); 864 ?> 854 865 <?php 855 866 } -
pistonui/trunk/pistonui.php
r3396877 r3396885 3 3 Plugin Name: PistonUI 4 4 Description: High-performance custom widgets for Elementor. 5 Version: 1.2. 25 Version: 1.2.3 6 6 Author: Lasindu Nadishan 7 7 Author URI: https://pistonui.com/lasindu … … 19 19 20 20 // Define plugin constants 21 define( 'PISTONUI_VERSION', '1.2. 2' );21 define( 'PISTONUI_VERSION', '1.2.3' ); 22 22 define( 'PISTONUI_PATH', plugin_dir_path( __FILE__ ) ); 23 23 define( 'PISTONUI_URL', plugin_dir_url( __FILE__ ) ); -
pistonui/trunk/readme.txt
r3396877 r3396885 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 27 Stable tag: 1.2.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 125 125 126 126 == Changelog == 127 = 1.2.3 = 128 - Fix: Scroll Reveal Cards widget - Critical JavaScript scoping issue that caused layout breaking on live sites 129 - Fix: JavaScript now properly scoped to widget instance using unique widget ID to prevent conflicts 130 - Fix: Replaced inline script tag with wp_add_inline_script for better WordPress compatibility 131 - Fix: Changed from ES6 arrow functions to ES5 for broader browser compatibility 132 127 133 = 1.2.2 = 128 134 - Fix: Scroll Reveal Cards widget - Corrected HTML structure for button anchor tag to ensure proper validation -
pistonui/trunk/widgets/scroll-reveal-cards.php
r3396877 r3396885 744 744 $layout_direction = !empty($settings['layout_direction']) ? $settings['layout_direction'] : 'left-right'; 745 745 $layout_class = $layout_direction === 'right-left' ? 'layout-reversed' : 'layout-normal'; 746 $widget_id = $this->get_id(); 746 747 ?> 747 <div class="scroll-reveal-wrapper <?php echo esc_attr($layout_class); ?>" >748 <div class="scroll-reveal-wrapper <?php echo esc_attr($layout_class); ?>" data-widget-id="<?php echo esc_attr($widget_id); ?>"> 748 749 <div class="scroll-reveal-container"> 749 750 <!-- LEFT CONTENT --> … … 805 806 </div> 806 807 807 <script> 808 (function() { 809 const cards = document.querySelectorAll('.scroll-reveal-card'); 808 <?php 809 // Properly scoped JavaScript for this widget instance 810 $widget_id_json = wp_json_encode($widget_id); 811 812 $inline_js = "(function() { 813 var widgetId = {$widget_id_json}; 814 var wrapper = document.querySelector('.scroll-reveal-wrapper[data-widget-id=\"' + widgetId + '\"]'); 815 816 if (!wrapper) return; 817 818 var cards = wrapper.querySelectorAll('.scroll-reveal-card'); 810 819 811 820 if (!cards.length) return; 812 821 813 822 // Simple fade-in on initial load 814 cards.forEach( (card, index) =>{823 cards.forEach(function(card, index) { 815 824 card.style.opacity = '1'; 816 825 }); 817 826 818 827 // Add scale effect when cards overlap 819 letticking = false;820 window.addEventListener('scroll', () =>{828 var ticking = false; 829 window.addEventListener('scroll', function() { 821 830 if (!ticking) { 822 window.requestAnimationFrame( () =>{823 cards.forEach( (card, index) =>{824 constrect = card.getBoundingClientRect();825 constisStuck = rect.top <= 100;831 window.requestAnimationFrame(function() { 832 cards.forEach(function(card, index) { 833 var rect = card.getBoundingClientRect(); 834 var isStuck = rect.top <= 100; 826 835 827 836 if (isStuck && index < cards.length - 1) { 828 constnextCard = cards[index + 1];829 constnextRect = nextCard.getBoundingClientRect();837 var nextCard = cards[index + 1]; 838 var nextRect = nextCard.getBoundingClientRect(); 830 839 831 840 // Calculate overlap 832 constoverlap = Math.max(0, 100 - nextRect.top + rect.height);833 constmaxOverlap = rect.height;834 constprogress = Math.min(overlap / maxOverlap, 1);841 var overlap = Math.max(0, 100 - nextRect.top + rect.height); 842 var maxOverlap = rect.height; 843 var progress = Math.min(overlap / maxOverlap, 1); 835 844 836 845 // Scale down current card as next card covers it 837 const scale = 1 - (progress * 0.05); 838 const opacity = 1 - (progress * 0.3); 846 var scale = 1 - (progress * 0.05); 839 847 840 card.style.transform = `scale(${scale})`;841 card.style.filter = `brightness(${1 - progress * 0.2})`;848 card.style.transform = 'scale(' + scale + ')'; 849 card.style.filter = 'brightness(' + (1 - progress * 0.2) + ')'; 842 850 } else if (!isStuck) { 843 851 card.style.transform = 'scale(1)'; … … 850 858 } 851 859 }); 852 })(); 853 </script> 860 })();"; 861 862 wp_enqueue_script('pistonui-script'); 863 wp_add_inline_script('pistonui-script', $inline_js, 'after'); 864 ?> 854 865 <?php 855 866 }
Note: See TracChangeset
for help on using the changeset viewer.