Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/nandedex/www/wp-content/plugins/live-news-lite/admin/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : /home/nandedex/www/wp-content/plugins/live-news-lite/admin/assets/js/menu-sliding.js
jQuery(document).ready(function($) {

    'use strict';

    //Handle changes of the news ticker filter
    $('#daext-filter-form select').on('change', function() {

        'use strict';

        $('#daext-filter-form').submit();

    });

    //do not set the default values if we are editing an existing sliding news
    if ( $( "#update-id" ).length ){return;}

    daextlnl_update_default_colors();

    $('#ticker-id').change(function(){

        'use strict';

        daextlnl_update_default_colors();

    });

    /*
     * Update the default 'Text Color', 'Text Color Hover' and 'Background Color' based on the values available on the
     * related ticker
     */
    function daextlnl_update_default_colors(){

        'use strict';

        //When the menu doesn't have the #ticker-id field available return
        if(!$('#ticker-id').length){return;}

        let ticker_id = parseInt($('#ticker-id').val(), 10);

        //prepare input for the ajax request
        let data = {
            "action": "update_default_colors",
            "security": daextlnl_nonce,
            "ticker_id": ticker_id
        };

        //ajax
        $.post(daextlnl_ajax_url, data, function(result_json) {

            'use strict';

            let data_obj = JSON.parse(result_json);

            $('#text-color').iris('color', data_obj.sliding_news_color);
            $('#text-color-hover').iris('color', data_obj.sliding_news_color_hover);
            $('#background-color').iris('color', data_obj.sliding_news_background_color);

        });

    }

});

F1le Man4ger