PageSourceSearch

https://www.discountschoolsupply.com/_ui/addons/excelligenceb2bacc…/common/js/acc.approval.js?v=S530

js discountschoolsupply.com collected 2026-09-25 18:19:20 UTC 2,466 bytes, 75 lines download raw bytes

1ACC.approval = {
2    _autoload: [
3        "bindToModalActionButton",
4        "bindToOrderApprovalDecisionButtons",
5        "bindToModalCancelButton"
6    ],
7
8    bindToModalActionButton : function() {
9        $(document).on('click', '.approverDecisionButton', function() {
10            var form = ACC.approval.currentForm;
11            form.find('#approverSelectedDecision').attr("value", $(this).data('decision'));
12            ACC.approval.isDecisionMade = true;
13            ACC.colorbox.close();
14        });
15    },
16
17    bindToModalCancelButton : function() {
18        $(document).on('click', '.cancelOrderApprovalCommentButton',
19            function(e) {
20                e.preventDefault();
21                ACC.colorbox.close();
22            }
23        );
24    },
25
26    bindToOrderApprovalDecisionButtons : function() {
27        ACC.approval.bindToOrderApprovalDecisionButton('.approverDecisionApprovalButton', '.orderApprovalApproveCommentModal');
28        ACC.approval.bindToOrderApprovalDecisionButton('.approverDecisionRejectButton', '.orderApprovalRejectCommentModal');
29    },
30
31    bindToOrderApprovalDecisionButton : function(decisionButtonSelector, popupModalSelector) {
32        $(document).on('click', decisionButtonSelector, function(e) {
33            e.preventDefault();
34            var form = $(this).closest("form");
35            var titleHtml = $(this).html();
36            var quoteCommentModal = form.find(popupModalSelector);
37            ACC.approval.currentForm = form;
38
39            form.find('textarea').val('');
40            ACC.approval.isDecisionTaken = false;
41
42            ACC.colorbox.open(titleHtml, {
43                href : quoteCommentModal,
44                inline : true,
45                width : "620px",
46                onClosed: function() {
47                    if (ACC.approval.isDecisionMade) {
48                        form.submit();
49                    }
50                }
51            });
52        });
53    }
54
55};
56
57$(document).ready(function() {
58    $('#rejectreasonsubmit').attr('disabled', true);
59
60    $('#rejectcomments').on('keyup',function() {
61        var textarea_value = $("#rejectcomments").val();
62        if(textarea_value != '') {
63            $('#rejectreasonsubmit').attr('disabled', false);
64        } else {
65            $('#rejectreasonsubmit').attr('disabled', true);
66        }
67    });
68});
69
70$(document).ready(
71    function(){
72        $("#rejectreasonlink").click(function () {
73            $("#rejectreasondiv").toggle();
74        });
75});

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.