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-admin-notification/view/adminhtml/web/js/grid/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

/**
 * @api
 */
define([
    'Magento_Ui/js/grid/listing',
    'Magento_Ui/js/lib/spinner',
    'jquery'
], function (Listing, loader, $) {
    'use strict';

    return Listing.extend({
        defaults: {
            imports: {
                totalRecords: '${ $.provider }:data.totalRecords'
            },
            selectors: {
                collapsible: '.message-system-collapsible',
                messages: '.message-system'
            }
        },

        /** @inheritdoc */
        initObservable: function () {
            this._super()
                .track({
                    totalRecords: 0
                });

            return this;
        },

        /** @inheritdoc */
        showLoader: function () {
            if (!this.source.firstLoad) {
                this.fixLoaderHeight();
                this._super();
            }
        },

        /**
         * Calculates loader height
         *
         * @param {Boolean} [closed]
         */
        fixLoaderHeight: function (closed) {
            var $messagesBlock = $(this.selectors.messages),
                $collapsibleBlock = $(this.selectors.collapsible),
                resultHeight = 0;

            if ($messagesBlock.length) {
                resultHeight += $messagesBlock.outerHeight();
            }

            if ($collapsibleBlock.length && $collapsibleBlock.is(':visible') && !closed) {
                resultHeight += $collapsibleBlock.outerHeight();
            }

            loader.get(this.name).height(resultHeight);
        }
    });
});

Spamworldpro Mini