1(function ($) { 2 var selector = "div.flatpickr input.flatpickr"; 3 4 $(selector).entwine({ 5 onadd: function () { 6 if (this.hasClass("flatpickr-init")) { 7 return; 8 } 9 opts = this.data("flatpickr"); 10 if (!opts) { 11 opts = {}; 12 } 13 14 rangeInput = this.data("rangeinput"); 15 if (rangeInput) { 16 opts.plugins = [new rangePlugin({ 17 input: rangeInput 18 })]; 19 } 20 21 disabledFunc = this.data("disabledfunc"); 22 if (disabledFunc) { 23 opts.disable = [ 24 window[disabledFunc] 25 ]; 26 } 27 28 flatpickr("#" + this.attr("id"), opts); 29 this.addClass("flatpickr-init"); 30 } 31 }); 32 33 // We need to rely on this pattern otherwise on first load "onadd" is never called 34 $(function () { 35 var list = $(selector); 36 if (list.length) { 37 list.each(function () { 38 $(this).onadd(); 39 }); 40 } else { 41 console.log("Selector " + selector + " did not match anything"); 42 } 43 }); 44})(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.