File tree Expand file tree Collapse file tree 5 files changed +38
-7
lines changed
view/adminhtml/ui_component Expand file tree Collapse file tree 5 files changed +38
-7
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2016 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Sales \Ui \Component \Control ;
7
+
8
+ use Magento \Ui \Component \Control \Action ;
9
+
10
+ /**
11
+ * Class PdfAction
12
+ */
13
+ class PdfAction extends Action
14
+ {
15
+ /**
16
+ * Prepare
17
+ *
18
+ * @return void
19
+ */
20
+ public function prepare ()
21
+ {
22
+ $ config = $ this ->getConfiguration ();
23
+ $ context = $ this ->getContext ();
24
+ $ config ['url ' ] = $ context ->getUrl (
25
+ $ config ['pdfAction ' ],
26
+ ['order_id ' => $ context ->getRequestParam ('order_id ' )]
27
+ );
28
+ $ this ->setData ('config ' , (array )$ config );
29
+ parent ::prepare ();
30
+ }
31
+ }
Original file line number Diff line number Diff line change 54
54
</filterSelect >
55
55
</filters >
56
56
<massaction name =" listing_massaction" >
57
- <action name =" pdfcreditmemos_order" >
57
+ <action name =" pdfcreditmemos_order" class = " Magento\Sales\Ui\Component\Control\PdfAction " >
58
58
<argument name =" data" xsi : type =" array" >
59
59
<item name =" config" xsi : type =" array" >
60
60
<item name =" type" xsi : type =" string" >pdfcreditmemos_order</item >
61
61
<item name =" label" xsi : type =" string" translate =" true" >PDF Creditmemos</item >
62
- <item name =" url " xsi : type =" url " path = " sales/creditmemo/pdfcreditmemos" / >
62
+ <item name =" pdfAction " xsi : type =" string " > sales/creditmemo/pdfcreditmemos</ item >
63
63
</item >
64
64
</argument >
65
65
</action >
Original file line number Diff line number Diff line change 54
54
</filterSelect >
55
55
</filters >
56
56
<massaction name =" listing_massaction" >
57
- <action name =" pdfinvoices_order" >
57
+ <action name =" pdfinvoices_order" class = " Magento\Sales\Ui\Component\Control\PdfAction " >
58
58
<argument name =" data" xsi : type =" array" >
59
59
<item name =" config" xsi : type =" array" >
60
60
<item name =" type" xsi : type =" string" >pdfinvoices_order</item >
61
61
<item name =" label" xsi : type =" string" translate =" true" >PDF Invoices</item >
62
- <item name =" url " xsi : type =" url " path = " sales/invoice/pdfinvoices" / >
62
+ <item name =" pdfAction " xsi : type =" string " > sales/invoice/pdfinvoices</ item >
63
63
</item >
64
64
</argument >
65
65
</action >
Original file line number Diff line number Diff line change 54
54
</filterSelect >
55
55
</filters >
56
56
<massaction name =" listing_massaction" >
57
- <action name =" pdfshipments_order" >
57
+ <action name =" pdfshipments_order" class = " Magento\Sales\Ui\Component\Control\PdfAction " >
58
58
<argument name =" data" xsi : type =" array" >
59
59
<item name =" config" xsi : type =" array" >
60
60
<item name =" type" xsi : type =" string" >pdfshipments_order</item >
61
61
<item name =" label" xsi : type =" string" translate =" true" >PDF Shipments</item >
62
- <item name =" url " xsi : type =" url " path = " sales/shipment/pdfshipments" / >
62
+ <item name =" pdfAction " xsi : type =" string " > sales/shipment/pdfshipments</ item >
63
63
</item >
64
64
</argument >
65
65
</action >
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ define([
147
147
* @param {Object } data - Selections data.
148
148
*/
149
149
defaultCallback : function ( action , data ) {
150
- var itemsType = data . excludeMode && data . excluded . length !== 0 ? 'excluded' : 'selected' ,
150
+ var itemsType = data . excludeMode ? 'excluded' : 'selected' ,
151
151
selections = { } ;
152
152
153
153
selections [ itemsType ] = data [ itemsType ] ;
You can’t perform that action at this time.
0 commit comments