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 title = $(this).text().trim(); 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(title, { 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};
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.