1$('document').ready(function () { 2 3 /* BEGIN: DO NOT CHANGE */ 4 if (Builder.getSelectedObject()) { 5 $$ = function (obj) { 6 return Builder.getSelectedObject().parent().find(obj); 7 } 8 } 9 else { 10 $$ = function (obj) { 11 return $("body").find(obj); 12 } 13 } 14 /* END: DO NOT CHANGE */ 15 16 var boxVisible = false; 17 var canSearch = false; 18 var timeoutId = false; 19 var intervalID; 20 var canSubmit = false 21 var canShowOutputBox = true; 22 var arrowControl = -2 23 var totalElements = 0; 24 25 var svgClose = '<i data-type="close" class="fa fa-close"></i>'; 26 var svgClose2 = '<i data-type="close" class="onlyResp"><svg width="16" enable-background="new 0 0 26 26" version="1.1" viewBox="0 0 26 26" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="float: left;"><path d="M14.0605469,13L24.7802734,2.2802734c0.2929688-0.2929688,0.2929688-0.7675781,0-1.0605469 s-0.7675781-0.2929688-1.0605469,0L13,11.9394531L2.2802734,1.2197266c-0.2929688-0.2929688-0.7675781-0.2929688-1.0605469,0 s-0.2929688,0.7675781,0,1.0605469L11.9394531,13L1.2197266,23.7197266c-0.2929688,0.2929688-0.2929688,0.7675781,0,1.0605469 C1.3662109,24.9267578,1.5576172,25,1.75,25s0.3837891-0.0732422,0.5302734-0.2197266L13,14.0605469l10.7197266,10.7197266 C23.8662109,24.9267578,24.0576172,25,24.25,25s0.3837891-0.0732422,0.5302734-0.2197266 c0.2929688-0.2929688,0.2929688-0.7675781,0-1.0605469L14.0605469,13z" fill="#1D1D1B"></path></svg></i>'; 27 if ($("html").attr("iconLibrary") == "grupo2") { 28 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="01-close" clip-path="url(#clip-_01-close)"> <g data-name="x (1)"> <path data-name="Linha 8" d="M0,12.5a.5.5,0,0,1-.354-.146.5.5,0,0,1,0-.707l12-12a.5.5,0,0,1,.707,0,.5.5,0,0,1,0,.707l-12,12A.5.5,0,0,1,0,12.5Z" transform="translate(6 6)"/> <path data-name="Linha 9" d="M12,12.5a.5.5,0,0,1-.354-.146l-12-12a.5.5,0,0,1,0-.707.5.5,0,0,1,.707,0l12,12A.5.5,0,0,1,12,12.5Z" transform="translate(6 6)"/> </g> </g></svg>'; 29 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="01-close" clip-path="url(#clip-_01-close)"> <g data-name="x (1)"> <path data-name="Linha 8" d="M0,12.5a.5.5,0,0,1-.354-.146.5.5,0,0,1,0-.707l12-12a.5.5,0,0,1,.707,0,.5.5,0,0,1,0,.707l-12,12A.5.5,0,0,1,0,12.5Z" transform="translate(6 6)"/> <path data-name="Linha 9" d="M12,12.5a.5.5,0,0,1-.354-.146l-12-12a.5.5,0,0,1,0-.707.5.5,0,0,1,.707,0l12,12A.5.5,0,0,1,12,12.5Z" transform="translate(6 6)"/> </g> </g></svg>'; 30 } else if ($("html").attr("iconLibrary") == "grupo2") { 31 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="02-close" clip-path="url(#clip-_02-close)"> <g transform="translate(1 1)"> <path data-name="Caminho 1810" d="M16.4,17a.6.6,0,0,1-.424-.176l-10.8-10.8a.6.6,0,0,1,.849-.849l10.8,10.8A.6.6,0,0,1,16.4,17Z" transform="translate(0)" fill="#0a0e14"/> <path data-name="Caminho 1811" d="M5.6,17a.6.6,0,0,1-.424-1.024l10.8-10.8a.6.6,0,0,1,.849.849l-10.8,10.8A.6.6,0,0,1,5.6,17Z" transform="translate(0)" fill="#0a0e14"/> </g> </g></svg>'; 32 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="02-close" clip-path="url(#clip-_02-close)"> <g transform="translate(1 1)"> <path data-name="Caminho 1810" d="M16.4,17a.6.6,0,0,1-.424-.176l-10.8-10.8a.6.6,0,0,1,.849-.849l10.8,10.8A.6.6,0,0,1,16.4,17Z" transform="translate(0)" fill="#0a0e14"/>
32 <path data-name="Caminho 1811" d="M5.6,17a.6.6,0,0,1-.424-1.024l10.8-10.8a.6.6,0,0,1,.849.849l-10.8,10.8A.6.6,0,0,1,5.6,17Z" transform="translate(0)" fill="#0a0e14"/> </g> </g></svg>'; 33 } else if ($("html").attr("iconLibrary") == "grupo3") { 34 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="03-close" clip-path="url(#clip-_03-close)"> <path data-name="Caminho 1810" d="M19,19H5V5H19ZM3,3V21H21V3ZM17,15.59,15.59,17,12,13.41,8.41,17,7,15.59,10.59,12,7,8.41,8.41,7,12,10.59,15.59,7,17,8.41,13.41,12Z"/> </g></svg>'; 35 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="03-close" clip-path="url(#clip-_03-close)"> <path data-name="Caminho 1810" d="M19,19H5V5H19ZM3,3V21H21V3ZM17,15.59,15.59,17,12,13.41,8.41,17,7,15.59,10.59,12,7,8.41,8.41,7,12,10.59,15.59,7,17,8.41,13.41,12Z"/> </g></svg>'; 36 } else if ($("html").attr("iconLibrary") == "grupo4") { 37 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="04-close" clip-path="url(#clip-_04-close)"> <g > <path data-name="Linha 6" d="M0,13a1,1,0,0,1-.707-.293,1,1,0,0,1,0-1.414l12-12a1,1,0,0,1,1.414,0,1,1,0,0,1,0,1.414l-12,12A1,1,0,0,1,0,13Z" transform="translate(6 6)"/> <path data-name="Linha 7" d="M12,13a1,1,0,0,1-.707-.293l-12-12a1,1,0,0,1,0-1.414,1,1,0,0,1,1.414,0l12,12A1,1,0,0,1,12,13Z" transform="translate(6 6)"/> </g> </g></svg>'; 38 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="04-close" clip-path="url(#clip-_04-close)"> <g > <path data-name="Linha 6" d="M0,13a1,1,0,0,1-.707-.293,1,1,0,0,1,0-1.414l12-12a1,1,0,0,1,1.414,0,1,1,0,0,1,0,1.414l-12,12A1,1,0,0,1,0,13Z" transform="translate(6 6)"/> <path data-name="Linha 7" d="M12,13a1,1,0,0,1-.707-.293l-12-12a1,1,0,0,1,0-1.414,1,1,0,0,1,1.414,0l12,12A1,1,0,0,1,12,13Z" transform="translate(6 6)"/> </g> </g></svg>'; 39 } else if ($("html").attr("iconLibrary") == "grupo5") { 40 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="05-close" clip-path="url(#clip-_05-close)"> <path data-name="Caminho 173" d="M0,0H20V20H0Z" fill="none"/> <g transform="translate(5 5)"> <path data-name="close" d="M6.225,4.811A1,1,0,0,0,4.811,6.225L10.586,12,4.811,17.775a1,1,0,0,0,1.414,1.414L12,13.414l5.775,5.775a1,1,0,0,0,1.414-1.414L13.414,12l5.775-5.775a1,1,0,0,0-1.414-1.414L12,10.586Z" transform="translate(-4.518 -4.518)"/> </g> </g></svg>'; 41 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="05-close" clip-path="url(#clip-_05-close)"> <path data-name="Caminho 173" d="M0,0H20V20H0Z" fill="none"/> <g transform="translate(5 5)"> <path data-name="close" d="M6.225,4.811A1,1,0,0,0,4.811,6.225L10.586,12,4.811,17.775a1,1,0,0,0,1.414,1.414L12,13.414l5.775,5.775a1,1,0,0,0,1.414-1.414L13.414,12l5.775-5.775a1,1,0,0,0-1.414-1.414L12,10.586Z" transform="translate(-4.518 -4.518)"/> </g> </g></svg>'; 42 } else if ($("html").attr("iconLibrary") == "grupo6") { 43 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="06-close" clip-path="url(#clip-_06-close)">
43 <path data-name="União 1" d="M-411.363-461.666l-5.94,5.94-1.7-1.7,5.94-5.94L-419-469.3l1.7-1.7,5.94,5.94,5.94-5.94,1.7,1.7-5.94,5.94,5.94,5.94-1.7,1.7Z" transform="translate(423.363 475.363)"/> </g></svg>'; 44 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="06-close" clip-path="url(#clip-_06-close)"> <path data-name="União 1" d="M-411.363-461.666l-5.94,5.94-1.7-1.7,5.94-5.94L-419-469.3l1.7-1.7,5.94,5.94,5.94-5.94,1.7,1.7-5.94,5.94,5.94,5.94-1.7,1.7Z" transform="translate(423.363 475.363)"/> </g></svg>'; 45 } else if ($("html").attr("iconLibrary") == "grupo7") { 46 svgClose = '<svg data-type="close" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="07-close" clip-path="url(#clip-_07-close)"> <path d="M10.707,10.5l5.646-5.646a.5.5,0,1,0-.707-.707L10,9.793,4.354,4.147a.5.5,0,0,0-.707.707L9.293,10.5,3.647,16.146a.5.5,0,0,0,.708.707L10,11.207l5.646,5.646a.5.5,0,0,0,.708-.707L10.709,10.5Z" transform="translate(1.999 1.5)"/> </g></svg>'; 47 svgClose2 = '<svg data-type="close" class="onlyResp" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24"> <defs> <clipPath > <rect width="24" height="24"/> </clipPath> </defs> <g data-name="07-close" clip-path="url(#clip-_07-close)"> <path d="M10.707,10.5l5.646-5.646a.5.5,0,1,0-.707-.707L10,9.793,4.354,4.147a.5.5,0,0,0-.707.707L9.293,10.5,3.647,16.146a.5.5,0,0,0,.708.707L10,11.207l5.646,5.646a.5.5,0,0,0,.708-.707L10.709,10.5Z" transform="translate(1.999 1.5)"/> </g></svg>'; 48 } 49 50 51 if ($(window).width() > 768) { 52 var tradPesquisa = ""; 53 if ($("[module='search'][tsplugin=1]").length > 0) { 54 tradPesquisa = ""; 55 var optPesquisa = JSON.parse(Base64.decode($("[module='search'][tsplugin=1]").attr("builder_module"))); 56 tradPesquisa = optPesquisa.defaultText.value; 57 } 58 if ($("#omw-search-panel-result[mobilesearch='nao']").length == 0) { 59 $("body").append('<div class="omw-plugin-preview" mobilesearch="nao" id="omw-search-panel-result" style="display:none;width:100%;background:rgba(209,58,122,.95);height:100%;z-index:9999997 !important;position:fixed;top:0;left:0;text-align:center" ><div class="iconPesq_close" style="position:absolute;right:55px;top: 32px; font-size:30px;">' + svgClose + ' ' + svgClose2 + '</div><div class="iconPesq_search" style="position:absolute;right:55px;top: 55px; font-size:30px;"><i class=""><svg width="16" enable-background="new 0 0 26 26" version="1.1" viewBox="0 0 26 26" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M14.9462891,1C9.4033203,1,4.8935547,5.5097656,4.8935547,11.0532227 c0,2.5022583,0.9248047,4.7885132,2.4428101,6.5498657l-6.1166382,6.1166382c-0.2929688,0.2929688-0.2929688,0.7675781,0,1.0605469 C1.3662109,24.9267578,1.5576172,25,1.75,25s0.3837891-0.0732422,0.5302734-0.2197266l6.1165771-6.1165771 c1.7612305,1.5180054,4.0474243,2.442749,6.5494385,2.442749C20.4902344,21.1064453,25,16.5966797,25,11.0532227 S20.4902344,1,14.9462891,1z M14.9462891,19.6064453c-4.7158203,0-8.5527344-3.8369141-8.5527344-8.5532227 S10.2304688,2.5,14.9462891,2.5C19.6630859,2.5,23.5,6.3369141,23.5,11.0532227S19.6630859,19.6064453,14.9462891,19.6064453z" fill="#1D1D1B"></path></svg></i></div><div style="float:left;margin-top:20px;width:100%;"><span style="color:white;font-size:30px" class="module-title">' + tradPesquisa + '</span><br><br><form role="search" class="form_pesq_1" action="' + translations.i18n["trad20"] + '"><input type="text" style="border:none;width: 100%;padding-bottom:10px;border-bottom: 2px solid rgba(255,255,255);max-width: 500px;font-size:60px;background-color:transparent;color:white;text-align:center;" autofocus><label style="margin: 10px auto 0px; color: rgba(255, 255, 255, 0.5);opacity:0;width:100%;">
59' + translations.i18n["trad21"] + '</label><button type="submit" style="display:none;">Send</button></form><div class="form_pesq_1_output"></div></div></div>'); 60 } 61 62 $$("[module='search'] i.btnpesquisa").on("click", function () { 63 $("#omw-search-panel-result[mobilesearch='nao']").fadeIn().css("display", "table").find("input").focus(); 64 }); 65 66 //$("body").on("click", "#close", function () { 67 $("body").on("click", "[data-type='close']", function () { 68 $("#omw-search-panel-result[mobilesearch='nao'] input").val(""); 69 $("#omw-search-panel-result[mobilesearch='nao'] .form_pesq_1_output").html(""); 70 $("#omw-search-panel-result[mobilesearch='nao']").find("label").animate({ 71 opacity: 0 72 }, 300, function () { 73 $("#omw-search-panel-result[mobilesearch='nao']").find("label").removeClass("mostraMsgPesq"); 74 }); 75 $("#omw-search-panel-result[mobilesearch='nao']").fadeOut(); 76 }); 77 78 try { 79 var builderSettings = $.parseJSON(Base64.decode($$("[module='search']").attr("builder_module"))); 80 $.each(builderSettings, function (key, val) { 81 if (key == "defaultText") { 82 $("#omw-search-panel-result[mobilesearch='nao'] .module-title").html(val["value"]); 83 } 84 }) 85 } 86 catch (err) { } 87 88 $("body").on("keyup", "#omw-search-panel-result[mobilesearch='nao'] form input", function () { 89 var c = $("#omw-search-panel-result[mobilesearch='nao'] .module-title").css("color"); 90 var rgb = c.match(/\d+/g); 91 var rgbaColor = "rgba(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ",0.5)"; 92 $("#omw-search-panel-result[mobilesearch='nao'] form label").css("color", rgbaColor); 93 var searchString = $(this).val(); 94 if ((searchString.length > 2)) { 95 $("#omw-search-panel-result[mobilesearch='nao'] form label").animate({ 96 opacity: 0 97 }, 500, function () { 98 // $("#omw-search-panel-result .mostraMsgPesq").css("display","none"); 99 $("#omw-search-panel-result[mobilesearch='nao'] .mostraMsgPesq").addClass("escondePesqmobileMessage"); 100 }); 101 } else { 102 $("#omw-search-panel-result[mobilesearch='nao'] form label").animate({ 103 opacity: 1 104 }, 500, function () { 105 $("#omw-search-panel-result[mobilesearch='nao'] .mostraMsgPesq").removeClass("escondePesqmobileMessage"); 106 }); 107 } 108 }) 109 110 $("body").on("submit", "#omw-search-panel-result[mobilesearch='nao'] form", function (event) { 111 event.preventDefault(); 112 var pesqTerm = $(this).find("input").val(); 113 if (pesqTerm.length >= 2) { 114 // var pesqUrl = "/" + $("html").attr("lang") + "/" + $(this).attr("action") + "/" + pesqTerm; 115 var pesqUrl = "/" + $("html").attr("lang") + "/" + translations.i18n["trad2420"] + "/" + pesqTerm; 116 //console.log(document.location.hostname) 117 // var pesqUrl = $(this).attr("action") + "/" + pesqTerm; 118 location.href = pesqUrl; 119 } else { 120 $(this).find("label").addClass("mostraMsgPesq"); 121 $(this).find("label").animate({ 122 opacity: 1 123 }, 300, function () { 124 // Animation complete. 125 }); 126 } 127 }) 128 } 129 130 131 132 $("#omw-search-panel-result.omw-plugin-preview[mobilesearch='nao'] input").keydown(function (e) { 133 if (e.keyCode == '40') { 134 $(".lineResult").eq(0).click() 135 $(".lineResult").eq(0).addClass("active") 136 e.preventDefault(); 137 } 138 }) 139 140 $("#omw-search-panel-result.omw-plugin-preview[mobilesearch='nao'] input").off("keyup").on("keyup", function (e) { 141 var searchString = $(this).val(); 142 143 // Clear Timeout 144 clearTimeout(timeoutId); 145 146 if (e.keyCode == '13') { 147 canSubmit = true; 148 $(this).closest(".form_pesq_1").submit(); 149 return 150 } 151 152 if ((searchString.length >= 2) && (!boxVisible)) { 153 boxVisible = true; 154 canSearch = true; 155 $(this).closest(".form_pesq_1").find("label").fadeOut("fast"); 156 } 157 else if ((searchString.length < 2) && boxVisible) { 158 boxVisible = false 159 canSearch = false 160 $(this).closest(".form_pesq_1").find("label").fadeIn("fast"); 161 } 162 163 if (canShowOutputBox) { 164 165 if (boxVisible) { 166 167 // $(this).closest(".omw-plugin-preview").find(".form_pesq_1_output").css({"position":"absolute","top": parseInt($(this).closest(".omw-plugin-search-container").outerHeight()-1) + "px","left": 0, "width" : $(this).closest(".omw-plugin-search-container").outerWidth() });
168 $(this).closest(".omw-plugin-preview").find(".form_pesq_1_output").fadeIn("fast"); 169 } 170 else { 171 $(this).closest(".omw-plugin-preview").find(".form_pesq_1_output").fadeOut("fast", function () { 172 }); 173 174 } 175 176 if (canSearch) { 177 try { 178 $tbody.keynavigator.$parent.empty(); 179 } 180 catch (error) { } 181 182 var objSearch = $(this).closest(".omw-plugin-preview").find(".form_pesq_1_output"); 183 184 185 timeoutId = setTimeout(function(){ 186 187 $.ajax({ 188 type: "POST", 189 //url:"/_inc/global_assets/omw/searchV2.php?search=" + searchString, 190 url: "/_inc/global_assets/omw/searchV2.php?lang=" + $("meta[http-equiv='content-language'").attr("content") + "&search=" + searchString, 191 192 dataType: "html", 193 success: function (html) { 194 objSearch.html(html) 195 var totalElements = objSearch.find(".lineResult").length; 196 // $tbody.keynavigator.$parent.append(html); 197 // $tbody.keynavigator.reBuild(); 198 }, 199 error: function (xmlRequest, errorCode) { 200 } 201 }); 202 }, 800); 203 } 204 } 205 }) 206 207 208 $("#omw-search-panel-result").each(function(){ 209 if(!$(this).attr("mobilesearch")){ 210 $(this).remove(); 211 } 212 }); 213 214 $("[module='form'] .omw-customField label").each(function(){ 215 if($(this).is(":hidden")===true){ 216 $(this).remove(); 217 } 218 }) 219 220});
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.