PageSourceSearch

https://www.scalabad.no/scripts/eniro.js

js scalabad.no collected 2026-10-08 01:16:11 UTC 3,035 bytes, 1 lines download raw bytes

1mcWeb.eniro=new function(){var n=this,t;n.service=new WebApiService("Eniro");this.people=ko.observableArray();t={data:this.people,columns:[{headerText:"",rowText:"HitLine"},{headerText:"Name",rowText:"Name"},{headerText:"Address",rowText:"DisplayAddress"},{headerText:"Telephone",rowText:"Telephone"},{headerText:"OrgNo",rowText:"OrgNo"},{headerText:"",rowText:""}],pageSize:20};ko.simpleGrid===undefined?getLibrary("knockout.simpleGrid").then(()=>{n.gridViewModel=new ko.simpleGrid.viewModel(t)}):n.gridViewModel=new ko.simpleGrid.viewModel(t);n.isBusinessSearch=ko.observable(!0);this.populatePeople=function(t){n.people.removeAll();jQuery.each(t,function(t,i){var u="",f="",e="",o="",r=[];i.Addresses!=null&&i.Addresses.length>0&&(u=i.Addresses[0].Street+" <br/> "+i.Addresses[0].Code+" "+i.Addresses[0].Locality,f=i.Addresses[0].Street,e=i.Addresses[0].Code,o=i.Addresses[0].Locality);i.Phones!=null&&i.Phones.length>0&&(r[0]=i.Phones[0].PhoneNumber,i.Phones.length>1&&(r[1]=i.Phones[1].PhoneNumber));n.people.push({HitLine:i.HitLine,Name:i.DisplayName,FirstName:i.FirstName,LastName:i.LastName,StreetAddress:f,PostCode:e,DisplayAddress:u,Telephone:r,Location:o,OrgNo:i.OrgNo,SelectedPhone:ko.observable()})})};this.selectResult=function(n){PubSub.publish("EniroResultSelected",n);jQuery("#eniro-lightbox").modal("hide");ko.cleanNode(document.getElementById("ResultLightbox"))};this.applyResultWindowBindings=function(t){n.populatePeople(JSON.parse(t));ko.applyBindings(n,document.getElementById("ResultLightbox"))};this.loadResultView=function(t,i){var r,u;if(jQuery("#EniroResultLightBox").length==0)r=jQuery('<div id="EniroResultLightBox"><\/div>'),jQuery("body").append(r),u="/Webpages/Kunde/EniroResultView.aspx",i&&(u="/Webpages/Kunde/VippsLoginResultView.aspx"),r.load(u,function(){if(r.length<1)return!1;jQuery("#eniro-lightbox").modal({show:!0});jQuery("#UpdateIcon").hide();n.applyResultWindowBindings(t);jQuery("#eniro-lightbox").on("hidden.bs.modal",function(){ko.cleanNode(document.getElementById("ResultLightbox"))});return!0});else{jQuery("#eniro-lightbox").modal({show:!0});jQuery("#UpdateIcon").hide();n.applyResultWindowBindings(t);jQuery("#eniro-lightbox").on("hidden.bs.modal",function(){ko.cleanNode(document.getElementById("ResultLightbox"))})}};this.showResults=function(t,i){n.loadResultView(t,i)};this.sendQueryAsync=function(t){var i,r;jQuery(t+" #addressSearch").val()?(n.isBusinessSearch(!1),i={text:jQuery(t+" #addressSearch").val(),commonname:jQuery("#eniroCommonName").text(),isAddressSearchCompany:!1},jQuery("#UpdateIcon").show(),n.service.GetAction("SendQueryAsync",i).then(function(t){t&&n.showResults(t)})):jQuery(t+" #addressSearchCompany").val()&&(n.isBusinessSearch(!0),r={text:jQuery(t+" #addressSearchCompany").val(),commonname:jQuery("#eniroCommonName").text(),isAddressSearchCompany:!0},jQuery("#UpdateIcon").show(),n.service.GetAction("SendQueryAsync",r).then(function(t){t&&n.showResults(t)}))};this.triggerQueryByEnter=function(t,i,r){return r.keyCode==13?(n.sendQueryAsync(t),!1):!0}}

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.