1/** 2* DO NOT EDIT THIS FILE. 3* See the following change record for more information, 4* https://www.drupal.org/node/2815083 5* @preserve 6**/ 7 8(function ($) { 9 Drupal.facets = Drupal.facets || {}; 10 Drupal.behaviors.facetsDateRange = { 11 attach: function attach(context, settings) { 12 function toTimestamp(strDate) { 13 var datum = Date.parse(strDate); 14 return datum / 1000; 15 } 16 17 function autoSubmit() { 18 var $this = $(this); 19 var facetId = $this.parents(".facets-widget-date_range").find("ul").attr("data-drupal-facet-id"); 20 var daterange = settings.facets.daterange[facetId]; 21 var min = toTimestamp($("input[id=".concat(facetId, "_min]")).val()) || ""; 22 var max = toTimestamp($("input[id=".concat(facetId, "_max]")).val()) || ""; 23 window.location.href = daterange.url.replace("__date_range_min__", min).replace("__date_range_max__", max); 24 } 25 26 $("input.facet-date-range", context).on("change", autoSubmit); 27 $("input.facet-date-range", context).on("keypress", function (e) { 28 $(this).off("change blur"); 29 $(this).on("blur", autoSubmit); 30 31 if (e.keyCode === 13) { 32 autoSubmit(); 33 } 34 }); 35 } 36 }; 37})(jQuery);
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.