PageSourceSearch

https://www.discountschoolsupply.com/_ui/responsive/common/js/acc.order.js?v=S530

js discountschoolsupply.com collected 2026-09-25 18:18:23 UTC 3,086 bytes, 88 lines download raw bytes

1ACC.order = {
2
3	_autoload: [
4	    "backToOrderHistory",
5	    "bindMultidProduct",
6	    ["bindInvoiceDateFilter", $(".invoice-date-filter-js").length != 0]
7	],
8
9	backToOrderHistory: function(){
10		$(".orderBackBtn > button").on("click", function(){
11			var sUrl = $(this).data("backToOrders");
12			window.location = sUrl;
13		});
14		if($("body").hasClass("page-order")){
15		    var orderNo = $('.jda-dynamic-shipping').data('ordernumber');
16            var url = window.location.origin;
17            $.getJSON(url+"/your-account/order/"+orderNo+"/ordershipping", function(orderData) {
18            var divElements = $('.jda-dynamic-shipping');
19
20            divElements.each(function() {
21                var uniqueProductId = $(this).data('uniqueproductid');
22                var orderDetails = orderData[uniqueProductId];
23
24                if (orderDetails && orderDetails.Shipping.length > 0) {
25                var shipping = orderDetails.Shipping;
26                var anchorTags = '';
27
28                shipping.forEach(function(shippingItem) {
29                    var trackingNumber = shippingItem.TrackingNumber;
30
31                    if (trackingNumber) {
32                    anchorTags += '<a href="' + shippingItem.TrackingURL + '">' + trackingNumber  + '</a><br>';
33                    }
34                });
35                $(this).append('<div><b> Tracking URL</b></div>')
36                $(this).append(anchorTags);
37                }
38            });
39            }).fail(function() {
40            console.log('Failed to fetch order and shipping data.');
41            });
42        };
43	},
44	
45	bindMultidProduct: function ()
46	{
47		// link to display the multi-d grid in read-only mode
48		$(document).on("click",'.js-show-multiD-grid-in-order', function (event){
49			ACC.multidgrid.populateAndShowGrid(this, event, true);
50			return false;
51		});
52
53		// link to display the multi-d grid in read-only mode
54		$(document).on("click",'.showMultiDGridInOrderOverlay', function (event){
55			ACC.multidgrid.populateAndShowGridOverlay(this, event);
56		});
57
58	},
59
60	bindInvoiceDateFilter: function ()
61    {
62        var $dateInput = $(".invoice-date-filter-js"),
63            actionUrl = $('#invoice-datefilter-url').val(),
64            startDate = $('#invoice-datefilter-start').val(),
65            endDate = $('#invoice-datefilter-end').val();
66
67        if(startDate === '' ||  endDate === '') {
68            $dateInput.daterangepicker();
69        }
70        else {
71            $dateInput.daterangepicker({ startDate: startDate, endDate: endDate });
72            $(".from-date-js").html(startDate);
73            $(".to-date-js").html(endDate);
74        }
75
76        $dateInput.on("apply.daterangepicker", function(ev, picker) {
77            var startDate = picker.startDate.format('MM/DD/YYYY'),
78                endDate = picker.endDate.format('MM/DD/YYYY');
79
80            window.location.href= actionUrl + "startdate=" + startDate + "&enddate=" + endDate;
81        });
82
83        var $clearButtons = $(".clear-dates-js");
84        $clearButtons.on("click", function() {
85            window.location.href= actionUrl;
86        });
87    }
88};

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.