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/system/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

/**
 * @api
 */
define([
    'jquery',
    'mage/template',
    'jquery/ui',
    'Magento_Ui/js/modal/modal'
], function ($, mageTemplate) {
    'use strict';

    $.widget('mage.systemMessageDialog', $.mage.modal, {
        options: {
            modalClass: 'modal-system-messages',
            systemMessageTemplate:
                '<% _.each(data.items, function(item) { %>' +
                    '<li class="message message-warning' +
                        '<% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
                        '<%= item.text %>' +
                    '</li>' +
                '<% }); %>'
        },

        /** @inheritdoc */
        _create: function () {
            this.options.title = $('#message-system-all').attr('title');
            this._super();
        },

        /** @inheritdoc */
        openModal: function (severity) {
            var superMethod = $.proxy(this._super, this);

            $.ajax({
                url: this.options.ajaxUrl,
                type: 'GET',
                data: {
                    severity: severity
                }
            }).done($.proxy(function (data) {
                var tmpl = mageTemplate(this.options.systemMessageTemplate, {
                    data: {
                        items: data
                    }
                });

                tmpl = $(tmpl);

                this.element.html(
                    $('<ul></ul>', {
                        'class': 'message-system-list'
                    }).append(tmpl)
                ).trigger('contentUpdated');

                superMethod();
            }, this));

            return this;
        },

        /** @inheritdoc */
        closeModal: function () {
            this._super();
        }
    });

    $(function () {
        $('#system_messages .message-system-short .error').on('click', function () {
            $('#message-system-all').systemMessageDialog('openModal', 1);
        });

        $('#system_messages .message-system-short .warning').on('click', function () {
            $('#message-system-all').systemMessageDialog('openModal', 2);
        });
    });

    return $.mage.systemMessageDialog;
});

Spamworldpro Mini