PageSourceSearch

https://shop.steris.com/wcsstore/Widgets-Steris/com.steris.commerc…/GlobalLoginShopOnBehalf*1788449354000.js

js steris.com collected 2026-09-24 17:57:39 UTC 11,286 bytes, 1 lines download raw bytes

1GlobalLoginShopOnBehalfJS={USER_SEARCH_CRITERIA_TOPIC:"userSearchCriteriaChanged",firstNameSearchType:3,lastNameSearchType:3,updateTimer:null,timeOut:1e3,buyerSearchURL:"",loadedPanels:{},callerId:"",logoutURL:null,redirectURL:null,setCallerId:function(a){this.callerId=a},setBuyerSearchURL:function(a){this.buyerSearchURL=a},setControllerURL:function(a){wc.render.getRefreshControllerById("GlobalLoginShopOnBehalf_controller").url=a},registerShopOnBehalfPanel:function(a,b){this.loadedPanels[a]=b},isPageUsingHTTP:function(){return"http:"==document.location.protocol},initHTTPSecure:function(){var a="https://"+document.location.host+document.location.pathname;null!=document.location.search&&""!=document.location.search&&(a+=document.location.search),setCookie("WC_DisplayContractPanel_"+WCParamJS.storeId,!0,{path:"/",domain:cookieDomain}),setCookie("WC_ToogleOnBehalfPanel_"+WCParamJS.storeId,!0,{path:"/",domain:cookieDomain}),window.location.href=a},initializePanels:function(){if(null!=this.loadedPanels)for(var a in this.loadedPanels){var b=dojo.byId(a);null!=b&&this.initializePanel(a,this.loadedPanels[a])}},initializePanel:function(a,b){var c=require("dojo/dom-attr"),d=c.get(a,"isEventsSetup");if(null==d||!d){this.setUpEvents(a),c.set(a,"isEventsSetup",!0);var e=getCookie("WC_ToogleOnBehalfPanel_"+WCParamJS.storeId);null!=e&&e&&(this.toggleShopOnBehalfPanel(a+"_shopOnBehalfCheckBox",b,a),setCookie("WC_ToogleOnBehalfPanel_"+WCParamJS.storeId,null,{path:"/",expires:-1}))}var f="",g=dojo.byId(a+"_callerId");null!=g&&(f=g.innerHTML),this.setCallerId(f)},toggleShopOnBehalfPanel:function(a,b,c){if(this.isPageUsingHTTP())this.initHTTPSecure();else{require(["dojo/dom-attr","dojo/dom-style"],function(d,e){var f=d.get(a,"src");-1==f.indexOf("checked")?(d.set(a,"src",f.replace("checkbox","checkbox_checked")),e.set(b,"display","none"),e.set(c,"display","block")):(d.set(a,"src",f.replace("checkbox_checked","checkbox")),e.set(c,"display","none"),e.set(b,"display","block"))})}},setUpEvents:function(a){var b=this;require(["dojo/on","dojo/topic","dojo/dom-construct","dojo/dom","dojo/domReady!","dojo/dom-attr","dojo/dom-style"],function(c,d,e,f,g,h,i){var j=a+"_buyerUserName",k=a+"_errorLabel",l=dojo.byId(j);null!=l&&(c(l,"keyup",function(a){var c={buyerSearchInput:l.value,"data-parent":h.get(l,"data-parent"),originator:l.id,searchErrorLabel:k};a.keyCode!=dojo.keys.TAB&&d.publish(b.USER_SEARCH_CRITERIA_TOPIC,c)}),d.subscribe(b.USER_SEARCH_CRITERIA_TOPIC,function(a){a.buyerSearchInput=l.value,clearTimeout(b.updateTimer),b.updateTimer=setTimeout(dojo.hitch(b,"updateSearchResults",a),b.timeOut)}))})},updateSearchResults:function(a){if("undefined"!==a.buyerSearchInput){var b=new String(a.buyerSearchInput),c=b;a.lastName=c,this.performSearch(a)}},performSearch:function(a){var b=wc.render.getContextById("GlobalLoginShopOnBehalf_context"),c=a.lastName,d=b.properties.previousLastName;if(c!=d&&""!=c){b.properties.previousLastName=c;if(require("dojo/dom-style").set(a.originator+"Error","display","none"),setCurrentId(a.originator),!submitRequest())return;cursor_wait(),require(["dojo/request/xhr"],function(b){b(GlobalLoginShopOnBehalfJS.buyerSearchURL,{handleAs:"json",method:"GET",query:{lastName:c,lastNameSearchType:GlobalLoginShopOnBehalfJS.lastNameSearchType},headers:{"Content-Type":"text/plain; charset=utf-8"}}).then(function(b){cursor_clear(),GlobalLoginShopOnBehalfJS.displaySearchResults(b,a)},function(b){cursor_clear(),b.errorCode="GENERICERR_MAINTEXT",GlobalLoginShopOnBehalfJS.handleError(b,a)})})}},displaySearchResults:function(a,b){var c=this,d=document.getElementById(b.searchErrorLabel);require(["dojo/store/Memory"],function(e){var f=[],g=!1;require(["dojo/_base/config"],function(a){"ja-jp"!=a.locale&&"ko-kr"!=a.locale&&"zh-cn"!=a.locale&&"zh-tw"!=a.locale||(g=!0)});var h=require("dojo/_base/lang"),i=require("dojo/dom-class");if(null!=a&&null!=a.userDataBeans&&a.userDataBeans.length>0){i.remove(d,"active");for(var j=0;j<a.userDataBeans.length;j++){var k=a.userDataBeans[j];k.displayName="";var l="",m="";null!=k.firstName&&""!=h.trim(k.firstName)&&(l=g?" "+k.firstName:k.firstName+" "),null!=k.lastName&&""!=h.trim(k.lastName)&&(m=k.lastName),k.displayName=g?m+l:l+m,k.fullName=h.trim(k.displayName),k.displayName+=" ("+k.logonId+")",k.displayName=h.trim(k.displayName)}f=a.userDataBeans}else i.add(d,"active");var n=new e({idProperty:"userId",data:f});n.remove(c.callerId);var o=b.originator,p=dijit.byId(o);p.searchAttr="displayName",p.store=n,p.toggleDropDown()})},handleError:function(a,b){var c=null;null!=a.errorMessage?c=a.errorMessage:null!=a.errorMessageKey?c=MessageHelper.messages[a.errorMessageKey]:null!=a.errorCode&&(c=MessageHelper.messages[a.errorCode]),null!=c&&""!=c||(c=MessageHelper.messages.GENERICERR_MAINTEXT),dojo.byId(b).innerHTML=c,require("dojo/dom-style").set(b,"display","block")},selectUser:function(a){var b=dijit.byId(a.id),c=b.item;if(null!=c&&"-1"!=c.userId){var d=wc.render.getContextById("GlobalLoginShopOnBehalf_context");if(d.properties.selectedUser=c,d.properties.shopOnBehalfPanelId=a["data-parent"],d.properties.shopForSelfPanelId=this.loadedPanels[a["data-parent"]],setCurrentId(a.id),!submitRequest())return;cursor_wait();var e=document.forms.shopOnBehalf_AuthTokenInfo,f=e.shopOnBehalf_AuthToken.value;wc.service.invoke("RunAsUserSetInSessionService",{runAsUserId:c.userId,authToken:f})}},onUserSetInSession:function(){var a=wc.render.getContextById("GlobalLoginShopOnBehalf_context"),b=a.properties.selectedUser;setCookie("WC_BuyOnBehalf_"+WCParamJS.storeId,escapeXml(b.fullName,!0),{path:"/",domain:cookieDomain});GlobalLoginJS.widgetsLoadedOnPage;setDeleteCartCookie(),setCookie("WC_DisplayContractPanel_"+WCParamJS.storeId,!0,{path:"/",domain:cookieDomain}),document.location.href="AjaxLogonForm?storeId="+WCParamJS.storeId+"&catalogId="+WCParamJS.catalogId+"&langId="+WCParamJS.langId+"&myAcctMain=1"},updateOrganization:function(a){var b=dijit.byId(a.id),c=b.value,d=wc.render.getContextById("GlobalLoginShopOnBehalf_context");d.properties.shopOnBehalfPanelId=b["data-parent"],d.properties.shopForSelfPanelId=this.loadedPanels[b["data-
1parent"]],setCurrentId(a.id),submitRequest()&&(cursor_wait(),wc.service.invoke("OrganizationSetInSessionService",{activeOrgId:c}))},updateContract:function(a){var b=dijit.byId(a.id),c=b.value,d=wc.render.getContextById("GlobalLoginShopOnBehalf_context");d.properties.shopOnBehalfPanelId=b["data-parent"],d.properties.shopForSelfPanelId=this.loadedPanels[b["data-parent"]],setCurrentId(b.id),submitRequest()&&(cursor_wait(),wc.service.invoke("ContractSetInSessionService",{contractId:c}))},clearUserSetInSession:function(a,b){null!=a&&""!=a&&setCurrentId(a.id),submitRequest()&&(cursor_wait(),this.logoutURL=null,this.redirectURL=b,wc.service.invoke("RestoreOriginalUserSetInSessionService"))},clearUserSetInSessionAndLogoff:function(a){submitRequest()&&(cursor_wait(),this.logoutURL=a,this.redirectURL=null,wc.service.invoke("RestoreOriginalUserSetInSessionService"))},restoreCSRSessionAndRedirect:function(a){GlobalLoginJS.deleteUserLogonIdCookie(),GlobalLoginShopOnBehalfJS.deleteBuyerUserNameCookie(),GlobalLoginShopOnBehalfJS.clearUserSetInSession("",a)},onRestoreUserSetInSession:function(){setCookie("WC_BuyOnBehalf_"+WCParamJS.storeId,null,{path:"/",expires:-1,domain:cookieDomain}),setDeleteCartCookie(),deleteOnBehalfRoleCookie(),"-1"!=this.redirectURL&&(null==this.logoutURL&&null==this.redirectURL?stringStartsWith(document.location.href,"https")?document.location.href=WCParamJS.homePageURL:document.location.reload():null!=this.redirectURL&&"-1"!=this.redirectURL?document.location.href=this.redirectURL:logout(this.logoutURL))},updateSignOutLink:function(a){var b=a+"_",c=dojo.byId(b+"signOutQuickLinkUser");if(null!=c){var d="",e=getCookie("WC_LogonUserId_"+WCParamJS.storeId);void 0!==e&&(d=e),c.innerHTML=escapeXml(d,!0);var f="",g=getCookie("WC_BuyOnBehalf_"+WCParamJS.storeId);void 0!==g&&(f=escapeXml(g,!0)),""!=f&&(c.innerHTML+=" ("+f+")")}},deleteBuyerUserNameCookie:function(){setCookie("WC_BuyOnBehalf_"+WCParamJS.storeId,null,{expires:-1,path:"/",domain:cookieDomain});GlobalLoginJS.widgetsLoadedOnPage},resetBuyerUserNameCookie:function(a){setCookie("WC_BuyOnBehalf_"+WCParamJS.storeId,escapeXml(a,!0),{path:"/",domain:cookieDomain})},resetDropdown:function(a){dijit.byId(a.id).reset()}},wc.render.declareContext("GlobalLoginShopOnBehalf_context",{previousLastName:null,firstName:null,lastName:null},""),wc.service.declare({id:"RunAsUserSetInSessionService",actionId:"RunAsUserSetInSession",url:"AjaxRunAsUserSetInSession",formId:"",successHandler:function(a){GlobalLoginShopOnBehalfJS.onUserSetInSession(),cursor_clear()},failureHandler:function(a){var b=wc.render.getContextById("GlobalLoginShopOnBehalf_context");GlobalLoginShopOnBehalfJS.handleError(a,b.properties.shopOnBehalfPanelId+"_ErrorField"),cursor_clear()}}),wc.service.declare({id:"OrganizationSetInSessionService",actionId:"OrganizationSetInSession",url:"AjaxOrganizationSetInSession",formId:"",successHandler:function(a){wc.service.invoke("SetPreferredOrganizationService",{preferredOrgId:organizationSelected}),cursor_clear()},failureHandler:function(a){var b=wc.render.getContextById("GlobalLoginShopOnBehalf_context");GlobalLoginShopOnBehalfJS.handleError(a,b.properties.shopOnBehalfPanelId+"_ErrorField"),cursor_clear()}}),wc.service.declare({id:"ContractSetInSessionService",actionId:"ContractSetInSession",url:"AjaxContractSetInSession",formId:"",successHandler:function(a){cursor_clear()},failureHandler:function(a){var b=wc.render.getContextById("GlobalLoginShopOnBehalf_context");GlobalLoginShopOnBehalfJS.handleError(a,b.properties.shopOnBehalfPanelId+"_ErrorField"),cursor_clear()}}),wc.service.declare({id:"RestoreOriginalUserSetInSessionService",actionId:"RestoreOriginalUserSetInSessionService",url:"AjaxRestoreOriginalUserSetInSession?"+getCommonParametersQueryString(),formId:"",successHandler:function(a){if("undefined"!=typeof callCenterIntegrationJS&&void 0!=callCenterIntegrationJS&&null!=callCenterIntegrationJS){var b={};b.status="success",b.serviceResponse=a,callCenterIntegrationJS.postActionMessage(b,"TERMINATE_ON_BEHALF_SESSION_RESPONSE")}GlobalLoginShopOnBehalfJS.onRestoreUserSetInSession(),cursor_clear()}
1,failureHandler:function(a){if("undefined"!=typeof callCenterIntegrationJS&&void 0!=callCenterIntegrationJS&&null!=callCenterIntegrationJS){var b={};b.status="error",b.serviceResponse=a,callCenterIntegrationJS.postActionMessage(b,"TERMINATE_ON_BEHALF_SESSION_RESPONSE")}var c=wc.render.getContextById("GlobalLoginShopOnBehalf_context");GlobalLoginShopOnBehalfJS.handleError(a,c.properties.shopOnBehalfPanelId+"_ErrorField"),cursor_clear()}}),wc.render.declareRefreshController({id:"GlobalLoginShopOnBehalf_controller",renderContext:wc.render.getContextById("GlobalLoginShopOnBehalf_context"),url:"",formId:"",renderContextChangedHandler:function(a,b){var c=this.renderContext;b.refresh(c.properties)},postRefreshHandler:function(a){var b=this.renderContext;delete b.properties.selectedUser,delete b.properties.firstName,delete b.properties.lastName,delete b.properties.previousFirstName,delete b.properties.previousLastName,delete b.properties.showOnBehalfPanel,GlobalLoginShopOnBehalfJS.initializePanels(),cursor_clear()}});

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.