1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'jquery',
'Magento_Ui/js/modal/modal',
'mage/translate'
], function ($, modal, $t) {
'use strict';
return function (config, element) {
config.buttons = [
{
text: $t('Print'),
'class': 'action action-primary',
/**
* Click handler
*/
click: function () {
window.location.href = this.options.url;
}
}, {
text: $t('Cancel'),
'class': 'action action-secondary',
/**
* Click handler
*/
click: function () {
this.closeModal();
}
}
];
modal(config, element);
};
});