1const fileInputInit = function (message, reviews = 'N') { 2 BX.Aspro.Loader.addExt('uniform').then(() => { 3 $("input[type=file]:not('.uniform-ignore')").uniform({ 4 fileButtonHtml: BX.message("JS_FILE_BUTTON_NAME"), 5 fileDefaultHtml: message 6 }); 7 8 $(document).on("change", "input[type=file]", function () { 9 if ($(this).val()) { 10 $(this).closest(".uploader").addClass("files_add"); 11 $(this).valid(); 12 } else { 13 $(this).closest(".uploader").removeClass("files_add"); 14 } 15 }); 16 17 BX.bindDelegate(document, 'click', {class: 'add_file'}, function() { 18 if (!this.closest('.form')) return; 19 20 const index = $(this).closest(".input").find("input[type=file]").length + 1; 21 22 if (reviews === 'Y') { 23 $('<input type="file" class="form-control inputfile" tabindex="3" id="comment_images_n' + index + '" name="comment_images[]" value="" />').insertBefore(this); 24 } else { 25 $('<input type="file" id="POPUP_FILE' + index + '" name="FILE_n' + index + '" class="inputfile" value="" />').inserBefore(this); 26 } 27 28 $("input[type=file]:not('.uniform-ignore')").uniform({ 29 fileButtonHtml: BX.message("JS_FILE_BUTTON_NAME"), 30 fileDefaultHtml: message, 31 }); 32 }); 33 }) 34}
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.