// create a test node off the browser screen to calculate high contrast mode var testNode = document.createElement("div"); testNode.className = "highContrastTestNode"; document.body.appendChild(testNode); // look at the computed style for the test node var styles = null; try { styles = document.defaultView.getComputedStyle(testNode, ""); } catch(e) { styles = testNode.currentStyle; } var testImg = styles.backgroundImage; if ((styles.borderTopColor == styles.borderRightColor) || (testImg != null && (testImg == "none" || testImg == "url(invalid-url:)" ))) { document.getElementsByTagName("body")[0].className+=" lotusImagesOff"; } document.body.removeChild(testNode);(function(){ var _1=ibmCfg.portalConfig.contentHandlerURI+"?uri=menu:${id}"; var _2=false; var _3=function(){ return i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); }; if(typeof wptheme==="undefined"||!wptheme){ wptheme={}; } i$.mash(wptheme,{getWindowIDFromSkin:function(_4){ while((_4=_4.parentNode)!=null){ if(i$.hasClass(_4,"component-control")){ var m=_4&&(_4.className||"").match(/id-([\S]+)/); return m&&m[1]; } } return null; },getPortletState:function(_5){ var _6=i$.byId("portletState"); if(_6){ if(!_6._cache){ _6._cache=i$.fromJson(_6.innerHTML); _6._cache._defaults={"windowState":"normal","portletMode":"view"}; } if(_6._cache[_5]){ return _6._cache[_5]; }else{ return _6._cache._defaults; } } return {}; },isValidOp:function(_7){ if(_7.visibility===false){ return false; } var _8=_7.metadata||{}; switch(_7.id){ case "ibm.portal.operations.changePortletMode": return wptheme.getPortletState(_8.wid).portletMode!=_8.portletMode; case "ibm.portal.operations.changeWindowState": return wptheme.getPortletState(_8.wid).windowState!=_8.windowState; default: } return true; },operation:{changeToHelpMode:function(_9){ var _a=window.location.href; if(_9.actionUrl){ if(_9.actionUrl.indexOf("?")==0){ var _b=_a.indexOf("#"); if(_b!=-1){ var _c=_a.substring(0,_b); var _d=_a.substring(_b); _a=_c+(_c.indexOf("?")==-1?"?":"&")+_9.actionUrl.substring(1); _a+=_d; }else{ _a+=(_a.indexOf("?")==-1?"?":"&")+_9.actionUrl.substring(1); } }else{ _a=_9.actionUrl; } } window.open(_a,"","resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,width=800,height=600,screenX=10,screenY=10,top=10,left=10"); }},canImpersonate:function(){ return ibmCfg.portalConfig.canImpersonate; },contextMenu:{cache:{},css:{focus:"wpthemeMenuFocus",disabled:"wpthemeMenuDisabled",show:"wpthemeMenuShow",error:"wpthemeMenuError",menuTemplate:"wpthemeTemplateMenu",submenuTemplate:"wpthemeTemplateSubmenu",loadingTemplate:"wpthemeTemplateLoading"},init:function(_e,_f,_10){ _e._contextMenu=_e._contextMenu||{}; _e._contextMenu.id=_e._contextMenu.id||Math.round(Math.random()*1000000000); _e.setAttribute("id",_e._contextMenu.id); _e._contextMenu.menuId=_f; _e._contextMenu.jsonQuery=_10; var _11=_e._contextMenu; var _12=function(_13){ if(_13.displayMenu){ i$.fireEvent("wptheme/contextMenu/close/all"); wptheme.contextMenu._updateAbsolutePosition(i$.byId(_11.id)); var _14=wptheme.contextMenu._adjustScreenPositionStart(); i$.addClass((_11.shadowNode)?_11.shadowNode:i$.byId(_11.id),wptheme.contextMenu.css.show); wptheme.contextMenu._adjustScreenPositionEnd(_14); var _15=i$.byId(_11.id)._firstSelectable; if(_15){ _15.focus(); i$.byId(_11.id)._currentSelected=_15; } i$.addListener("wptheme/contextMenu/close/all",function(){ var _16=i$.byId(_11.id); i$.removeClass((_11.shadowNode)?_11.shadowNode:_16,wptheme.contextMenu.css.show); }); } }; wptheme.contextMenu._initialize(_e).then(_12,_12); _e=null; },initSubmenu:function(_17,_18,_19){ _17._contextMenu=_17._contextMenu||{}; _17._contextMenu._submenu=true; _17._contextMenu._menuitemTemplate=_19._menuitemTemplate; _17._contextMenu._subMenuTemplate=_19._subMenuTemplate; _17._contextMenu._loadingTemplate=_19._loadingTemplate; wptheme.contextMenu.init(_17,_18,_19.jsonQuery); },_findFocusNode:function(_1a){ var _1b,i,_1c; var _1d=function(_1e,_1f){ var l=_1e.childNodes.length; for(i=0;i=0;i--){ _24=_26.childNodes[i]; if(i$.hasClass(_24,wptheme.contextMenu.css.menuTemplate)){ _21=_24; continue; } if(i$.hasClass(_24,wptheme.contextMenu.css.submenuTemplate)){ _22=_24; continue; } if(i$.hasClass(_24,wptheme.contextMenu.css.loadingTemplate)){ _23=_24; continue; } if(_24.childNodes){ i=_25(_24,i); } } return _27; }; _25(_20); return {"menu":_21,"submenu":_22,"loading":_23}; },_invalidateCallback:function(){ wptheme.contextMenu.cache={}; },_initialize:function(_28){ var _29=true; var _2a=_28._contextMenu; if(wptheme.contextMenu.cache[_2a.id]||_2a._inProgress){ return i$.promise.resolved({displayMenu:_29}); } _2a._inProgress=true; i$.addListener("wptheme/contextMenu/invalidate/all",wptheme.contextMenu._invalidateCallback); var _2b,_2c,tmp=i$.createDom("div"); if(_2a._submenu){ tmp.innerHTML=_2a._subMenuTemplate.replace(/\$\{submenu-id\}/g,_2a.id+"_menu"); _28.appendChild(tmp.firstChild); _2b=i$.byId(_2a.id+"_menu"); _2c=i$.createDom("div"); _2c.innerHTML=_2a._loadingTemplate; }else{ var _2d=wptheme.contextMenu._findNodes((_2a.shadowNode)?_2a.shadowNode:_28); _2b=_2d.menu; if(!_2a._menuitemTemplate){ _2a._menuitemTemplate=i$.trim(_2b.innerHTML); } if(!_2a._loadingTemplate){ _2c=i$.createDom("div"); _2c.appendChild(_2d.loading); _2a._loadingTemplate=i$.trim(_2c.innerHTML); _2c=null; } _2c=i$.createDom("div"); _2c.innerHTML=_2a._loadingTemplate; tmp.appendChild(_2d.submenu.cloneNode(true)); if(!_2a._subMenuTemplate){ _2a._subMenuTemplate=i$.trim(tmp.innerHTML); } } while(_2b.firstChild){ _2b.removeChild(_2b.firstChild); } _2b.appendChild(_2c); var _2e; if(_2a.shadowNode){ _2e=_2a.shadowNode; }else{ _2e=wptheme.contextMenu._transformIntoAbsolutePosition(_28); } i$.addClass((_2e)?_2e:_28,wptheme.contextMenu.css.show); i$.bindDomEvt((_2e)?_2e:_28,"onmouseleave",function(){ if(_2a._inProgress){ _29=false; } var _2f=i$.byId(_2a.id); i$.removeClass((_2a.shadowNode)?_2a.shadowNode:_2f,wptheme.contextMenu.css.show); if(!_2a.activeAction){ var _30=_2f._currentSelected; if(_30){ _30.blur(); } var _31=wptheme.contextMenu._findFocusNode(_2f); ((_31)?_31:_2f).focus(); } }); return wptheme.contextMenu._load(_2a).then(function(_32){ var _33=wptheme.contextMenu._parseData(_32).then(function(_34){ _34=wptheme.contextMenu._filterMenu(_34); if(!_34||_34.length==0){ var tmp=i$.createDom("div"); tmp.innerHTML=wptheme.contextMenu._fromTemplate(_2a._menuitemTemplate,wptheme.contextMenu.css.error,wptheme.contextMenu.nls.NO_ITEMS_0); while(_2b.firstChild){ _2b.removeChild(_2b.firstChild); } _2b.appendChild(tmp); }else{ wptheme.contextMenu._buildMenu(_2a,_2b,_34); } _2a._inProgress=false; wptheme.contextMenu.cache[_2a.id]=true; i$.removeClass((_2e)?_2e:_28,wptheme.contextMenu.css.show); return {displayMenu:_29}; }); return _33; },function(){ var tmp=i$.createDom("div"); tmp.innerHTML=wptheme.contextMenu._fromTemplate(_2a._menuitemTemplate,wptheme.contextMenu.css.error,wptheme.contextMenu.nls.ERROR_LOADING_0); while(_2b.firstChild){ _2b.removeChild(_2b.firstChild); } _2b.appendChild(tmp); _2a._inProgress=false; wptheme.contextMenu.cache[_2a.id]=true; return {displayMenu:_29}; }); },_load:function(_35){ var _36=_1.replace(/\$\{id\}/g,_35.menuId); if(_35.jsonQuery){ _36+=(_36.indexOf("?")==-1?"?":"&")+i$.toQuery(_35.jsonQuery); } return i$.xhrGet({url:_36,headers:{"X-IBM-XHR":"true"},responseType:"json"}).then(function(_37){ return _37.data; },function(_38){ var _39=_38.xhr.getResponseHeader("Content-Type")||""; if((_39.indexOf("text/html")==0)||(_38.xhr.status==401)){ window.setTimeout(function(){ document.location.reload(); },0); } console.log("Error trying to load the context menu feed for '"+_35.menuId+"': "+_38); return null; }); },_parseData:function(_3a){ var _3b=[]; i$.each(_3a,function(_3c){ var _3d=i$.fromPath("moduleInfo.deferred",false,_3c)?i$.modules.loadDeferred():i$.promise.resolved(true); _3b.push(_3d.then(function(){ var _3e=wptheme.contextMenu._checkFunction(_3c,_3c.visibilityFn,_3c,(typeof _3c.visibility!="undefined")?_3c.visibility:true); var _3f=wptheme.contextMenu._checkFunction(_3c,_3c.enableFn,_3c,(typeof _3c.enabled!="undefined")?_3c.enabled:true); return i$.whenAll(_3e,_3f).then(function(_40){ _3c._visible=_40[0]; _3c._enabled=_40[1]; return _3c; }); })); }); return i$.whenAll.apply(i$,_3b); },_filterMenu:function(_41){ var _42=[],_43,_44={"type":"Separator"}; for(var i=_41.length-1;i>=0;i--){ _43=_41[i]; if(!_43._visible){ continue; } if(_43.type=="Separator"){ if(_44.type=="Separator"){ continue; } }else{ if(_43.type=="Header"){ if((_44.type=="Separator")||(_44.type=="Header")){ continue; } } } _44=_43; _42.unshift(_43); } while(_42.length>0&&_42[0].type=="Separator"){ _42=_42.slice(1); } return _42; },_buildMenu:function(_45,_46,_47){ var _48=document.createDocumentFragment(),tmp=i$.createDom("div"),_49,_4a,_4b,_4c; for(var i=0,l=_47.length;i=0;c--){ if (cols[c].getAttribute("colSpan")!=null&&cols[c].getAttribute("colSpan")!="1") fl=true; } if (fl==false){ for (var c=cols.length-1;c>=0;c--){ var col = document.createElement("col"); var width=cols[c].offsetWidth; if (width>370) col.setAttribute("width","370px"); else col.setAttribute("width",width-1+"px"); colWidth[c]=col; } for (var c=cols.length-1;c>=0;c--){ table[h].insertBefore(colWidth[c], table[h].firstChild); } table[h].style.tableLayout="fixed"; } } } } };(function(){ i$.merge({ "WARNING_0":"Warning", "DELETE_0":"Delete", "INFO_0":"Information", "MESSAGES_AVAILABLE_1":"${0} messages are available for review", "SHOW_DETAILS_0":"Show Details", "ERROR_0":"Error", "HIDE_DETAILS_0":"Hide Details" },i$.fromPath("wptheme.statusBar.nls",true)); })(); (function(){ if(typeof com==="undefined"||!com){ com={}; } if(typeof com.ibm==="undefined"||!com.ibm){ com.ibm={}; } if(typeof com.ibm.widgets==="undefined"||!com.ibm.widgets){ com.ibm.widgets={}; } if(typeof com.ibm.widgets.StatusType==="undefined"||!com.ibm.widgets.StatusType){ com.ibm.widgets.StatusType=function(id,_1,_2,_3){ this._id=id; this._styleClass=_1; this._iconPath=_2; this._iconAlt=_3; }; } if(typeof com.ibm.widgets.StatusMessage==="undefined"||!com.ibm.widgets.StatusMessage){ com.ibm.widgets.StatusMessage=function(_4,_5,_6){ this._type=_4; this._message=_5; if(!i$.isString(_5)&&_5.message&&i$.isString(_5.message)){ this._message=_5.message; } this._details=_6; }; } if(typeof com.ibm.widgets.StatusBarV2==="undefined"||!com.ibm.widgets.StatusBarV2){ com.ibm.widgets.StatusBarV2=function(_7){ this.uid=_7; this.showDetails=false; this._messages=[]; this._connections=[]; this._numMessages=0; this._baseURL=window.location.protocol+"//"+window.location.host; this.errorGifPath=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif"; this.warningGifPath=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif"; this.infoGifPath=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif"; this._statusTypesMap={"error":new com.ibm.widgets.StatusType(0,"lotusError",this.errorGifPath,wptheme.statusBar.nls.ERROR_0),"warning":new com.ibm.widgets.StatusType(1,"lotusWarning",this.warningGifPath,wptheme.statusBar.nls.WARNING_0),"info":new com.ibm.widgets.StatusType(2,"lotusInfo",this.infoGifPath,wptheme.statusBar.nls.INFO_0)}; i$.addListener("/portal/status",i$.scope(this,this.addMessage)); i$.addListener("/message/status",i$.scope(this,this.addMessage)); i$.addListener("/portal/status/clear",i$.scope(this,this.clearMessage)); i$.addListener("/message/status/clear",i$.scope(this,this.clearMessage)); if(typeof (ibmCfg)!="undefined"&&ibmCfg.portalConfig){ this.isBidi=ibmCfg.portalConfig.isRTL; }else{ if(typeof (ibmPortalConfig)!="undefined"){ this.isBidi=ibmPortalConfig.isRTL; }else{ if(typeof (ibmConfig)!="undefined"){ this.isBidi=ibmConfig.isBidi; } } } i$.addOnUnload(i$.scope(this,this._onWindowUnload)); this.containerNode=i$.byId("wpthemeStatusBarContainer"); }; } i$.augment(com.ibm.widgets.StatusBarV2,{_onWindowUnload:function(){ i$.forEach(this._connections,function(_8){ i$.unbindDomEvt(_8); }); this._connections=null; this.clear(); this._messages=null; },_getStatusContainer:function(){ return this.containerNode; },_escapeHTML:function(_9){ if(_9.replace){ return _9.replace(/&/g,"&").replace(/>/g,">").replace(/=0;i--){ if(this._messages[i]._type==_d._type&&this._messages[i]._message==_d._message&&this._messages[i]._details==_d._details){ this._messages.splice(i,1); } } if(this._messages.length==0){ this.clear(); }else{ if(this._messages.length<100){ this.render(this._getStatusContainer()); } } } },addMessage:function(_e){ if(_e.uid&&_e.uid!=this.uid){ return; } var _f=_e.message; this._messages.push(_f); if(this._messages.length<100){ this.render(this._getStatusContainer()); } },render:function(_10){ if(_10==null){ _10=this._getStatusContainer(); } _10.innerHTML=""; if(this._messages.length>1){ this.renderHeader(_10); }else{ if(this._messages.length==1){ this.renderMessage(_10,this._messages[0],this.showDetails,0); } } if(this.showDetails&&this._messages.length>1){ for(x in this._messages){ this.renderMessage(_10,this._messages[x],this.showDetails,x); } } },renderHeader:function(_11){ if(this._messages.length>1){ var _12=2; for(var i=0;i1&&_18>=0){ _1a.style.marginLeft="10px"; } var _1b=document.createElement("img"); _1b.className="lotusIcon "+(_19._styleClass=="lotusError"?"lotusIconMsgError":_19._styleClass=="lotusWarning"?"lotusIconMsgWarning":"lotusIconMsgInfo"); _1b.src=_19._iconPath; _1b.alt=_1b.title=_19._iconAlt; _1a.appendChild(_1b); var _1c=document.createElement("span"); _1c.className="lotusAltText"; _1c.innerHTML=this._escapeHTML(_19._iconAlt+":"); _1a.appendChild(_1c); var _1d=document.createElement("div"); _1d.className="lotusMessageBody"; _1d.innerHTML=this._escapeHTML(_16._message); _1a.appendChild(_1d); if((this._messages.length>1&&_18<0)||(this._messages.length==1)){ if(_16._details&&_16._details.length>0||_18<0){ var _1e=document.createElement("a"); _1e.href="javascript:void(0)"; _1e.className="wpthemeHideShow"; _1e.role="button"; this._connections.push(i$.bindDomEvt(_1e,"onclick",i$.scope(this,this.toggleShowDetails))); var _1f=document.createElement("img"); _1f.className="lotusIcon16"; _1f.src=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif"; _1e.appendChild(_1f); var _20=document.createElement("span"); _20.className="lotusAltText"; _1e.appendChild(_20); }else{ _17=false; } var _21=document.createElement("a"); _21.href="javascript:void(0);"; _21.className="lotusDelete"; _21.role="button"; _21.title=wptheme.statusBar.nls.DELETE_0; this._connections.push(i$.bindDomEvt(_21,"onclick",i$.scope(this,this.clear))); var _22=document.createElement("img"); _22.alt=wptheme.statusBar.nls.DELETE_0; _22.src=ibmCfg.themeConfig.modulesWebAppBaseURI+"/themes/html/dynamicSpots/icons/blank.gif"; _21.appendChild(_22); var _23=document.createElement("span"); _23.className="lotusAltText"; _23.innerHTML=this._escapeHTML(wptheme.statusBar.nls.DELETE_0); _21.appendChild(_23); if(_16._details&&_16._details.length>0||_18<0){ if(_17){ _1e.title=wptheme.statusBar.nls.HIDE_DETAILS_0; _1f.className+=" lotusIconHide"; _1f.alt=wptheme.statusBar.nls.HIDE_DETAILS_0; _20.innerHTML=this._escapeHTML(wptheme.statusBar.nls.HIDE_DETAILS_0); }else{ _1e.title=wptheme.statusBar.nls.SHOW_DETAILS_0; _1f.className+=" lotusIconShow"; _1f.alt=wptheme.statusBar.nls.SHOW_DETAILS_0; _20.innerHTML=this._escapeHTML(wptheme.statusBar.nls.SHOW_DETAILS_0); } _1a.appendChild(_1e); if(!this.isBidi){ _1d.style.marginRight="32px"; }else{ _1d.style.marginLeft="32px"; } } _1a.appendChild(_21); } var _24=document.createElement("div"); _24.className="wpthemeClear"; _1a.appendChild(_24); if(_16._details&&_16._details.length>0&&_17&&_18>=0){ var _25=document.createElement("div"); _25.className="wpthemeDetails"; _25.appendChild(document.createTextNode(_16._details)); _1a.appendChild(_25); } _15.appendChild(_1a); _15.setAttribute("role","alert"); _15.setAttribute("wairole","alert"); }}); if(typeof wpstatusbar==="undefined"||!wpstatusbar){ wpstatusbar=new com.ibm.widgets.StatusBarV2("ibmStatusBox"); } var _26=i$.getCookie("ibm.portal.operations.error"); if(_26){ var _27=i$.fromJson(_26); var _28="error"; if(_27.errorType){ _28=_27.errorType; }else{ if(_27.errorCode){ if(_27.errorCode=="400"){ _28="error"; } } } i$.fireEvent("/portal/status",[{message:new com.ibm.widgets.StatusMessage(_28,_27.errorMessage?_27.errorMessage:"",_27.errorDetails?_27.errorDetails:""),uid:"ibmStatusBox"}]); i$.deleteCookie("ibm.portal.operations.error"); } i$.addOnLoad(function(){ if("localStorage" in window&&window["localStorage"]!==null){ if(localStorage["com.ibm.wp.toolbar.msg.msg"]!=null){ i$.fireEvent("/message/status",[{message:new com.ibm.widgets.StatusMessage(localStorage["com.ibm.wp.toolbar.msg.type"],localStorage["com.ibm.wp.toolbar.msg.msg"],""),uid:"ibmStatusBox"}]); localStorage.removeItem("com.ibm.wp.toolbar.msg.type"); localStorage.removeItem("com.ibm.wp.toolbar.msg.msg"); } } }); })();