File tree 3 files changed +34
-16
lines changed
app/code/Magento/AdminNotification/view/adminhtml
templates/system/messages
dev/tests/functional/tests/app/Magento/Tax/Test/Page/Adminhtml
3 files changed +34
-16
lines changed Original file line number Diff line number Diff line change 19
19
</ul>
20
20
</div>
21
21
22
- <script>
23
- require([
24
- "jquery",
25
- "Magento_Ui/js/modal/modal"
26
- ], function($){
27
- if (this.modal) {
28
- this.modal.html($('[data-role="system_messages_list"]').html());
29
- } else {
30
- this.modal = $('[data-role="system_messages_list"]').modal({
31
- modalClass: 'modal-system-messages ui-popup-message',
32
- type: 'popup',
33
- buttons: []
34
- });
22
+ <script type="text/x-magento-init">
23
+ {
24
+ "[data-role=system_messages_list]": {
25
+ "Magento_AdminNotification/js/system/messages/popup": {
26
+ "class":"modal-system-messages ui-popup-message"
27
+ }
28
+ }
35
29
}
36
- this.modal.modal('openModal');
37
- });
38
30
</script>
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+
6
+ define ( [
7
+ 'jquery' ,
8
+ 'Magento_Ui/js/modal/modal'
9
+ ] , function ( $ , modal ) {
10
+ 'use strict' ;
11
+
12
+ return function ( data , element ) {
13
+
14
+ if ( modal . modal ) {
15
+ modal . modal . html ( $ ( element ) . html ( ) ) ;
16
+ } else {
17
+ modal . modal = $ ( element ) . modal ( {
18
+ modalClass : data . class ,
19
+ type : 'popup' ,
20
+ buttons : [ ]
21
+ } ) ;
22
+ }
23
+
24
+ modal . modal . modal ( 'openModal' ) ;
25
+ } ;
26
+ } ) ;
Original file line number Diff line number Diff line change 7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/pages.xsd" >
9
9
<page name =" TaxConfiguration" area =" Adminhtml" mca =" admin/system_config/edit/section/tax" module =" Magento_Tax" >
10
- <block name =" notificationBlockPopup" class =" Magento\Tax\Test\Block\Adminhtml\System\Config\NotificationPopup" locator =" .ui-popup-message .modal-inner-wrap" strategy =" css selector" />
10
+ <block name =" notificationBlockPopup" class =" Magento\Tax\Test\Block\Adminhtml\System\Config\NotificationPopup" locator =" .ui-popup-message._show .modal-inner-wrap" strategy =" css selector" />
11
11
<block name =" notificationBlock" class =" Magento\Tax\Test\Block\Adminhtml\System\Config\Notification" locator =" #system_messages" strategy =" css selector" />
12
12
<block name =" pageActions" class =" Magento\Backend\Test\Block\System\Config\PageActions" locator =" .page-main-actions" strategy =" css selector" />
13
13
<block name =" messagesBlock" class =" Magento\Backend\Test\Block\Messages" locator =" #messages" strategy =" css selector" />
You can’t perform that action at this time.
0 commit comments