PageSourceSearch

https://flyeralarm.digital/wp-content/themes/flyer/js/account.js?ver=1790944455

js flyeralarm.digital collected 2026-10-02 14:59:40 UTC 4,479 bytes, 129 lines download raw bytes

1// FA DIGITAL ACCOUNT.JS (only on is_account_page())
2
3// ON DOCUMENT READY
4jQuery(function(){
5    // Call animateNumbers function
6    animatedNumbers();
7    // Call animatedProgress function
8    animatedProgress();
9    // Call toggleDailystats function
10    toggleDailystats();
11    // Call ordersSubmenu function
12    ordersSubmenu();
13    // Call checkboxStyling function
14    checkboxStyling();
15    // If 'Orders' page
16    if(jQuery('#top').hasClass('page-id-53936')) {
17        // Call feedbackForm function
18        feedbackForm();
19    }
20
21    // AFFILIATE DASHBOARD: MODAL Z-INDEX FIX
22    jQuery('#withdraw_modal_opener').on('click', function () {
23        jQuery('.yith-wcaf-modal .content').addClass('yith-wcaf-dashboard-payments')
24        jQuery('.yith-wcaf-modal').addClass("yith-wcaf-dashboard").insertAfter('#wrap_all');
25    });
26});
27
28// CAMPAIGN DASHBOARD: ANIMATED NUMBERS
29function animatedNumbers(){
30    if (jQuery(".animated_number")[0]){
31        jQuery('.animated_number').each(function () {
32            var $this = jQuery(this);
33            var rawNumber = $this.text().replace(/\./g, ''); // Punkte entfernen
34            var target = parseInt(rawNumber);
35
36            $this.prop('Counter',0).animate({
37                Counter: target
38            }, {
39                duration: 1500,
40                easing: 'swing',
41                step: function (now) {
42                    $this.text(numberWithDots(Math.ceil(now)));
43                }
44            });
45        });
46    }
47}
48
49function numberWithDots(x) {
50    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
51}
52
53
54// CAMPAIGN DASHBOARD: ANIMATED PROGRESS
55function animatedProgress(){
56    jQuery('svg.radial-progress').each(function( index, value ) {
57        jQuery(this).find(jQuery('circle.complete')).removeAttr('style');
58    });
59
60    jQuery('svg.radial-progress').each(function( index, value ) {
61        // Get percentage of progress
62        percent = jQuery(value).data('percentage');
63        // Get radius of the svg's circle.complete
64        radius = jQuery(this).find(jQuery('circle.complete')).attr('r');
65        // Get circumference (2πr)
66        circumference = 2 * Math.PI * radius;
67        // Get stroke-dashoffset value based on the percentage of the circumference
68        strokeDashOffset = circumference - ((percent * circumference) / 100);
69        // Transition progress for 1.25 seconds
70        jQuery(this).find(jQuery('circle.complete')).animate({'stroke-dashoffset': strokeDashOffset}, 1250);
71    });
72}
73
74// CAMPAIGN DASHBOARD: TOGGLE STATS
75function toggleDailystats() {
76    jQuery('#top.woocommerce-account .woocommerce #campaign_container .toggle-daily-stats').on('click', function () {
77        jQuery(this).children('i').toggleClass('fa-flip-horizontal');
78        jQuery(this).next('div').toggleClass('show');
79    });
80}
81
82// ORDERS OVERVIEW: TOGGLE ORDER-ACTIONS-MENU
83function ordersSubmenu(){
84    jQuery('.woocommerce-account a.menu-handle').on('click', function(e) {
85        var ActiveMenu = jQuery(this).next('.order-actions-menu').toggleClass('active');
86        jQuery('.order-actions-menu').not(ActiveMenu).removeClass('active');
87        e.preventDefault();
88    });
89}
90
91
92// AFFILIATE DASHBOARD: SETTINGS - ADD SPAN AFTER CHECKBOX INPUT
93function checkboxStyling(){
94    if (jQuery('.yith-wcaf-toggle').length){
95        jQuery('<span></span>').insertAfter('.yith-wcaf-toggle');
96    }
97    if (jQuery('.terms-label').length){
98        jQuery('<span></span>').insertAfter('.terms-label input');
99    }
100
101}
102
103// FEEDBACKFORM
104function feedbackForm() {
105    jQuery('.feedback-link').on('click', function (event) {
106        event.preventDefault(); // verhindert den Standard-Link-Klick
107
108        var link = jQuery(this);
109
110        // Innerhalb des Containers #popup-feedback
111        var popup = jQuery('#popup-feedback');
112
113        // Zeige .formular-before und verstecke .formular-after innerhalb des Popups
114        popup.find('.formular-before').show();
115        popup.find('.formular-after').hide();
116
117        // Setze die Bestellnummer ins entsprechende Eingabefeld
118        var orderNumber = link.data('order-number');
119        var inputField = popup.find('input[name="order-number"]');
120
121        if (inputField.length && orderNumber) {
122            inputField.val(orderNumber);
123            console.log('Order-Nummer gesetzt:', orderNumber);
124        }
125
126        // Radio-Buttons mit name="bewertung" deselektieren (zurücksetzen)
127        popup.find('input[name="bewertung"]').prop('checked', false);
128    });
129}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.