![]() 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-asynchronous-operations/view/adminhtml/web/js/ |
/** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ define([ 'Magento_Ui/js/form/components/insert-form', 'uiRegistry' ], function (Insert, registry) { 'use strict'; return Insert.extend({ defaults: { modalProvider: '${ $.parentName }', titlePrefix: '', imports: { changeModalTitle: '${ $.modalProvider }:state' }, listens: { responseData: 'afterRetry' }, modules: { modal: '${ $.modalProvider }', notificationListing: '${ $.columnsProvider }' } }, /** @inheritdoc */ initConfig: function () { var modalTitleProvider; this._super(); modalTitleProvider = this.modalTitleProvider.split(':'); this.modalTitleTarget = modalTitleProvider[0]; this.modalTitlePath = modalTitleProvider[1]; }, /** * Change modal title. * * @param {Boolean} change */ changeModalTitle: function (change) { if (change) { registry.get(this.modalTitleTarget, function (target) { this.modal().setTitle(this.titlePrefix + target.get(this.modalTitlePath)); }.bind(this)); } else { this.modal().setTitle(''); } }, /** * Action after retry operation. * * @param {Object} data */ afterRetry: function (data) { if (!data.error) { this.modal().closeModal(); this.notificationListing().reload(); } } }); });