PageSourceSearch

https://www.epson.sk/_ui/addons/orderselfserviceaddon/responsive/common/js/cms/returnorderaction.js

js epson.sk collected 2026-10-06 17:41:04 UTC 2,110 bytes, 53 lines download raw bytes

1ACC.returnorderaction = {
2
3    _autoload: [
4        ["bindToReturnCompleteOrderButton", $(".js-return-complete-order-link").length != 0],
5        "bindToReturnEntryQuantityInput",
6        "bindToReturnEntryQuantityFocusOut"
7    ],
8
9    bindToReturnCompleteOrderButton : function() {
10        $(document).on('click', '.js-return-complete-order-link', function(event) {
11            event.preventDefault();
12            $.each( $('[id^="item_quantity_"]'), function() {
13                var entryNumber = $(this).attr('id').split("item_quantity_")[1];
14                $('[name^="returnEntryQuantityMap[' + entryNumber + ']"]').val($('#item_quantity_' + entryNumber).val());
15            });
16            ACC.returnorderaction.disableEnableReturnSubmit();
17        });
18    },
19
20    bindToReturnEntryQuantityInput : function() {
21        $('input[id^="returnEntryQuantityMap"]').keypress(function(e) {
22            if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
23                return false;
24            }
25        });		
26    },
27
28    bindToReturnEntryQuantityFocusOut : function() {
29        $('[name^="returnEntryQuantityMap"]').focusout(function(field) {
30            var index = this.id.replace("returnEntryQuantityMap", "");
31            if (parseInt($('#item_quantity_' + index).val()) < parseInt(this.value)) {
32                this.value = $('#item_quantity_' + index).val();
33            }
34            $('[name^="returnEntryQuantityMap[' + index + ']"]').val(this.value)
35            
36            ACC.returnorderaction.disableEnableReturnSubmit();
37        });
38    },
39
40    //Enable submit button in case some value is more than zero.
41    disableEnableReturnSubmit: function() {
42        var submitDisabled = true;
43        $.each( $('[id^="item_quantity_"]'), function() {
44            var entryNumber = $(this).attr('id').split("item_quantity_")[1];
45
46            if (parseInt($('[name^="returnEntryQuantityMap[' + entryNumber + ']"]').val()) > 0 ) {
47                submitDisabled = false;
48            }
49        });
50        $("#returnOrderButtonConfirmation").prop("disabled", submitDisabled);
51    }
52
53};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.