1/* 2 3 Copyright 2014-2019 Riccardo Massera (TheCoder4.Eu) 4 BootsFaces JS 5 author: TheCoder4.eu 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18*/ 19var process=process||{env:{NODE_ENV:"development"}};BsF={ajax:{},onCompleteCallback:{},onErrorCallback:{},onSuccessCallback:{},blockBlockUI:!1}; 20BsF.ajax.onevent=function(a){if("begin"===a.status)$.blockUI&&null!=$.blockUI&&!BsF.blockBlockUI&&$.blockUI();else if("complete"===a.status){var b=a.source.id.replace(/[^a-zA-Z0-9]+/g,"_");(b=null!=a.responseText&&0<=a.responseText.indexOf("<error><error-name>")?BsF.onErrorCallback[b]:BsF.onSuccessCallback[b])&&null!=b&&"undefined"!=typeof b&&b();$.blockUI&&null!=$.blockUI&&$.unblockUI()}"success"==a.status&&(b=a.source.id.replace(/[^a-zA-Z0-9]+/g,"_"),(b=BsF.onCompleteCallback[b])&&null!=b&&"undefined"!= 21typeof b&&b());"error"==a.status&&(b=a.source.id.replace(/[^a-zA-Z0-9]+/g,"_"),(b=BsF.onErrorCallback[b])&&null!=b&&"undefined"!=typeof b&&b())};BsF.ajax.cb=function(a,b,c,d){BsF.ajax.callAjax(a,b,c,"@all",d,null)}; 22BsF.ajax.callAjax=function(a,b,c,d,e,f,h,n,p,k){if(null==a.id||""==a.id)a=a.parentNode;var l=a.id,m=l.replace(/[^a-zA-Z0-9]+/g,"_"),g={};n&&(g.params={BsFEvent:n});(c=BsF.ajax.resolveJQuery(c))&&null!=c&&(g.render=c);(d=BsF.ajax.resolveJQuery(d))&&null!=d&&(g.execute=d);g[l]=l;BsF.onCompleteCallback[m]=e&&null!=e?e:null;BsF.onErrorCallback[m]=f&&null!=f?f:null;BsF.onSuccessCallback[m]=h&&null!=h?h:null;g.onevent=BsF.ajax.onevent;p&&(g.delay=p);if(k)for(var q in k)c=k[q],"object"===typeof c&&("Array"!= 23c.constructor.name||1<c.length)&&(c=JSON.stringify(c).replace(/"/g,"'")),g[q]=c;BsF.blockBlockUI="true"===g["blockui.disabled"];faces.ajax.request(a,b,g);return!1};BsF.ajax.resolveJQuery=function(a){if("undefined"==typeof a||null==a)return"";var b="";a=a.split(" ");for(i=0;i<a.length;i++)if(part=a[i],0==part.indexOf("@(")&&part.lastIndexOf(")")==part.length-1){var c=part.substring(2,part.length-1);(c=$(c))&&c.each(function(d,e){b+=e.id+" "})}else b+=part+" ";return b.trim()}; 24BsF.ajax.paginate=function(a,b,c,d,e){a={execute:"@this"};a.render=e;a[d]=c;faces.ajax.request(d,b,a);return!1};if($.datepicker){var generateHTML_orig=$.datepicker._generateHTML;$.datepicker._generateHTML=function(){var a=generateHTML_orig.apply(this,arguments);a=a.replace(/<span\s+class='ui-icon\s+ui-icon-circle-triangle-w'\s*>[^<]+<\/span>/,'<span class="glyphicon glyphicon-chevron-left"></span>');return a=a.replace(/<span\s+class='ui-icon\s+ui-icon-circle-triangle-e'\s*>[^<]+<\/span>/,'<span class="glyphicon glyphicon-chevron-right"></span>')}} 25function jq(a){return"#"+a.replace(/(:|\.|\[|\]|,)/g,"\\$1")}BsF.substringMatcher=function(a){return function(b,c){var d=[];substrRegex=new RegExp(b,"i");$.each(a,function(e,f){substrRegex.test(f)&&d.push(f)});c(d)}};BsF.addParametersToForm=function(a,b){var c=[];a.parametersAddedTemporarily=c;var d=0,e;for(e in b)if(b.hasOwnProperty(e)){var f=document.createElement("input");f.type="hidden";f.name=e;f.value=b[e];a.appendChild(f);c[d++]=f}}; 26BsF.submitForm=function(a,b){a=document.getElementById(a);BsF.addParametersToForm(a,b);a.onsubmit?(b=a.onsubmit(),("undefined"==typeof b||b)&&a.submit()):a.submit();BsF.removeTemporalParametersFromForm(a)};BsF.removeTemporalParametersFromForm=function(a){var b=a.parametersAddedTemporarily;if(null!==b)for(var c=0;c<b.length;c++)a.removeChild(b[c])};
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.