
;define("dojo/back",["./_base/config","./_base/lang","./sniff","./dom","./dom-construct","./_base/window","require"],function(_1,_2,_3,_4,_5,_6,_7){
var _8={};
_3("extend-dojo")&&_2.setObject("dojo.back",_8);
var _9=_8.getHash=function(){
var h=window.location.hash;
if(h.charAt(0)=="#"){
h=h.substring(1);
}
return _3("mozilla")?h:decodeURIComponent(h);
},_a=_8.setHash=function(h){
if(!h){
h="";
}
window.location.hash=encodeURIComponent(h);
_b=history.length;
};
var _c=(typeof (window)!=="undefined")?window.location.href:"";
var _d=(typeof (window)!=="undefined")?_9():"";
var _e=null;
var _f=null;
var _10=null;
var _11=null;
var _12=[];
var _13=[];
var _14=false;
var _15=false;
var _b;
function _16(){
var _17=_13.pop();
if(!_17){
return;
}
var _18=_13[_13.length-1];
if(!_18&&_13.length==0){
_18=_e;
}
if(_18){
if(_18.kwArgs["back"]){
_18.kwArgs["back"]();
}else{
if(_18.kwArgs["backButton"]){
_18.kwArgs["backButton"]();
}else{
if(_18.kwArgs["handle"]){
_18.kwArgs.handle("back");
}
}
}
}
_12.push(_17);
};
_8.goBack=_16;
function _19(){
var _1a=_12.pop();
if(!_1a){
return;
}
if(_1a.kwArgs["forward"]){
_1a.kwArgs.forward();
}else{
if(_1a.kwArgs["forwardButton"]){
_1a.kwArgs.forwardButton();
}else{
if(_1a.kwArgs["handle"]){
_1a.kwArgs.handle("forward");
}
}
}
_13.push(_1a);
};
_8.goForward=_19;
function _1b(url,_1c,_1d){
return {"url":url,"kwArgs":_1c,"urlHash":_1d};
};
function _1e(url){
var _1f=url.split("?");
if(_1f.length<2){
return null;
}else{
return _1f[1];
}
};
function _20(){
var url=(_1["dojoIframeHistoryUrl"]||_7.toUrl("./resources/iframe_history.html"))+"?"+(new Date()).getTime();
_14=true;
if(_11){
_3("webkit")?_11.location=url:window.frames[_11.name].location=url;
}else{
}
return url;
};
function _21(){
if(!_15){
var hsl=_13.length;
var _22=_9();
if((_22===_d||window.location.href==_c)&&(hsl==1)){
_16();
return;
}
if(_12.length>0){
if(_12[_12.length-1].urlHash===_22){
_19();
return;
}
}
if((hsl>=2)&&(_13[hsl-2])){
if(_13[hsl-2].urlHash===_22){
_16();
}
}
}
};
_8.init=function(){
if(_4.byId("dj_history")){
return;
}
var src=_1["dojoIframeHistoryUrl"]||_7.toUrl("./resources/iframe_history.html");
if(_1.afterOnLoad){
console.error("dojo/back::init() must be called before the DOM has loaded. "+"Include dojo/back in a build layer.");
}else{
document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");
}
};
_8.setInitialState=function(_23){
_e=_1b(_c,_23,_d);
};
_8.addToHistory=function(_24){
_12=[];
var _25=null;
var url=null;
if(!_11){
if(_1["useXDomain"]&&!_1["dojoIframeHistoryUrl"]){
console.warn("dojo/back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
_11=window.frames["dj_history"];
}
if(!_10){
_10=_5.create("a",{style:{display:"none"}},_6.body());
}
if(_24["changeUrl"]){
_25=""+((_24["changeUrl"]!==true)?_24["changeUrl"]:(new Date()).getTime());
if(_13.length==0&&_e.urlHash==_25){
_e=_1b(url,_24,_25);
return;
}else{
if(_13.length>0&&_13[_13.length-1].urlHash==_25){
_13[_13.length-1]=_1b(url,_24,_25);
return;
}
}
_15=true;
setTimeout(function(){
_a(_25);
_15=false;
},1);
_10.href=_25;
if(_3("ie")){
url=_20();
var _26=_24["back"]||_24["backButton"]||_24["handle"];
var tcb=function(_27){
if(_9()!=""){
setTimeout(function(){
_a(_25);
},1);
}
_26.apply(this,[_27]);
};
if(_24["back"]){
_24.back=tcb;
}else{
if(_24["backButton"]){
_24.backButton=tcb;
}else{
if(_24["handle"]){
_24.handle=tcb;
}
}
}
var _28=_24["forward"]||_24["forwardButton"]||_24["handle"];
var tfw=function(_29){
if(_9()!=""){
_a(_25);
}
if(_28){
_28.apply(this,[_29]);
}
};
if(_24["forward"]){
_24.forward=tfw;
}else{
if(_24["forwardButton"]){
_24.forwardButton=tfw;
}else{
if(_24["handle"]){
_24.handle=tfw;
}
}
}
}else{
if(!_3("ie")){
if(!_f){
_f=setInterval(_21,200);
}
}
}
}else{
url=_20();
}
_13.push(_1b(url,_24,_25));
};
_8._iframeLoaded=function(evt,_2a){
var _2b=_1e(_2a.href);
if(_2b==null){
if(_13.length==1){
_16();
}
return;
}
if(_14){
_14=false;
return;
}
if(_13.length>=2&&_2b==_1e(_13[_13.length-2].url)){
_16();
}else{
if(_12.length>0&&_2b==_1e(_12[_12.length-1].url)){
_19();
}
}
};
return _8;
});

if(typeof define!=="undefined"&&typeof define._packages!=="undefined")define._packages["lconn.communities.catalog"]=true;

;if(!dojo._hasResource["lconn.communities.catalog.catalog_help"]){
dojo._hasResource["lconn.communities.catalog.catalog_help"]=true;
dojo.provide("lconn.communities.catalog.catalog_help");




function initHelpLink(_1,_2,_3,_4){
if(typeof _4!=="object"){
_4={};
}
lconn.core.HelpLauncher.createHelpLink(_1,_2,_3,_4);
};
function openHelpWindow(_5,_6,_7){
lconn.core.help.launchHelp(_5);
};
function openDemoWindow(_8,_9,_a){
lconn.core.help.launchDemo(_8);
};
}

dojo.provide("lconn.comm.nls.strings")._built=true;
dojo.provide("lconn.comm.nls.strings.en_gb");
lconn.comm.nls.strings.en_gb={"rs_member_create_invite":"Send Invitations","rs_invite_members_fieldset":"invite members fieldset","rs_member_count_singular":"1 member","rs_revoke_invites_confirm":"Are you sure you want to revoke the selected invitations?","rs_button_do_lotuslive_invite":"Proceed with Invitations","rs_member_add_members":"Add Members","rs_member_filterby_external":"People from an outside organization","rs_member_subscribe_feed_members":"Feed for these Members","rs_popup_subscribe_to_feed":"Please right click and select Copy Shortcut to get the URL to this feed.","rs_invite_tab":"Invitations","rs_searchResults_taggedwith":"Tagged with","rs_parent_member_no_results":"No matching people in the parent community","rs_member_tip_close":"Close Help","rs_member_members":"Members","rs_member_invite_to_community":"Invite","rs_invite_to_lotuslive_query_auto":"Invite these users as guests to add them to the community.","rs_member_find_close":"Click to close find member","rs_requests_select_all":"Select All","rs_requests_deselect_all":"Deselect All","rs_member_cancel":"Cancel","rs_member_email_none":"None","rs_invite_external":"You can invite people who are external to your organization to join this community.","rs_group_count_singular":"1 group","rs_member_external_label":"(from outside organization)","rs_member_remove":"Remove","rs_external_members_allowed":"This community can have members from outside your organization.","rs_member_add_members_warn_dialog_title":"Confirm Adding Parent Community Members","rs_member_export_members":"Export Members","rs_member_people":"People","rs_member_find_a_member":"Find a Member","rs_member_member_type":"Member Type","rs_member_added":"Selected ${0} as a member","rs_member_last_owner_error":"A community must retain at least one owner.","rs_member_filterby_vm_internal":"Internal users","rs_member_email_allowed":"Allowed","rs_member_paging_next":"Next","rs_member_paging_previous":"Previous","rs_msgbox_error_a11y":"Error:","rs_member_paging_show":"Show:","rs_member_import_action":"Action:","rs_member_help1":"View the members in your community, as well as people who are invited but have not yet joined.","rs_member_help2":"Add members to automatically include them in the community. Invite members to give them the opportunity to join.","rs_member_tip_help":"Help","rs_internal_only":"This community cannot have members from outside your organization.","rs_manager_added":"Selected ${0} as an owner","rs_requests_reject":"Reject","rs_member_pagepos":"${0} - ${1} of ${2}","rs_invite_revoke_confirm":"Are you sure you want to revoke the invitation for ${0}?","rs_msgbox_information_a11y":"Information:","rs_member_import_missing_emails":"Missing comma-separated email addresses","rs_invite_no_invites":"This community has no pending invitations.","rs_member_sub_addall":"Add all members from the parent community.","rs_member_import_select_file":"Select a CSV file of email addresses","rs_invite_message":"Add a personal message:","rs_member_export_title":"Export People from this Community to a CSV file","rs_member_sortby_ascending":"Sort By Ascending","rs_invite_to_lotuslive_message":"The following users do not have an account and were not added or invited to your community.","rs_memberprofile_inactive":"inactive","rs_member_network_tab":"Members","rs_invite_sortby_name":"Name","rs_searchResults_filteredby":"Filtered by","rs_profile_photo":"Profile Photo","rs_member_allmembers":"All Members","rs_members_typeahead":"Person Name or Email...","rs_member_filterby_owners":"Owners","rs_member_invite_members":"Invite Members","rs_member_browse_file":"Browse","rs_requests_sortby_date_requested":"Date requested","rs_add_members_fieldset":"add members fieldset","rs_member_import_people_to_import":"People to Import:","rs_member_sortby_name":"Name","rs_invite_resend":"Resend","rs_member_add_members_warn_dialog_line1":"The parent community for this subcommunity contains ${0} members.  When you add them, each person will receive an email, indicating that they have been added.","rs_memberprofile_active":"active","rs_member_paging_all":"All","rs_member_add_members_warn_dialog_line2":"Click \"Add Members\" to proceed.","rs_member_add_members_warn_dialog_okbutton":"Add Members","rs_member_not_logged_in_error":"The action failed because you are no longer logged in.","rs_export_members_fieldset":"export members fieldset","rs_msgbox_warning":"Warning","rs_member_person_count_singular":"1 person","rs_member_add_help1":"Add members or owners to this community by name or email address.","rs_member_remove_confirm":"Are you sure you want to remove ${0} from this community?","rs_member_add_help2":"You can add people who are external to your organization to this community.","rs_member_export_warn_missing_email":"{0} lacks an email address and will not be included in the export.","rs_member_sortby_descending":"Sort By Descending","rs_member_invite_help1":"Invite members or owners to this community by name or email address.","rs_member_invite_help2":"You can invite people who are external to your organization to join this community.","rs_invite_to_lotuslive_title":"Members Were Not Added or Invited","rs_export_warning_icon":"Warning","rs_import_members_fieldset":"import members fieldset","rs_member_person_count_plural":"${0} people","rs_community_access_update_message":"Updating the community access has the following consequences:","rs_invite_revoke":"Revoke","rs_invite_invited":"Invited ","rs_member_save":"Save","rs_request_basis_label":"Basis for request:","rs_member_filterby_internal":"People from inside the organization","rs_community_access_update_submit":"OK","rs_member_edit_member":"Edit Member","rs_member_add_to_community":"Add to community","rs_member_members_tip":"These members have joined this community. Hover over a member name to view contact information.","rs_member_members_colon":"Members:","rs_member_sub_inviteall":"Invite all members from the parent community.","rs_member_businessowner_headder_tip":"Business Owner","rs_member_role_member":"Member","rs_unable_to_load":"Unable to load ${0}.  Status: ${1}","rs_member_sortby_all":"All","rs_member_import_enter_email":"Enter comma-separated email addresses","rs_requests_count_singular":"1 request","rs_member_remove_members":"Remove Members","rs_member_businessowner_tip":"Each community belongs to the organization of its business owner. The business owner must always have an active account.","rs_msgbox_success":"Success","rs_group_count_plural":"${0} groups","rs_member_count_plural":"${0} members","rs_member_filterDescription":"Select a filter to change the type of items shown on the Members page","rs_member_viewall_nocnt":"View All","rs_member_find":"Find:","rs_member_form_already_open":"There is a form already open. Please complete that form before opening a new one.","rs_member_import_members":"Import Members","rs_member_invite_members_btn":"Invite Members","rs_member_sortby_newest":"Newest","rs_member_role_external_member":"External Member","rs_member_import_missing_csv":"Missing CSV file on import","rs_invite_name_email":"Name or email:","rs_msgbox_close":"Close","rs_member_export_warn_missing_emails":"{0} people ({1}) lack email addresses and will not be included in the export.","rs_community_access_update_cancel":"Cancel","rs_member_filterby_vm_external":"External users","rs_member_import":"Import","rs_msgbox_error":"Error","rs_member_find_a_member_desc":"Enter a member name to find","rs_member_as":"as","rs_member_removed":"Removed ${0} as a member","rs_member_export":"Export","rs_member_jumptopage":"Jump to page ","rs_member_sortby_owners":"Owners","rs_member_import_select_role":"as:","rs_community_access_update_title":"Warning","rs_msgbox_success_a11y":"Success:","rs_button_dont_lotuslive_invite":"Cancel","rs_member_edit":"Edit","rs_msgbox_warning_a11y":"Warning:","rs_member_member_role":"Member Role","rs_member_email_colon":"Email:","rs_member_jumptopageof":" of ${0}","rs_member_export_colon":"Export:","rs_member_groups":"Groups","rs_member_sortby_colon":"Sort by:","rs_member_paging_show_label":"Show","rs_member_import_action_invite":"Invite people to the community","rs_member_remove_members_confirm":"Are you sure you want to remove the selected members from this community?","rs_searchResults_matching":"matching","rs_private_community":"Restricted","rs_member_filterby_members":"Members","rs_member_add_members_btn":"Add Members","rs_member_filterby_all":"All","rs_invite_external_help":"An external user is someone from outside of your organization or company that you invite to collaborate with you within your business environment. External users have restricted access to the content and people in your organization.","rs_member_no_results":"No results found","rs_invite_sortby_date":"Date Invited","rs_searchResults_alltab":"All Connections Content","rs_member_import_title":"Import People to this Community","rs_requests_no_requests":"There are no membership requests for this community.","rs_member_import_action_add":"Add people to the community as:","rs_manager_removed":"Removed ${0} as an owner","rs_member_sortby_date":"Date Added","rs_requests_count_plural":"${0} requests","rs_msgbox_information":"Information","rs_member_filterby":"Filter by:","rs_requests_tab":"Membership requests","rs_requests_accept":"Accept","rs_member_owners":"Owners","rs_member_find_open":"Click to open find member","rs_invite_subscribe_feed":"Feed for Invitations","rs_moderated_community":"Moderated","rs_member_role_owner":"Owner","rs_member_transfer":"Are you sure you want to transfer the community to ${0}? The business owner must have an active account. The community will be removed if the business owners account is deactivated.","rs_member_viewall":"View All (${0})","rs_member_role_business_owner":"Business Owner","rs_member_generic_error":"An unexpected error occurred: ${0}","rs_member_paging_page":"Page","rs_member_role":"Role:","rs_requests_reject_confirm":"Are you sure you want to reject these requests?","rs_member_sub_notice":"Note: Subcommunity members have to be members of the parent community.","rs_member_remove_name":"Remove ${0}"};
if(typeof define!=="undefined"&&typeof define._packages!=="undefined")define._packages["lconn.comm"]=true;

;if(!dojo._hasResource["lconn.comm.community"]){
dojo._hasResource["lconn.comm.community"]=true;
dojo.provide("lconn.comm.community");








dojo.requireLocalization("lconn.comm","strings");
dijit._destroyAll=function(){
dijit._curFocus=null;
dijit._prevFocus=null;
dijit._activeStack=[];
dojo.forEach(dijit.findWidgets(dojo.body()),function(_1){
if(_1!=null&&!_1._destroyed){
if(_1.destroyRecursive){
_1.destroyRecursive();
}else{
if(_1.destroy){
_1.destroy();
}
}
}
});
};
function getCommunitiesForPersonUrl(_2,_3){
var _4=null;
var _5=location.href.substr(0,location.href.indexOf("/service"));
if(this.exposePublicCommunities=="true"){
_4=_5+"/service/html/allcommunities";
}else{
_4=_5+"/service/html/mycommunities";
}
if(_3==null){
_4=_4+"?userid="+_2;
}else{
_4=_4+"?email="+_3;
}
return _4;
};
function updateSearchTab(_6){
var _7=document.getElementById("searchPageTabContanierId").getElementsByTagName("li");
var _8=null;
var _9="/tns:widgets/tns:layout/tns:page[@pageId='communityOverview']/tns:widgetInstance[@defIdRef='"+_6+"']";
var _a=lconn.core.xpath.selectSingleNode(_9,WidgetPlacementConfig.widgetConfigXMLDocument);
var _b=_a.getAttribute("defIdRef");
var _c=_a.getAttribute("instanceId");
for(var i=0;_7!=null&&i<_7.length;i++){
var _d=_7[i].id.substring(0,_7[i].id.indexOf("_TabItem"));
if(_d===_c){
_8=dojo.byId(_d+"_TabItem");
break;
}
}
if(_8!=null){
_8.click();
}
};
function lconn_comm_community_handleSearchRequest(){
var _e=searchBar.getValue();
_e=dojo.string.trim(_e);
if(!_e){
return false;
}
var _f=searchBar.selectedOption;
if(_f.feature){
return true;
}else{
switch(_f.scope){
case "community":
var _10=[];
var _11=null;
var _12=null;
var _13=null;
var _14=window.location.hash;
if(_14!=null){
_11=_14.indexOf("&tabinst=");
if(_11>0){
_12=_14.substr(_11+9);
}else{
_11=_14.indexOf("&tab=");
if(_11>0){
_13=_14.substr(_11+5);
}
}
}
_10.push({entryName:"searchKeywords",entryValue:_e,component:"communities:content",selectTabInst:_12,selectTab:_13});
if(window.debugComm!=null){
console.log("search by keyword: "+_e);
}
lconn.comm.community.handleSearchRequestbyGeneral(_10);
break;
case "all":
case "restricted":
case "my":
var _15=dojo.byId("simpleSearchForm");
_15.searchFor.value=_e;
_15.searchScope.value=_f.scope;
_15.submit();
break;
default:
return true;
break;
}
}
return false;
};
lconn.comm.community.handleSearchRequestbyTag=function(_16){
if(window.debugComm!=null){
console.log("search by tag: "+_16);
}
var _17=[];
var _18=null;
var _19=null;
var _1a=null;
var _1b=window.location.hash;
if(_1b!=null){
_18=_1b.indexOf("&tabinst=");
if(_18>0){
_19=_1b.substr(_18+9);
}else{
_18=_1b.indexOf("&tab=");
if(_18>0){
_1a=_1b.substr(_18+5);
}
}
}
if(!dojo.isFF){
_16=decodeURIComponent(_16);
}
_17.push({entryName:"tagCloudItemValue",entryValue:_16,component:"communities:content",selectTabInst:_19,selectTab:_1a});
lconn.comm.community.handleSearchRequestbyGeneral(_17);
};
lconn.comm.community.inCommunitySearchAlready=false;
lconn.comm.community.handleSearchRequestbyGeneral=function(_1c){
var _1d=dojo.i18n.getLocalization("lconn.comm","strings");
try{
if(!lconn.comm.community.inCommunitySearchAlready){
closeOtherViews();
lconn.core.WidgetPlacement.closeFullPageWidgetIfOpen();
registerCloseViewFunction(lconn.comm.community.exitSearchMode);
}
lconn.core.utilities.hide("lconnTagCloudContent",false,true);
lconn.core.utilities.hide("contentArea",false,true);
lconn.core.utilities.hide("lotusColRight",false,true);
lconn.core.utilities.hide("lotusInfoBox",false,true);
lconn.core.utilities.hide("widget-container-col1",false,true);
lconn.core.utilities.hide("editCommunityForm",false,true);
var _1e="search";
var _1f="searchPageTabContanierId";
var _20=document.getElementById(_1f);
if(!_20){
return;
}
_20.innerHTML="<li role=\"tab\" id=\"SearchResult_TabItem\" onclick=\"lconn.core.WidgetPlacement.showFirstTab('allContentContainer', 'SearchResult_TabItem', lconn.core.WidgetPlacement.researchAll)\"><a>"+_1d["rs_searchResults_alltab"]+"</a></li>";
var _21=document.getElementById("searchCommunityForm");
var _22=null;
_22=document.getElementById("allContentContainer");
if(_22==null){
_22=document.createElement("span");
_22.id="allContentContainer";
_21.appendChild(_22);
}
if(window.debugComm!=null){
console.log("search: invoking: lconn.core.WidgetPlacement.addTabsWithOnclickCalls");
}
lconn.core.WidgetPlacement.addTabsWithOnclickCalls(_1f,"searchModeContainer","allContentContainer",null,null,_1e,_1c);
if(document.location.hash&&document.location.hash.indexOf("&tab=")==-1){
setFieldFocus("SearchResult_TabItem");
}
if(window.debugComm!=null){
console.log("search: invoking: activateTabbedWidget");
}
var _23=null;
if((_1c[0].component!=null)&&(typeof (_1c[0].component)!="undefined")){
_23=_1c[0].component;
}
var _24=_22;
var _25=null;
var _26=null;
if(_1c[0].entryName=="searchKeywords"){
_25=_1c[0].entryValue;
var _27=document.getElementById("search_searchResults_queryInfo");
if(_27!=null){
var _28=dojox.html.entities.encode(_25);
_27.innerHTML="&nbsp;"+_1d["rs_searchResults_matching"]+":&nbsp;<b>"+_28+"</b>";
}
_27=document.getElementById("search_searchResults_filterInfo");
if(_27!=null){
_27.innerHTML="";
}
}else{
_26=_1c[0].entryValue;
var _27=document.getElementById("search_searchResults_queryInfo");
if(_27!=null){
_27.innerHTML="";
}
_27=document.getElementById("search_searchResults_filterInfo");
if(_27!=null){
_27.innerHTML="";
}
}
var _29=WidgetPlacementConfig.resourceId;
var ph=new lconn.core.url.ProxyUrlHelper(ibmConfig["com.ibm.mashups.proxy.url"]);
var _2a=dojo.hitch(ph,ph.getProxifiedURL);
WidgetPlacementConfig.tempSearch={};
WidgetPlacementConfig.tempSearch.component=_23;
WidgetPlacementConfig.tempSearch.resultContainerDomNode=_24;
WidgetPlacementConfig.tempSearch.searchKeywords=_25;
WidgetPlacementConfig.tempSearch.tagCloudItemValue=_26;
WidgetPlacementConfig.tempSearch.resourceId=_29;
WidgetPlacementConfig.tempSearch.userid=widgetUserInfo.userid;
WidgetPlacementConfig.tempSearch.rewriteURI=_2a;
WidgetPlacementConfig.tempSearch.searchInfo=_27;
WidgetPlacementConfig.tempSearch.allContentContainer=_22;
lconn.comm.community.inCommunitySearchAlready=true;
lconn.core.widgetUtils.searchC(_23,_24,_25,_26,_29,widgetUserInfo.userid,_2a,null,_27,_22);
lconn.core.utilities.show("searchCommunityForm",false,false,true);
}
catch(exception){
console.log(exception);
}
};
lconn.core.WidgetPlacement.researchAll=function(){
if(WidgetPlacementConfig&&typeof WidgetPlacementConfig.tempSearch!="undefined"&&WidgetPlacementConfig.tempSearch!=null){
lconn.core.widgetUtils.searchC(WidgetPlacementConfig.tempSearch.component,WidgetPlacementConfig.tempSearch.resultContainerDomNode,WidgetPlacementConfig.tempSearch.searchKeywords,WidgetPlacementConfig.tempSearch.tagCloudItemValue,WidgetPlacementConfig.tempSearch.resourceId,WidgetPlacementConfig.tempSearch.userid,WidgetPlacementConfig.tempSearch.rewriteURI,null,WidgetPlacementConfig.tempSearch.searchInfo,WidgetPlacementConfig.tempSearch.allContentContainer);
}
};
lconn.comm.community.exitSearchMode=function(_2b){
lconn.comm.community.inCommunitySearchAlready=false;
registerCloseViewFunction(null);
if(window.tagCloudWidgetInstance){
tagCloudWidgetInstance.setSelectedTags([]);
if(window.location.hash.substr(0,"#fullpageWidgetId=".length)!="#fullpageWidgetId="){
tagCloudWidgetInstance.reload(false,{"communityUuid":ic_comm_communityUuid});
}
}
if(window.location.href.indexOf("&filter=")==-1&&((window.pageId!=null&&pageId=="communityOverview")||(window.location.href.indexOf("/community/bookmarks")!=-1||window.location.href.indexOf("/community/feeds")!=-1))){
handleModeExit();
var _2c=dojo.byId("search_searchResults_filterInfo");
var _2d=_2c.parentNode;
dijit.byId("search_searchResults_filterInfo").destroy();
var _2e=dojo.create("span",{id:"search_searchResults_filterInfo"});
_2d.appendChild(_2e);
lconn.core.utilities.show("lconnTagCloudContent",false,false,true);
lconn.core.utilities.show("contentArea",false,false,true);
lconn.core.utilities.show("lotusColRight",false,false,true);
lconn.core.utilities.show("lotusInfoBox",false,false,true);
lconn.core.utilities.show("widget-container-col1",false,false,true);
lconn.core.utilities.hide("searchCommunityForm",false,true);
dojo.byId("searchPageTabContanierId").innerHTML="";
window.searchObject=null;
WidgetPlacementConfig.tempSearch=null;
searchBar.clearValue();
if(window.location.hash.substr(0,"#query=".length)=="#query="||window.location.hash.substr(0,"#tag=".length)=="#tag="){
changeHash("overview");
}
}else{
window.location=WidgetPlacementConfig.params["communitiesSvcRef"]+"/service/html/communityview?communityUuid="+WidgetPlacementConfig.params.resourceId;
}
};
var Tango={editFormRefCount:0,Util:{constructUrl:function(url,_2f){
var _30="";
for(var p in _2f){
if(_30.length>0){
_30+="&";
}
_30+=encodeURIComponent(p);
_30+="=";
_30+=encodeURIComponent(_2f[p]);
}
if(_30.length>0){
url+="?"+_30;
}
return url;
},getCookie:function(_31){
key=_31+"=";
c=document.cookie;
start=c.indexOf("; "+key)+2+key.length;
start=start>-1+2+key.length?start:c.indexOf(_31+"=")+key.length;
if(start>-1+key.length){
end=c.indexOf(";",start);
end=end>-1?end:c.length;
return unescape(c.substring(start,end));
}else{
return null;
}
},setCookie:function(_32,_33){
document.cookie=_32+"="+escape(_33)+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path=/";
}}};
var COM={editFormRefCount:0,utils:{hide:function(_34){
var el=_34;
if(typeof _34=="string"){
el=dojo.byId(_34);
}
if(el!=null){
el.style.display="none";
}
},show:function(_35){
var el=_35;
if(typeof _35=="string"){
el=dojo.byId(_35);
}
if(el!=null){
el.style.display="";
}
},toggle:function(_36){
var el=dojo.byId(_36);
if(el.style.display!="none"){
this.hide(el);
}else{
this.show(el);
}
},constructUrl:function(url,_37){
var _38="";
for(var p in _37){
if(_38.length>0){
_38+="&";
}
_38+=encodeURIComponent(p);
_38+="=";
_38+=encodeURIComponent(_37[p]);
}
if(_38.length>0){
url+="?"+_38;
}
return url;
},getCookie:function(_39){
key=_39+"=";
c=document.cookie;
start=c.indexOf("; "+key)+2+key.length;
start=start>-1+2+key.length?start:c.indexOf(_39+"=")+key.length;
if(start>-1+key.length){
end=c.indexOf(";",start);
end=end>-1?end:c.length;
return unescape(c.substring(start,end));
}else{
return null;
}
},setCookie:function(_3a,_3b){
document.cookie=_3a+"="+escape(_3b)+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path=/";
}}};
function _displayComMessage(_3c,_3d,_3e,_3f,_40,_41){
try{
var _42=dojo.byId(_3d);
if(_42){
var _43=dojo.i18n.getLocalization("lconn.comm","strings");
var _44=new com.ibm.oneui.controls.MessageBox({canClose:((typeof _41=="undefined")?true:_41),_strings:{icon_alt:_43[_3e],a11y_label:_43[_3f],close_btn_title:_43["rs_msgbox_close"],close_btn_alt:_43["rs_msgbox_close"]},type:_40,msg:_3c},_42);
}
}
catch(e){
if(window.debugComm!=null&&window.console){
console.log(e);
}
}
};
function displayComErrorMessage(_45,_46){
dojo.addOnLoad(function(){
_displayComMessage(_45,_46,"rs_msgbox_error","rs_msgbox_error_a11y",com.ibm.oneui.controls.MessageBox.TYPE.ERROR,false);
});
};
function displayComWarningMessage(_47,_48){
dojo.addOnLoad(function(){
_displayComMessage(_47,_48,"rs_msgbox_warning","rs_msgbox_warning_a11y",com.ibm.oneui.controls.MessageBox.TYPE.WARNING);
});
};
function displayComInfoMessage(_49,_4a){
dojo.addOnLoad(function(){
_displayComMessage(_49,_4a,"rs_msgbox_information","rs_msgbox_information_a11y",com.ibm.oneui.controls.MessageBox.TYPE.INFO);
});
};
function displayComSuccessMessage(_4b,_4c){
dojo.addOnLoad(function(){
_displayComMessage(_4b,_4c,"rs_msgbox_success","rs_msgbox_success_a11y",com.ibm.oneui.controls.MessageBox.TYPE.SUCCESS);
});
};
function saveMemberFields(_4d){
addMembers_W.setHiddenFields();
_4d.elements["members"].value=addMembers_W.getMembers();
_4d.elements["owners"].value=addMembers_W.getOwners();
_4d.elements["memberemails"].value=addMembers_W.getMemberEmails();
_4d.elements["owneremails"].value=addMembers_W.getOwnerEmails();
addMembers_W.reset();
};
function cancelMemberCreateForm(){
COM.utils.hide("errorMessages");
COM.utils.hide("memberAddForm");
if(addMembers_W){
addMembers_W.reset();
}
};
function displayFeedCreateForm(){
COM.utils.hide("feedContentAreaSub");
COM.utils.show("feedAddForm");
setFieldFocus("addFeedUrl");
};
function resetHeadlineError(){
var _4e=dijit.byId("msgError");
if(_4e){
_4e.destroy();
}
};
function resetHeadlineWarning(){
var _4f=dijit.byId("msgWarning");
if(_4f){
_4f.destroy();
}
};
function resetHeadlineInfo(){
var _50=dijit.byId("msgInformation");
if(_50){
_50.destroy();
}
};
function resetHeadlineSuccess(){
var _51=dijit.byId("msgSuccess");
if(_51){
_51.destroy();
}
};
function resetHeadlineSuccess1(){
var _52=dijit.byId("msgSuccess1");
if(_52){
_52.destroy();
}
};
function resetFormError(){
var _53=dijit.byId("reference-add-messages");
if(_53){
_53.destroy();
}
};
function resetHeadlineMessages(){
resetHeadlineError();
resetHeadlineWarning();
resetHeadlineInfo();
resetHeadlineSuccess();
resetHeadlineSuccess1();
resetFormError();
};
function cancelFeedCreateForm(){
resetHeadlineMessages();
COM.utils.hide("feedAddForm");
COM.utils.show("feedContentAreaSub");
setFieldFocus("addFeedBtn");
};
function updateFieldForNewId(_54,_55,_56,_57){
if(typeof _57=="undefined"){
_57=true;
}
var _58=getElementById((_56||dojo.doc),_54);
if(_58){
dojo.query("label[for"+(_57?"":"*")+"=\""+_54+"\"]",(_56||dojo.doc)).forEach(function(lbl){
dojo.attr(lbl,"for",_55);
});
_58.id=_55;
}
return _58;
};
function displayFeedEditForm(_59,_5a,_5b){
if(COM.editFormRefCount>0){
return;
}else{
COM.editFormRefCount++;
COM.utils.hide("b_summary_"+_5a);
COM.utils.hide("b_details_"+_5a);
COM.utils.hide("b_feedDisplay_"+_5a);
COM.utils.show("b_editDisplay_"+_5a);
var _5c=document.getElementById("editForm");
var _5d=_5c.cloneNode(true);
var _5e=document.getElementById(_59);
_5d.id="editForm"+"_"+_5a;
var _5f=updateFieldForNewId("feed_uuid","feed_uuid"+_5a,_5d);
if(_5f){
_5f.value=_5a;
}
var _60=updateFieldForNewId("feed_type","feed_type"+_5a,_5d);
var _61=updateFieldForNewId("autocompletetags_edit","autocompletetags_edit"+_5a,_5d);
var _62=getElementById(_5d,"editFeedCancelBtn");
var _63=function onclick(_64){
destroyFeedEditForm(_5e,_5d,_5a);
setFieldFocus("b_edit_"+_5a);
return false;
};
_62.onclick=_63;
if(_5b){
var _65=document.getElementById("refFormName");
var _66=document.getElementById("refFormUrl");
var _67=document.getElementById("refFormDescription");
var _68=document.getElementById("refFormTagList");
}else{
var _65=document.getElementById("b_name_"+_5a);
var _66=document.getElementById("b_uri_"+_5a);
var _67=document.getElementById("b_description_"+_5a);
var _68=document.getElementById("b_tags_"+_5a);
}
var _69=updateFieldForNewId("editFeedName","editFeedName"+_5a,_5d);
if(_69&&_65){
if(_65.textContent){
_69.value=_65.textContent;
}else{
if(_65.innerText){
_69.value=_65.innerText;
}
}
}
var uri=updateFieldForNewId("editFeedUrl","editFeedUrl"+_5a,_5d);
if(uri&&_66){
uri.value=_66.getAttribute("href");
}
var _6a=updateFieldForNewId("editFeedDescription","editFeedDescription"+_5a,_5d);
if(_6a&&_67){
if(_67.textContent){
_6a.value=dojo.string.trim(_67.textContent);
}else{
if(_67.innerText){
_6a.value=dojo.string.trim(_67.innerText);
}
}
}
if(_61&&_68){
if(_68.textContent){
_61.value=_68.textContent;
}else{
if(_68.innerText){
_61.value=_68.innerText;
}
}
}
_5e.appendChild(_5d);
var _6b=updateFieldForNewId("homepage","homepage"+_5a,_5d);
var _6c=document.getElementById("b_homepage_"+_5a);
if(_6b&&(_6c.innerHTML=="true")){
_6b.checked=true;
}
renderWidget(_61);
setFieldFocus("editFeedUrl");
}
};
function destroyFeedEditForm(_6d,_6e,_6f){
_6d.removeChild(_6e);
COM.utils.show("b_summary_"+_6f);
COM.utils.show("b_details_"+_6f);
COM.utils.show("b_feedDisplay_"+_6f);
COM.utils.hide("b_editDisplay_"+_6f);
COM.editFormRefCount--;
resetHeadlineMessages();
};
function setFieldFocusElement(_70){
if(_70){
var _71=function(){
try{
_70.focus();
}
catch(exception){
setTimeout(function(){
try{
_70.focus();
}
catch(exception2){
}
},1000);
}
};
setTimeout(_71,1000);
}
};
function setFieldFocus(_72){
var _73=dojo.byId(_72);
setFieldFocusElement(_73);
};
function showTags(_74,_75,_76){
if(_74=="cloud"){
COM.utils.hide(_76);
COM.utils.show(_75);
}else{
COM.utils.show(_76);
COM.utils.hide(_75);
}
};
function toggleBookmarkDisplay(_77,_78){
if(_78=="show"){
COM.utils.hide("b_show_"+_77);
COM.utils.show("b_hide_"+_77);
COM.utils.show("b_details_"+_77);
var _79=dojo.byId("b_hide_"+_77);
_79.focus();
}else{
COM.utils.show("b_show_"+_77);
COM.utils.hide("b_hide_"+_77);
COM.utils.hide("b_details_"+_77);
var _7a=dojo.byId("b_show_"+_77);
_7a.focus();
}
};
function toggleFeedDisplay(_7b,_7c,_7d){
if(_7d=="show"){
COM.utils.hide("b_show_"+_7b);
COM.utils.show("b_hide_"+_7b);
COM.utils.show("b_details_"+_7b);
_7c.loadThread();
COM.utils.show("b_feedDisplay_"+_7b);
var _7e=dojo.byId("b_hide_"+_7b);
_7e.focus();
}else{
COM.utils.show("b_show_"+_7b);
COM.utils.hide("b_hide_"+_7b);
COM.utils.hide("b_details_"+_7b);
COM.utils.hide("b_feedDisplay_"+_7b);
var _7f=dojo.byId("b_show_"+_7b);
_7f.focus();
}
};
function displayBookmarkCreateForm(){
COM.utils.hide("bookmarkContentAreaSub");
COM.utils.show("bookmarkAddForm");
setFieldFocus("addBookmarkUrl");
};
function cancelBookmarkCreateForm(){
resetHeadlineMessages();
COM.utils.hide("bookmarkAddForm");
clearBookmarkForm();
COM.utils.show("bookmarkContentAreaSub");
setFieldFocus("addBookmarkBtn");
};
function clearBookmarkForm(){
var url=document.getElementById("addBookmarkUrl");
if(url){
url.value="";
}
var _80=document.getElementById("addBookmarkName");
if(_80){
_80.value="";
}
var _81=document.getElementById("addBookmarkDescription");
if(_81){
_81.value="";
}
var _82=document.getElementById("autocompletetags2");
if(_82){
_82.value="";
}
var _83=document.getElementById("addBookmarkImportant");
if(_83){
_83.checked=false;
}
};
function displayBookmarkEditForm(_84,_85,_86){
if(COM.editFormRefCount>0){
return;
}else{
COM.editFormRefCount++;
COM.utils.hide("headline-messages");
COM.utils.hide("b_summary_"+_85);
COM.utils.hide("b_details_"+_85);
COM.utils.show("b_editDisplay_"+_85);
var _87=document.getElementById("editForm");
var _88=_87.cloneNode(true);
var _89=document.getElementById(_84);
_88.id="editForm"+"_"+_85;
var _8a=getElementById(_88,"bookmark_uuid");
if(_8a){
_8a.id=_8a.id+"_"+_85;
_8a.value=_85;
}
var _8b=getElementById(_88,"bookmark_type");
if(_8b){
_8b.id=_8b.id+"_"+_85;
}
var _8c=updateFieldForNewId("autocompletetags_edit","autocompletetags_edit"+_85,_88);
var _8d=getElementById(_88,"editBookmarkCancelBtn");
var _8e=function onclick(_8f){
destroyBookmarkEditForm(_89,_88,_85);
setFieldFocus("b_edit_"+_85);
return false;
};
_8d.onclick=_8e;
var _90=function(_91){
return validateReferenceForm("editBookmarkUrl"+_85,urlRequiredMsg,"editBookmarkName"+_85,nameRequiredMsg,"reference-edit-messages");
};
_88.onsubmit=_90;
if(_86){
var _92=document.getElementById("refFormName");
var _93=document.getElementById("refFormUrl");
var _94=document.getElementById("refFormDescription");
var _95=document.getElementById("refFormTagList");
var _96=document.getElementById("refFormIsSpecial");
}else{
var _92=document.getElementById("b_name_"+_85);
var _93=document.getElementById("b_uri_"+_85);
var _94=document.getElementById("b_description_"+_85);
var _95=document.getElementById("b_tags_"+_85);
var _96=document.getElementById("b_homepage_"+_85);
}
var _97=updateFieldForNewId("editBookmarkName","editBookmarkName"+_85,_88);
if(_97&&_92){
if(_92.textContent){
_97.value=_92.textContent;
}else{
if(_92.innerText){
_97.value=_92.innerText;
}
}
}
var uri=updateFieldForNewId("editBookmarkUrl","editBookmarkUrl"+_85,_88);
if(uri&&_93){
uri.value=_93.getAttribute("href");
}
var _98=updateFieldForNewId("editBookmarkDescription","editBookmarkDescription"+_85,_88);
if(_98&&_94){
if(_94.textContent){
_98.value=dojo.string.trim(_94.textContent);
}else{
if(_94.innerText){
_98.value=dojo.string.trim(_94.innerText);
}
}
}
if(_8c&&_95){
if(_95.textContent){
_8c.value=_95.textContent;
}else{
if(_95.innerText){
_8c.value=_95.innerText;
}
}
}
_89.appendChild(_88);
var _99=updateFieldForNewId("homepage","homepage"+_85,_88);
if(_99&&(_96.innerHTML=="true")){
_99.checked="true";
}
renderWidget(_8c);
setFieldFocus("editBookmarkUrl");
}
};
function destroyBookmarkEditForm(_9a,_9b,_9c){
_9a.removeChild(_9b);
COM.utils.show("b_summary_"+_9c);
COM.utils.show("b_entry_"+_9c);
COM.utils.show("b_entry_date_"+_9c);
COM.utils.show("b_details_"+_9c);
COM.editFormRefCount--;
resetHeadlineMessages();
};
function deleteResourcePrompt(_9d,_9e,_9f,ok,_a0){
var _a1=function(_a2){
if(!_a2){
return;
}
window.location=_9d;
};
lconn.core.DialogUtil.prompt(_9e,_9f,ok,_a0,_a1);
};
function getElementById(_a3,_a4){
var _a5=null;
var _a6=_a3.getElementsByTagName("*");
for(var ii=0;ii<_a6.length;ii++){
if(_a6[ii].id==_a4){
_a5=_a6[ii];
break;
}
}
return (_a5);
};
function toggleSection(_a7,_a8){
var _a9=null;
if(_a8=="show"){
COM.utils.hide(_a7+"Show");
COM.utils.show(_a7+"Hide");
COM.utils.show(_a7);
_a9=dojo.byId(_a7+"Hide");
}else{
COM.utils.show(_a7+"Show");
COM.utils.hide(_a7+"Hide");
COM.utils.hide(_a7);
_a9=dojo.byId(_a7+"Show");
}
if(_a9!=null){
_a9.focus();
}
};
function selectTab(_aa){
var _ab=dojo.byId("threadedTab");
var _ac=dojo.byId("recentTab");
if(_aa=="threadedTab"){
COM.utils.hide("recentTabContent");
dojo.removeClass(_ac,"lotusSelected");
dojo.addClass(_ab,"lotusSelected");
COM.utils.show("threadedTabContent");
}else{
dojo.addClass(_ac,"lotusSelected");
COM.utils.hide("threadedTabContent");
dojo.removeClass(_ab,"lotusSelected");
dojo.addClass(_ac,"lotusSelected");
COM.utils.show("recentTabContent");
}
};
function toggleDisplay(_ad,_ae){
COM.utils.show(_ad);
COM.utils.hide(_ae);
};
function openContent(_af,_b0,_b1){
var _b2=dojo.byId(_af);
var _b3=dojo.byId(_b0);
var _b1=dojo.byId(_b1);
dojo.removeClass(_b2,"lotusHidden");
dojo.removeClass(_b1,"lotusHidden");
try{
dojo.query("a",_b2)[0].focus();
}
catch(ee){
}
dojo.addClass(_b3,"lotusHidden");
};
function closeContent(_b4,_b5,_b6){
var _b7=dojo.byId(_b4);
var _b8=dojo.byId(_b5);
var _b6=dojo.byId(_b6);
dojo.removeClass(_b8,"lotusHidden");
try{
dojo.query("a",_b8)[0].focus();
}
catch(ee){
}
dojo.addClass(_b7,"lotusHidden");
dojo.addClass(_b6,"lotusHidden");
};
function toggleContent(_b9,_ba,_bb){
var _bc=dojo.byId(_b9);
if(dojo.hasClass(_bc,"lotusHidden")){
openContent(_b9,_ba,_bb);
}else{
closeContent(_b9,_ba,_bb);
}
};
function setReaderContent(id,_bd){
var _be=dojo.byId(id);
if(_be!=null){
if(_bd){
_be.setAttribute("aria-live","polite");
}else{
_be.removeAttribute("aria-live");
}
}
};
var pendingCommunityDescription=null;
var communityCreateRTE=null;
var communityEditRTE=null;
function initCommunityCreateRTE(){
var _bf=communityCreateRTE;
if(!_bf){
var id="addCommunityDescription";
_bf=communityCreateRTE=CKEDITOR.replace(id,{toolbar:"CommToolbar_NoFiles",ibmMentionDisabled:true});
_bf.on("blur",createCommunityFormBlur);
var _c0=dojo.byId("editorContainer");
_c0.className+=" _editorrepaint";
}
};
function initCommunityEditRTE(){
var _c1=communityEditRTE;
if(!_c1){
var id="editCommunityDescription";
_c1=communityEditRTE=CKEDITOR.replace(id,{ibmMentionDisabled:true});
}
};
function setNextCommunityDescription(_c2,_c3){
if(_c2){
_c2.setData(_c3||"");
pendingCommunityDescription=null;
}else{
pendingCommunityDescription=_c3;
}
};
var communityJoinRTE=null;
function initCommunityJoinRTE(){
if(!communityJoinRTE){
communityJoinRTE=CKEDITOR.replace("requestBody",{toolbar:"CommToolbar_NoFiles",ibmMentionDisabled:true});
}
};
var addComMembers_W=null;
function setTypeAheadInternalOnly(_c4){
try{
if(dojo.exists("addComMembers_W.setInternalOnly")){
addComMembers_W.setInternalOnly(!(_c4.checked));
}
}
catch(e){
if(window.debugComm!=null){
console.log(e);
}
}
};
function displayCommunityCreate(_c5,_c6,_c7,_c8){
COM.utils.hide("communitiesList");
COM.utils.show("newCommunityForm");
initializeThemes("");
if(addComMembers_W==null){
addComMembers_W=getAddMembersWidget({"class":"content","cellContainer":"addMembersContainer","isPersonOnly":true},dojo.byId("addComMembersWidget"));
}else{
addComMembers_W.reset();
}
restoreMemberValues();
var _c9=dojo.byId("allowExternal");
if(_c9){
setTypeAheadInternalOnly(_c9);
}
lconn.core.ckeditor.async(initCommunityCreateRTE);
dojo.parser.parse(dojo.byId("tagTypeAheadContainer"));
dojo.connect(dijit.byId("widget_lconn_core_PeopleTypeAhead_0"),"onblur",createCommunityFormBlur);
setFieldFocus("addCommunityName");
var _ca=dojo.byId("autocompletetags");
_ca.style.width="99.2%";
};
function createCommunityFormBlur(){
lconn.core.uiextensions.invokeExtensions("comm.createCommunityFormListener");
};
function initializeThemes(_cb,_cc){
var _cd="themeImages";
var _ce="theme";
var _cf="themeLink";
if(_cc){
_cd=_cc+"ThemeImages";
_ce=_cc+"Theme";
_cf=_cc+"ThemeLink";
}
var _d0=dojo.byId(_cd);
if(_d0){
var _d1=_d0.getElementsByTagName("img");
if(_d1!=null&&_d1.length>=2){
for(i=0;i<_d1.length;i++){
var _d2=_d1[i];
if(_d2){
var _d3=dojo.attr(_d2,"trueSrc");
dojo.attr(_d2,"src",_d3);
}
}
var _d4=document.getElementsByName(_ce);
if(_cb==null||_cb.length==0){
setThemeValue(_ce,_d4[0].value);
}else{
var _d5=false;
for(var i=0;i<_d4.length;i++){
_d4[i].checked=false;
if(_d4[i].value==_cb){
setThemeValue(_ce,_d4[i].value);
var _d5=true;
}
}
if(!_d5){
setThemeValue(_ce,_d4[0].value);
}
}
for(i=0;i<_d4.length;i++){
dojo.connect(_d4[i],"onchange",changeTheme);
}
}else{
COM.utils.hide(_cf);
if(_d1.length==1){
var _d4=document.getElementsByName(_ce);
if(_d4[0]){
setThemeValue(_ce,_d4[0].value);
}
}
}
}
};
function saveCommunityCreate(_d6){
var _d7=disableCommunitySaveBtn();
if(_d7){
var _d8=CKEDITOR.instances["addCommunityDescription"].getData();
_d6.elements["description"].value=_d8;
addComMembers_W.setHiddenFields();
_d6.elements["members"].value=addComMembers_W.getMembers();
_d6.elements["owners"].value=addComMembers_W.getOwners();
_d6.elements["memberemails"].value=addComMembers_W.getMemberEmails();
_d6.elements["owneremails"].value=addComMembers_W.getOwnerEmails();
}
return _d7;
};
var saveCommunityCreateClickedOnce=false;
function disableCommunitySaveBtn(){
var _d9=true;
var acb=dojo.byId("addCommunityButton");
if(acb!=null){
dojo.addClass(acb,"lotusBtnDisabled");
if(saveCommunityCreateClickedOnce){
acb.setAttribute("disabled","");
_d9=false;
}else{
saveCommunityCreateClickedOnce=true;
}
}
return _d9;
};
function enableCommunitySaveBtn(){
var acb=dojo.byId("addCommunityButton");
if(acb!=null){
saveCommunityCreateClickedOnce=false;
dojo.removeClass(acb,"lotusBtnDisabled");
acb.removeAttribute("disabled");
}
};
function cancelCommunityCreate(){
COM.utils.hide("errorMessages");
COM.utils.hide("photoUploadHelp");
COM.utils.hide("photoUpload");
COM.utils.hide("photoUploadRemove");
COM.utils.hide("themeSelection");
COM.utils.hide("advMembersRow");
var _da=dojo.byId("themeLink");
if(_da!=null){
dojo.removeClass(_da,"lotusFirst");
}
var _db=dojo.byId("advancedLink");
if(_db!=null){
dojo.removeClass(_db,"lotusFirst");
}
COM.utils.show("photoUploadLink");
COM.utils.show("themeLink");
COM.utils.show("advancedLink");
COM.utils.hide("newCommunityForm");
COM.utils.show("communitiesList");
clearCommunityForm();
if(dojo.byId("createAllBtn")){
setFieldFocus("createAllBtn");
}else{
if(dojo.byId("createMyBtn")){
setFieldFocus("createMyBtn");
}
}
};
function clearCommunityForm(){
var _dc=document.getElementById("addCommunityName");
if(_dc){
_dc.value="";
}
var _dd=document.getElementById("addPublicAccess");
if(_dd){
_dd.checked=true;
}
var _de=document.getElementById("autocompletemembers");
if(_de){
_de.value="";
}
var _df=document.getElementById("addCommunityDescription");
if(_df){
_df.value="";
}
setNextCommunityDescription(communityCreateRTE,null);
if(addComMembers_W){
addComMembers_W.reset();
}
var _e0=document.getElementById("photoId");
if(_e0){
_e0.value="";
}
var _e1=document.getElementById("autocompletetags");
if(_e1){
_e1.value="";
}
var _e2=document.getElementById("autocompletehandle");
if(_e2){
_e2.value="";
}
};
var origCommunityName=null;
var origCommunityDescription=null;
var origCommunityTagNameString=null;
var origManagedAppChecked=new Array();
var origCommunityType=null;
var origCommunityHandle=null;
function saveCommunityEditOrigValues(_e3,_e4){
origCommunityName=document.getElementById("editCommunityName").value;
origCommunityDescription=document.getElementById("editCommunityDescription").innerHTML;
origCommunityTagNameString=document.getElementById("autocompletetags").value;
for(i=0;i<_e3;i++){
origManagedAppChecked[i]=document.getElementById("managedApp"+(i+1)).checked;
}
origCommunityType=_e4;
var _e5=document.getElementById("autocompletehandle");
if(_e5){
origCommunityHandle=_e5.value;
}
};
function cancelCommunityEdit(){
var _e6="";
cancelCommunityEdit(_e6);
};
function cancelCommunityEdit(_e7){
if(window.debugComm!=null){
console.log("cancelCommunityEdit");
}
if(_e7!=null&&_e7.length>0){
window.location.href=_e7;
}else{
populateCommunityEdit(origCommunityName,origCommunityType,origManagedAppChecked,origCommunityDescription,origCommunityTagNameString,origCommunityHandle);
COM.utils.show("photoUploadLink");
COM.utils.hide("photoUploadHelp");
COM.utils.hide("photoUpload");
COM.utils.hide("photoUploadRemove");
var _e8=dojo.byId("themeLink");
if(_e8!=null){
dojo.removeClass(_e8,"lotusFirst");
}
COM.utils.show("themeLink");
COM.utils.hide("themeSelection");
var _e9=document.getElementById("photoId");
if(_e9!=null){
_e9.value="";
}
var _ea=document.getElementById("photoRemove");
if(_ea!=null){
_ea.checked=false;
togglePhotoRemove(_ea);
}
COM.utils.hide("community-edit-messages");
COM.utils.hide("editCommunityForm");
COM.utils.show("lotusColRight");
COM.utils.hide("headline-messages");
COM.utils.show("headline-content");
COM.utils.show("contentArea");
COM.utils.show("communityActionBar");
COM.utils.show("lotusColLeftContent");
if(WidgetPlacementConfig.handleModeExitExe==null){
handleModeExit(true);
}
lconn.core.WidgetPlacement.registerCloseViewFunction=null;
}
};
function populateCommunityEdit(_eb,_ec,_ed,_ee,_ef,_f0){
if(window.debugComm!=null){
console.log("populateCommunityEdit: name="+_eb,", type="+_ec+", description="+_ee+", tags="+_ef+", handle="+_f0);
}
var _f1=document.getElementById("editCommunityName");
_f1.value=_eb;
var _f2=document.getElementById("publicAccess");
if(_f2!=null){
_f2.checked=(_ec=="public");
}
var _f3=document.getElementById("publicInviteOnlyAccess");
if(_f3!=null){
_f3.checked=(_ec=="publicInviteOnly");
}
var _f4=document.getElementById("privateAccess");
if(_f4!=null){
_f4.checked=(_ec=="private");
}
for(i=0;i<_ed.length;i++){
var _f5=document.getElementById("managedApp"+(i+1));
_f5.checked=_ed[i];
}
setNextCommunityDescription(communityEditRTE,_ee);
var _f6=document.getElementById("autocompletetags");
if(_f6!=null){
_f6.value=_ef;
}
var _f7=document.getElementById("autocompletehandle");
if(_f7!=null){
_f7.value=_f0;
}
};
function displayCommunityEdit(){
window.location=WidgetPlacementConfig.params["communitiesSvcRef"]+"/service/html/communityedit?communityUuid="+WidgetPlacementConfig.params.resourceId;
};
function displayCommunityEditOld(){
if(window.debugComm!=null){
console.log("displayCommunityEdit");
}
closeOtherViews();
registerCloseViewFunction(cancelCommunityEdit);
COM.utils.hide("lotusColRight");
COM.utils.hide("headline-content");
COM.utils.hide("contentArea");
COM.utils.hide("communityActionBar");
COM.utils.hide("lotusColLeftContent");
lconn.core.utilities.show("editCommunityForm",false,false,true);
lconn.core.ckeditor.async(initCommunityEditRTE);
initializeThemes(lconn_comm_global_currentTheme);
dojo.parser.parse(dojo.byId("editTagTypeAheadContainer"));
WidgetPlacementConfig.TabContainerDomId="ediPageTabContanierId";
lconn.core.WidgetPlacement.addEditTabsWithOnclickCalls("ediPageTabContanierId","editModeContainer","initialFormContainer",cancelCommunityEdit,"editPageTabFirstItem_TabItem");
setFieldFocus("editPageTabFirstItem");
return false;
};
function getStandardAddMembersWidget(_f8,_f9){
return new lconn.comm.typeahead.AddMembers(_f8,_f9);
};
function getStandardInviteMembersWidget(_fa,_fb){
return new lconn.comm.typeahead.InviteMembers(_fa,_fb);
};
var addSubcomMembers_W=null;
function displaySubcommunityCreate(){
COM.utils.hide("contentArea");
COM.utils.hide("lotusColRight");
COM.utils.hide("communityActionBar");
COM.utils.hide("lotusColLeftContent");
COM.utils.hide("searchCommunityForm");
COM.utils.show("newCommunityForm");
var _fc=null;
initializeThemes(lconn_comm_global_currentTheme,"add");
restoreThemeValue();
if(addSubcomMembers_W==null){
addSubcomMembers_W=getStandardAddMembersWidget({"class":"content","isPersonOnly":!groupSupportEnabled,"communityUuid":currentCommunityUuid,"cellContainer":"addMembersContainer","isInternalOnly":isInternalOnly},dojo.byId("addComMembersWidget"));
}else{
addSubcomMembers_W.reset();
}
restoreMembershipValues();
lconn.core.ckeditor.async(initCommunityCreateRTE);
dojo.parser.parse(dojo.byId("subTagTypeAheadContainer"));
setFieldFocus("addCommunityName");
};
function toggleSubcommunityMembers(_fd){
if(_fd.checked){
dojo.byId("addMembersRow").style.display="none";
}else{
dojo.byId("addMembersRow").style.display="block";
}
};
function saveSubcommunityCreate(_fe){
if(_fe.elements["addAllMembers"].checked==true){
var _ff=new lconn.comm.objects.community(currentCommunityUuid);
var _100=_ff.getMemberCount();
if(_100!=null&&_100>=50){
var _101=dojo.i18n.getLocalization("lconn.comm","strings");
var msg=dojo.string.substitute(_101["rs_member_add_members_warn_dialog_line1"],[_100]);
msg+="<br>"+_101["rs_member_add_members_warn_dialog_line2"];
lconn.core.DialogUtil.prompt(_101["rs_member_add_members_warn_dialog_title"],msg,_101["rs_member_add_members_warn_dialog_okbutton"],_101["rs_member_cancel"],dojo.partial(warningCallback,_fe));
return false;
}else{
saveSubcommunityCreateSubmit(_fe);
}
}else{
saveSubcommunityCreateSubmit(_fe);
}
};
function warningCallback(_102,ok){
if(ok==true){
saveSubcommunityCreateSubmit(_102);
_102.submit();
}
};
function saveSubcommunityCreateSubmit(_103){
var _104=disableCommunitySaveBtn();
if(_104){
addSubcomMembers_W.setHiddenFields();
_103.elements["addMembers"].value=addSubcomMembers_W.getMembers();
_103.elements["addOwners"].value=addSubcomMembers_W.getOwners();
_103.elements["addMemberemails"].value=addSubcomMembers_W.getMemberEmails();
_103.elements["addOwneremails"].value=addSubcomMembers_W.getOwnerEmails();
_103.elements["addCommunityDescription"].value=CKEDITOR.instances["addCommunityDescription"].getData();
}
return _104;
};
function cancelSubcommunityCreate(){
resetSubcommunityForm("add");
COM.utils.hide("newCommunityForm");
COM.utils.show("contentArea");
COM.utils.show("lotusColRight");
COM.utils.show("communityActionBar");
COM.utils.show("lotusColLeftContent");
if(window.location.hash.substr(0,"#query=".length)=="#query="||window.location.hash.substr(0,"#tag=".length)=="#tag="){
window.location=WidgetPlacementConfig.params["communitiesSvcRef"]+"/service/html/communityoverview?communityUuid="+WidgetPlacementConfig.params.resourceId;
}
};
function resetSubcommunityForm(_105){
var _106=document.getElementById(_105+"Photo");
if(_106){
_106.value="";
}
var _107=document.getElementById(_105+"PhotoRemove");
if(_107){
_107.checked=false;
}
COM.utils.show(_105+"PhotoUploadLink");
COM.utils.hide(_105+"PhotoUploadHelp");
COM.utils.hide(_105+"PhotoUpload");
COM.utils.hide(_105+"PhotoUploadRemove");
var _108=dojo.byId(_105+"ThemeLink");
if(_108!=null){
dojo.removeClass(_108,"lotusFirst");
}
COM.utils.show(_105+"ThemeLink");
COM.utils.hide(_105+"ThemeSelection");
var _109=dojo.byId(_105+"AdvancedLink");
if(_109!=null){
dojo.removeClass(_109,"lotusFirst");
}
COM.utils.show(_105+"AdvancedLink");
COM.utils.hide(_105+"AdvMembersRow");
};
function clearSubcommunityForm(_10a){
var name=document.getElementById(_10a+"CommunityName");
if(name){
name.value="";
}
var tags=document.getElementById(_10a+"CommunityTags");
if(tags){
tags.value="";
}
var _10b=document.getElementById(_10a+"Handle");
if(_10b){
_10b.value="";
}
alert("Checking access");
var _10c=document.getElementById(_10a+"PublicAccess");
var _10d=document.getElementById(_10a+"PublicInviteOnlyAccess");
var _10e=document.getElementById(_10a+"PrivateAccess");
if(_10c){
alert("Public found");
_10c.checked=true;
}else{
if(_10d){
alert("Invite found");
_10d.checked=true;
}else{
if(_10e){
alert("Private found");
_10e.checked=true;
}
}
}
var _10f=document.getElementById(_10a+"AutocompleteMembers");
if(_10f){
_10f.value="";
}
if(addSubcomMembers_W){
addSubcomMembers_W.reset();
}
var desc=document.getElementById(_10a+"CommunityDescription");
if(desc){
desc.value="";
}
setNextCommunityDescription(communityCreateRTE,null);
var _110=document.getElementById(_10a+"Photo");
if(_110){
_110.value="";
}
};
function displaySubcommunityPhoto(_111){
COM.utils.hide(_111+"PhotoUploadLink");
var _112=dojo.byId(_111+"ThemeLink");
if(_112!=null&&_112.style.display!="none"){
dojo.addClass(_112,"lotusFirst");
}else{
var _113=dojo.byId(_111+"AdvancedLink");
if(_113){
dojo.addClass(_113,"lotusFirst");
}
}
COM.utils.show(_111+"PhotoUploadHelp");
COM.utils.show(_111+"PhotoUpload");
if(_111=="edit"){
COM.utils.show(_111+"PhotoUploadRemove");
}
setFieldFocus(_111+"PhotoId");
};
function displaySubcommunityTheme(_114){
COM.utils.hide(_114+"ThemeLink");
var _115=dojo.byId(_114+"PhotoUploadLink");
if(_115&&_115.style.display=="none"){
var _116=dojo.byId(_114+"AdvancedLink");
if(_116){
dojo.addClass(_116,"lotusFirst");
}
}
COM.utils.show(_114+"ThemeSelection");
setFieldFocus("defaultCtlSubComm");
};
function displaySubcommunityAdvanced(_117){
COM.utils.hide(_117+"AdvancedLink");
COM.utils.show(_117+"AdvMembersRow");
COM.utils.show(_117+"AdvHandleRow1");
COM.utils.show(_117+"AdvHandleRow2");
COM.utils.show(_117+"AdvHandleRow3");
setFieldFocus("editHandle");
};
function toggleSubcommunityPhoto(_118,_119){
if(_118.checked){
_119.value="";
_119.disabled=true;
}else{
_119.disabled=false;
}
};
function displaySubcommunityEdit(){
window.location=WidgetPlacementConfig.params["communitiesSvcRef"]+"/service/html/communityedit?communityUuid="+WidgetPlacementConfig.params.resourceId;
};
function displaySubcommunityEditOld(){
closeOtherViews();
registerCloseViewFunction(cancelSubcommunityEdit);
COM.utils.hide("lotusColRight");
COM.utils.hide("headline-content");
COM.utils.hide("contentArea");
COM.utils.hide("communityActionBar");
COM.utils.hide("lotusColLeftContent");
lconn.core.utilities.show("editCommunityForm",false,false,true);
lconn.core.ckeditor.async(initCommunityEditRTE);
initializeThemes(lconn_comm_global_currentTheme,"edit");
dojo.parser.parse(dojo.byId("subTagTypeAheadContainer"));
setFieldFocus("editCommunityName");
WidgetPlacementConfig.TabContainerDomId="ediPageTabContanierId";
lconn.core.WidgetPlacement.addEditTabsWithOnclickCalls("ediPageTabContanierId","editModeContainer","initialFormContainer",cancelSubcommunityEdit,"editPageTabFirstItem_TabItem");
return false;
};
function cancelSubcommunityEdit(){
COM.utils.hide("community-edit-messages");
COM.utils.hide("editCommunityForm");
COM.utils.hide("headline-messages");
COM.utils.show("lotusColRight");
COM.utils.show("headline-content");
COM.utils.show("contentArea");
COM.utils.show("communityActionBar");
COM.utils.show("lotusColLeftContent");
if(WidgetPlacementConfig.handleModeExitExe==null){
handleModeExit(true);
}
lconn.core.WidgetPlacement.registerCloseViewFunction=null;
resetSubcommunityForm("edit");
};
function restoreSubcommunity(_11a,_11b,_11c,_11d,_11e,_11f,_120){
var name=document.getElementById(_11a+"CommunityName");
if(name){
name.value=_11b;
}
var tags=document.getElementById(_11a+"CommunityTags");
if(tags){
tags.value=_11c;
}
var _121=document.getElementById(_11a+"Handle");
if(_121){
_121.value=_11d;
}
var _122=null;
if(_11e=="public"){
_122=document.getElementById(_11a+"PublicAccess");
}else{
if(_11e=="publicInviteOnly"){
_122=document.getElementById(_11a+"PublicInviteOnlyAccess");
}else{
if(_11e=="private"){
_122=document.getElementById(_11a+"PrivateAccess");
}
}
}
if(_122){
_122.checked=true;
}
for(var ii=0;ii<_11f.length;ii++){
var _123=document.getElementById(_11a+"ManagedApp"+(ii+1));
_123.checked=_11f[ii];
}
setNextCommunityDescription((_11a=="add")?communityCreateRTE:communityEditRTE,_120);
var _124=dojo.byId("community-add-messages");
if(_124!=null){
_124.style.display="none";
}
var _125=dojo.byId("community-edit-messages");
if(_125!=null){
_125.style.display="none";
}
};
var communityTypeUpdateWarningFuncs=new Array();
function registerCommunityTypeUpdateWarning(func){
communityTypeUpdateWarningFuncs[communityTypeUpdateWarningFuncs.length]=func;
};
function showCommunityTypeUpdateWarnings(_126){
var _127=function(_128){
if(_128){
_126.submit();
}
};
var _129=ic_comm_communityType;
var _12a=new Array();
_12a[0]="publicAccess";
_12a[1]="publicInviteOnlyAccess";
_12a[2]="privateAccess";
_12a[3]="editSubPrivateAccess";
_12a[4]="editSubPublicInviteOnlyAccess";
_12a[5]="editPublicAccessCtl";
for(var i=0;i<_12a.length;i++){
var _12b=dojo.byId(_12a[i]);
if(_12b&&_12b.checked){
_129=_12b.value;
_129=_129.substr(0,_129.indexOf("Access"));
}
}
var _12c=false;
if(_129!=ic_comm_communityType){
var _12d=dojo.i18n.getLocalization("lconn.comm","strings");
var _12e=_12d["rs_community_access_update_message"];
for(var i=0;i<communityTypeUpdateWarningFuncs.length;i++){
var _12f=communityTypeUpdateWarningFuncs[i](ic_comm_communityType,_129);
if(_12f){
_12c=true;
_12e+=("<br><br>"+_12f);
}
}
}
if(!_12c){
return true;
}
var _130=_12d["rs_community_access_update_title"];
var _131=_12d["rs_community_access_update_submit"];
var _132=_12d["rs_community_access_update_cancel"];
_12e="<div style=\"width: 650px;\" role=\"presentation\">"+_12e+"</div>";
lconn.core.DialogUtil.prompt(_130,_12e,_131,_132,_127);
return false;
};
var sendMailClickedOnce=false;
function disableSendButton(){
var _133=true;
var _134=dojo.byId("submit");
if(_134!=null){
dojo.addClass(_134,"lotusBtnDisabled");
if(sendMailClickedOnce){
_134.setAttribute("disabled","");
_133=false;
}else{
sendMailClickedOnce=true;
}
}
return _133;
};
function enableSendBtn(){
var _135=dojo.byId("submit");
if(_135!=null){
sendMailClickedOnce=false;
dojo.removeClass(_135,"lotusBtnDisabled");
_135.removeAttribute("disabled");
}
};
function saveEmailForm(_136){
var _137=disableSendButton();
saveForm(_136,"body","composeEmailBody");
return _137;
};
function saveForm(_138,_139,_13a){
var _13b=CKEDITOR.instances[_13a].getData();
_138.elements[_139].value=_13b;
};
function displaySelectTheme(){
COM.utils.show("selectThemeForm");
COM.utils.hide("lotusColRight");
COM.utils.hide("headline-content");
COM.utils.hide("communityPage");
COM.utils.hide("communityContent");
};
function cancelSelectTheme(){
COM.utils.hide("selectThemeForm");
COM.utils.show("lotusColRight");
COM.utils.show("headline-content");
COM.utils.show("communityPage");
COM.utils.show("communityContent");
};
function changeTheme(_13c){
if(_13c.currentTarget){
setThemeValue(_13c.currentTarget.name,_13c.currentTarget.value);
}
return true;
};
function selectTheme(_13d){
var _13e=dojo.byId(_13d);
if(_13e){
setThemeValue(_13e.name,_13e.value);
}
return true;
};
function setThemeValue(_13f,_140){
var _141=document.getElementsByName(_13f);
if(_141!=null){
var _142=_141.length;
if(_142!=undefined){
for(var i=0;i<_142;i++){
if(_141[i].value==_140){
if(!_141[i].checked){
_141[i].checked=true;
}
_141[i].setAttribute("aria-checked","true");
}else{
if(_141[i].checked){
_141[i].checked=false;
}
_141[i].setAttribute("aria-checked","false");
}
}
}
}
};
function displayPhoto(_143){
COM.utils.hide("photoUploadLink");
var _144=dojo.byId("themeLink");
if(_144&&_144.style.display!="none"){
dojo.addClass(_144,"lotusFirst");
}else{
var _145=dojo.byId("advancedLink");
if(_145){
dojo.addClass(_145,"lotusFirst");
}
}
COM.utils.show("photoUploadHelp");
COM.utils.show("photoUpload");
if(_143){
COM.utils.show("photoUploadRemove");
}
try{
setFieldFocus("photoId");
return;
}
catch(e){
}
var _146=dojo.byId("themeLink");
if(_146&&dojo.style(_146,"display")!="none"){
setFieldFocus("themeLinkButton");
}else{
var _147=dojo.byId("addCommunityDescriptionDiv");
if(_147){
var _148=dojo.query("iframe",_147);
if(_148&&_148[0]){
var _149=_148[0];
try{
if(_149.contentDocument){
var _14a=_149.contentDocument.body;
setFieldFocusElement(_14a);
}
}
catch(e){
}
}
}
}
};
function displayTheme(_14b){
COM.utils.hide("themeLink");
var _14c=dojo.byId("photoUploadLink");
if(_14c&&_14c.style.display=="none"){
var _14d=dojo.byId("advancedLink");
if(_14d){
dojo.addClass(_14d,"lotusFirst");
}
}
COM.utils.show("themeSelection");
setFieldFocus("defaultCtl"+_14b);
};
function displayAdvanced(_14e){
COM.utils.hide("advancedLink");
COM.utils.show("advMembersRow");
COM.utils.show("advHandleRow1");
COM.utils.show("advHandleRow2");
COM.utils.show("advHandleRow3");
setFieldFocus(_14e);
};
function enableInternalOnly(_14f,_150){
var _151=dojo.byId(_14f);
var _152=dojo.byId(_150);
if(_151&&_152){
_151.disabled=false;
_151.checked=false;
dojo.removeClass(_152,"lotusDisabled");
toggleInternalOnly(_151);
toggleExternalWarning(_151);
}
};
function disableInternalOnly(_153,_154){
var _155=dojo.byId(_153);
var _156=dojo.byId(_154);
if(_155&&_156){
_155.disabled=true;
_155.checked=false;
dojo.addClass(_156,"lotusDisabled");
toggleInternalOnly(_155);
toggleExternalWarning(_155);
}
};
function toggleInternalOnly(_157){
setTypeAheadInternalOnly(_157);
toggleInternalOnlyPermanentWarning(_157);
};
function toggleInternalOnlyPermanentWarning(_158){
if(_158.checked){
COM.utils.hide("internalOnlyPermanentWarning");
}else{
COM.utils.show("internalOnlyPermanentWarning");
}
};
function toggleExternalWarning(_159){
if(_159.checked){
COM.utils.show("externalWarning");
}else{
COM.utils.hide("externalWarning");
}
};
function toggleModerationWarning(_15a,_15b){
if(_15a.checked){
COM.utils.hide(_15b);
}else{
COM.utils.show(_15b);
}
};
function togglePhotoRemove(_15c){
var _15d=document.getElementById("photoId");
if(_15c.checked){
_15d.value="";
_15d.disabled=true;
}else{
_15d.disabled=false;
}
};
function handleComAjaxErrors(_15e,_15f,_160){
console.log("Entered handleComFeedErrors");
var _161=null;
switch(_15f){
case 302:
case 401:
_161="feedErrorUnauth_"+_160;
break;
case 404:
_161="feedErrorNotFound_"+_160;
break;
case 0:
case 403:
_161="feedErrorNotAuthorized_"+_160;
break;
default:
_161="feedErrorDefault_"+_160;
break;
}
var _162=dojo.byId("feedErrorDetailMessage_"+_160);
if(_162!=null&&_15e!=null&&0<_15e.length){
_162.innerHTML=_15e;
}
COM.utils.hide("feedContainer_"+_160);
COM.utils.show(_161);
COM.utils.show("feedErrorContainer_"+_160);
return;
};
function itemCreated(type,data,evt){
if(feed_thread){
feed_thread.refreshThread();
}
};
function handleError(_163,_164){
alert("Error: "+_163.dojoType+" - "+_163);
console.error(_163);
return _163;
};
function addThumbnail(_165,_166){
if(profileService!=null){
var _167=profileService+"/photo.do?userid=";
var _168=getElementById(_166,"post_photo_"+_165.postId);
if(_168&&_165.author_userid){
_168.src=_167+_165.author_userid;
}
}
};
function renderWidget(_169){
dijit.registry.remove(_169.id);
dijit.registry.remove("tagTypeAheadStoreId");
var _16a={queryParam:"tag",url:"autoCompleteTags.do?format=v2"};
var _16b=new lconn.core.TypeAheadDataStore(_16a,document.getElementById("tagTypeAheadStoreId"));
var _16c={store:_16b,name:"tagsList",value:_169.value,searchDelay:400,minChars:2,multipleValues:true,token:" ",style:"width: 98%"};
new lconn.core.TypeAhead(_16c,_169);
};
function renderUsedCommunityHandleTypeAheadLookup(_16d){
dijit.registry.remove(_16d.id);
dijit.registry.remove("handleTypeAheadStoreId");
var _16e={queryParam:"handle",url:"autoCompleteHandles.do?format=v2"};
var _16f=new lconn.core.TypeAheadDataStore(_16e,document.getElementById("handleTypeAheadStoreId"));
var _170={store:_16f,name:"handles",value:_16d.value,searchDelay:400,minChars:2,multipleValues:false,token:" ",style:"width: 98%"};
new lconn.core.TypeAhead(_170,_16d);
};
function showLotusLiveGuestInvites(_171,_172){




var _173=dojo.i18n.getLocalization("lconn.comm","strings");
var _174=["<div class=\"lotusDialogBorder\">","<div class=\"lotusDialog\" style=\"zoom:1\" role=\"dialog\" aria-labelledby=\"${titleID}\" aria-describedby=\"${contentID}\" waistate=\"${titleID}\">","<h1 role=\"presentation\"><span id=\"${titleID}\" class=\"title\"></span></h1>","<form method=\"post\" action=\"/manage/subscribers/inviteGuests/input\" id=\"${formID}\" class=\"lotusForm2\">","<input type=\"hidden\" name=\"guestEmails\" value=\"${emailsNotFound}\">","<input type=\"hidden\" name=\"returnUrl\" value=\"${contextRoot}service/html/communityview?communityUuid=${communityUuid}&successMessage=label.action.confirm.LotusLive.invite\">","<input type=\"hidden\" name=\"cancelUrl\" value=\"${contextRoot}service/html/communityview?communityUuid=${communityUuid}\">","<div id=\"${contentID}\" class=\"lotusDialogContent\" role=\"presentation\">","<div id=\"guestInviteDialog\">","<div class=\"lotusFormField\">${rs_invite_to_lotuslive_message}</div>","<div class=\"lotusFormField\">","<div class=\"lotusMessage lotusWarning \">","<span id=\"guestInviteStringSpan\">${emailsNotFound}</span>","</div>","</div>","<div class=\"lotusFormField\">${rs_invite_to_lotuslive_query_auto}</div>","</div>","</div>","<div class=\"lotusDialogFooter\" role=\"presentation\"><input type=\"button\" role=\"button\" class=\"lotusFormButton submit\" /> <input type=\"button\" role=\"button\" class=\"lotusFormButton cancel\" /> </div>","</form>","</div>","</div>"].join("");
var _175=dojox.uuid.generateTimeBasedUuid();
var html=dojo.string.substitute(_174,dojo.mixin(dojo.i18n.getLocalization("lconn.core","strings"),{formID:_175,titleID:dojox.uuid.generateTimeBasedUuid(),contentID:dojox.uuid.generateTimeBasedUuid(),emailsNotFound:_171,contextRoot:commContextPath,communityUuid:_172,rs_invite_to_lotuslive_message:_173["rs_invite_to_lotuslive_message"],rs_invite_to_lotuslive_query_auto:_173["rs_invite_to_lotuslive_query_auto"]}));
var d=new dijit.Dialog();
d.containerNode.innerHTML=html;
d.lotusTitleNode=dojo.query("h1 .title",d.containerNode)[0];
d.lotusSubmitNode=dojo.query(".lotusDialogFooter .submit",d.containerNode)[0];
d.lotusCancelNode=dojo.query(".lotusDialogFooter .cancel",d.containerNode)[0];
d.lotusTitleNode.innerHTML=_173["rs_invite_to_lotuslive_title"];
d.lotusSubmitNode.value=_173["rs_button_do_lotuslive_invite"];
d.lotusCancelNode.value=_173["rs_button_dont_lotuslive_invite"];
var _176=function(){
document.forms[_175].submit();
};
d.lotusSubmitNode.onclick=function(){
_176();
};
d.connect(d.lotusCancelNode,"onclick","onCancel");
d.titleBar.style.display="none";
d.show();
setFieldFocus(d.lotusCancelNode);
};
function showLotusLiveGuestInvitesMessage(_177,_178){
var _179=extractMessageValue(_177,"memberOperation");
var _17a=extractMessageValue(_177,"appCsrfToken");
var _17b=extractMessageValue(_177,"emailsNotFound");
var _17c=extractMessageValue(_177,"memberEmails");
var _17d=extractMessageValue(_177,"ownerEmails");
showLotusLiveGuestInvitesAuto(_179,_178,_17a,_17b,_17c,_17d);
};
function extractMessageValue(_17e,name){
var _17f="";
var _180=name+"Start";
var _181=name+"End";
var _182=_17e.indexOf(_180);
if(_182>-1){
_182+=_180.length;
var _183=_17e.indexOf(_181);
if(_183>-1){
_17f=_17e.substr(_182,_183-_182);
}
}
return _17f;
};
function showLotusLiveGuestInvitesAuto(_184,_185,_186,_187,_188,_189){
var _18a=new Object();
_18a.operation=_184;
_18a.communityUuid=_185;
_18a.memberEmails=_188;
_18a.ownerEmails=_189;
var _18b=dojo.toJson(_18a);




var _18c=dojo.i18n.getLocalization("lconn.comm","strings");
var _18d=["<div class=\"lotusDialogBorder\">","<div class=\"lotusDialog\" style=\"zoom:1\" role=\"dialog\" aria-labelledby=\"${titleID}\" aria-describedby=\"${contentID}\" waistate=\"${titleID}\">","<h1 role=\"presentation\"><span id=\"${titleID}\" class=\"title\"></span></h1>","<form method=\"post\" action=\"/manage/subscribers/inviteGuests/input\" id=\"${formID}\" class=\"lotusForm2\">","<input type=\"hidden\" name=\"guestEmails\" value=\"${emailsNotFound}\">","<input type='hidden' name='serviceData' value='${serviceData}'>","<input type=\"hidden\" name=\"appCsrfToken\" value=\"${appCsrfToken}\">","<input type=\"hidden\" name=\"returnUrl\" value=\"${contextRoot}service/html/memberguestsubmit\">","<input type=\"hidden\" name=\"cancelUrl\" value=\"${contextRoot}service/html/communityview?communityUuid=${communityUuid}\">","<div id=\"${contentID}\" class=\"lotusDialogContent\" role=\"presentation\">","<div id=\"guestInviteDialog\">","<div class=\"lotusFormField\">${rs_invite_to_lotuslive_message}</div>","<div class=\"lotusFormField\">","<div class=\"lotusMessage lotusWarning \">","<span id=\"guestInviteStringSpan\">${emailsNotFound}</span>","</div>","</div>","<div class=\"lotusFormField\">${rs_invite_to_lotuslive_query_auto}</div>","</div>","</div>","<div class=\"lotusDialogFooter\" role=\"presentation\"><input type=\"button\" role=\"button\" class=\"lotusFormButton submit\" /> <input type=\"button\" role=\"button\" class=\"lotusFormButton cancel\" /> </div>","</form>","</div>","</div>"].join("");
var _18e=dojox.uuid.generateTimeBasedUuid();
var html=dojo.string.substitute(_18d,dojo.mixin(dojo.i18n.getLocalization("lconn.core","strings"),{formID:_18e,titleID:dojox.uuid.generateTimeBasedUuid(),contentID:dojox.uuid.generateTimeBasedUuid(),emailsNotFound:_187,serviceData:_18b,appCsrfToken:_186,contextRoot:commContextPath,communityUuid:_185,rs_invite_to_lotuslive_message:_18c["rs_invite_to_lotuslive_message"],rs_invite_to_lotuslive_query_auto:_18c["rs_invite_to_lotuslive_query_auto"]}));
var d=new dijit.Dialog();
d.containerNode.innerHTML=html;
d.lotusTitleNode=dojo.query("h1 .title",d.containerNode)[0];
d.lotusSubmitNode=dojo.query(".lotusDialogFooter .submit",d.containerNode)[0];
d.lotusCancelNode=dojo.query(".lotusDialogFooter .cancel",d.containerNode)[0];
d.lotusTitleNode.innerHTML=_18c["rs_invite_to_lotuslive_title"];
d.lotusSubmitNode.value=_18c["rs_button_do_lotuslive_invite"];
d.lotusCancelNode.value=_18c["rs_button_dont_lotuslive_invite"];
var _18f=function(){
document.forms[_18e].submit();
};
d.lotusSubmitNode.onclick=function(){
_18f();
};
d.connect(d.lotusCancelNode,"onclick","onCancel");
d.titleBar.style.display="none";
d.show();
setFieldFocus(d.lotusCancelNode);
};
function updateMetrics(_190,_191,_192,_193,_194,_195,_196){
var _197={};
var _198={};
_197.contentId=_191;
_198.contentTile=_192;
_198.contentLink=_195;
_197.source=_196||"COMMUNITIES";
_197.itemType=_194;
_197.userId=_190;
_197.communityId=_193;
_197.extra=_198;
var _199=com.ibm.lconn.layout.track;
_199.read(_197.contentId,_197.itemType,_197);
};
function clickLink(_19a,_19b,_19c,node){
var _19d={};
var _19e={};
_19d.contentId=_19b;
if(node.firstChild&&node.firstChild.nodeType==3){
_19e.contentTitle=node.firstChild.nodeValue;
}
_19e.contentLink=node.href;
_19d.source="BOOKMARKS";
_19d.itemType="BOOKMARK";
_19d.userId=_19a;
_19d.communityId=_19c;
_19d.extra=_19e;
_19d.sync=true;
var _19f=com.ibm.lconn.layout.track;
var dfd=_19f.read(_19d.contentId,_19d.itemType,_19d);
};
function disableCheckbox(_1a0,_1a1){
var _1a2=dojo.byId(_1a0);
var _1a3=dojo.byId(_1a1);
_1a2.disabled=true;
dojo.addClass(_1a3,"lotusDisabled");
};
function validateCommunityFormFields(_1a4,_1a5,_1a6,_1a7,_1a8){
var _1a9=true;
if(validateCommunityForm(_1a4,_1a5,_1a8)==false){
_1a9=false;
}
if(_1a9==true){
if(validateCommunityHandle(_1a6,_1a7,_1a8)==false){
_1a9=false;
}
}
return (_1a9);
};
function validateCommunityHandle(_1aa,_1ab,_1ac){
var _1ad=true;
var _1ae=dojo.byId(_1aa);
if(_1ae!=null){
var _1af=_1ae.value;
if(_1af.length>256){
_1ad=false;
}
if(_1ad==true){
if(_1af!=""){
_1ad=false;
var _1b0=_1af.match(/[A-Za-z0-9@_\.-]+/);
if(_1b0.length==1){
if(_1b0[0]==_1af){
_1ad=true;
}
}
}
}
if(_1ad==false){
validationError(_1aa,_1ab,_1ac);
}
}
if(_1ad==false){
enableCommunitySaveBtn();
}
return (_1ad);
};
function validateCommunityForm(_1b1,_1b2,_1b3){
var _1b4=checkRequiredField(_1b1,_1b2,_1b3);
if(!_1b4){
enableCommunitySaveBtn();
}
return _1b4;
};
function validateReferenceForm(_1b5,_1b6,_1b7,_1b8,_1b9){
var _1ba=checkRequiredField(_1b5,_1b6,_1b9);
if(_1ba){
var _1ba=checkRequiredField(_1b7,_1b8,_1b9);
}
return _1ba;
};
function checkRequiredField(_1bb,_1bc,_1bd){
var _1be=false;
if(_1bb){
if(checkRequiredValue(_1bb)){
_1be=true;
}else{
validationError(_1bb,_1bc,_1bd);
}
}
return _1be;
};
function checkRequiredValue(_1bf){
var _1c0=false;
if(_1bf){
var _1c1=dojo.byId(_1bf);
if(_1c1){
var _1c2=dojo.string.trim(_1c1.value);
if(_1c2.length>0){
_1c0=true;
_1c1.setAttribute("aria-invalid","false");
}else{
_1c1.setAttribute("aria-invalid","true");
}
_1c1.value=_1c2;
}
}
return _1c0;
};
function validationError(_1c3,_1c4,_1c5){
if(_1c4){
clearMessage(_1c5);
displayComErrorMessage(_1c4,_1c5);
}
var _1c6=dojo.byId(_1c3);
if(_1c6!=null){
_1c6.setAttribute("aria-invalid","true");
}
if(_1c3){
setFieldFocus(_1c3);
}
};
function clearMessage(_1c7){
if(_1c7!=null){
messageWidget=dijit.byId(_1c7);
if(messageWidget&&messageWidget.destroy){
messageWidget.destroy();
}
}
};
function getAddMembersWidget(_1c8,node){
if(useCustomTypeAhead){
var _1c9=dojo.getObject(customAddMembersWidget);
return new _1c9(_1c8,node);
}else{
return new lconn.comm.typeahead.AddMembers(_1c8,node);
}
};
function getInviteMembersWidget(_1ca,node){
if(useCustomTypeAhead){
var _1cb=dojo.getObject(customAddMembersWidget);
return new _1cb(_1ca,node);
}else{
return new lconn.comm.typeahead.InviteMembers(_1ca,node);
}
};
function enableButton(_1cc,_1cd){
var btn=dojo.byId(_1cc);
if(btn){
dojo.connect(btn,"onclick",null,function(evt){
_1cd();
dojo.stopEvent(evt);
return false;
});
}
};
}


;if(!dojo._hasResource["lconn.communities.catalog.admin.widgets.common"]){
dojo._hasResource["lconn.communities.catalog.admin.widgets.common"]=true;
dojo.provide("lconn.communities.catalog.admin.widgets.common");
lconn.communities.catalog.admin.FETCH_SERVERS_TOPIC="lconn.communities.catalog.admin.FETCH_SERVERS_TOPIC";
lconn.communities.catalog.admin.DISPLAY_SERVERS_INFO_TOPIC="lconn.communities.catalog.admin.DISPLAY_SERVERS_INFO_TOPIC";
lconn.communities.catalog.admin.ADMIN_NEW_SORT_KEY_TOPIC="lconn.communities.catalog.admin.ADMIN_NEW_SORT_KEY_TOPIC";
lconn.communities.catalog.admin.ADMIN_NEW_SORT_ORDER_TOPIC="lconn.communities.catalog.admin.ADMIN_NEW_SORT_ORDER_TOPIC";
lconn.communities.catalog.admin.UPDATE_SUMMARY_TOPIC="lconn.communities.catalog.admin.UPDATE_SUMMARY_TOPIC";
lconn.communities.catalog.admin.SERVICE_ERROR_MESSAGE_TOPIC="lconn.communities.catalog.admin.SERVICE_ERROR_MESSAGE_TOPIC";
lconn.communities.catalog.admin.DISPLAY_OVERLAY_TOPIC="lconn.communities.catalog.admin.DISPLAY_OVERLAY_TOPIC";
lconn.communities.catalog.admin.HIDE_OVERLAY_TOPIC="lconn.communities.catalog.admin.HIDE_OVERLAY_TOPIC";
lconn.communities.catalog.admin.REFRESH_SERVER_INFO_TOPIC="lconn.communities.catalog.admin.REFRESH_SERVER_INFO_TOPIC";
lconn.communities.catalog.admin.FETCH_SERVER_TOPIC="lconn.communities.catalog.admin.FETCH_SERVER_TOPIC";
lconn.communities.catalog.admin.REMOVE_SERVER_TOPIC="lconn.communities.catalog.admin.REMOVE_SERVER_TOPIC";
lconn.communities.catalog.admin.CONFIRM_MESSAGE_TOPIC="lconn.communities.catalog.admin.CONFIRM_MESSAGE_TOPIC";
lconn.communities.catalog.admin.WARNING_MESSAGE_TOPIC="lconn.communities.catalog.admin.WARNING_MESSAGE_TOPIC";
lconn.communities.catalog.admin.HIDE_MESSAGE_TOPIC="lconn.communities.catalog.admin.HIDE_MESSAGE_TOPIC";
lconn.communities.catalog.admin.ERROR_MESSAGE_TOPIC="lconn.communities.catalog.admin.ERROR_MESSAGE_TOPIC";
lconn.communities.catalog.admin.INFO_MESSAGE_TOPIC="lconn.communities.catalog.admin.INFO_MESSAGE_TOPIC";
lconn.communities.catalog.admin.FADE_OUT_TOPIC="lconn.communities.catalog.admin.FADE_OUT_TOPIC";
lconn.communities.catalog.admin.UPDATE_DETAILS_STATE_TOPIC="lconn.communities.catalog.admin.UPDATE_DETAILS_STATE_TOPIC";
boldDisplayTemplate="<strong>${0}</strong>";
if(lconn.communities.catalog.admin.util==undefined){
lconn.communities.catalog.admin.util={};
}
dojo.declare("lconn.communities.catalog.admin.RestService",null,{proxyUrl:null,remoteServer:null,root:null,extraParams:null,constructor:function(_1){
this.root=_1;
},getServiceUrl:function(_2,_3){
var _4=[];
if(this.remoteServer!=null){
var _5=this.remoteServer.indexOf("://");
var _6=this.remoteServer.substring(0,_5);
var _7=this.remoteServer.substring(_5+3);
_4.push(this.proxyUrl);
_4.push(_6);
_4.push("/");
_4.push(_7);
}
if(this.extraParams!=null){
dojo.mixin(_3,this.extraParams);
}
_4.push(this.root);
_4.push(_2);
_4.push("?");
_4.push(dojo.objectToQuery(_3));
return _4.join("");
}});
lconn.communities.catalog.admin.util.getNodes=function(_8,_9){
return ibm.portal.xml.xpath.evaluateXPath(_9,_8,lconn.communities.catalog.admin.util.xmlNamespaces);
};
lconn.communities.catalog.admin.util.escapeString=function(_a){
return _a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;");
};
lconn.communities.catalog.admin.util.unescapeString=function(_b){
return _b.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");
};
dojo.declare("lconn.communities.catalog.admin.widgets.MenuUtility",null,{openedBy:null,openMenu:function(_c,_d){
_c=dojo.fixEvent(_c);
this.openedBy=_c.target;
dijit.popup.open({popup:_d,around:_c.target,orient:{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"},onExecute:function(){
},onCancel:function(){
dijit.popup.close(_d);
},onClose:function(){
_c.target.focus();
}});
_d.focus();
dojo.connect(_d,"_onBlur",function(){
dijit.popup.close(_d);
});
dojo.stopEvent(_c);
},closeMenu:function(_e,_f){
_e=dojo.fixEvent(_e);
dijit.popup.close(_f);
dojo.stopEvent(_e);
},openMenuA11y:function(evt,_10){
if(evt.keyCode==dojo.keys.ENTER){
this.openMenu(evt,_10);
}
}});
function lconn_comm_community_handleSearchRequest(){
var str=searchBar.getValue();
str=dojo.string.trim(str);
if(!str){
return false;
}
var _11=searchBar.selectedOption;
if(_11.feature){
return true;
}else{
switch(_11.scope){
case "all":
case "restricted":
case "my":
var _12=dojo.byId("simpleSearchForm");
_12.searchFor.value=str;
_12.searchScope.value=_11.scope;
_12.submit();
break;
default:
return true;
break;
}
}
return false;
};
}


;if(!dojo._hasResource["lconn.communities.catalog.widgets.common"]){
dojo._hasResource["lconn.communities.catalog.widgets.common"]=true;


dojo.provide("lconn.communities.catalog.widgets.common");
lconn.communities.catalog.NEW_SORT_KEY_TOPIC="lconn.communities.catalog.NEW_SORT_KEY_TOPIC";
lconn.communities.catalog.NEW_SORT_ORDER_TOPIC="lconn.communities.catalog.NEW_SORT_ORDER_TOPIC";
lconn.communities.catalog.NEXT_PAGE_TOPIC="lconn.communities.catalog.NEXT_PAGE_TOPIC";
lconn.communities.catalog.PREV_PAGE_TOPIC="lconn.communities.catalog.PREV_PAGE_TOPIC";
lconn.communities.catalog.SET_PAGE_TOPIC="lconn.communities.catalog.SET_PAGE_TOPIC";
lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC="lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC";
lconn.communities.catalog.SET_SEARCH_STATE_TOPIC="lconn.communities.catalog.SET_SEARCH_STATE_TOPIC";
lconn.communities.catalog.FETCH_RESULTS_TOPIC="lconn.communities.catalog.FETCH_RESULTS_TOPIC";
lconn.communities.catalog.RESTORE_COMMUNITY="lconn.communities.catalog.RESTORE_COMMUNITY";
lconn.communities.catalog.SEARCH_RESULTS_PROCESSING_ENDED_TOPIC="lconn.communities.catalog.SEARCH_RESULTS_PROCESSING_ENDED_TOPIC";
lconn.communities.catalog.DISPLAY_RESULTS_TOPIC="lconn.communities.catalog.DISPLAY_RESULTS_TOPIC";
lconn.communities.catalog.INVITED_CONTENT_CHANGED_TOPIC="lconn.communities.catalog.INVITED_CONTENT_CHANGED_TOPIC";
lconn.communities.catalog.FADE_OUT_TOPIC="lconn.communities.catalog.FADE_OUT_TOPIC";
lconn.communities.catalog.OVERLAY_DISPLAY_TOPIC="lconn.communities.catalog.OVERLAY_DISPLAY_TOPIC";
lconn.communities.catalog.OVERLAY_OPEN_TOPIC="lconn.communities.catalog.OVERLAY_OPEN_TOPIC";
lconn.communities.catalog.OVERLAY_CLOSE_TOPIC="lconn.communities.catalog.OVERLAY_CLOSE_TOPIC";
lconn.communities.catalog.OWNER_SELECTED_TOPIC="lconn.communities.catalog.OWNER_SELECTED_TOPIC";
lconn.communities.catalog.ERROR_MSG_TOPIC="lconn.communities.catalog.ERROR_MSG_TOPIC";
lconn.communities.catalog.ADD_FILTER="lconn.communities.catalog.ADD_FILTER";
lconn.communities.catalog.REMOVE_FILTER="lconn.communities.catalog.REMOVE_FILTER";
lconn.communities.catalog.CONFIRM_MESSAGE_TOPIC="lconn.communities.catalog.CONFIRM_MESSAGE_TOPIC";
lconn.communities.catalog.WARNING_MESSAGE_TOPIC="lconn.communities.catalog.WARNING_MESSAGE_TOPIC";
lconn.communities.catalog.HIDE_MESSAGE_TOPIC="lconn.communities.catalog.HIDE_MESSAGE_TOPIC";
lconn.communities.catalog.ERROR_MESSAGE_TOPIC="lconn.communities.catalog.ERROR_MESSAGE_TOPIC";
lconn.communities.catalog.INFO_MESSAGE_TOPIC="lconn.communities.catalog.INFO_MESSAGE_TOPIC";
lconn.communities.catalog.DISPLAY_FACETS="lconn.communities.catalog.DISPLAY_FACETS";
lconn.communities.catalog.REGISTER_FACET="lconn.communities.catalog.REGISTER_FACET";
lconn.communities.catalog.DISPLAY_RESTRICTED_OWNERS="lconn.communities.catalog.DISPLAY_RESTRICTED_OWNERS";
lconn.communities.catalog.CLOSE_RESTRICTED_OWNERS="lconn.communities.catalog.CLOSE_RESTRICTED_OWNERS";
lconn.communities.catalog.SUMMARY_DISPLAY_MODE=0;
lconn.communities.catalog.DETAILS_DISPLAY_MODE=1;
if(lconn.communities.catalog.util===undefined){
lconn.communities.catalog.util={};
}
dojo.declare("lconn.communities.catalog.RestService",null,{proxyUrl:null,remoteServer:null,root:null,extraParams:null,constructor:function(_1){
this.root=_1;
},getServiceUrl:function(_2,_3){
var _4=[];
if(this.remoteServer!=null){
var _5=this.remoteServer.indexOf("://");
var _6=this.remoteServer.substring(0,_5);
var _7=this.remoteServer.substring(_5+3);
_4.push(this.proxyUrl);
_4.push(_6);
_4.push("/");
_4.push(_7);
}
if(this.extraParams!=null){
dojo.mixin(_3,this.extraParams);
}
_4.push(this.root);
if(_2!=null){
_4.push(_2);
}
_4.push("?");
_4.push(dojo.objectToQuery(_3));
return _4.join("");
}});
dojo.declare("lconn.communities.catalog.Filter",null,{getFilterType:function(){
},isExclusive:function(){
},formatBreadCrumb:function(_8){
},getConstraint:function(_9){
},addFilter:function(_a){
},removeFilter:function(_b){
}});
lconn.communities.catalog.util.filtersMap={};
lconn.communities.catalog.util.getFilter=function(_c){
return lconn.communities.catalog.util.filtersMap[_c];
};
lconn.communities.catalog.util.registerFilter=function(_d){
lconn.communities.catalog.util.filtersMap[_d.getFilterType()]=_d;
};
dojo.subscribe(lconn.communities.catalog.ADD_FILTER,function(_e,_f){
var _10=lconn.communities.catalog.util.getFilter(_e);
if(_10!==undefined){
_10.addFilter(_f);
}
});
dojo.subscribe(lconn.communities.catalog.REMOVE_FILTER,function(_11,_12){
if(_11===undefined){
for(key in lconn.communities.catalog.util.filtersMap){
var _13=lconn.communities.catalog.util.filtersMap[key];
_13.removeFilter();
}
}else{
var _14=lconn.communities.catalog.util.getFilter(_11);
if(_14!==undefined){
_14.removeFilter(_12);
}
}
});
lconn.communities.catalog.util.getNodes=function(_15,_16,_17,_18){
return lconn.core.xpath.selectNodes(_16,_15,_18,_17);
};
lconn.communities.catalog.util.getXpathValue=function(_19,_1a,_1b,_1c){
var _1d=lconn.communities.catalog.util.getNodes(_19,_1a,_1b,_1c);
if(_1d.length===0||_1d[0].firstChild==null){
return null;
}
var _1e=_1d[0].firstChild;
var _1f=_1e.data;
while(_1e.nextSibling){
_1e=_1e.nextSibling;
_1f=_1f.concat(_1e.data);
}
return _1f;
};
lconn.communities.catalog.util.getXpathAttrValue=function(_20,_21,_22,_23){
var _24=lconn.communities.catalog.util.getNodes(_20,_21,_22,_23);
if(_24.length===0){
return null;
}
return _24[0].nodeValue;
};
lconn.communities.catalog.util.toggle=function(_25){
if(dojo.hasClass(this.toggleLink,"lotusTwistyOpen")){
dojo.removeClass(this.toggleLink,"lotusTwistyOpen");
dojo.addClass(this.toggleLink,"lotusTwistyClosed");
dojo.style(this[_25],"display","none");
this.toggleLabel.innerHTML=this.resourceBundle.collapsedSection;
this.toggleLink.title=this.resourceBundle.open;
this.toggleSpan.innerHTML="&#x25b6;";
}else{
dojo.removeClass(this.toggleLink,"lotusTwistyClosed");
dojo.addClass(this.toggleLink,"lotusTwistyOpen");
dojo.style(this[_25],"display","");
this.toggleLabel.innerHTML=this.resourceBundle.expandedSection;
this.toggleLink.title=this.resourceBundle.close;
this.toggleSpan.innerHTML="&#x25bc;";
}
};
lconn.communities.catalog.util.escapeString=function(_26){
return _26.replace(/</g,"&lt;").replace(/>/g,"&gt;");
};
lconn.communities.catalog.util.getConstraints=function(_27){
var _28=[];
for(var i=0;i<_27.filters.length;i++){
var _29=_27.filters[i].filterType;
var _2a=_27.filters[i].filterValue;
var _2b=lconn.communities.catalog.util.getFilter(_29);
_28.push(dojo.toJson(_2b.getConstraint(_2a)));
}
return _28;
};
lconn.communities.catalog.util.getFilterValue=function(_2c){
var _2d=lconn.communities.catalog.history.stateManager.currentState;
for(var i=0;i<_2d.filters.length;i++){
var _2e=_2d.filters[i].filterType;
var _2f=_2d.filters[i].filterValue;
if(_2e==_2c){
return _2f;
}
}
return null;
};
function lconn_comm_community_handleSearchRequest(){
var str=searchBar.getValue();
str=dojo.string.trim(str);
if(!str){
return false;
}
var _30=searchBar.selectedOption;
if(_30.feature){
return true;
}else{
switch(_30.scope){
case "all":
case "restricted":
case "my":
var _31=dojo.byId("simpleSearchForm");
_31.searchFor.value=str;
_31.searchScope.value=_30.scope;
_31.submit();
break;
default:
return true;
break;
}
}
return false;
};
dojo.addOnLoad(function(){
var _32=document.getElementsByTagName("body")[0];
if(dojo.hasClass(_32,"dijit_a11y")){
dojo.addClass(_32,"lotusImagesOff");
}
});
}


;if(!dojo._hasResource["lconn.communities.catalog.widgets.History"]){
dojo._hasResource["lconn.communities.catalog.widgets.History"]=true;




dojo.provide("lconn.communities.catalog.widgets.History");
dojo.declare("lconn.communities.catalog.history.SearchState",null,{changeUrl:null,numItems:10,page:0,sortKey:"update_date",sortOrder:"desc",filters:null,timeStamp:null,constructor:function(){
this.filters=[];
this.timeStamp=new Date().getTime();
this.changeUrl=this.encodeStateUrl();
if(djConfig.isDebug){
console.debug("changeUrl: "+this.changeUrl);
}
},clone:function(){
var _1=new lconn.communities.catalog.history.SearchState();
_1.page=this.page;
_1.sortKey=this.sortKey;
_1.sortOrder=this.sortOrder;
_1.numItems=this.numItems;
_1.timeStamp=new Date().getTime();
_1.filters=[];
for(var i=0;i<this.filters.length;i++){
_1.filters.push(this.filters[i]);
}
_1.changeUrl=_1.encodeStateUrl();
return _1;
},encodeStateUrl:function(){
var _2=[];
for(var i=0;i<this.filters.length;i++){
_2.push(this.filters[i].filterType+"="+this.filters[i].filterValue);
}
if(this.sortKey!=null){
_2.push("sortKey="+this.sortKey);
}
if(this.sortOrder!=null){
_2.push("sortOrder="+this.sortOrder);
}
_2.push("page="+this.page);
_2.push("numItems="+this.numItems);
_2.push("timeStamp="+this.timeStamp);
return _2.join("&");
},handle:function(_3){
if(djConfig.isDebug){
console.debug("handling "+_3);
console.debug("publishing stored state:");
console.debug(this);
}
dojo.publish(lconn.communities.catalog.REMOVE_FILTER,[]);
for(var i=0;i<this.filters.length;i++){
var _4=this.filters[i];
dojo.publish(lconn.communities.catalog.ADD_FILTER,[_4.filterType,_4.filterValue]);
}
dojo.publish(lconn.communities.catalog.NEW_SORT_KEY_TOPIC,[this.sortKey]);
dojo.publish(lconn.communities.catalog.NEW_SORT_ORDER_TOPIC,[this.sortOrder]);
dojo.publish(lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC,[this.numItems]);
dojo.publish(lconn.communities.catalog.SET_PAGE_TOPIC,[this.page]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[true]);
},getMumOfFilters:function(){
return this.filters.length;
},addFilter:function(_5,_6,_7){
for(var i=0;i<this.filters.length;i++){
if(this.filters[i].filterType===_5&&this.filters[i].filterValue===_6){
return false;
}
}
if(_7){
this.removeFilter(_5);
}
this.filters.push({"filterType":_5,"filterValue":_6});
return true;
},removeFilter:function(_8,_9){
if(_8===undefined){
this.filters=[];
return true;
}
if(_9===undefined){
this.filters=[];
return true;
}
for(var i=0;i<this.filters.length;i++){
if(this.filters[i].filterType===_8&&this.filters[i].filterValue===_9){
this.filters.splice(i,1);
return true;
}
}
return false;
},getFilterValues:function(_a,_b){
var _c=[];
for(var i=0;i<this.filters.length;i++){
if(this.filters[i].filterType===_a&&(_b===undefined||this.filters[i].filterValue===_b)){
_c.push(this.filters[i].filterValue);
}
}
return _c;
}});
dojo.declare("lconn.communities.catalog.history.SearchStateManager",null,{constantParameters:{"sortKey":true,"sortOrder":true,"currentPage":true,"numItems":true,"timeStamp":true},currentState:null,constructor:function(){
this.currentState=new lconn.communities.catalog.history.SearchState();
dojo.subscribe(lconn.communities.catalog.NEXT_PAGE_TOPIC,this,"nextPage");
dojo.subscribe(lconn.communities.catalog.PREV_PAGE_TOPIC,this,"prevPage");
dojo.subscribe(lconn.communities.catalog.SET_PAGE_TOPIC,this,"setPage");
dojo.subscribe(lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC,this,"itemsPerPage");
dojo.subscribe(lconn.communities.catalog.NEW_SORT_KEY_TOPIC,this,"newSortKey");
dojo.subscribe(lconn.communities.catalog.NEW_SORT_ORDER_TOPIC,this,"newSortOrder");
dojo.subscribe(lconn.communities.catalog.FETCH_RESULTS_TOPIC,this,"addToHistory");
dojo.subscribe(lconn.communities.catalog.ADD_FILTER,this,"addFilter");
dojo.subscribe(lconn.communities.catalog.REMOVE_FILTER,this,"removeFilter");
},addToHistory:function(_d){
if(djConfig.isDebug){
console.debug("addToHistory entry dontAddToHistory="+_d);
}
if(_d===undefined){
var _e=this.currentState.clone();
if(djConfig.isDebug){
console.debug(_e);
}
dojo.back.addToHistory(_e);
}
},getHash:function(){
var h=window.location.hash;
if(h.charAt(0)=="#"){
h=h.substring(1);
}
return dojo.isMozilla?h:decodeURIComponent(h);
},publishInitialState:function(){
if(djConfig.isDebug){
console.debug("publishInitialState entry");
}
var _f=this.getHash();
if(_f.length>0){
var _10=dojo.queryToObject(_f);
for(key in _10){
if(this.constantParameters[key]===true){
continue;
}
var _11=_10[key];
if(dojo.isArray(_11)){
for(var i=0;i<_11.length;i++){
dojo.publish(lconn.communities.catalog.ADD_FILTER,[key,_11[i]]);
}
}else{
dojo.publish(lconn.communities.catalog.ADD_FILTER,[key,_11]);
}
}
if(_10.sortKey!==undefined){
dojo.publish(lconn.communities.catalog.NEW_SORT_KEY_TOPIC,[_10.sortKey]);
}
if(_10.sortOrder!==undefined){
dojo.publish(lconn.communities.catalog.NEW_SORT_ORDER_TOPIC,[_10.sortOrder]);
}
if(_10.numItems!==undefined){
dojo.publish(lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC,[_10.numItems]);
}
if(_10.page!==undefined){
dojo.publish(lconn.communities.catalog.SET_PAGE_TOPIC,[_10.page]);
}
}
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[true]);
dojo.back.setInitialState(this.currentState.clone());
},nextPage:function(){
this.currentState.page++;
},newSortKey:function(_12){
this.currentState.sortKey=_12;
this.currentState.page=0;
},newSortOrder:function(_13){
this.currentState.sortOrder=_13;
this.currentState.page=0;
},prevPage:function(){
this.currentState.page--;
},setPage:function(_14){
this.currentState.page=_14;
},itemsPerPage:function(_15){
this.currentState.numItems=_15;
this.currentState.page=0;
},addFilter:function(_16,_17){
if(djConfig.isDebug){
console.debug("addFilter: entry");
console.debug(this.currentState.filters);
}
var _18=lconn.communities.catalog.util.getFilter(_16);
if(_18===undefined){
return;
}
this.currentState.addFilter(_16,_17,_18.isExclusive());
if(djConfig.isDebug){
console.debug("SearchStateManager: current filters");
console.debug(this.currentState.filters);
}
this.currentState.page=0;
},removeFilter:function(_19,_1a){
this.currentState.removeFilter(_19,_1a);
this.currentState.page=0;
}});
lconn.communities.catalog.history.stateManager=new lconn.communities.catalog.history.SearchStateManager();
}

dojo.provide("lconn.communities.catalog.nls.placeCenter")._built=true;
dojo.provide("lconn.communities.catalog.nls.placeCenter.en_gb");
lconn.communities.catalog.nls.placeCenter.en_gb={"acceptErrorMessage":"Failed to join \"${0}\"","loginToViewRecommendations":"Log in to view recommendations","personLinkTooltip":"Filter by owner","loginForMore":"Log in for more results","welcomeTitle":"New to Communities?","trashIconAlt":"Trash","tags":"Tags:","publicPlace":"Public","welcomeStart":"Click \"Start a Community\" to create a new community.","Communities":"Communities","tagsBreadCrumbText":"Tagged with \'${0}\'","cloud":"cloud","breadCrumbTitle":"Filtered by","recommActions":"Recommendations actions","recommendTip":"","details":"Details","requestToJoinRestrictedMailBody":"Dear ${0}, I would like to join the following restricted community: ${1}","open":"Open section","welcomeDetail":"Get together with people who share your interests. Learn how to:","showingResultsMessage":"${0} - ${1} of ${2}","ImAMemeberTitle":"I\'m a Member","title":"Title","closeHelpTagFilter":"Close tag cloud help","restricted":"Restricted","noResultsInvite":"You are not invited to any communities.","restoringCommunity":"Restoring Community...","descendingDateHoverText":"Sort from most recently updated to least recently updated","restrictedCommMailToOwnerDesc":"This is a restricted community, and community information is only available to members. Email a community owner to request access to the community.","restoreFailed":"Community restore failed","nextPageText":"Next","descendingHoverText":"Descending. Click to sort by ascending order","contactOwner":"contact an owner","lastAdminUpdateBy":"Administrative update by ${0}","lastUpdatedBy":"Updated by ${0}","group":"${0} group","ascendingDateHoverText":"Sort from least recently updated to most recently updated","nextPageHoverText":"Next Page","TeamPlace":"Quickr Places","name":"Name","collapsedSection":"Collapsed section","restore":"Restore","ascendingHoverText":"Ascending. Click to sort by descending order","retrievalFailed":"Failed to retrieve items.","popularTags":"Tags","ImInvited":"I\'m Invited","lastTrashedBy":"Deleted by ${0}","member":"${0} person","list":"list","minimize":"Minimize","closeFilterTitle":"Remove this filter","mainNav":"Communities","ImFollowingTitle":"I\'m Following","lotusQuickr":"Lotus Quickr","ImInvitedCount":"${0}","updated":"Updated","noResultsOwner":"You do not own any communities.","toggleTagFilter":"Toggle the tag cloud","display":"Display:","requestToJoinRestrictedMailSubject":"Request to join Restricted Community - ${0}","communitiesAdministratorDisplayName":"Communities Administrator","maximize":"Maximize","ImAnOwnerTitle":"I\'m an Owner","commLogo":"Community logo","refresh":"Refresh","sharedExternally":"Shared externally","ownerTip":"Type and select a person\'s name to see communities owned by that person.","ImAMemeberLabel":"I\'m a Member","noResults":"No communities to display.","declineErrorMessage":"Failed to delete the invitation to join \"${0}\"","decline":"Decline","actions":"actions","findPlacestooltip":"Find a Community","lastUpdate":"Last Update","noResultsFollow":"You are not following any communities.","accept":"Accept","showItemsPerPage":"Show: ${0} items","placeDeleted":"${0} has been deleted and will be removed from this view shortly.","ImInvitedWithCount":"I\'m Invited (${0})","members":"${0} people","declineSuccessMessage":"The invitation to join \"${0}\" was successfully deleted","welcomeLogin":"Log in to start using Communities.","descendingNumberHoverText":"Sort by popularity in descending order","popularity":"Popularity","restrictedCommDesc":"This is a restricted community, and community information is only available to members. Once you accept the invitation, you will be able to visit this community.","searchTooltip":"Search for Communities","loading":"Loading...","help":"Help","becomeMember":"To become a member,","hide":"hide","ownerBreadCrumbText":"Owned by ${0}","lastUpdated":"Last updated ${0}","prevPageHoverText":"Previous Page","ImFollowingLabel":"I\'m Following","ascendingNumberHoverText":"Sort by popularity in ascending order","genericErrorMsg":"A problem occurred while retrieving items. If the problem persists please contact your System Administrator.","welcomeMsg1":"${0}Join a community${1} and start contributing.","welcomeMsg2":"${0}Participate in your community\'s forum${1} and get a discussion going.","welcomeMsg3":"${0}Share useful web resources${1} with fellow members.","more":"more","welcomeMsg4":"Bring a group of like-minded people together by ${0}creating your own community${1}.","relevance":"Relevance","sortTitle":"Sort by:","descendingStringHoverText":"Sort by name in reverse alphabetical order","show100ItemsPerPage":"Show 100 items","closeDialog":"close dialog","feedForThesePlaces":"Feed for these Communities","show10ItemsPerPage":"Show 10 items","helpTagFilter":"Tag cloud help","ImAnOwnerLabel":"I\'m an Owner","restoreSucceeded":"The community \x3ca href=\'${href}\'\x3e${commTitle}\x3c/a\x3e was restored.","welcomeTip1":"Tip:","welcomeTip2":"Click","welcomeTip3":"to see help on a specific feature or click Help to view all help topics.","ascendingStringHoverText":"Sort by name in alphabetical order","show25ItemsPerPage":"Show 25 items","removeTagFilter":"Remove ${0} filter","communityTypeFilterLabel":"Filter by Community Type","all":"All","summary":"Summary","sortKeyHoverText":"Sort by ${0}","inplaceTagTooltip":"Click to filter by tag","acceptSuccessMessage":"Thanks for joining \"${0}\"","date":"Date","prevPageText":"Previous","welcomeClose":"Close","learnMore":"Learn More","noResultsPublic":"There are no public communities.","selectView":"View as","moderated":"Moderated","tagsTip":"A tag is a keyword that you assign to  a community to categorize it and make it easy to find. Type or click a tag to see the communities associated with it. Popular tags appear in larger text in the tag cloud or list.","currentUserTitle":"Click to see communities you own","groups":"${0} groups","recommendations":"Recommendations","demo":"View Demo","show50ItemsPerPage":"Show 50 items","closedlg":"Close","expandedSection":"Expanded section","welcomeClosePanel":"Close Communities Welcome Panel","noResultsMember":"You are not a member of any communities.","close":"Close section"};

;dojo.cache("lconn.communities.catalog", "templates/Breadcrumbs.html", "<div class=\"lotusFilters breadCrumbsContainer\" style=\"display:none;\"> <header class=\"lotusHeader\"> ${resourceBundle.breadCrumbTitle}: <span dojoAttachPoint=\"breadCrumbsContainer\"></span> </header></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.Breadcrumbs"]){
dojo._hasResource["lconn.communities.catalog.widgets.Breadcrumbs"]=true;












dojo.requireLocalization("lconn.communities.catalog","placeCenter");
dojo.provide("lconn.communities.catalog.widgets.Breadcrumbs");
dojo.declare("lconn.communities.catalog.widgets.Breadcrumbs",[dijit._Widget,dijit._Templated],{resourceBundle:null,templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/Breadcrumbs.html"),defaultSortKey:"update_date",defaultSortOrder:"desc",filterTemplate:"<a class=\"lotusFilter lotusEditable\" href=\"javascript: void(0)\" style=\"white-space: nowrap\">${0}&nbsp;</a> ",blankIcon:null,postCreate:function(){
dojo.subscribe(lconn.communities.catalog.FETCH_RESULTS_TOPIC,this,"display");
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},display:function(){
if(djConfig.isDebug){
console.debug("Breadcrumbs display entry");
}
this.breadCrumbsContainer.innerHTML="";
var _1=lconn.communities.catalog.history.stateManager.currentState.filters;
if(djConfig.isDebug){
console.debug("Breadcrumbs display filters:");
console.debug(_1);
}
var _2=false;
for(var i=0;i<_1.length;i++){
var _3=_1[i].filterType;
var _4=lconn.communities.catalog.admin.util.escapeString(_1[i].filterValue);
var _5=lconn.core.globalization.bidiUtil.enforceTextDirection(_4);
var _6=lconn.communities.catalog.util.getFilter(_3);
var _7=document.createElement("span");
var _8=_6.formatBreadCrumb(_5);
if(_8===null){
continue;
}
_2=true;
_7.innerHTML=dojo.string.substitute(this.filterTemplate,[_8]);
var _9=dojo.string.substitute(this.resourceBundle.removeTagFilter,[_5]);
var _a=_7.firstChild;
dojo.attr(_a,"title",_9);
dojo.attr(_a,"aria-label",_9);
this.breadCrumbsContainer.appendChild(_7);
_a.breadCrumb={"filterType":_3,"filterValue":_4};
dojo.connect(_a,"onclick",this,"removeClicked");
var _b=dojo.create("img",{alt:_9,src:this.blankIcon},_a);
dojo.addClass(_b,"lotusDelete");
var _c=dojo.create("span",{innerHTML:"X",title:_9,role:"button"},_a);
dojo.addClass(_c,"lotusAltText");
}
if(!_2){
dojo.style(this.domNode,"display","none");
return;
}
dojo.style(this.domNode,"display","");
},removeClicked:function(_d){
var _e=_d.target.breadCrumb;
if(_e===undefined){
_e=_d.target.parentNode.breadCrumb;
}
if(_e){
dojo.publish(lconn.communities.catalog.REMOVE_FILTER,[_e.filterType,_e.filterValue]);
}
}});
}

dojo.provide("lconn.communities.catalog.nls.messageBox")._built=true;
dojo.provide("lconn.communities.catalog.nls.messageBox.en_gb");
lconn.communities.catalog.nls.messageBox.en_gb={"confirmation":"Confirmation","error":"Error","close":"Close","warning":"Warning","information":"Information"};

;dojo.cache("lconn.communities.catalog", "templates/MessageBox.html", "<div style=\"display: none\" role=\"alert\" aria-live=\"assertive\"> <div dojoAttachPoint=\"dialogNode\" role=\"alert\"></div></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.MessageBox"]){
dojo._hasResource["lconn.communities.catalog.widgets.MessageBox"]=true;








dojo.requireLocalization("lconn.communities.catalog","messageBox");
dojo.provide("lconn.communities.catalog.widgets.MessageBox");
dojo.declare("lconn.communities.catalog.widgets.MessageBox",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/MessageBox.html"),resourceBundle:null,topicsPackage:null,dialog:null,postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","messageBox");
},postCreate:function(){
dojo.subscribe(this.topicsPackage.HIDE_MESSAGE_TOPIC,this,"hideMessage");
dojo.subscribe(this.topicsPackage.ERROR_MESSAGE_TOPIC,this,"errorMessage");
dojo.subscribe(this.topicsPackage.CONFIRM_MESSAGE_TOPIC,this,"confirmMessage");
dojo.subscribe(this.topicsPackage.WARNING_MESSAGE_TOPIC,this,"warningMessage");
dojo.subscribe(this.topicsPackage.INFO_MESSAGE_TOPIC,this,"infoMessage");
},errorMessage:function(_1,_2){
this.showMessage(_1,com.ibm.oneui.controls.MessageBox.TYPE.ERROR,this.resourceBundle.error,_2);
},confirmMessage:function(_3,_4){
this.showMessage(_3,com.ibm.oneui.controls.MessageBox.TYPE.SUCCESS,this.resourceBundle.confirmation,_4);
},warningMessage:function(_5,_6){
this.showMessage(_5,com.ibm.oneui.controls.MessageBox.TYPE.WARNING,this.resourceBundle.warning,_6);
},infoMessage:function(_7,_8){
this.showMessage(_7,com.ibm.oneui.controls.MessageBox.TYPE.INFO,this.resourceBundle.information,_8);
},showMessage:function(_9,_a,_b,_c){
if(this.dialog){
this.dialog.destroy();
}
function _d(m){
var _e=document.createElement("div");
_e.innerHTML=m;
return _e;
};
var _f=_c?_d(_9):_9;
var _10={canClose:true,msg:_f,_strings:{icon_alt:_b,a11y_label:_b,close_btn_title:this.resourceBundle.close,close_btn_alt:this.resourceBundle.close},type:_a};
this.dialog=new com.ibm.oneui.controls.MessageBox(_10,this.dialogNode);
dojo.style(this.domNode,"display","");
},hideMessage:function(){
dojo.style(this.domNode,"display","none");
}});
}


;if(!dojo._hasResource["lconn.core.xslt"]){
dojo._hasResource["lconn.core.xslt"]=true;
dojo.provide("lconn.core.xslt");




dojo.deprecated("lconn.core.xslt","Use dojox.xml.parser instead","4.7");
lconn.core.xslt.ie={};
lconn.core.xslt.gecko={};
lconn.core.xslt.getXmlHttpRequest=function(){
var _1=null;
if(typeof ActiveXObject!="undefined"){
_1=new ActiveXObject("Microsoft.XMLHTTP");
}else{
_1=new XMLHttpRequest();
}
return _1;
};
lconn.core.xslt.loadXml=function(_2){
if(typeof ActiveXObject!="undefined"){
return lconn.core.xslt.ie.loadXml(_2);
}else{
return lconn.core.xslt.gecko.loadXml(_2);
}
};
lconn.core.xslt.loadXmlString=function(_3){
return dojox.xml.parser.parse(_3);
};
lconn.core.xslt.loadXsl=function(_4){
if(typeof ActiveXObject!="undefined"){
return lconn.core.xslt.ie.loadXsl(_4);
}else{
return lconn.core.xslt.gecko.loadXsl(_4);
}
};
lconn.core.xslt.loadXslString=function(_5){
if(typeof ActiveXObject!="undefined"){
return lconn.core.xslt.ie.loadXslString(_5);
}else{
return dojox.xml.parser.parse(_5);
}
};
lconn.core.xslt.transform=function(_6,_7,_8,_9,_a){
if(typeof ActiveXObject!="undefined"){
return lconn.core.xslt.ie.transform(_6,_7,_8,_9,_a);
}else{
return lconn.core.xslt.gecko.transform(_6,_7,_8,_9,_a);
}
};
lconn.core.xslt.transformDocument=function(_b,_c,_d){
var _e=lconn.core.xslt.loadXsl(_c);
if(_e.documentElement==null){
return null;
}
var _f=lconn.core.xslt.transform(_b,_e,null,_d,true);
return _f;
};
lconn.core.xslt.transformAndUpdate=function(_10,xml,xsl,_11,_12){
if(typeof ActiveXObject!="undefined"){
var _13=lconn.core.xslt.ie.transform(xml,xsl,_11,_12,true);
_10.innerHTML+=_13;
}else{
_13=lconn.core.xslt.gecko.transform(xml,xsl,_11,_12,false);
var _14=_13.documentElement;
if(_13.documentElement.tagName=="transformiix:result"){
_14=_13.documentElement.childNodes;
dojomum.dom.copyChildren(_13.documentElement,_10,true);
}else{
_10.appendChild(_14);
}
}
};
lconn.core.xslt.ie.loadXml=function(_15){
var _16=new ActiveXObject("MSXML2.DOMDocument");
_16.async=0;
_16.resolveExternals=0;
if(!_16.load(_15)){
throw new Error("Error loading xml file "+_15);
}
return _16;
};
lconn.core.xslt.ie.loadXsl=function(_17){
var _18=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
_18.async=0;
dojo.xhrGet({sync:true,url:_17,handleAs:"text",expectedContentType:"xml",load:function(_19,_1a){
_18.loadXML(_19);
}});
return _18;
};
lconn.core.xslt.ie.loadXslString=function(_1b){
var _1c=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
_1c.async=0;
if(!_1c.loadXML(_1b)){
throw new Error("Error loading xsl string "+_1b);
}
return _1c;
};
lconn.core.xslt.ie.transform=function(_1d,xsl,_1e,_1f,_20){
var _21=_1d;
var _22=xsl;
try{
if(!_22.documentElement){
_22=this.loadXsl(xsl);
}
}
catch(e){
var _23=e.message;
throw new Error(""+_23,""+_23);
}
var _24=new ActiveXObject("Msxml2.XSLTemplate");
_24.stylesheet=_22;
var _25=_24.createProcessor();
_25.input=_21;
for(var i=0;_1f!=null&&i<_1f.length;i++){
var _26=_1f[i][0];
var _27=_1f[i][1];
if(_26==null||_26==""){
continue;
}
try{
_25.addParameter(_26,_27);
}
catch(error){
console.debug(error);
}
}
if(_1e){
_25.addParameter("mode",_1e);
}
if(_20){
if(!_25.transform()){
throw new Error("Error transforming xml doc "+_21);
}
return _25.output;
}else{
var _28=new ActiveXObject("MSXML2.DOMDocument");
_28.async=0;
_28.validateOnParse=1;
_21.transformNodeToObject(_22,_28);
return _28;
}
};
lconn.core.xslt.gecko.loadXml=function(_29){
var _2a=dojox.data.dom.createDocument();
_2a.async=false;
if(dojo.isWebKit){
_2a.load=function(url){
var req=dojo.xhrGet({sync:true,url:url,handleAs:"xml",load:function(_2b,_2c){
_2a=_2b;
}});
};
}
_2a.load(_29);
if(_2a.documentElement&&_2a.documentElement.nodeName=="parsererror"){
console.log(dojox.data.dom.innerXML(_2a.documentElement));
return null;
}
return _2a;
};
lconn.core.xslt.gecko.loadXsl=function(_2d){
var _2e=document.implementation.createDocument("","",null);
_2e.async=false;
if(dojo.isWebKit){
_2e.load=function(url){
var req=dojo.xhrGet({sync:true,url:url,handleAs:"xml",load:function(_2f,_30){
_2e=_2f;
}});
};
}
_2e.load(_2d);
return _2e;
};
lconn.core.xslt.gecko.transform=function(_31,xsl,_32,_33,_34){
try{
var _35=xsl;
if(!_35.documentElement){
console.log("xslDoc is not a Document, loading it...");
_35=this.loadXsl(xsl);
}
var _36=new XSLTProcessor();
_36.importStylesheet(_35);
for(var i=0;_33!=null&&i<_33.length;i++){
var _37=_33[i][0];
var _38=_33[i][1];
_36.setParameter(null,_37,_38);
}
if(_32){
_36.setParameter(null,"mode",_32);
}
var _39=_36.transformToFragment(_31,document);
if(!_34){
return _39;
}
var _3a=new XMLSerializer();
resultStr=_3a.serializeToString(_39);
}
catch(exc){
throw new Error("Error transforming xml doc "+exc);
}
return resultStr;
};
lconn.core.xslt.setLayerContentByXml=function(_3b,xml,xsl,_3c,_3d){
var _3e=lconn.core.xslt.transform(xml,xsl,null,_3c,_3d);
if(_3b.innerHTML){
_3b.innerHTML=_3e;
}else{
var obj=document.getElementById(_3b);
obj.innerHTML=_3e;
}
};
lconn.core.xslt.transformAndRender=function(_3f){
var _40=function(_41){
if(lconn.core.xslt.debug){
_42("before lconn.core.xslt.transformDocument for: "+_41.xmlDocUrl);
}
var _43;
if(_41.xslDoc){
_43=lconn.core.xslt.transform(_41.xmlDoc,_41.xslDoc,null,_41.aXslParams,true);
}else{
_43=lconn.core.xslt.transformDocument(_41.xmlDoc,_41.xsltUrl,_41.aXslParams);
}
if(lconn.core.xslt.debug){
_42("after lconn.core.xslt.transformDocument for: "+_41.xmlDocUrl);
}
if(lconn.core.xslt.debug){
_42("transformDocAndRender: xslResult doc:\n"+_43+"<br/><br/><br/>");
}
if(_41.callback!=null){
_41.callback(_43);
}
if(typeof (_41.htmlContainerElemId)=="string"){
document.getElementById(_41.htmlContainerElemId).innerHTML=_43;
}else{
_41.htmlContainerElemId.innerHTML=_43;
}
};
var _44=function(_45,_46){
if(lconn.core.xslt.debug){
_42("dojoLoadCallback start");
}
try{
var _47=_46.args.xsltArgs;
if(dojo.isIE&&_45.documentElement==null){
if(lconn.core.xslt.debug){
_42("before dojox.data.dom.createDocument for: "+_47.xmlDocUrl);
}
_45=dojox.data.dom.createDocument(_45);
if(lconn.core.xslt.debug){
_42("after dojox.data.dom.createDocument for: "+_47.xmlDocUrl);
}
}
if(lconn.core.xslt.debug){
_42("transformUrlAndRender: xml doc:\n"+dojox.data.dom.innerXML(_45)+"<br/><br/><br/>");
}
_47.xmlDoc=_45;
_40(_47);
}
catch(exception){
_47.exceptionHandler("transformUrlAndRender",exception,_47);
}
if(lconn.core.xslt.debug){
_42("dojoLoadCallback end");
}
};
var _42=function(_48){
console.log(_48);
};
if(_3f.dojoErrorHandler==null){
_3f.dojoErrorHandler=lconn.core.errorhandling.DefaultXHRErrorHandler;
}
if(_3f.exceptionHandler==null){
_3f.exceptionHandler=lconn.core.errorhandling.DefaultErrorHandler;
}
if(_3f.xmlDoc!=null){
_40(_3f);
}else{
var _49="xml";
if(dojo.isIE){
_49="text";
}
if(lconn.core.xslt.debug){
_42("using: handleAs: "+_49+" for: "+_3f.xmlDocUrl);
}
var _4a={xsltArgs:_3f,url:_3f.xmlDocUrl,sync:false,handleAs:_49,expectedContentType:"xml",load:_44};
if(_3f.dojoErrorHandler!=null){
_4a.error=_3f.dojoErrorHandler;
}
dojo.xhrGet(_4a);
}
};
}


;if(!dojo._hasResource["lconn.core.Paging"]){
dojo._hasResource["lconn.core.Paging"]=true;
dojo.provide("lconn.core.Paging");








dojo.declare("lconn.core.CenterPaging",[dijit._Widget,lconn.core.Res],{_rendered:0,currentPage:1,maxPage:10,isBottom:false,url:"#",stopNavigation:false,buildRendering:function(){
this.inherited(arguments);
this.loadDefaultBundle();
if(this.isBottom){
this.domNode=dojo.create("div");
var _1="<input id='"+this.id+"-jumper' type='text' value='"+this.currentPage+"' aria-label='"+this.resBundle.rs_jumpPageLabel+"'>";
this.domNode.innerHTML=dojo.string.substitute(this.resBundle.rs_jumpPage,[_1,this.maxPage]);
var x=dojo.query("input",this.domNode);
this.connect(x[0],"onkeypress","_jumpKeypress");
}else{
this.domNode=dojo.create("ul");
dojo.addClass(this.domNode,"lotusInlinelist");
this._createListItem(1,"lotusFirst");
if(this.currentPage<=4){
var i;
for(i=2;i<=5;i++){
this._createListItem(i);
}
}else{
this._createDummyListItem();
}
if(this.currentPage<=4&&this.maxPage>4){
this._createDummyListItem();
}else{
if(this.currentPage<this.maxPage-3){
this._createListItem(this.currentPage-2,"lotusFirst");
for(i=this.currentPage-1;i-2<=this.currentPage;i++){
this._createListItem(i);
}
}
}
if(this.currentPage>=this.maxPage-3){
this._createListItem(this.maxPage-5,"lotusFirst");
for(i=this.maxPage-4;i<=this.maxPage;i++){
this._createListItem(i);
}
}else{
if(this.currentPage>4){
this._createDummyListItem();
}
}
this._createListItem(this.maxPage,"lotusLast");
}
},focus:function(){
if(this._focusNode){
this._focusNode.focus();
}else{
var _2=dojo.query("a",this.domNode);
if(_2&&_2.length>0){
_2[0].focus();
}
}
},onPageSelected:function(_3){
},_createDummyListItem:function(){
if(this._rendered>=this.maxPage){
return;
}
var li=dojo.create("li",{innerHTML:"..."});
dojo.addClass(li,"lotusLast");
dojo.place(li,this.domNode);
},_createListItem:function(_4,_5){
if(_4<=0||_4<=this._rendered||_4>this.maxPage){
return;
}
var li=dojo.create("li");
if(_4!=this.currentPage){
if(_4===1){
li.innerHTML=this.resBundle.rs_pageLabel+"&nbsp;";
}
var a=dojo.create("a",{innerHTML:_4});
if(_4===this.currentPage-1){
this._focusNode=a;
}
a.setAttribute("href",dojo.string.substitute(this.url,[_4]));
this.connect(a,"onclick","_onPageClick");
dojo.place(a,li);
}else{
if(_4===1){
li.innerHTML=this.resBundle.rs_pageLabel+"&nbsp;"+_4;
}else{
li.innerHTML=_4;
}
}
if(_5){
dojo.addClass(li,_5);
}
dojo.place(li,this.domNode);
this._rendered=_4;
},_onPageClick:function(_6){
if(this.stopNavigation){
dojo.stopEvent(_6);
}
this.onPageSelected(dojo.trim(_6.target[dojo.isIE?"innerText":"textContent"]));
},_jumpKeypress:function(_7){
if(_7.keyCode==dojo.keys.ENTER){
dojo.stopEvent(_7);
var _8=parseInt(dojo.byId(this.id+"-jumper").value);
if(_8>0&&_8<=this.maxPage){
this.onPageSelected(_8);
if(!this.stopNavigation){
window.location=dojo.string.substitute(this.url,[_8]);
}
}
}
}});
}


;dojo.cache("lconn.communities.catalog", "templates/placesTable.html", "<div aria-label=\"${pageTitle}\" ><div class=\"lotusPaging\" style=\"display: none\" dojoAttachPoint=\"pagingHeader\"> <div class=\"lotusLeft\" dojoType=\"lconn.communities.catalog.widgets.TypeFilter\"></div > <div class=\"lotusLeft\" dojoAttachPoint=\"showingResultsMessage\"></div> <ul class=\"lotusRight lotusInlinelist\" ><li class=\"lotusFirst prevPageLink\" ><a dojoAttachEvent=\"onclick: prevPage\" href=\"javascript: void(0)\" title=\"${resourceBundle.prevPageHoverText}\"> ${resourceBundle.prevPageText} </a ><span style=\"display: none\">${resourceBundle.prevPageText}</span ></li> <li class=\"nextPageLink\" ><a dojoAttachEvent=\"onclick: nextPage\" href=\"javascript: void(0)\" title=\"${resourceBundle.nextPageHoverText}\"> ${resourceBundle.nextPageText} </a ><span style=\"display: none\">${resourceBundle.nextPageText}</span ></li ></ul> <div> <div class=\"\" dojoAttachPoint=\"catCenterPagingTop\"></div> </div> </div ><div style=\"display: none\" dojoAttachPoint=\"containerNode\"></div ><table style=\"display: none; word-break: break-all;\" dojoAttachPoint=\"resultsTable\" class=\"lotusTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" summary=\"\" role=\"presentation\"> <tbody dojoAttachPoint=\"resultsTableBody\"> </tbody> </table ><div style=\"display: none\" class=\"lotusPaging\" dojoAttachPoint=\"pagingFooter\"> <ul class=\"lotusLeft lotusInlinelist\" dojoAttachPoint=\"itemsPerPageList\"> <li class=\"lotusFirst itemsPerPageLink\"><a role=\"button\" aria-pressed=\"false\" title=\"${resourceBundle.show10ItemsPerPage}\" href=\"javascript: void(0)\">10</a><span title=\"${resourceBundle.show10ItemsPerPage}\" role=\"button\" aria-pressed=\"true\" aria-disabled=\"true\" style=\"display: none\">10</span></li> <li class=\"itemsPerPageLink\"><a role=\"button\" aria-pressed=\"false\" title=\"${resourceBundle.show25ItemsPerPage}\" href=\"javascript: void(0)\">25</a><span title=\"${resourceBundle.show10ItemsPerPage}\" role=\"button\" aria-pressed=\"true\" aria-disabled=\"true\" style=\"display: none\">25</span></li> <li class=\"itemsPerPageLink\"><a role=\"button\" aria-pressed=\"false\" title=\"${resourceBundle.show50ItemsPerPage}\" href=\"javascript: void(0)\">50</a><span title=\"${resourceBundle.show10ItemsPerPage}\" role=\"button\" aria-pressed=\"true\" aria-disabled=\"true\" style=\"display: none\">50</span></li> <li class=\"itemsPerPageLink\"><a role=\"button\" aria-pressed=\"false\" title=\"${resourceBundle.show100ItemsPerPage}\" href=\"javascript: void(0)\">100</a><span title=\"${resourceBundle.show10ItemsPerPage}\" role=\"button\" aria-pressed=\"true\" aria-disabled=\"true\" style=\"display: none\">100</span></li> </ul> <ul class=\"lotusRight lotusInlinelist\" ><li class=\"lotusFirst prevPageLink\" ><a dojoAttachEvent=\"onclick: prevPage\" href=\"javascript: void(0)\" title=\"${resourceBundle.prevPageHoverText}\"> ${resourceBundle.prevPageText} </a ><span style=\"display: none\">${resourceBundle.prevPageText}</span ></li> <li class=\"nextPageLink\" ><a dojoAttachEvent=\"onclick: nextPage\" href=\"javascript: void(0)\" title=\"${resourceBundle.nextPageHoverText}\"> ${resourceBundle.nextPageText} </a ><span style=\"display: none\">${resourceBundle.nextPageText}</span ></li ></ul> <div> <div class=\"\" dojoAttachPoint=\"catCenterPagingBottom\"></div> </div> </div ><div style=\"display: none; margin-top: 20px\" dojoAttachPoint=\"zeroResultsNode\"><h5>${resourceBundle.noResults}</h5></div></div>");

;dojo.cache("lconn.communities.catalog", "templates/placeView.html", "<table dojoAttachPoint=\"tableNode\"><tbody ><tr class=\"placeRow\" role=\"article\" aria-labelledby=\"${id}-title\"> <td class=\"lotusFirstCell\" dojoAttachPoint=\"communityIcon\" width=\"35px\"/> <td class=\"lotusFirstCell\"> <h4> <span dojoAttachPoint=\"trashedIconNode\" style=\"display: none\" class=\"lotusType commType\"> <img style=\"display: inline\" class=\"lconnSprite lconnSprite-iconTrashCan16\" src=\"${blankIcon}\" alt=\"${resourceBundle.trashIconAlt}\" title=\"\"/> <span class=\"lotusAltText\">${resourceBundle.trashIconAlt}</span> </span> <span id=\"${id}-title\" dojoAttachPoint=\"placeLinkNode\"><a dojoAttachPoint=\"placeTitleLink\" href=\"${placeLink}\" target=\"${linkTarget}\" aria-describedby=\"${id}sourceType\" class=\"bidiAware\"></a></span> <span dojoAttachPoint=\"sourceTypePlaceHolder\" id=\"${id}sourceType\" class=\"lotusType commType\"></span> <span role=\"presentation\" style=\"display: none\" class=\"lotusDivider\" dojoAttachPoint=\"sourceTypeSectionDevider\">|</span> <span dojoAttachPoint=\"moderatedIconNode\" style=\"display: none\" class=\"lotusType commType\"> <img style=\"display: inline\" class=\"lconnSprite lconnSprite-iconModeratedCommunity16\" src=\"${blankIcon}\" alt=\"\" title=\"\"/> ${resourceBundle.moderated} </span> <span dojoAttachPoint=\"restrictedIconNode\" style=\"display: none\" class=\"lotusType commType\"> <img style=\"display: inline; margin-top: -5px\" class=\"iconsStates16 iconsStates16-CheckedOut\" src=\"${blankIcon}\" alt=\"\" title=\"\"/> ${resourceBundle.restricted} </span> <span dojoAttachPoint=\"externalIconNode\" style=\"display: none\" class=\"lotusType commType\"> <img style=\"display: inline; margin-top: -5px\" class=\"lotusui30 lconnIconListSharedExternal\" src=\"${blankIcon}\" alt=\"\" title=\"\"/> ${resourceBundle.sharedExternally} </span> </h4> <div class=\"lotusMeta\"> <span role=\"list\"> <span role=\"listitem\" dojoAttachPoint=\"numOfMembersPlaceHolder\"></span> <span role=\"presentation\" style=\"display: none\" class=\"lotusDivider\" dojoAttachPoint=\"membersSectionDevider\">|</span> <span role=\"listitem\" dojoAttachPoint=\"personPlaceHolder\"></span> <span role=\"presentation\" style=\"display: none\" class=\"lotusDivider\" dojoAttachPoint=\"authorSectionDevider\">|</span> <span role=\"listitem\" dojoAttachPoint=\"lastUpdateNode\"></span> <span role=\"presentation\" style=\"display: none\" class=\"lotusDivider\" dojoAttachPoint=\"restoreCommDivider\">|</span> <span role=\"listitem\" style=\"display: none\" dojoAttachPoint=\"restoreCommButton\"> <a dojoattachevent=\"onclick: restoreCommunity\" href=\"javascript: void(0)\">${resourceBundle.restore}</a> </span> <span role=\"presentation\" style=\"display: none\" class=\"lotusDivider\" dojoAttachPoint=\"tagsSectionDevider\">|</span> <span role=\"listitem\" class=\"lotusTags\" dojoAttachPoint=\"tagsSection\"></span> </span> </div> <div class=\"lotusLastCell\" dojoAttachPoint=\"detailsSection\" style=\"display: none\"> <p dojoAttachPoint=\"placeDescNode\" class=\"bidiAware\"></p> <ul class=\"lotusInlinelist lotusLeft lotusActions\" dojoAttachPoint=\"acceptDeclineInvite\" style=\"display: none\"> <li class=\"lotusFirst\"> <a href=\"javascript: void(0)\" role=\"button\" dojoAttachEvent=\"onclick: acceptInvite\">${resourceBundle.accept}</a> </li> <li> <a href=\"javascript: void(0)\" role=\"button\" dojoAttachEvent=\"onclick: declineInvite\">${resourceBundle.decline}</a> </li> </ul> <ul class=\"lotusInlinelist lotusLeft lotusActions\" dojoAttachPoint=\"showOwners\" style=\"display: none\"> <li class=\"lotusFirst\"> ${resourceBundle.becomeMember} <a href=\"javascript: void(0)\" dojoAttachPoint=\"showOwnersListLink\" >${resourceBundle.contactOwner}</a> </li> </ul> </div> </td> <td class=\"lotusAlignRight lotusLastCell lotusTiny\"> </td> </tr></tbody></table>");

;dojo.cache("lconn.communities.catalog", "templates/typeFilter.html", "<div style=\"color: #848484;\"> <span id=\"${id}displaySpan\">${resourceBundle.display}</span> <a href=\"javascript:;\" dojoAttachPoint=\"scopeNode\" dojoAttachEvent=\"onclick:openMenu,onkeypress:openMenuA11y\" aria-haspopup=\"true\" role=\"button\" aria-labelledby=\"${id}displaySpan\" style=\"color: #000000\"> <span dojoAttachPoint=\"currScopeLabelNode\">${resourceBundle.all}</span> <img class=\"lotusArrow lotusDropDownSprite\" src=\"${blankGif}\" alt=\"\" role=\"presentation\"></img> <span class=\"lotusAltText\" role=\"presentation\">&#9660;</span> </a> |</div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.PlacesDisplayWidgets"]){
dojo._hasResource["lconn.communities.catalog.widgets.PlacesDisplayWidgets"]=true;








































dojo.requireLocalization("lconn.communities.catalog","placeCenter");


dojo.provide("lconn.communities.catalog.widgets.PlacesDisplayWidgets");
dojo.declare("lconn.communities.catalog.widgets.ResultsFetcher",[dijit._Widget,dijit._Templated],{resourceBundle:null,searchService:null,facets:null,searchTerms:"",memberId:"",templateString:"<span style=\"display: none\">${resourceBundle.loading}</span>",postCreate:function(){
if(djConfig.isDebug){
console.debug("ResultsFetcher: postCreate");
}
dojo.subscribe(lconn.communities.catalog.FETCH_RESULTS_TOPIC,this,"fetchResults");
dojo.subscribe(lconn.communities.catalog.REGISTER_FACET,this,"addFacet");
if(this.searchTerms!=null&&this.searchTerms.length>0){
var _1=document.getElementById("titleSearchTerm");
if(_1!=null){
_1.innerHTML="<b>"+lconn.communities.catalog.util.escapeString(this.searchTerms)+"</b>";
}
}
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},fetchResults:function(_2){
this.show();
if(_2===undefined||_2==false){
dojo.publish(lconn.communities.catalog.HIDE_MESSAGE_TOPIC,[]);
}
dojo.publish(lconn.communities.catalog.FADE_OUT_TOPIC,[]);
var _3=this.createServiceUrl();
if(djConfig.isDebug){
console.debug("fetching results for "+_3);
}
return dojo.xhrGet({url:_3,preventCache:true,load:dojo.hitch(this,"handleSearchResults",false),error:dojo.hitch(this,"handleError"),handleAs:"text"});
},handleSearchResults:function(_4,_5,_6){
this.hide();
var _7=lconn.core.xslt.loadXmlString(_5);
if(!_4){
dojo.publish(lconn.communities.catalog.DISPLAY_RESULTS_TOPIC,[_7]);
}
var _8=lconn.communities.catalog.util.getNodes(_7,"/atom:feed/ibmsc:facets");
if(_8.length>0){
dojo.publish(lconn.communities.catalog.DISPLAY_FACETS,[_7]);
}
dojo.publish(lconn.communities.catalog.SEARCH_RESULTS_PROCESSING_ENDED_TOPIC,[]);
return _7;
},createServiceUrl:function(){
var _9=lconn.communities.catalog.history.stateManager.currentState;
var _a={results:_9.numItems,start:_9.page*_9.numItems,sortKey:_9.sortKey,sortOrder:_9.sortOrder,facet:this.facets,format:"XML"};
if(this.searchService.root.indexOf("public")===-1&&lconn.communities.catalog.history.stateManager.currentUserID.length>0){
_a.userCacheKey=lconn.communities.catalog.history.stateManager.currentUserID;
}
var _b=lconn.communities.catalog.util.getConstraints(_9);
if(_b.length>0){
_a.constraint=_b;
}
if(this.searchTerms!=null&&this.searchTerms.length>0){
_a.query=this.searchTerms;
_a.queryLang=djConfig.locale;
}
if(this.memberId!=""){
_a.memberId=this.memberId;
}
return this.searchService.getServiceUrl(null,_a);
},handleError:function(_c,_d){
if(djConfig.isDebug){
console.debug("handleError");
console.debug(_d.xhr.status);
}
this.hide();
dojo.publish(lconn.communities.catalog.ERROR_MESSAGE_TOPIC,[this.resourceBundle.genericErrorMsg,_d]);
},hide:function(){
dojo.style(this.domNode,"display","none");
},show:function(){
dojo.style(this.domNode,"display","inline");
},addFacet:function(_e){
if(this.facets==null){
this.facets=[];
}
this.facets.push(_e);
}});
dojo.declare("lconn.communities.catalog.widgets.RestoreCommunity",[dijit._Widget,dijit._Templated],{resourceBundle:null,templateString:"<div id=\"restorecommunitymessage\" style=\"display: none\">${resourceBundle.restoringCommunity}</div>",communityTitle:"",communityLink:"",postCreate:function(){
if(djConfig.isDebug){
console.debug("RestoreCommunity: postCreate");
}
dojo.subscribe(lconn.communities.catalog.RESTORE_COMMUNITY,this,"startRestoreCommunity");
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},startRestoreCommunity:function(_f,_10,_11){
this.show();
if(djConfig.isDebug){
console.debug("fetching results for "+_f);
}
this.communityTitle=_10;
this.communityLink=_11;
return dojo.xhrGet({url:_f,preventCache:true,load:dojo.hitch(this,"handleGetCommEntry"),error:dojo.hitch(this,"handleRestoreError"),handleAs:"text"});
},handleGetCommEntry:function(_12,_13){
var _14=dojox.xml.parser.parse(_12);
dojo.withDoc(_14,function(){
var _15=dojo.query("category[term=\"deleted\"]")[0];
if(_15){
dojo.destroy(_15);
}
});
var _16=dojox.xml.parser.innerXML(_14);
return dojo.xhrPut({url:_13["url"],preventCache:true,putData:_16,load:dojo.hitch(this,"handlePutCommEntry"),error:dojo.hitch(this,"handleRestoreError"),handleAs:"text"});
},handlePutCommEntry:function(_17,_18){
this.hide();
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
this.communityTitle=lconn.communities.catalog.util.escapeString(this.communityTitle);
var _19=dojo.string.substitute(this.resourceBundle.restoreSucceeded,{href:this.communityLink,commTitle:this.communityTitle});
dojo.publish(lconn.communities.catalog.CONFIRM_MESSAGE_TOPIC,[_19,true]);
this.communityTitle="";
this.communityLink="";
},handleRestoreError:function(_1a,_1b,_1c){
this.hide();
dojo.publish(lconn.communities.catalog.ERROR_MESSAGE_TOPIC,[this.resourceBundle.restoreFailed,_1c]);
},hide:function(){
dojo.style(this.domNode,"display","none");
},show:function(){
dojo.style(this.domNode,"display","");
}});
dojo.declare("lconn.communities.catalog.widgets.ResultsDisplayWidget",[dijit._Widget,dijit._Templated,dijit._Container],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/placesTable.html"),resourceBundle:null,enableTypeFilter:false,blankIcon:null,openInNewWindow:true,displayMode:lconn.communities.catalog.SUMMARY_DISPLAY_MODE,isInternalOnly:false,isInvited:false,isTrashPage:false,isRestricted:false,queryType:"",communitiesInviteUrl:"",communitiesMemberUrl:"",communityIconUrl:"",publicCommunitiesUrl:"",userId:"",quickrPlaceIcon:"",pageTitle:"",postCreate:function(){
dojo.subscribe(lconn.communities.catalog.FADE_OUT_TOPIC,this,"fadeOut");
dojo.subscribe(lconn.communities.catalog.DISPLAY_RESULTS_TOPIC,this,"displayResults");
this.itemsPerPageList.innerHTML=dojo.string.substitute(this.resourceBundle.showItemsPerPage,[this.itemsPerPageList.innerHTML]);
var _1d=this;
dojo.query("a",this.itemsPerPageList).forEach(function(_1e){
dojo.connect(_1e,"onclick",_1d,"setItemsPerPage");
});
if(selectedTag){
dojo.publish(lconn.communities.catalog.ADD_FILTER,["tag",selectedTag]);
}
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
this.widgetsInTemplate=this.enableTypeFilter;
},displayResults:function(_1f){
while(this.resultsTableBody.childNodes.length>0){
this.resultsTableBody.removeChild(this.resultsTableBody.firstChild);
}
dijit.registry.byClass("lconn.communities.catalog.widgets.PlaceDisplayWidget").forEach(function(_20){
_20.destroy();
});
var _21=this.convertResultsDoc(_1f);
this.fadeIn();
for(var i=0;i<this.domNode.childNodes.length;i++){
var _22=this.domNode.childNodes[i];
if(_22){
dojo.style(_22,"display",_21.totalResults===0?"none":"");
}
}
if(_21.totalResults===0&&lconn.communities.catalog.util.getFilterValue("type")!=null){
dojo.style(this.domNode.childNodes[0],"display","");
}
dojo.style(this.zeroResultsNode,"display",_21.totalResults===0?"":"none");
this.updateNoResultsNodeText();
if(this.isInvited&&_21!=null){
dojo.publish(lconn.communities.catalog.INVITED_CONTENT_CHANGED_TOPIC,[_21.totalResults]);
}
this.setMessage(_21);
this.setNavigationLinks(_21);
this.createPlacesDisplayWidgets(_21.results);
this.createPagingControls();
if(typeof (SemTagSvc)!=="undefined"){
SemTagSvc.parseDom(null,this.resultsTable);
}
},updateNoResultsNodeText:function(){
var _23=window.location.hash.substr(1);
var _24=this.resourceBundle.noResults;
var _25;
if(_23){
_25=_23.substr(_23.indexOf("tag=")).split("&")[0].split("=")[1];
}
if(isFilterApplied=="false"&&!_25){
if(this.queryType=="all"){
_24=this.resourceBundle.noResultsPublic;
}else{
if(this.queryType=="own"){
_24=this.resourceBundle.noResultsOwner;
}else{
if(this.queryType=="invite"){
_24=this.resourceBundle.noResultsInvite;
}else{
if(this.queryType=="my"){
_24=this.resourceBundle.noResultsMember;
}else{
if(this.queryType=="follow"){
_24=this.resourceBundle.noResultsFollow;
}
}
}
}
}
}
this.zeroResultsNode.removeChild(this.zeroResultsNode.firstChild);
this.zeroResultsNode.appendChild(document.createTextNode(_24));
},convertResultsDoc:function(_26){
var _27={};
var _28=lconn.communities.catalog.util.getNodes(_26,"/atom:feed")[0];
_27.startIndex=Number(lconn.communities.catalog.util.getXpathValue(_26,"opensearch:startIndex",_28));
_27.totalResults=Number(lconn.communities.catalog.util.getXpathValue(_26,"opensearch:totalResults",_28));
_27.itemsPerPage=Number(lconn.communities.catalog.util.getXpathValue(_26,"opensearch:itemsPerPage",_28));
var _29=lconn.communities.catalog.util.getXpathAttrValue(_26,"atom:link[@rel='self']/@href",_28);
_27.serverUrl=this.findServerUrl(_29);
var _2a=lconn.communities.catalog.util.getNodes(_26,"atom:entry",_28);
_27.results=[];
for(var i=0;i<_2a.length;i++){
var _2b=_2a[i];
var _2c={};
_2c.placeId=lconn.communities.catalog.util.getXpathValue(_26,"atom:id",_2b);
_2c.placeTitle=lconn.communities.catalog.util.getXpathValue(_26,"atom:title",_2b);
_2c.placeLink=lconn.communities.catalog.util.getXpathAttrValue(_26,"atom:link/@href",_2b);
if(_2c.placeLink!=null&&_2c.placeLink.indexOf("/")==0){
_2c.placeLink=_27.serverUrl+_2c.placeLink;
}
_2c.summary=lconn.communities.catalog.util.getXpathValue(_26,"atom:summary",_2b);
_2c.lastUpdate=lconn.communities.catalog.util.getXpathValue(_26,"atom:updated",_2b);
_2c.commGetUrl=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='ATOMAPISOURCE']",_2b);
_2c.accessLevel=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='AccessControlLevel']",_2b);
_2c.memberCount=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='FIELD_COMMUNITY_MEMBER_COUNT']",_2b);
var _2d=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='isMember']",_2b);
if(_2d&&"true"===_2d.toLowerCase()){
_2c.isMember=true;
}
_2c.isInternalOnly=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='isInternalOnly']",_2b);
_2c.lastMod=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='ImageLastMod']",_2b);
_2c.contentSourceType=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='ContentSourceType']",_2b);
_2c.groupCount=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='groupCount']",_2b);
if(_2c.groupCount!=null){
_2c.groupCount=parseInt(_2c.groupCount);
}else{
_2c.groupCount=0;
}
var _2e=lconn.communities.catalog.util.getNodes(_26,"ibmsc:field[@id='tag']",_2b);
if(_2e!=null&&_2e.length>0){
_2c.tags=[];
for(var j=0;j<_2e.length;j++){
if(_2e[j].firstChild){
_2c.tags.push(_2e[j].firstChild.data);
}
}
}
var _2f=lconn.communities.catalog.util.getNodes(_26,"atom:author",_2b);
if(_2f.length>0){
_2c.author=this.parsePerson(_26,_2f[0]);
}
var _30=lconn.communities.catalog.util.getNodes(_26,"atom:contributor",_2b);
if(_30.length>0){
_2c.contributor=this.parsePerson(_26,_30[0]);
}
var _31=lconn.communities.catalog.util.getXpathValue(_26,"ibmsc:field[@id='FIELD_UPDATE_FLAG']",_2b);
if(_31&&"ADMIN_MEMBERSHIP_UPDATE"===_31.toUpperCase()){
_2c.lastUpdateByAdmin=true;
}
_27.results.push(_2c);
}
return _27;
},parsePerson:function(doc,_32){
var _33={};
_33.name=lconn.communities.catalog.util.getXpathValue(doc,"atom:name",_32);
_33.email=lconn.communities.catalog.util.getXpathValue(doc,"atom:email",_32);
_33.id=lconn.communities.catalog.util.getXpathValue(doc,"snx:userid",_32);
return _33;
},findServerUrl:function(url){
var _34=url.indexOf("//");
_34=url.indexOf("/",_34+2);
return url.substring(0,_34);
},createPlacesDisplayWidgets:function(_35){
var _36=dojo.cookie("QuickrDeletedPlace");
for(var i=0;i<_35.length;i++){
var _37=_35[i];
_37.resourceBundle=this.resourceBundle;
_37.placeIcon=this.placeIcon;
_37.publicIcon=this.publicIcon;
_37.openInNewWindow=this.openInNewWindow;
_37.blankIcon=this.blankIcon;
_37.displayMode=this.displayMode;
_37.isInvited=this.isInvited;
_37.isTrashed=this.isTrashPage;
_37.isRestricted=this.isRestricted;
_37.communitiesInviteUrl=this.communitiesInviteUrl;
_37.communitiesMemberUrl=this.communitiesMemberUrl;
_37.communityIconUrl=this.communityIconUrl;
_37.publicCommunitiesUrl=this.publicCommunitiesUrl;
_37.userId=this.userId;
_37.quickrPlaceIcon=this.quickrPlaceIcon;
if(_36!=null&&_36==_37.placeId){
_37.isDeleted=true;
}
var _38=document.createElement("div");
var _39=new lconn.communities.catalog.widgets.PlaceDisplayWidget(_37,_38);
var _3a=this.resultsTableBody;
dojo.query("tr.placeRow",_39.domNode).forEach(function(row){
_3a.appendChild(row);
if(i==0&&!dojo.hasClass(row,"lotusDetails")){
dojo.addClass(row,"lotusFirst");
}
});
}
},setMessage:function(_3b){
var _3c=Math.min(_3b.totalResults,_3b.startIndex+_3b.itemsPerPage);
var _3d=_3b.startIndex;
if(_3b.totalResults>0){
_3d++;
}
this.showingResultsMessage.innerHTML=dojo.string.substitute(this.resourceBundle.showingResultsMessage,[dojo.number.format(_3d),dojo.number.format(_3c),dojo.number.format(_3b.totalResults)]);
var _3e=Math.ceil(_3b.totalResults/_3b.itemsPerPage);
this.resultsInfo={startIndex:_3d,endIndex:_3c,maxPage:_3e,pageSize:_3b.itemsPerPage,totalResults:_3b.totalResults};
},createPagingControls:function(){
var url="#";
if(this.topPaging_W){
this.topPaging_W.destroy();
this.bottomPaging_W.destroy();
}
var _3f=lconn.communities.catalog.history.stateManager.currentState;
var _40=+_3f.page;
var _41={currentPage:_40+1,stopNavigation:true,url:url,isBottom:false};
dojo.mixin(_41,this.resultsInfo);
console.debug(_41);
console.debug("this.resultsInfo.maxPage: "+this.resultsInfo.maxPage);
if(this.resultsInfo.maxPage>1){
this.topPaging_W=new lconn.core.CenterPaging(_41,this._getCenterPaging(_41.isBottom));
_41.isBottom=true;
this.bottomPaging_W=new lconn.core.CenterPaging(_41,this._getCenterPaging(_41.isBottom));
}
this.attachPageLinks();
this.attachJumper();
},attachPageLinks:function attachPageLinks(){
var _42=this.catCenterPagingTop;
var _43=this;
dojo.query("a",_42).forEach(function(_44){
dojo.connect(_44,"onclick",_43,"_onPageClick");
});
},attachJumper:function attachJumper(){
var _45=this.catCenterPagingBottom;
var _46=this;
dojo.query("input",_45).forEach(function(_47){
dojo.connect(_47,"onkeypress",_46,"_jumpKeypress");
});
},_onPageClick:function(_48){
if(this.stopNavigation){
dojo.stopEvent(_48);
}
var _49=dojo.trim(_48.target[dojo.isIE?"innerText":"textContent"]);
this.gotoPage(+_49-1);
},_jumpKeypress:function(_4a){
if(_4a.keyCode==dojo.keys.ENTER){
dojo.stopEvent(_4a);
var _4b=dojo.query("input",this.catCenterPagingBottom);
if(_4b!=null&&_4b.length>0){
var _4c=this.resultsInfo.maxPage;
var num=parseInt(_4b[0].value)-1;
if(num<0){
num=0;
}else{
if(num>(_4c-1)){
num=_4c-1;
}
}
if(num>=0&&num<_4c){
this.gotoPage(num);
}
}
}
},_getCenterPaging:function(_4d){
var _4e=this.catCenterPagingTop;
if(_4d){
_4e=this.catCenterPagingBottom;
}
var _4f=document.createElement("div");
_4e.appendChild(_4f);
return _4f;
},_getTextContent:function(_50){
return dojo.trim(_50?_50[dojo.isIE?"innerText":"textContent"]:"");
},setNavigationLinks:function(_51){
var _52=this;
dojo.query(".itemsPerPageLink",this.itemsPerPageList).forEach(function(_53){
if(_53.firstChild.innerHTML!=_51.itemsPerPage){
_52.enableLink(_53);
}else{
_52.disableLink(_53);
}
});
dojo.query(".prevPageLink",this.domNode).forEach(function(_54){
if(_51.startIndex>0){
_52.enableLink(_54);
}else{
_52.disableLink(_54);
}
});
dojo.query(".nextPageLink",this.domNode).forEach(function(_55){
if(_51.totalResults>_51.startIndex+_51.itemsPerPage){
_52.enableLink(_55);
}else{
_52.disableLink(_55);
}
});
},disableLink:function(_56){
dojo.style(_56.childNodes[0],"display","none");
dojo.style(_56.childNodes[1],"display","");
},enableLink:function(_57){
dojo.style(_57.childNodes[1],"display","none");
dojo.style(_57.childNodes[0],"display","");
},prevPage:function(){
dojo.publish(lconn.communities.catalog.PREV_PAGE_TOPIC,[]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},nextPage:function(){
dojo.publish(lconn.communities.catalog.NEXT_PAGE_TOPIC,[]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},gotoPage:function(_58){
dojo.publish(lconn.communities.catalog.SET_PAGE_TOPIC,[_58]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},setItemsPerPage:function(evt){
var _59=evt.target.innerHTML;
if(djConfig.isDebug){
console.debug("newItemsPerPage: "+_59);
}
dojo.publish(lconn.communities.catalog.ITEMS_PER_PAGE_TOPIC,[_59]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},fadeOut:function(){
dojo.style(this.domNode,"opacity",0);
},fadeIn:function(){
dojo.fadeIn({node:this.domNode,duration:300}).play();
}});
dojo.declare("lconn.communities.catalog.widgets.PlaceDisplayWidget",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/placeView.html"),widgetsInTemplate:true,placeId:null,placeTitle:null,placeLink:null,summary:"",lastUpdate:null,author:null,resourceBundle:null,showingDetails:false,tags:null,openInNewWindow:true,memberCount:null,isMember:false,blankIcon:null,isDeleted:false,isTrashed:false,isInvited:false,isRestricted:false,communitiesInviteUrl:"",communitiesMemberUrl:"",userId:"",tagsTemplate:"<a href=\"javascript: void(0)\" class=\"tagLink\">${0}</a>",personCardTemplate:"<span class=\"vcard X-sametime-resolve\"><a class=\"fn lotusPerson\" href=\"${url}?userid=${author.id}\">${author.name}</a><span class=\"x-lconn-userid\" style=\"display: none;\">${author.id}</span></span>",userEntryTemplate:"<?xml version=\"1.0\" encoding=\"UTF-8\"?><entry xmlns=\"http://www.w3.org/2005/Atom\"><contributor><snx:userid xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">${0}</snx:userid></contributor></entry>",communityIconUrl:"",publicCommunitiesUrl:"",lastMod:"",contentSourceType:"",quickrPlaceIcon:"",accessLevel:"",groupCount:0,contributor:null,closeHandle:null,lastUpdateByAdmin:false,resctrictedCommInviteDialog:null,postMixInProperties:function(){
this.linkTarget=this.openInNewWindow?"_blank":"_self";
},displayTags:function(){
if(this.tags!=null){
dojo.style(this.tagsSectionDevider,"display","");
this.tagsSection.appendChild(document.createTextNode(this.resourceBundle.tags+" "));
for(i=0;i<this.tags.length;i++){
if(i>0){
this.tagsSection.appendChild(document.createTextNode(", "));
}
var _5a=document.createElement("a");
_5a.href="javascript: void(0);";
_5a.className="tagLink bidiAware";
_5a.title=this.resourceBundle.inplaceTagTooltip;
_5a.innerHTML=lconn.communities.catalog.admin.util.escapeString(this.tags[i]);
this.tagsSection.appendChild(_5a);
dojo.connect(_5a,"onclick",dojo.hitch(this,"filterByTag",this.tags[i]));
}
}
},restoreCommunity:function(){
var url=dojo.attr(this.restoreCommButton,"commgeturl");
dojo.publish(lconn.communities.catalog.RESTORE_COMMUNITY,[url,this.placeTitle,this.placeLink]);
},postCreate:function(){
if(this.placeTitle==null){
this.placeTitle="NO-TITLE";
}
lconn.core.util.html.breakString(this.placeTitle,dojo.doc,this.placeTitleLink,10);
if(this.isTrashed===true){
dojo.style(this.trashedIconNode,"display","");
}
var _5b=false;
if(this.accessLevel!==null){
if(this.accessLevel==="publicInviteOnly"){
dojo.style(this.moderatedIconNode,"display","");
}else{
if(this.accessLevel==="private"||this.accessLevel=="Privileged"){
_5b=true;
dojo.style(this.restrictedIconNode,"display","inline-block");
if(this.isInvited){
this.placeTitleLink.href="javascript: void(0);";
var _5c=this;
var _5d=this.placeTitle;
dojo.connect(this.placeTitleLink,"onclick",dojo.hitch(_5c,"openRestricted"));
}
}
}
}
if(this.memberCount!=null){
this.memberCount=parseInt(this.memberCount);
this.memberCount-=this.groupCount;
var _5e=dojo.string.substitute(this.memberCount>1?this.resourceBundle.members:this.resourceBundle.member,[dojo.number.format(this.memberCount)]);
if(this.groupCount>0){
_5e+=", "+dojo.string.substitute(this.groupCount>1?this.resourceBundle.groups:this.resourceBundle.group,[dojo.number.format(this.groupCount)]);
}
this.numOfMembersPlaceHolder.innerHTML=_5e;
dojo.style(this.membersSectionDevider,"display","");
}
this.handlePersonLink();
if(this.summary!=null){
this.summary=this.summary.replace(/(\r\n|\n|\r)/gm,"");
this.summary=this.summary.replace(/\s+/g," ");
this.placeDescNode.appendChild(document.createTextNode(this.summary));
}
if(this.isTrashed!==true){
this.displayIcon();
}
this.displayTags();
dojo.style(this.detailsSection,"display","");
this.handleSourceType();
if(this.isDeleted){
this.placeLinkNode.innerHTML=this.placeLinkNode.firstChild.innerHTML;
dojo.style(this.placeLinkNode,"textDecoration","line-through");
dojo.style(this.placeDescNode,"textDecoration","line-through");
var msg=dojo.string.substitute(this.resourceBundle.placeDeleted,["<strong>"+this.placeTitle+"</strong>"]);
dojo.publish(lconn.communities.catalog.INFO_MESSAGE_TOPIC,[msg]);
}
if(this.isInvited){
dojo.style(this.acceptDeclineInvite,"display","");
}
if(this.isRestricted&&!this.isMember){
var _5c=this;
dojo.style(this.personPlaceHolder,"display","none");
dojo.style(this.authorSectionDevider,"display","none");
var _5d=this.placeTitle;
var _5f=this.placeId;
this.placeTitleLink.href="javascript: void(0);";
dojo.connect(this.placeTitleLink,"onclick",dojo.hitch(_5c,"openRestrictedOwnersDialog",[_5d,_5f]));
dojo.style(this.showOwners,"display","");
dojo.connect(this.showOwnersListLink,"onclick",dojo.hitch(_5c,"openRestrictedOwnersDialog",[_5d,_5f]));
}
if(this.isInternalOnly==="false"){
dojo.style(this.externalIconNode,"display","");
var _60=dojo.query("img",this.externalIconNode)[0];
dojo.attr(_60,"alt",externalLabel);
}
if(this.isTrashed===true){
dojo.attr(this.communityIcon,"style","width: 3px; padding-left: 0px");
dojo.attr(this.placeTitleLink,"style","text-decoration: none; color: black");
dojo.removeAttr(this.placeTitleLink,"href");
dojo.style(this.restoreCommDivider,"display","");
dojo.style(this.restoreCommButton,"display","");
dojo.attr(this.restoreCommButton,"commgeturl",this.commGetUrl);
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.tableNode);
},handlePersonLink:function(){
var _61=this.resourceBundle.lastUpdated;
var _62=null;
var _63="";
if(this.contributor!=null){
_62=this.contributor;
if(this.lastUpdateByAdmin){
_63=dojo.string.substitute(this.resourceBundle.lastAdminUpdateBy,[""]);
}else{
if(this.isTrashed===true){
_63=dojo.string.substitute(this.resourceBundle.lastTrashedBy,[""]);
}else{
_63=dojo.string.substitute(this.resourceBundle.lastUpdatedBy,[""]);
}
}
this.personPlaceHolder.appendChild(document.createTextNode(_63));
_61=null;
}else{
if(this.author!=null){
_62=this.author;
}
}
var _64=null;
if(_62!=null){
var _65=_62.id;
var _66=_62.name;
var _67=_62.email;
if(_65==communityAdminId){
this.personPlaceHolder.innerHTML=_63+this.resourceBundle.communitiesAdministratorDisplayName;
}else{
_64=com.ibm.lconn.layout.people.createLink({userid:_65,email:_67,name:_66});
if(_64==null||_64.tagName.toLowerCase()!="a"){
_64=dojo.string.substitute(this.personCardTemplate,{"url":this.publicCommunitiesUrl,"author":_62});
this.personPlaceHolder.innerHTML=_63+_64;
}else{
if(!dojo.hasClass(_64,"vcard")){
dojo.addClass(_64,"vcard");
}
this.personPlaceHolder.appendChild(_64);
}
}
dojo.style(this.authorSectionDevider,"display","");
}
if(this.lastUpdate!=null){
if(!dojo._isBodyLtr()){
this.lastUpdateNode.innerHTML="&rlm;";
}
this.lastUpdateNode.appendChild(this.formatDate(this.lastUpdate,_61));
}
},handleSourceType:function(){
if(this.contentSourceType=="TeamPlace"||this.contentSourceType=="DominoPlace"){
this.sourceTypePlaceHolder.appendChild(document.createTextNode(this.resourceBundle.lotusQuickr));
dojo.style(this.sourceTypePlaceHolder,"display","");
if(this.accessLevel!="AllAuthenticated"){
dojo.style(this.sourceTypeSectionDevider,"display","");
}
}
},openRestricted:function(){
var _68=dojo.create("div",{innerHTML:this.resourceBundle.restrictedCommDesc});
dojo.addClass(_68,"restrictedCommInvite");
this.resctrictedCommInviteDialog=lconn.core.DialogUtil.popupForm(this.placeTitle,_68,this.resourceBundle.accept,this.resourceBundle.decline,dojo.hitch(this,"acceptInviteFromDialog"),dojo.hitch(this,"declineInviteFromDialog"));
},openRestrictedOwnersDialog:function(_69){
this.closeHandle=dojo.subscribe(lconn.communities.catalog.CLOSE_RESTRICTED_OWNERS,this,"closeRestrictedOwnersDialog");
dojo.publish(lconn.communities.catalog.DISPLAY_RESTRICTED_OWNERS,[_69]);
},closeRestrictedOwnersDialog:function(){
dojo.unsubscribe(this.closeHandle);
},displayIcon:function(){
var _6a=document.createElement("img");
if(this.contentSourceType=="TeamPlace"||this.contentSourceType=="DominoPlace"){
_6a.src=this.quickrPlaceIcon;
}else{
if(this.contentSourceType=="Communities"){
var _6b=[];
var _6c={communityUuid:this.placeId,lastMod:this.lastMod,showDefaultForNoPermissions:"true"};
if(dojo.isIE<9){
_6c.r="false";
}
_6b.push(this.communityIconUrl);
_6b.push("?");
_6b.push(dojo.objectToQuery(_6c));
_6b=_6b.join("");
_6a.src=_6b;
}
}
_6a.width="64";
_6a.height="64";
_6a.alt="";
dojo.attr(_6a,"role","presentation");
this.communityIcon.appendChild(_6a);
},filterByTag:function(tag,_6d){
dojo.publish(lconn.communities.catalog.ADD_FILTER,["tag",tag]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},formatDate:function(_6e,_6f){
var _70=this.parseDate(_6e);
var _71=lconn.core.DateUtil.toString(_70);
if(_6f==null){
return document.createTextNode(_71);
}
return document.createTextNode(dojo.string.substitute(_6f,[_71]));
},toggleDetails:function(){
this.showingDetails=!this.showingDetails;
if(this.showingDetails){
dojo.removeClass(this.moreHideImg,"lotusIconShow");
dojo.addClass(this.moreHideImg,"lotusIconHide");
}else{
dojo.removeClass(this.moreHideImg,"lotusIconHide");
dojo.addClass(this.moreHideImg,"lotusIconShow");
}
dojo.style(this.detailsSection,"display",(this.showingDetails?"":"none"));
},parseDate:function(_72){
return dojo.date.stamp.fromISOString(_72);
},manageFocusAfterAcceptOrDecline:function(){
var _73=dojo.byId("commonSearchControlContainersearchInput");
var _74=dojo.query("input",_73)[0];
_74.focus();
},declineInviteFromDialog:function(){
this.resctrictedCommInviteDialog.hide();
if(!arguments[0]||dojo.hasClass(arguments[0].currentTarget,"lotusDialogClose")){
return;
}
this.declineInvite();
},declineInvite:function(){
var _75=[];
var _76={communityUuid:this.placeId,userid:this.userId};
_75.push(this.communitiesInviteUrl);
_75.push("?");
_75.push(dojo.objectToQuery(_76));
_75=_75.join("");
dojo.xhrDelete({url:_75,load:dojo.hitch(this,"handleDecline"),error:dojo.hitch(this,"handleDeclineError")});
},handleDecline:function(){
var _77=dojo.string.substitute(this.resourceBundle.declineSuccessMessage,[this.placeTitle]);
dojo.publish(lconn.communities.catalog.CONFIRM_MESSAGE_TOPIC,[_77]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[true]);
this.manageFocusAfterAcceptOrDecline();
},handleDeclineError:function(){
var _78=dojo.string.substitute(this.resourceBundle.declineErrorMessage,[this.placeTitle]);
dojo.publish(lconn.communities.catalog.ERROR_MESSAGE_TOPIC,[_78]);
},acceptInviteFromDialog:function(){
this.resctrictedCommInviteDialog.hide();
this.acceptInvite();
},acceptInvite:function(){
var _79=[];
var _7a={communityUuid:this.placeId};
_79.push(this.communitiesMemberUrl);
_79.push("?");
_79.push(dojo.objectToQuery(_7a));
_79=_79.join("");
dojo.xhrPost({url:_79,postData:dojo.string.substitute(this.userEntryTemplate,[this.userId]),load:dojo.hitch(this,"handleAccept"),error:dojo.hitch(this,"handleAcceptError"),headers:{"Content-Type":"application/xml"}});
},handleAccept:function(){
var _7b=dojo.string.substitute(this.resourceBundle.acceptSuccessMessage,[this.placeTitle]);
dojo.publish(lconn.communities.catalog.CONFIRM_MESSAGE_TOPIC,[_7b]);
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[true]);
this.manageFocusAfterAcceptOrDecline();
},handleAcceptError:function(res,_7c){
var _7d=null;
var _7e=_7c.xhr.status;
var _7f=res.responseText;
if((_7e==404||_7e==409)&&typeof (_7f)!="undefined"&&_7f!=null){
var _80="<message>";
var _81="</message>";
var _82=_7f.indexOf(_80);
var _83=_7f.indexOf(_81);
if(_82>=0&&_83>=0){
_7d=_7f.substr(_82+_80.length,_83-(_82+_80.length));
}
}
if(_7d==null){
_7d=dojo.string.substitute(this.resourceBundle.acceptErrorMessage,[this.placeTitle]);
}
dojo.publish(lconn.communities.catalog.ERROR_MESSAGE_TOPIC,[_7d]);
}});
dojo.declare("lconn.communities.catalog.widgets.SortWidget",[dijit._Widget,dijit._Templated],{resourceBundle:null,templateString:"<div class=\"lotusSort\"><ul class=\"lotusInlinelist\" dojoAttachPoint=\"sortKeysList\" aria-labelledby=\"sortTitle\" role=\"toolbar\"><li id=\"sortTitle\" class=\"lotusFirst\">${resourceBundle.sortTitle}</li></ul></div>",linkTemplate:"<a role=\"button\" tabindex=\"-1\" href=\"javascript: void(0)\">${0}</a>",selectedClass:"lotusActiveSort",ascendingClass:"lotusAscending",descendingClass:"lotusDescending",defaultSortKey:null,defaultSortOrder:null,sortKeyClicked:false,postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
this.sortKeys=[{id:"update_date",defaultOrder:"desc",label:this.resourceBundle.date,ascTextPattern:this.resourceBundle.ascendingDateHoverText,descTextPattern:this.resourceBundle.descendingDateHoverText},{id:"FIELD_COMMUNITY_MEMBER_COUNT",defaultOrder:"desc",label:this.resourceBundle.popularity,ascTextPattern:this.resourceBundle.ascendingNumberHoverText,descTextPattern:this.resourceBundle.descendingNumberHoverText},{id:"title",defaultOrder:"asc",label:this.resourceBundle.name,ascTextPattern:this.resourceBundle.ascendingStringHoverText,descTextPattern:this.resourceBundle.descendingStringHoverText}];
},newSortKeyTopic:lconn.communities.catalog.NEW_SORT_KEY_TOPIC,newSortOrderTopic:lconn.communities.catalog.NEW_SORT_ORDER_TOPIC,newSortOrderFromClickTopic:"NEW_SORT_ORDER_FROM_CLICK_TOPIC",resultsProcessingEnded:lconn.communities.catalog.SEARCH_RESULTS_PROCESSING_ENDED_TOPIC,sortKeySelected:function(_84){
var _85=this;
dojo.query("a",this.sortKeysList).forEach(function(_86){
if(_86.sortKey.id==_84){
dojo.addClass(_86,_85.selectedClass);
dojo.attr(_86,"aria-pressed","true");
}else{
dojo.removeClass(_86,_85.selectedClass);
dojo.removeClass(_86,_85.ascendingClass);
dojo.removeClass(_86,_85.descendingClass);
dojo.attr(_86,"aria-pressed","false");
var _87=_86.sortKey.ascTextPattern;
if(_85.defaultSortOrder=="desc"){
_87=_86.sortKey.descTextPattern;
}
_86.title=_87;
if(_86.childNodes.length>1){
_86.removeChild(_86.firstChild);
}
}
});
},handleSearchResultsEnded:function(){
if(!this.sortKeyClicked){
return;
}
var _88=this;
dojo.query("a."+this.selectedClass,this.sortKeysList).forEach(function(_89){
_89.focus();
});
this.sortKeyClicked=false;
},sortOrderSelectedFromClick:function(_8a){
this.sortKeyClicked=true;
dojo.publish(this.newSortOrderTopic,[_8a]);
},sortOrderSelected:function(_8b){
var _8c=this;
dojo.query("a."+this.selectedClass,this.sortKeysList).forEach(function(_8d){
dojo.removeClass(_8d,_8c.ascendingClass);
dojo.removeClass(_8d,_8c.descendingClass);
if(_8d.childNodes.length>1){
_8d.removeChild(_8d.firstChild);
}
if(_8b!=null){
var _8e=_8c.getSorkKeyByLabel(_8d.innerHTML);
var _8f=document.createElement("span");
_8f.className="lotusAltText";
if(_8b=="asc"){
if(_8e!=null){
_8d.title=_8e.ascTextPattern;
}else{
_8d.title=_8c.resourceBundle.ascendingHoverText;
}
dojo.addClass(_8d,_8c.ascendingClass);
_8f.innerHTML="&#x25B2;";
}else{
if(_8e!=null){
_8d.title=_8e.descTextPattern;
}else{
_8d.title=_8c.resourceBundle.descendingHoverText;
}
dojo.addClass(_8d,_8c.descendingClass);
_8f.innerHTML="&#x25bc;";
}
_8d.insertBefore(_8f,_8d.firstChild);
}
});
},getSorkKeyByLabel:function(_90){
var _91=null;
for(var i=0;i<this.sortKeys.length;i++){
var _92=this.sortKeys[i];
if(_92.label==_90){
_91=_92;
}
}
return _91;
},sortButtonPrefix:"sort_button_",keyDownAction:function(_93){
if(_93.keyCode!=dojo.keys.RIGHT_ARROW&&_93.keyCode!=dojo.keys.LEFT_ARROW){
return;
}
var _94;
var _95=_93.target.id;
var _96=parseInt(_95.slice(-1));
var _97=_93.target;
_97.tabIndex=-1;
if(_93.keyCode==dojo.keys.RIGHT_ARROW){
_96+=1;
}else{
_96-=1;
}
var _98=this.sortKeys.length-1;
if(_96>_98){
_96=0;
}else{
if(_96<0){
_96=_98;
}
}
_95=this.sortButtonPrefix+_96;
_97=dojo.byId(_95);
_97.tabIndex=0;
_97.focus();
},onClickAction:function(_99){
if(dojo.hasClass(_99.target,this.ascendingClass)){
dojo.publish(this.newSortOrderFromClickTopic,["desc"]);
}else{
if(dojo.hasClass(_99.target,this.descendingClass)){
dojo.publish(this.newSortOrderFromClickTopic,["asc"]);
}else{
dojo.publish(this.newSortKeyTopic,[_99.target.sortKey.id]);
dojo.publish(this.newSortOrderFromClickTopic,[_99.target.sortKey.defaultOrder]);
}
}
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
_99.target.blur();
},postCreate:function(){
dojo.subscribe(this.newSortKeyTopic,this,"sortKeySelected");
dojo.subscribe(this.newSortOrderTopic,this,"sortOrderSelected");
dojo.subscribe(this.newSortOrderFromClickTopic,this,"sortOrderSelectedFromClick");
dojo.subscribe(this.resultsProcessingEnded,this,"handleSearchResultsEnded");
for(var i=0;i<this.sortKeys.length;i++){
var _9a=this.sortKeys[i];
var _9b=document.createElement("li");
_9b.innerHTML=dojo.string.substitute(this.linkTemplate,[_9a.label]);
var _9c=_9a.ascTextPattern;
if(this.defaultSortOrder=="desc"){
_9c=_9a.descTextPattern;
}
var _9d=_9b.firstChild;
_9d.id=this.sortButtonPrefix+i;
_9d.title=_9c;
if(i==0){
_9b.className="lotusFirst";
_9d.tabIndex=0;
}
_9d.sortKey=_9a;
dojo.connect(_9d,"onkeydown",this,"keyDownAction");
dojo.connect(_9d,"onclick",this,"onClickAction");
this.sortKeysList.appendChild(_9b);
}
this.sortKeySelected(this.defaultSortKey);
this.sortOrderSelected(this.defaultSortOrder);
}});
dojo.declare("lconn.communities.catalog.widgets.SearchResultsSortWidget",lconn.communities.catalog.widgets.SortWidget,{postMixInProperties:function(){
this.defaultSortKey=null;
this.defaultSortOrder=null;
this.inherited(arguments);
this.sortKeys.splice(0,0,{id:null,defaultOrder:null,label:this.resourceBundle.relevance});
}});
dojo.declare("lconn.communities.catalog.widgets.PlacesFeedWidget",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"lotusFeeds\"><a target=\"_self\" class=\"lotusFeed lotusAction\" dojoAttachEvent=\"onclick: createPlacesFeed\" href=\"{feedUrl}\">{feedTitle}</a></div>",resourceBundle:null,searchService:null,searchTerms:"",memberId:"",postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
var _9e=this.createServiceUrl();
var _9f=this.resourceBundle["feedForThesePlaces"];
this.templateString=dojo.replace(this.templateString,{"feedUrl":_9e,"feedTitle":_9f});
},createPlacesFeed:function(){
var _a0=lconn.communities.catalog.history.stateManager.currentState;
var _a1=this.createServiceUrl();
document.location=_a1;
},createServiceUrl:function(_a2,_a3){
var _a4=lconn.communities.catalog.history.stateManager.currentState;
var _a5={results:_a4.numItems,start:_a4.page*_a4.numItems,sortKey:_a4.sortKey,sortOrder:_a4.sortOrder};
if(this.searchTerms!=null&&this.searchTerms.length>0){
_a5.query=this.searchTerms;
_a5.queryLang=djConfig.locale;
}
var _a6=lconn.communities.catalog.util.getConstraints(_a4);
if(_a6.length>0){
_a5.constraint=_a6;
}
if(this.memberId!=""){
_a5.memberId=this.memberId;
}
return this.searchService.getServiceUrl(null,_a5);
}});
dojo.declare("lconn.communities.catalog.widgets.TypeFilter",[dijit._Widget,dijit._Templated,lconn.communities.catalog.Filter],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/typeFilter.html"),resourceBundle:null,filterType:"type",blankGif:djConfig.blankGif,types:["all","Communities","TeamPlace"],postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
lconn.communities.catalog.util.registerFilter(this);
},selectOption:function(_a7){
this.closeMenu();
var _a8=_a7.key;
if(_a8=="all"){
dojo.publish(lconn.communities.catalog.REMOVE_FILTER,[this.getFilterType()]);
}else{
dojo.publish(lconn.communities.catalog.ADD_FILTER,[this.getFilterType(),_a8]);
}
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
},getFilterType:function(){
return this.filterType;
},isExclusive:function(){
return true;
},getConstraint:function(_a9){
var _aa=[_a9];
if(_a9=="TeamPlace"){
_aa.push("DominoPlace");
}
return {"type":"field","id":"ContentSourceType","values":_aa};
},formatBreadCrumb:function(_ab){
return null;
},addFilter:function(_ac){
this.currScopeLabelNode.innerHTML=this.getLabel(_ac);
},removeFilter:function(_ad){
this.currScopeLabelNode.innerHTML=this.getLabel(this.types[0]);
},openMenu:function(evt){
var _ae=this.getScopeMenu();
dijit.popup.open({popup:_ae,around:this.scopeNode,orient:(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),onCancel:dojo.hitch(this,"_cancelMenu")});
_ae.focus();
dojo.stopEvent(evt);
},openMenuA11y:function(evt){
if(evt.keyCode==dojo.keys.ENTER||evt.charCode==dojo.keys.SPACE||evt.keyCode==dojo.keys.DOWN_ARROW||evt.keyCode==dojo.keys.UP_ARROW){
this.openMenu(evt);
}
},_cancelMenu:function _cancelMenu(){
dijit.popup.close(this.getScopeMenu());
dijit.focus(this.scopeNode);
},closeMenu:function(){
if(this.scopeMenu){
dijit.popup.close(this.scopeMenu);
}
},getLabel:function(key){
var _af=this.resourceBundle[key];
if(_af==null){
_af=key;
}
return _af;
},getScopeMenu:function(){
if(!this.scopeMenu){
this.scopeMenu=new dijit.Menu({onItemClick:dojo.hitch(this,"selectOption")});
this.connect(this.scopeMenu,"_onBlur","closeMenu");
for(var i=0;i<this.types.length;i++){
var key=this.types[i];
var _b0=this.getLabel(key);
var _b1=new dijit.MenuItem({"label":_b0,"key":key,"parentMenu":this.scopeMenu});
var _b2=_b1.iconNode;
_b2.parentNode.removeChild(_b2);
this.scopeMenu.addChild(_b1);
}
}
return this.scopeMenu;
}});
}


;dojo.cache("lconn.communities.catalog", "templates/placesNavigation.html", "<div id=\"lotusNavBarContainer\"> <div class=\"lotusMenu\"> <div class=\"lotusBottomCorner\"> <div class=\"lotusInner\" role=\"navigation\" aria-label=\"${resourceBundle.mainNav}\"> <ul dojoAttachPoint=\"placesLinks\" role=\"toolbar\" id=\"toolbar_catalog_menu\" aria-label=\"${resourceBundle.communityTypeFilterLabel}\"> </ul> </div> </div> </div></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.PlacesNavigation"]){
dojo._hasResource["lconn.communities.catalog.widgets.PlacesNavigation"]=true;








dojo.requireLocalization("lconn.communities.catalog","placeCenter");
dojo.provide("lconn.communities.catalog.widgets.PlacesNavigation");
dojo.declare("lconn.communities.catalog.widgets.PlacesNavigation",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/placesNavigation.html"),resourceBundle:null,selectedClass:"lotusSelected",appContext:"",navigationLinks:null,postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},postCreate:function(){
dojo.subscribe(lconn.communities.catalog.INVITED_CONTENT_CHANGED_TOPIC,this,"updateInvitedLinks");
for(var i=0;i<this.navigationLinks.length;i++){
var _1=this.navigationLinks[i];
var _2=document.createElement("li");
var _3=document.createElement("a");
_3.href=this.appContext+"/"+_1.path;
if(_1.path=="trashedcommunities"){
dojo.addClass(_2,"lotusMenuSeparatorTop");
}
if(_1.path=="communityinvites"){
_3.invitedlink=true;
}
_3.innerHTML=_1.label;
if(_1.title){
_3.title=_1.title;
}
dojo.attr(_3,"id","toolbar_catalog_menu_"+_1.path);
dojo.attr(_3,"role","button");
if(this.navigationLinks.length==1||_1.isSelected){
dojo.addClass(_2,"lotusSelected");
dojo.attr(_3,"aria-pressed","true");
}else{
dojo.attr(_3,"aria-pressed","false");
}
_2.appendChild(_3);
this.placesLinks.appendChild(_2);
}
var _4=new lconn.core.aria.Toolbar("toolbar_catalog_menu");
},updateInvitedLinks:function(_5){
console.debug("invited communities updated: "+_5);
var _6=dojo.query("a",this.placesLinks);
for(var i=0;i<_6.length;i++){
var _7=_6[i];
console.debug(_7);
if(_7.invitedlink){
var _8=this.resourceBundle.ImInvited;
if(_5>0){
_8+="<span class='lotusUnreadBadge'>";
_8+=dojo.string.substitute(this.resourceBundle.ImInvitedCount,[_5]);
_8+="</span>";
}
_7.innerHTML=_8;
}
}
}});
}


;dojo.cache("lconn.communities.catalog", "templates/ownerView.html", "<table><tbody><tr class=\"ownerRow\" aria-labelledby=\"${id}-title\"> <td class=\"lotusFirstCell\" width=\"35px\" > <img dojoAttachPoint=\"ownerImage\" width=\"55\" height=\"55\" alt=\"\" src=\"\"> </td> <td class=\"lotusFirstCell\" > <h4> <span id=\"${id}-title\" dojoAttachPoint=\"ownerName\"></span> </h4> <div style=\" padding-top: 3px;\" class=\"lotusDetails lotusLeft\" id=\"businessCardDetails\"> <a href=\"\" dojoAttachPoint=\"ownerMailLink\"></a> </div> </td> <td class=\"lotusAlignRight lotusLastCell lotusTiny\" > </td> </tr></tbody></table>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.PlaceOwnerWidget"]){
dojo._hasResource["lconn.communities.catalog.widgets.PlaceOwnerWidget"]=true;
dojo.provide("lconn.communities.catalog.widgets.PlaceOwnerWidget");










dojo.declare("lconn.communities.catalog.widgets.PlaceOwnerWidget",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/ownerView.html"),resourceBundle:null,widgetsInTemplate:true,communityTitle:null,name:null,email:null,id:null,postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},postCreate:function(){
this.buildTitleLink();
this.buildMailToLink();
this.buildImage();
},buildImage:function(){
var _1=this.ownerImage;
_1.alt=this.name;
_1.src=com.ibm.lconn.layout.people.getImageUrl({userid:this.id,email:this.email,name:this.name});
},buildTitleLink:function(){
var _2=com.ibm.lconn.layout.people.createLink({userid:this.id,email:this.email,name:this.name});
if(_2!=null){
if(!dojo.hasClass(_2,"vcard")){
dojo.addClass(_2,"vcard");
}
if(!dojo.hasClass(_2,"hasHover")){
dojo.addClass(_2,"hasHover");
}
this.ownerName.appendChild(_2);
}
},buildMailToLink:function(){
var _3=this.ownerMailLink;
_3.href="#";
_3.title=this.email;
_3.innerHTML=this.email;
var _4=this;
dojo.connect(_3,"onclick",_4,"sendMail");
},sendMail:function(_5){
if(_5){
dojo.stopEvent(_5);
}
var _6=document.getElementById("hiddenMailToLink");
var _7=dojo.string.substitute(this.resourceBundle.requestToJoinRestrictedMailSubject,[this.communityTitle]);
var _8=dojo.string.substitute(this.resourceBundle.requestToJoinRestrictedMailBody,[this.name,this.communityTitle]);
_6.href="mailto:"+this.email+"?subject="+_7+"&body="+_8;
_6.click();
}});
}


;if(!dojo._hasResource["lconn.communities.catalog.widgets.RestrictedCommOwners"]){
dojo._hasResource["lconn.communities.catalog.widgets.RestrictedCommOwners"]=true;
dojo.provide("lconn.communities.catalog.widgets.RestrictedCommOwners");








dojo.declare("lconn.communities.catalog.widgets.RestrictedCommOwners",[dijit._Widget],{resourceBundle:null,blankIcon:null,membersService:null,dialog:null,createdWidgets:null,containerNode:null,postCreate:function(){
dojo.subscribe(lconn.communities.catalog.DISPLAY_RESTRICTED_OWNERS,this,"showDialog");
this.createdWidgets=[];
this._initContainer();
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},_initContainer:function(){
this.containerNode=document.createElement("div");
this.containerNode.style.width="38.7em";
var _1=document.createElement("span");
_1.innerHTML=this.resourceBundle.restrictedCommMailToOwnerDesc;
this.containerNode.appendChild(_1);
this.messageNode=document.createElement("div");
this.messageNode.style.diplay="none";
this.messageNode.style.marginTop="20px";
var _2=document.createElement("h5");
_2.innerHTML=this.resourceBundle.loading;
this.messageNode.appendChild(_2);
this.containerNode.appendChild(this.messageNode);
this.resultsTable=document.createElement("table");
this.resultsTable.style.display="none";
dojo.addClass(this.resultsTable,"lotusTable");
this.resultsTable.border=0;
this.resultsTable.cellspacing=0;
this.resultsTable.cellpadding=0;
this.resultsTableBody=document.createElement("tbody");
this.resultsTable.appendChild(this.resultsTableBody);
this.containerNode.appendChild(this.resultsTable);
var _3=document.createElement("div");
_3.style.display="none";
var _4=document.createElement("a");
_4.id="hiddenMailToLink";
_4.href="#";
_3.appendChild(_4);
this.containerNode.appendChild(_3);
},showDialog:function(_5){
this.communityTitle=_5[0];
this.communityId=_5[1];
this.showLoadingMessage();
this.hideResultsTable();
this.fetchResults();
this.dialog=lconn.core.DialogUtil.popupForm(this.communityTitle,this.containerNode,null,this.resourceBundle.closedlg,null,dojo.hitch(this,"closeDiag"));
this.dialog._dialog.lotusSubmitNode.style.display="none";
},showLoadingMessage:function(){
dojo.style(this.messageNode,"display","");
},hideLoadingMessage:function(){
dojo.style(this.messageNode,"display","none");
},showResultsTable:function(){
dojo.style(this.resultsTable,"display","");
},hideResultsTable:function(){
dojo.style(this.resultsTable,"display","none");
},showResults:function(_6){
this.hideLoadingMessage();
this.fadeIn();
this.createOwnersWidgets(_6);
},createOwnersWidgets:function(_7){
for(var i=0;i<_7.length;i++){
var _8=_7[i];
_8.communityTitle=this.communityTitle;
var _9=document.createElement("div");
var _a=new lconn.communities.catalog.widgets.PlaceOwnerWidget(_8,_9);
var _b=this.resultsTableBody;
dojo.query("tr.ownerRow",_a.domNode).forEach(function(_c){
_b.appendChild(_c);
});
this.createdWidgets.push(_a);
}
if(typeof (SemTagSvc)!=="undefined"){
SemTagSvc.parseDom(null,this.resultsTable);
}
this.showResultsTable();
},fadeIn:function(){
dojo.fadeIn({node:this.containerNode,duration:300}).play();
},closeDiag:function(){
if(this.dialog&&this.dialog._dialog){
this.dialog._dialog.hide();
}
dojo.empty(this.resultsTableBody);
for(var i=0;i<this.createdWidgets.length;i++){
this.createdWidgets[i].destroy();
}
this.createdWidgets=[];
if(this.containerNode.parentElement){
this.containerNode.parentElement.removeChild(this.containerNode);
}else{
this._initContainer();
}
if(this.dialog&&this.dialog._dialog){
this.dialog._dialog.destroy();
}
this.dialog=null;
},fetchResults:function(){
var _d=this.createServiceUrl();
if(djConfig.isDebug){
console.debug("fetching results for "+_d);
}
return dojo.xhrGet({url:_d,load:dojo.hitch(this,"handleOwnersList",false),error:dojo.hitch(this,"handleError"),handleAs:"text"});
},createServiceUrl:function(){
var _e={communityUuid:this.communityId,sortBy:"created",desc:"true",role:"owner",ps:"10",format:"full"};
return this.membersService.getServiceUrl(null,_e);
},handleOwnersList:function(_f,_10,_11){
var _12=lconn.core.xslt.loadXmlString(_10);
var _13=this.convertResultsDoc(_12);
this.showResults(_13);
},parsePerson:function(doc,_14,_15){
var _16={};
_16.name=lconn.communities.catalog.util.getXpathValue(doc,"atom:name",_14,_15);
_16.email=lconn.communities.catalog.util.getXpathValue(doc,"atom:email",_14,_15);
_16.id=lconn.communities.catalog.util.getXpathValue(doc,"snx:userid",_14,_15);
return _16;
},convertResultsDoc:function(_17){
var _18=[];
var _19=[{prefix:"atom",nameSpaceURI:"http://www.w3.org/2005/Atom"},{prefix:"sn",nameSpaceURI:"http://www.ibm.com/xmlns/prod/sn"},{prefix:"openSearch",nameSpaceURI:"http://a9.com/-/spec/opensearch/1.1/"},{prefix:"app",nameSpaceURI:"http://www.w3.org/2007/app"}];
var _1a=lconn.communities.catalog.util.getNodes(_17,"/atom:feed/atom:entry",null,_19);
for(var i=0;i<_1a.length;i++){
var _1b=_1a[i];
var _1c=null;
var _1d=lconn.communities.catalog.util.getNodes(_17,"atom:contributor",_1b,_19);
if(_1d.length>0){
_1c=this.parsePerson(_17,_1d[0],_19);
}
_18.push(_1c);
}
return _18;
},handleError:function(_1e,_1f){
if(djConfig.isDebug){
console.debug("handleError");
console.debug(_1f.xhr.status);
}
this.dialog._dialog.hide();
dojo.publish(lconn.communities.catalog.ERROR_MESSAGE_TOPIC,[this.resourceBundle.genericErrorMsg,_1f]);
}});
}


;define("dojox/date/posix",["dojo/_base/kernel","dojo/date","dojo/date/locale","dojo/string","dojo/cldr/supplemental"],function(_1,_2,_3,_4,_5){
var _6=_1.getObject("date.posix",true,dojox);
_6.strftime=function(_7,_8,_9){
var _a=null;
var _b=function(s,n){
return _4.pad(s,n||2,_a||"0");
};
var _c=_3._getGregorianBundle(_9);
var $=function(_d){
switch(_d){
case "a":
return _3.getNames("days","abbr","format",_9)[_7.getDay()];
case "A":
return _3.getNames("days","wide","format",_9)[_7.getDay()];
case "b":
case "h":
return _3.getNames("months","abbr","format",_9)[_7.getMonth()];
case "B":
return _3.getNames("months","wide","format",_9)[_7.getMonth()];
case "c":
return _3.format(_7,{formatLength:"full",locale:_9});
case "C":
return _b(Math.floor(_7.getFullYear()/100));
case "d":
return _b(_7.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_a==null){
_a=" ";
}
return _b(_7.getDate());
case "f":
if(_a==null){
_a=" ";
}
return _b(_7.getMonth()+1);
case "g":
break;
case "G":
console.warn("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _b(_7.getHours());
case "I":
return _b(_7.getHours()%12||12);
case "j":
return _b(_3._getDayOfYear(_7),3);
case "k":
if(_a==null){
_a=" ";
}
return _b(_7.getHours());
case "l":
if(_a==null){
_a=" ";
}
return _b(_7.getHours()%12||12);
case "m":
return _b(_7.getMonth()+1);
case "M":
return _b(_7.getMinutes());
case "n":
return "\n";
case "p":
return _c["dayPeriods-format-wide-"+(_7.getHours()<12?"am":"pm")];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _b(_7.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_7.getDay()||7);
case "U":
return _b(_3._getWeekOfYear(_7));
case "V":
return _b(_6.getIsoWeekOfYear(_7));
case "W":
return _b(_3._getWeekOfYear(_7,1));
case "w":
return String(_7.getDay());
case "x":
return _3.format(_7,{selector:"date",formatLength:"full",locale:_9});
case "X":
return _3.format(_7,{selector:"time",formatLength:"full",locale:_9});
case "y":
return _b(_7.getFullYear()%100);
case "Y":
return String(_7.getFullYear());
case "z":
var _e=_7.getTimezoneOffset();
return (_e>0?"-":"+")+_b(Math.floor(Math.abs(_e)/60))+":"+_b(Math.abs(_e)%60);
case "Z":
return _2.getTimezoneName(_7);
case "%":
return "%";
}
};
var _f="",i=0,_10=0,_11=null;
while((_10=_8.indexOf("%",i))!=-1){
_f+=_8.substring(i,_10++);
switch(_8.charAt(_10++)){
case "_":
_a=" ";
break;
case "-":
_a="";
break;
case "0":
_a="0";
break;
case "^":
_11="upper";
break;
case "*":
_11="lower";
break;
case "#":
_11="swap";
break;
default:
_a=null;
_10--;
break;
}
var _12=$(_8.charAt(_10++));
switch(_11){
case "upper":
_12=_12.toUpperCase();
break;
case "lower":
_12=_12.toLowerCase();
break;
case "swap":
var _13=_12.toLowerCase();
var _14="";
var ch="";
for(var j=0;j<_12.length;j++){
ch=_12.charAt(j);
_14+=(ch==_13.charAt(j))?ch.toUpperCase():ch.toLowerCase();
}
_12=_14;
break;
default:
break;
}
_11=null;
_f+=_12;
i=_10;
}
_f+=_8.substring(i);
return _f;
};
_6.getStartOfWeek=function(_15,_16){
if(isNaN(_16)){
_16=_5.getFirstDayOfWeek?_5.getFirstDayOfWeek():0;
}
var _17=_16;
if(_15.getDay()>=_16){
_17-=_15.getDay();
}else{
_17-=(7-_15.getDay());
}
var _18=new Date(_15);
_18.setHours(0,0,0,0);
return _2.add(_18,"day",_17);
};
_6.setIsoWeekOfYear=function(_19,_1a){
if(!_1a){
return _19;
}
var _1b=_6.getIsoWeekOfYear(_19);
var _1c=_1a-_1b;
if(_1a<0){
var _1d=_6.getIsoWeeksInYear(_19);
_1c=(_1d+_1a+1)-_1b;
}
return _2.add(_19,"week",_1c);
};
_6.getIsoWeekOfYear=function(_1e){
var _1f=_6.getStartOfWeek(_1e,1);
var _20=new Date(_1e.getFullYear(),0,4);
_20=_6.getStartOfWeek(_20,1);
var _21=_1f.getTime()-_20.getTime();
if(_21<0){
return _6.getIsoWeeksInYear(_1f);
}
return Math.ceil(_21/604800000)+1;
};
_6.getIsoWeeksInYear=function(_22){
function p(y){
return y+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);
};
var y=_22.getFullYear();
return (p(y)%7==4||p(y-1)%7==3)?53:52;
};
return _6;
});


;if(!dojo._hasResource["lconn.core.util._XSLCache"]){
dojo._hasResource["lconn.core.util._XSLCache"]=true;
dojo.provide("lconn.core.util._XSLCache");


dojo.declare("lconn.core.util._XSLCache",null,{xslDocs:null,xslStrings:{},constructor:function(){
this.xslDocs={};
},getXslDoc:function(_1){
if(_1 in this.xslStrings){
if(_1 in this.xslDocs){
return this.xslDocs[_1];
}
var _2=null;
try{
_2=lconn.core.xslt.loadXslString(dojo.cache(this.xslStrings[_1].templatePath));
}
catch(e){
return null;
}
this.xslDocs[_1]=_2;
return _2;
}
return null;
}});
}

dojo.provide("lconn.sand.nls.ui")._built=true;
dojo.provide("lconn.sand.nls.ui.en");
lconn.sand.nls.ui.en={"sand_Blogs":"Blog entries","sand_SIsTManager":"%s is %t\'s manager","sand_TCommentedOnPostsOnSBoard":"%t commented on posts on %s\'s board.","sand_TSharedFilesWithYou":"%t shared files with you","sand_theyShareCommunity2":"They share ${tagA1}a community${tagA2}","sand_theyShareCollegue":"They share ${tagA1}a colleague${tagA2}","sand_theyShareCommunity1":"They share ${tagA1}a community${tagA2}","wikiCoCommenting":"You commented within the same wiki.","sand_TCommentedOnPostOnYourBoard":"%t commented on a post on your board.","sand_theyShareBookmarks":"They share ${tagA1}%c bookmarks${tagA2}","sand_TSharedAFileToYou":"%t shared a file with you","sand_theyWereBothTaggedWithTags":"They were both tagged with ${tagA1}%c tags${tagA2} ","sand_Communities":"Communities","sand_youShareActivity":"You share ${tagA1}an activity${tagA2}","lm1":"You are this person\'s manager","sand_youShareActivities":"You share ${tagA1}%c activities${tagA2}","sdm":"You share the same manager","sand_ForumThread":"Forum thread","sand_Bookmarks":"Bookmarks","sand_Forums":"Discussion topics","sand_TCommentedOnPostOnSBoard":"%t commented on a post on %s\'s board.","statusUpdatesOwnerPostedTo":"This person wrote on your board.","sand_SCommentedOnTPost":"%s commented on %t\'s post.","sand_SCommentedOnPostsOnTBoard":"%s commented on posts on %t\'s board.","sand_SWroteOnTBoard":"%s wrote on %t\'s board.","coFileCommenting":"You commented on the same files","sand_youBothTaggedPeople":"You both tagged ${tagA1}%c people${tagA2} ","sand_Activities":"Activities","sand_commentedCTimesOnYourBlog":"%t commented %c times on your ${tagA1}blog${tagA2}","sand_YouCommentedOnThePosts":"You commented on the same posts.","sand_theyBothTaggedSamePerson":"They both tagged the same ${tagA1}person${tagA2}","sand_theySameDepartment":"They are in the same department","TAGS":"Tags: ","sand_YouCommentedOnPostOnTBoard":"You commented on a post on %t\'s board.","sand_youCollegues":"You are colleagues","sand_Discussion":"Discussion","DYKRemove":"Remove","sand_ExpandSection":"Expand section","sand_DYK":"Do You Know","sand_commentedCTimesOnTBlog":"%s commented %c times on %t\'s ${tagA1}blog${tagA2}","numTagInCommon":"${0} related tags","sand_PersonIsConnectedToTarget":"${person} is connected to ${target}","sand_theyBothCommentedOnSameBlogEntry":"They both commented on the same ${tagA1}blog entry${tagA2}","sand_commentedOnTBlog":"%s commented on %t\'s ${tagA1}blog${tagA2}","statusUpdatesCommentedTo":"This person commented on your status update post.","sand_youWereBothTaggedWithTags":"You were both tagged with ${tagA1}%c tags${tagA2} ","sand_YouEditedTFiles":"You were an editor of files authored by %t.","fileShared":"This person shared one or more files with you","sand_theyShareCollegues":"They share ${tagA1}%c colleagues${tagA2}","sand_youCommentedOnTBlog":"You commented on %t\'s ${tagA1}blog${tagA2}","sand_previous":"Previous","sand_YouCommentedOnTPosts":"You commented on %t\'s posts.","pctg":"You have both tagged the same person","sand_LogInTIC":"Log in to see common things between you.","sand_noRecomForNow":"There are no recommendations for you.","RESTORE_ACTION":"Restore removed recommendations","sand_youBothCommentedOnSameBlogEntryCTimes":"You both commented on the same ${tagA1}blog entry${tagA2} %c times","NDYK1":"No more people to recommend","sand_Blog":"Blog entry","forumthreaddiscussion":"You share a forum thread","sand_theyShareActivities":"They share ${tagA1}%c activities${tagA2}","str_component_id":"CLFRTT","sand_TwistyAccessHint":"Use the Enter key on the twisty to switch between the expanded and collapsed.","sand_theyShareActivity":"They share ${tagA1}an activity${tagA2}","numPeopleInCommon":"${0} related people","sand_youCoCommentedWiki":"You both commented within the same ${tagA1}wiki${tagA2}","sand_TWroteOnSBoard":"%t wrote on %s\'s board.","recommendErrorGeneric":"An error occurred while displaying content. Contact your system administrator.","sand_thingsInCommon_actionsFor":"Actions for Things in Common","sand_TCommentedOnPostsOnYourBoard":"%t commented on posts on your board.","sand_youShareDirectManager":"You share a ${tagA1}direct manager${tagA2}","sand_you":"you","ticUnavailable":"The items in common for you and this profile cannot currently be retrieved.","tgw":"You are tagged the same","sand_Tag":"Tag","sand_SEditedTFile":"%s was an editor of a file authored by %t.","sand_theyCoeditedWiki":"They co-edited a ${tagA1}wiki${tagA2}","numTagsInCommon":"${0} related tags","sand_Wikis":"Wiki pages","sand_Community":"Community","statusUpdatesCoCommenting":"You have commented on the same status update post.","acm":"You share activities","sand_youCoeditedWiki":"You co-edited a ${tagA1}wiki${tagA2}","sand_youAreTManager":"You are %t\'s manager","CANCEL_ACTION":"Cancel","SEND_ACTION":"Send","tgb":"The same people have tagged you both","sand_theyShareForumThread":"They share ${tagA1}a forum thread${tagA2}","sand_TSharedFilesWithS":"%t shared files with %s","sand_Tags":"Tags","sand_CollapseSection":"Collapse section","sand_YouWroteOnTBoard":"You wrote on %t\'s board.","sand_theyShareActivities120":"They share more than ${tagA1}120 activities${tagA2}","sand_youSharedAFileToT":"You shared a file with %t","LOADING":"Loading...","sand_recomItems_actionsFor":"Actions for Recommendations","sand_theyCollegues":"They are colleagues","sand_howAreConnected":"How are ${0} and ${1} connected","statusUpdatesOwnerCommentedBy":"You commented on one or more posts on this person\'s board.","sand_Bookmark":"Bookmark","sand_SSharedFilesToT":"%s shared files with %t","NEXT":"Next","sand_theyCoCommentedWiki":"They both commented within the same ${tagA1}wiki${tagA2}","sand_noSocialPath":"There are no connections between you and ${person}.","sand_youBothTaggedSamePerson":"You both tagged the same ${tagA1}person${tagA2}","sand_YouAreConnectedToPerson":"You are connected to ${person}","sand_commentedCTimesOnSBlog":"%t commented %c times on %s\'s ${tagA1}blog${tagA2}","dykUnavailable":"Suggestions for people you could invite to your network cannot currently be retrieved.","sand_theyShareFiles":"They share ${tagA1}%c files${tagA2}","sand_commentedOnSBlog":"%t commented on %s\'s ${tagA1}blog${tagA2}","sand_theyBothUsedTags":"There are ${tagA1}%c tags${tagA2} which They both used","sand_thereArePeopleThatTaggedThemBoth":"There are ${tagA1}%c people${tagA2} that tagged them both","sand_youBothCommentedOnSameBlogEntry":"You both commented on the same ${tagA1}blog entry${tagA2}","sand_STaggedT":"%s tagged %t","sand_youBothUsedSameTag":"You both used the ${tagA1}same tag${tagA2}","sand_youBothUsedTags":"There are ${tagA1}%c tags${tagA2} which You both used","sand_SCoSharesFileWithT":"They have been shared the same file","sand_youShareFile":"You share ${tagA1}a file${tagA2}","sand_TWroteOnYourBoard":"%t wrote on your board.","sand_theyShareCommunities2":"They share ${tagA1}%c communities${tagA2}","statusUpdatesOwnerPostedBy":"You posted to this person\'s board.","sand_theyShareCommunities1":"They share ${tagA1}%c communities${tagA2}","NR2":"As you create content and connect to people recommendations will start to appear.","NR1":"There are no current recommendations for you.","sand_recomItems":"Recommendations","DYKRemovePerson":"Remove ${personName}","sand_youCoeditedWikis":"You co-edited ${tagA1}%c wikis${tagA2}","sand_theyBothTaggedPeople":"They both tagged ${tagA1}%c people${tagA2}","sand_YouCommentedOnPostsOnTBoard":"You commented on posts on %t\'s board.","sand_TopItemsComm":"Top Items in Common","sand_youShareBookmarks":"You share ${tagA1}%c bookmarks${tagA2}","todoout":"This person assigned todos to you","fileSharing":"You shared one or more files with this person.","sand_TModifiedSFile":"%t was an editor of a file authored by %s.","sand_youCoCommentedWikis":"You commented within the same ${tagA1}%c wikis${tagA2}","sand_youCommentedCTimesOnTBlog":"You commented %c times on %t\'s ${tagA1}blog${tagA2}","sand_theyBothCommentedOnSameBlogEntryCTimes":"They both commented on the same ${tagA1}blog entry${tagA2} %c times","sand_theyShareForumThreads":"They share ${tagA1}%c forum threads${tagA2}","sand_next":"Next","sand_YouEditedTFile":"You were an editor of a file authored by %t.","recommendError":"An error has occured, the recommendation system may not be available.","sand_You":"You","sand_someoneTaggedThemBoth":"${tagA1}Someone${tagA2} tagged them both","INVITE_TITLE":"Send invitation to connect","sand_SEditedTFiles":"%s was an editor of files authored by %t.","sand_TCommentedOnSPost":"%t commented on %s\'s post.","sand_youShareForumThreads":"You share ${tagA1}%c forum threads${tagA2}","sand_TheyCommentedOnTheSamePost":"They commented on the same post.","statusUpdatesCommentedBy":"You commented on this person\'s status update post.","sand_fileCoSharing":"You have been shared the same file","tcu":"You have used the same tag","sand_DYK_actionsFor":"Actions for Do You Know","sand_youShareBookmark":"You share ${tagA1}a bookmark${tagA2}","sand_TTaggedYou":"%t tagged you","sand_youShareCommunities2":"You share ${tagA1}%c communities${tagA2}","sand_youShareCommunities1":"You share ${tagA1}%c communities${tagA2}","pt":"This person tagged you","sand_Wiki":"Wiki page","sand_TModifiedSFiles":"%t was an editor of files authored by %s.","sand_OneOfOne":"1 of 1","sand_youWereBothTaggedBySameTag":"You were both tagged by the same ${tagA1}tag${tagA2}","sand_personIsInYourNetwork":"${person} is in your network. ","sand_theyBothUsedSameTag":"They both used the ${tagA1}same tag${tagA2}","CONNECT_TO_PERSON":"Invite ${personName} to connect","sand_YouCommentedOnTPost":"You commented on %t\'s post.","sand_NothingInCommon":"There are no items in common for you and this profile.","sand_commentedOnYourBlog":"%t commented on your ${tagA1}blog${tagA2}","str.msgid.ignore":"true","sand_ActionsFor":"Actions for {0}","le1":"This person is your manager","sand_youShareCollegues":"You share ${tagA1}%c colleagues${tagA2}","sand_theyCoeditedWikis":"They co-edited ${tagA1}%c wikis${tagA2}","sand_theyShareBookmark":"They share ${tagA1}a bookmark${tagA2}","RECOMMENDATIONS_TITLE":"Your Recommendations","sand_loadingString":"Loading...","sand_TheyCommentedOnTheSamePosts":"They commented on the same posts.","DYK_TITLE":"Do You Know","pbt":"You tagged this person","sand_socialPath":"Who Connects Us?","sand_youSameDepartment":"You are in the same department","sand_TTaggedS":"%t tagged %s","sand_Login":"Log in","sand_theyShareFile":"They share ${tagA1}a file${tagA2}","PREV":"Previous","TITLE_RECOMMEND":"Recommendations:","sand_theyShareDirectManager":"They share a ${tagA1}direct manager${tagA2}","sand_TSharedAFileWithS":"%t shared a file with %s","sand_TCommentedOnYourPost":"%t commented on your post.","sand_TIsSManager":"%t is %s\'s manager","lpfr":"Is your colleague","wikiCoContribution":"You both edited the same wiki","sameDepartment":"You are in the same department","sand_youShareCollegue":"You share ${tagA1}a colleague${tagA2}","sand_Discussions":"Discussions","sand_youShareForumThread":"You share ${tagA1}a forum thread${tagA2}","sand_andMore":"and ${0} more","sand_thereArePeopleThatTaggedYouBoth":"There are ${tagA1}%c people${tagA2} that tagged you both","sand_TIsYourManager":"%t is your manager","sand_youSharedFilesToT":"You shared files with %t","sand_youShareCommunity2":"You share ${tagA1}a community${tagA2}","sand_youShareCommunity1":"You share ${tagA1}a community${tagA2}","sand_recomComm":"Recommendations","sand_Activity":"Activity","sand_SCoSharesFilesWithT":"They have been shared the same files","sand_More":"More (${restItemsNum})","sand_simComm":"Similar Communities","lpcfr":"You share some colleagues","CONNECT_TO":"Invite to Connect","sand_youShareActivities120":"You share more than ${tagA1}120 activities${tagA2}","sand_TEditedYourFile":"%t was an editor of a file that you authored.","sand_thingsInCommon":"Things in Common","fileAuthorEditedBy":"You were an editor of one or more files authored by this person.","sand_they":"They","sand_File":"File","sand_Forum":"Discussion topic","sand_someoneTaggedYouBoth":"${tagA1}Someone${tagA2} tagged you both","sand_TCommentedOnSPosts":"%t commented on %s\'s posts.","bpct":"Has commented on your blog","sand_youShareFiles":"You share ${tagA1}%c files${tagA2}","sand_XtoXofX":"${fromItem} - ${toItem} of ${totalItems}","sand_TEditedYourFiles":"%t was an editor of files that you authored.","sand_YouCommentedOnTheSamePost":"You commented on the same post.","sand_Files":"Files","fileCoSharing":"This person and you were shared the same file or files","ccms":"You are in a community together","sand_theyWereBothTaggedBySameTag":"They were both tagged by the same ${tagA1}tag${tagA2}","sand_ForumThreads":"Forum threads","TAGS_IN_COMMON":"Tags in common: ","sand_TCommentedOnYourPosts":"%t commented on your posts.","fileEditorAuthoredBy":"This person was an editor of one or more files authored by you.","bpcc":"You have commented on the same blog","bpcb":"You commented on their blog","ctb":"You share a bookmark","sand_filesCoSharing":"You have been shared the same files","ccmf":"You are in a community together","sand_SSharedAFileToT":"%s shared a file with %t","sand_youTaggedT":"You tagged %t","todoin":"You assigned todos to this person","socialPathUnavailable":"The connections between you and other people cannot currently be retrieved.","statusUpdatesOwnerCommentedTo":"This person commented on one or more posts on your board.","numPersonInCommon":"${0} related person","sand_theyCoCommentedWikis":"They commented within the same ${tagA1}%c wikis${tagA2}","sand_SCommentedOnPostOnTBoard":"%t commented on a post on %s\'s board.","sand_SCommentedOnTPosts":"%s commented on %t\'s posts."};
dojo.provide("lconn.sand.nls.RecommendWidget")._built=true;
dojo.provide("lconn.sand.nls.RecommendWidget.en_gb");
lconn.sand.nls.RecommendWidget.en_gb={"ARIA_PAGING":"Paging","REMOVE":"Remove","COMMUNITY":"Community","NUM_PEOPLE_IN_COMMON":"${0} related people","ACTIVITY":"Activity","NUM_PERSON_IN_COMMON":"${0} related person","TITLE_RECOMMEND":"Recommendations:","NUM_TAGS_IN_COMMON":"${0} related tags","PAGE_POSITION":"${0} - ${1} of ${2}","TAGS":"Tags: ","DIALOG_RELATED_PEOPLE":"Related People","LOADING":"Loading...","GENERIC_ERROR":"An error occurred while displaying content. Contact your system administrator.","ARIA_PAGE_POSITION":"Showing items ${0} through ${1} of ${2}","DIALOG_RELATED_TAGS":"Related Tags","NUM_TAG_IN_COMMON":"${0} related tag","NR1":"There are no current recommendations for you.","NR2":"As you create content and connect to people, recommendations will start to appear.","UNAVAILABLE":"Your recommendations cannot currently be retrieved.","NEXT":"Next","RECOMMENDATIONS_TITLE":"Your Recommendations","DIALOG_RELATED_PEOPLE_CLOSE":"Close Related People","BLOG_ENTRY":"Blog entry","BOOKMARK":"Bookmark","PREVIOUS":"Previous","DISCUSSION_TOPIC":"Discussion topic","FILE":"File","DIALOG_RELATED_TAGS_CLOSE":"Close Related Tags","WIKI_PAGE":"Wiki page","LINKACCESSDESCRIPTION":"Click the link for this recommendation to open it in a new window"};
if(typeof define!=="undefined"&&typeof define._packages!=="undefined")define._packages["lconn.sand"]=true;

;dojo.cache("lconn.sand", "templates/RecommendWidget.html", "<div dojoAttachPoint=\"root\" class=\"topContainer\"> <div class=\"lotusTable\" dojoAttachPoint=\"recommendErrorNode\" style=\"display:none\"> <img class=\"lconnSprite lconnSprite-iconWarning16\" src=\"${blankIcon}\" role=\"presentation\" alt=\"\"/>&nbsp;&nbsp;<span class=\"lotusMeta\">${_resourceBundle.GENERIC_ERROR}</span> </div> <div dojoAttachPoint=\"recommendLoading\"> <center>${_resourceBundle.LOADING}</center> </div> <div dojoAttachPoint=\"boardingNode\" style=\"display:none\"></div> <div dojoAttachPoint=\"welcomeNode\" style=\"display:none;\"> <span>${_resourceBundle.NR1}</span> </div> <span class=\"lotusAccess\" id=\"lconnRecommendLinkDescription\" dojoAttachPoint=\"recommendLinkDescription\">${_resourceBundle.LINKACCESSDESCRIPTION}</span> <div dojoAttachPoint=\"recommendContainer\"> </div> <div class=\"lotusSectionFooter\" dojoAttachPoint=\"pagingFooter\"> <div class=\"lotusPaging\" aria-label=\"${_resourceBundle.ARIA_PAGING}\" role=\"navigation\"> <div class=\"lotusLeft\" aria-label=\"${_resourceBundle.ARIA_PAGE_POSITION}\" title=\"${_resourceBundle.ARIA_PAGE_POSITION}\" dojoAttachPoint=\"pagePositionDiv\">${_resourceBundle.PAGE_POSITION}</div> <ul class=\"lotusRight lotusInlinelist\"> <li class=\"lotusFirst\"> <a href=\"javascript:void(0);\" alt=\"${_resourceBundle.PREVIOUS}\" title=\"${_resourceBundle.PREVIOUS}\" dojoAttachEvent=\"onclick:pagePrevious\" dojoAttachPoint=\"prevLink\">${_resourceBundle.PREVIOUS}</a> <span class=\"meta\" dojoAttachPoint=\"prevLinkText\">${_resourceBundle.PREVIOUS}</span> </li> <li> <a href=\"javascript:void(0);\" alt=\"${_resourceBundle.NEXT}\" title=\"${_resourceBundle.NEXT}\" dojoAttachEvent=\"onclick:pageNext\" dojoAttachPoint=\"nextLink\">${_resourceBundle.NEXT}</a> <span class=\"meta\" dojoAttachPoint=\"nextLinkText\">${_resourceBundle.NEXT}</span> </li> </ul> </div> </div></div>");

;dojo.cache("lconn.sand", "xslt/recommend.xsl", "<?xml version=\"1.0\" encoding=\"utf-8\"?><xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:ibmss=\"http://www.ibm.com/search/social/2011\" xmlns:ibmsc=\"http://www.ibm.com/search/content/2010\" xmlns:openSearch=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:relevance=\"http://a9.com/-/opensearch/extensions/relevance/1.0/\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" xmlns:spelling=\"http://a9.com/-/opensearch/extensions/spelling/1.0/\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" exclude-result-prefixes=\"xhtml atom xsl atom ibmss ibmsc openSearch relevance snx spelling\"> <xsl:output method=\"html\" encoding=\"utf-8\" /> <xsl:param name=\"activity\"/> <xsl:param name=\"blog\"/> <xsl:param name=\"bookmark\"/> <xsl:param name=\"community\"/> <xsl:param name=\"file\"/> <xsl:param name=\"forum\"/> <xsl:param name=\"wiki\"/> <xsl:param name=\"blankIcon\"/> <xsl:param name=\"tic\"/> <xsl:param name=\"pic\"/> <xsl:param name=\"profileUrl\"/> <xsl:param name=\"remove\"/> <xsl:template match=\"/atom:feed\"> <xsl:call-template name=\"recommendEntry\"/> </xsl:template> <xsl:template name=\"recommendEntry\"> <div class=\"totalResults\"> <xsl:value-of select=\"count(atom:entry)\"/> </div> <div role=\"list\" class=\"lotusChunk\"> <table class=\"lotusTable\" cellspacing=\"0\" role=\"presentation\"> <xsl:for-each select=\"atom:entry\"> <tr class=\"{atom:id} rec\" role=\"listitem\"> <td style=\"width: 19px;\"> <xsl:call-template name=\"iconChooser\"/> </td> <td class=\"lotusMeta\"> <a target=\"_blank\" aria-describedby=\"lconnRecommendLinkDescription\"> <xsl:attribute name=\"href\"> <xsl:value-of select=\"atom:link/@href\"/> </xsl:attribute> <xsl:attribute name=\"title\"> <xsl:value-of select=\"atom:title\"/> </xsl:attribute> <xsl:choose> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='files' or atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='wikis:file'\"> <xsl:attribute name=\"dir\">ltr</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\"> bidiAware </xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"atom:title\"/> </a> <xsl:if test=\"ibmss:entity_evidence[@type='tag']\"> <div> <a href=\"javascript:void(0);\" class=\"person sand_tic lotusAction\" action=\"{atom:id}\" role=\"button\" aria-haspopup=\"true\"><xsl:value-of select=\"count(ibmss:entity_evidence[@type='tag'])\"/></a> <div style=\"display:none;\" class=\"tic_evidence {atom:id}\"> <div role=\"list\"> <xsl:for-each select=\"ibmss:entity_evidence[@type='tag']\"><span role=\"listitem\"><xsl:value-of select=\"@id\"/></span><xsl:if test=\"position()!=last()\">, </xsl:if></xsl:for-each> </div> </div> </div> </xsl:if> <xsl:if test=\"ibmss:entity_evidence[@type='personUserID']\"> <div> <a href=\"javascript:void(0);\" class=\"person sand_pic lotusAction\" action=\"{atom:id}\" role=\"button\" aria-haspopup=\"true\"><xsl:value-of select=\"count(ibmss:entity_evidence[@type='personUserID'])\"/></a> <div style=\"display:none;\" class=\"pic_evidence {atom:id}\"> <ul class=\"lotusList\"> <xsl:for-each select=\"ibmss:entity_evidence[@type='personUserID']\"> <li class=\"lotusLeft\"> <span class=\"vcard\"> <xsl:choose> <xsl:when test=\"string-length($profileUrl) = 0\"> <span class=\"fn bidiAware\"> <xsl:value-of select=\"text()\"/> </span> </xsl:when> <xsl:otherwise> <a class=\"fn bidiAware\"> <xsl:attribute name=\"href\"> <xsl:value-of select=\"$profileUrl\"/><xsl:value-of select=\"@id\"/> </xsl:attribute> <xsl:value-of select=\"text()\"/> </a> </xsl:otherwise> </xsl:choose> <span class=\"x-lconn-userid\" style=\"display:none;\"><xsl:value-of select=\"@id\"/></span> </span> </li> </xsl:for-each> </ul> </div> </div> </xsl:if> </td> <td> <a role=\"button\" tabindex=\"-1\" href=\"javascript:;\" class=\"lotusAccess feedback\"> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> </a> <a role=\"button\" href=\"javascript:;\" class=\"lotusDelete sprite feedback\" style=\"visibility: hidden; margin-top:2px;\"> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> <img role=\"presentation\"> <xsl:attribute name=\"src\"><xsl:value-of select=\"$blankIcon\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$remove\"/></xsl:attribute> </img> <span class=\"lotusAltText\">X</span> </a> </td> </tr> </xsl:for-each> </table> </div> </xsl:template> <xsl:template name=\"iconChooser\"> <img> <xsl:attribute name=\"src\"> <xsl:value-of select=\"$blankIcon\"/> </xsl:attribute> <xsl:choose> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='blogs'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconBlogs16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$blog\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='files'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"ibmsc:field[@id='fileExtension']\"> lconn-ftype16 lconn-ftype16-<xsl:value-of select=\"ibmsc:field[@id='fileExtension']\"/> </xsl:when> <xsl:otherwise>lconnSprite lconnSprite-iconFiles16</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$file\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='forums'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconForums16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$forum\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='wikis'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"ibmsc:field[@id='fileExtension']\"> lconn-ftype16 lconn-ftype16-{ibmsc:field[@id='fileExtension']} </xsl:when> <xsl:otherwise>lconnSprite lconnSprite-iconWikis16</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$wiki\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='dogear'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconBookmarks16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$bookmark\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='activities'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconActivities16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$activity\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:feed'\"> lconnSprite lconnSprite-iconFeed16 </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:forum'\"> lconnSprite lconnSprite-iconForums16 </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:bookmark'\"> lconnSprite lconnSprite-iconBookmarks16 </xsl:when> <xsl:otherwise> lconnSprite lconnSprite-iconCommunities16 </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$community\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconCommunities16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$community\"/> </xsl:attribute> </xsl:otherwise> </xsl:choose> </img> </xsl:template></xsl:stylesheet>");

;if(!dojo._hasResource["lconn.sand.RecommendWidget"]){
dojo._hasResource["lconn.sand.RecommendWidget"]=true;
dojo.provide("lconn.sand.RecommendWidget");


























dojo.requireLocalization("lconn.sand","ui");
dojo.requireLocalization("lconn.sand","RecommendWidget");
dojo.declare("lconn.sand.RecommendWidget",[dijit._Widget,dijit._Templated,dijit._Container],{_resourceBundle:null,templatePath:dojo.moduleUrl("lconn.sand","templates/RecommendWidget.html"),remoteUrl:"",feedbackUrl:"",sourceList:"",blankIcon:"",tt:null,page:0,xhrErrorHandler:null,errorHtmlContainerElemId:null,profileViewURL:"",lastMod:"",currentUserId:null,_xslCache:new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"recommend.xsl":{templatePath:dojo.moduleUrl("lconn.sand","xslt/recommend.xsl")}}})),postCreate:function(){
var _1=lconn.core.config.services.search;
if(com.ibm.oneui.util.Url.secure){
var _2=_1.secureUrl;
}else{
var _2=_1.url;
}
this.feedbackUrl=_2+"/api/feedback";
var _3=_2+"/atom/social/recommend";
var _4="pageSize=15&locale="+dojo.locale+"&diversityboost=1.0f&dateboost=1.0f&randomize=true";
if(!this.sourceList||this.sourceList==""){
this.remoteUrl=_3+"?"+_4;
}else{
this.sourceList=this.sourceList.replace(new RegExp(", ","g"),",");
var _5=this.sourceList.split(",");
dojo.forEach(_5,function(_6,i){
if(_6=="communities"){
_5[i]="Source/communities/entry";
}else{
_5[i]="Source/"+_6;
}
});
var _7={type:"category",values:_5};
this.remoteUrl=_3+"?constraint="+dojo.toJson(_7)+"&"+_4;
}
var _8=lconn.core.config.services.profiles;
if(_8){
if(com.ibm.oneui.util.Url.secure){
this.profileViewURL=_8.secureUrl+"/html/profileView.do?userid=";
}else{
this.profileViewURL=_8.url+"/html/profileView.do?userid=";
}
}
this.recommendLoading.style.display="";
this.welcomeNode.id=this.id+"_welcomeNode";
if(this.errorHtmlContainerElemId==null){
this.errorHtmlContainerElemId=this.welcomeNode.id;
}
},postMixInProperties:function(){
if(this.blankIcon==""){
this.blankIcon=djConfig.blankGif;
}
this._resourceBundle=dojo.i18n.getLocalization("lconn.sand","RecommendWidget");
},handleAsyncRequest:function(_9,_a){
dojo.cookie("lconn.sand.recommendationsTimeout",null,{expires:-1});
if(_9!=null){
var _b=dojox.xml.parser.parse(_9);
var _c="";
var _d="";
if(dojo._isBodyLtr()){
_d="true";
}else{
_d="false";
}
var _e=this._xslCache.getXslDoc("recommend.xsl");
_c=lconn.core.xslt.transform(_b,_e,null,[["activity",this._resourceBundle.ACTIVITY],["blog",this._resourceBundle.BLOG_ENTRY],["bookmark",this._resourceBundle.BOOKMARK],["community",this._resourceBundle.COMMUNITY],["file",this._resourceBundle.FILE],["wiki",this._resourceBundle.WIKI_PAGE],["forum",this._resourceBundle.DISCUSSION_TOPIC],["blankIcon",this.blankIcon],["tic",this._resourceBundle.NUM_TAG_IN_COMMON],["pic",this._resourceBundle.NUM_PEOPLE_IN_COMMON],["profileUrl",this.profileViewURL],["remove",this._resourceBundle.REMOVE]],true);
if(_c!=""){
this.boardingNode.innerHTML=_c;
var _f=dojo.query(".totalResults",this.boardingNode);
var _10=_f[0].innerHTML;
_f.orphan();
this.pageStart(0);
if(_10==0){
this.recommendLoading.style.display="none";
this.recommendErrorNode.style.display="none";
this.welcomeNode.style.display="";
this.hidePaging();
}else{
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="none";
this.recommendLoading.style.display="none";
this.recommendContainer.style.display="";
this.recommendLinkDescription.style.display="";
}
}else{
this.recommendLoading.style.display="none";
this.recommendErrorNode.style.display="none";
this.welcomeNode.style.display="";
this.hidePaging();
}
}
},foo:function(evt){
alert("foo!");
},Recommend:function(){
this.recommendLoading.style.display="";
this.hidePaging();
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="none";
this.recommendContainer.style.display="none";
this.recommendLinkDescription.style.display="none";
var nlm=dojo.cookie("lconn.sand.lastmod");
if(typeof (nlm)!="undefined"||nlm!=null){
this.lastMod=nlm;
}else{
this.lastMod=new Date().getTime();
dojo.cookie("lconn.sand.lastmod",this.lastMod,{expires:7});
}
this.fetchRecommendations();
},fetchRecommendations:function(){
var _11=dojo.cookie("lconn.sand.recommendationsTimeout");
var _12={htmlContainerElemId:this.errorHtmlContainerElemId,url:com.ibm.oneui.util.proxy(this.remoteUrl),handleAs:"text",timeout:30000,preventCache:false,content:{lastMod:this.lastMod,uid:this.currentUserId}};
if(dojo.isIE){
if(!_11){
dojo.cookie("lconn.sand.recommendationsTimeout",this.recommendationsTimeout,{expires:1});
}else{
dojo.cookie("lconn.sand.recommendationsTimeout",null,{expires:-1});
this.displayError({status:503});
return;
}
}
var req=dojo.xhrGet(_12);
req.addCallback(dojo.hitch(this,"handleAsyncRequest"));
req.addErrback(dojo.hitch(this,"handleError",req.ioArgs));
},setContent:function(_13){
if(_13==""){
this.welcomeNode.display="none";
this.hidePaging();
return;
}else{
this.recommendContainer.innerHTML=_13;
var _14=dojo.query(".rec",this.recommendContainer);
var _15=true;
dojo.forEach(_14,function(_16){
if(_15&&dojo.style(_16,"display")!="none"){
_15=false;
dojo.addClass(_16,"lotusFirst");
}
var _17=function(evt){
var _18=dojo.query(".lotusDelete.feedback",this);
_18.style("visibility","visible");
dojo.query(".lotusAccess.feedback",this.recommendContainer).style("visibility","hidden");
};
var _19=function(evt){
dojo.query(".lotusDelete.feedback",this.recommendContainer).style("visibility","hidden");
dojo.query(".lotusAccess.feedback",this.recommendContainer).style("visibility","visible");
};
dojo.connect(_16,"onmouseenter",_17);
dojo.connect(_16,"onmouseleave",_19);
var _1a=dojo.query("h4 a, .sand_tic, .sand_pic",_16);
_1a.connect("onfocus",_16,_17);
var _1b=dojo.query("a.feedback",_16);
_1b.connect("onclick",this,"handleFeedback");
this._formatEvidenceLinks(_16);
},this);
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.recommendContainer);
}
},_formatEvidenceLinks:function(_1c){
var tic=dojo.query(".sand_tic",_1c);
if(tic.length>0){
var _1d=tic[0];
var _1e=dojo.query(".tic_evidence>*",_1c);
var _1f=_1e[0];
this._formatEvidenceLink(_1d,this._resourceBundle.NUM_TAG_IN_COMMON,this._resourceBundle.NUM_TAGS_IN_COMMON,_1f,this._resourceBundle.DIALOG_RELATED_TAGS,this._resourceBundle.DIALOG_RELATED_TAGS_CLOSE);
}
var pic=dojo.query(".sand_pic",_1c);
if(pic.length>0){
var _1d=pic[0];
var _1e=dojo.query(".pic_evidence",_1c);
var _20=dojo.query(".lotusList",_1e[0]);
var _1f=_20[0];
try{
SemTagSvc.parseDom(null,_1f);
}
catch(e){
}
this._formatEvidenceLink(_1d,this._resourceBundle.NUM_PERSON_IN_COMMON,this._resourceBundle.NUM_PEOPLE_IN_COMMON,_1f,this._resourceBundle.DIALOG_RELATED_PEOPLE,this._resourceBundle.DIALOG_RELATED_PEOPLE_CLOSE);
}
},_formatEvidenceLink:function(_21,_22,_23,_24,_25,_26){
if(_21){
var _27=dojo.attr(_21,"innerHTML");
if(_27=="1"){
var _28=dojo.string.substitute(_22,[_27]);
}else{
var _28=dojo.string.substitute(_23,[_27]);
}
dojo.attr(_21,"innerHTML",_28);
return lconn.core.HelpLauncher.createHelpLink(_21,"",_24,{HELP:_25,CLOSE:_26},true);
}
},handleError:function(_29,_2a,evt){
if(typeof (this.xhrErrorHandler)=="function"){
this.xhrErrorHandler(_2a,_29);
}else{
this.displayError(_2a);
}
},displayError:function(_2b){
if(_2b&&_2b.status===503){
dojo.attr(this.recommendErrorNode,"innerHTML",this._resourceBundle.UNAVAILABLE);
}
this.recommendLoading.style.display="none";
this.recommendContainer.style.display="none";
this.recommendLinkDescription.style.display="none";
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="";
this.hidePaging();
},hidePaging:function(){
dojo.style(this.pagingFooter,"display","none");
},handleFeedback:function(evt){
var _2c;
if(evt==null){
_2c=window.event.srcElement;
}else{
_2c=evt.target;
}
if(_2c.nodeName!="A"){
_2c=_2c.parentNode;
}
var _2d=_2c.getAttribute("action").replace(/:/g,"\\:");
var _2e=dojo.query("."+_2d,this.recommendContainer);
for(var i=0;i<_2e.length;i++){
if(_2e[i].getAttribute("role")=="listitem"){
var _2f=_2e[i].nextSibling;
while(_2f&&_2f.nodeType!=1){
_2f=_2f.nextSibling;
}
if(_2f&&_2f.style.display==="none"){
_2f=this.nextLinkText.parentNode;
}else{
if(dojo.isIE&&_2f&&_2f.querySelectorAll(".lotusMeta").length>0){
_2f=_2f.querySelectorAll(".lotusMeta")[0].getElementsByTagName("a")[0];
}else{
if(_2f&&_2f.getElementsByClassName("lotusMeta").length>0){
_2f=_2f.getElementsByClassName("lotusMeta")[0].getElementsByTagName("a")[0];
}else{
_2f=this.prevLinkText.parentNode;
}
}
}
if(_2f){
_2f.focus();
break;
}
}
}
_2e.orphan();
_2e=dojo.query("."+_2d,this.boardingNode);
_2e.orphan();
var _30={url:com.ibm.oneui.util.proxy(this.feedbackUrl),handleAs:"text",timeout:30000,content:{client:"recommend",itemid:_2c.getAttribute("action"),action:"remove"}};
var req=dojo.xhrGet(_30);
this.lastMod=new Date().getTime();
dojo.cookie("lconn.sand.lastmod",this.lastMod,{expires:7});
},pageNext:function(){
if(this.page<2){
this.pageStart(this.page+1);
}
},pagePrevious:function(){
if(this.page>0){
this.pageStart(this.page-1);
}
},pageStart:function(_31){
var _32=dojo.query(".rec",this.boardingNode);
var _33=(_31*5)+1;
if(_32.length>=_33+5){
var _34=_33+4;
}else{
var _34=_32.length;
}
dojo.attr(this.pagePositionDiv,"innerHTML",dojo.string.substitute(this._resourceBundle.PAGE_POSITION,[_33,_34,_32.length]));
var _35=dojo.string.substitute(this._resourceBundle.ARIA_PAGE_POSITION,[_33,_34,_32.length]);
dojo.attr(this.pagePositionDiv,"aria-label",_35);
dojo.attr(this.pagePositionDiv,"title",_35);
dojo.style(this.pagingFooter,"display","");
if(_31==0){
this.prevLink.style.display="none";
this.prevLinkText.style.display="";
}else{
this.prevLink.style.display="";
this.prevLinkText.style.display="none";
}
for(var i=0;i<_32.length;i++){
_32[i].style.display="none";
}
if(_32.length>((_31*5)+5)){
this.nextLink.style.display="";
this.nextLinkText.style.display="none";
for(var i=_31*5;i<((_31*5)+5);i++){
_32[i].style.display="";
}
}else{
this.nextLink.style.display="none";
this.nextLinkText.style.display="";
for(var i=_31*5;i<_32.length;i++){
_32[i].style.display="";
}
}
this.setContent(this.boardingNode.innerHTML);
this.page=_31;
}});
}


;dojo.cache("lconn.communities.catalog", "templates/recommendationsBox.html", "<div class=\"lotusSection2\" aria-labelledby=\"${id}recommendTitle\" role=\"region\"> <div class=\"lotusSectionHeader\"> <div class=\"lotusInner\"> <h2 id=\"${id}recommendTitle\" class=\"lotusHeading\">${resourceBundle.recommendations}</h2> <a class=\"lotusIcon lotusActionIcon\" id=\"actionsIcon\" title=\"${resourceBundle.recommActions}\" aria-owns=\"recommend_menu\" aria-haspopup=\"true\" role=\"button\" href=\"javascript:;\" dojoAttachEvent=\"onclick: openMenu\"> <img alt=\"\" src=\"${blankIcon}\" /> <span class=\"lotusAltText\">${resourceBundle.actions}</span> </a> <div id=\"recommend_menu\" dojoType=\"dijit.Menu\" style=\"display: none\"> <div dojoType=\"dijit.MenuItem\" dojoAttachPoint=\"toggleRecommend\" label=\"${resourceBundle.minimize}\"></div> <div dojoType=\"dijit.MenuItem\" dojoAttachPoint=\"refreshRecommend\" label=\"${resourceBundle.refresh}\"></div> <div dojoType=\"dijit.MenuItem\" onclick=\"openHelpWindow('${helpTopic}'); return false;\">${resourceBundle.help}</div> </div> </div> </div> <div class=\"lotusSectionBody\" dojoAttachPoint=\"recommendationsContent\"/></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.RecommendationsBox"]){
dojo._hasResource["lconn.communities.catalog.widgets.RecommendationsBox"]=true;










dojo.requireLocalization("lconn.communities.catalog","placeCenter");
dojo.provide("lconn.communities.catalog.widgets.RecommendationsBox");
dojo.declare("lconn.communities.catalog.widgets.RecommendationsBox",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/recommendationsBox.html"),widgetsInTemplate:true,resourceBundle:null,blankIcon:null,userId:"",sourceList:"communities",helpTopic:"t_com_using_recommended_comms_widget.html",searchServiceUrl:"",sandApiUrl:"/atom/social/recommend",isExpanded:true,recommendWidget:null,postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
},postCreate:function(){
var _1=this.searchServiceUrl+this.sandApiUrl;
var _2=document.createElement("div");
this.recommendationsContent.appendChild(_2);
var _3=this.resourceBundle.loginToViewRecommendations;
var _4={remoteUrl:_1,sourceList:this.sourceList,blankIcon:this.blankIcon,currentUserId:this.userId,xsltUrl:dojo.moduleUrl("lconn.sand","xslt/recommend.xsl").toString()};
dojo.connect(this.toggleRecommend,"onClick",this,"toggle");
dojo.connect(this.refreshRecommend,"onClick",this,"refresh");
this.recommendWidget=new lconn.sand.RecommendWidget(_4,_2);
if(this.userId==""){
this.recommendWidget.recommendErrorNode.innerHTML=_3;
this.recommendWidget.displayError();
}else{
this.recommendWidget.Recommend();
}
},toggle:function(){
if(this.isExpanded){
dojo.style(this.recommendationsContent,"display","none");
this.toggleRecommend.attr("label",this.resourceBundle.maximize);
}else{
dojo.style(this.recommendationsContent,"display","");
this.toggleRecommend.attr("label",this.resourceBundle.minimize);
}
this.isExpanded=!this.isExpanded;
},refresh:function(){
this.recommendWidget.Recommend();
},openMenu:function(_5){
com.ibm.oneui.util.openAround("recommend_menu",dijit.byId("actionsIcon"),null,_5);
}});
}


;if(!dojo._hasResource["lconn.communities.catalog.widgets.CatalogAjaxCall"]){
dojo._hasResource["lconn.communities.catalog.widgets.CatalogAjaxCall"]=true;




dojo.provide("lconn.communities.catalog.widgets.CatalogAjaxCall");
dojo.declare("lconn.communities.catalog.widgets.CatalogAjaxCall",[lconn.core.CommonTags.AjaxCall],{DATASTORE:null,tags:null,callback:null,isFirstLoad:true,constructor:function(){
dojo.subscribe(lconn.communities.catalog.DISPLAY_FACETS,this,"convertTags");
},setup:function(ds){
this.DATASTORE=ds;
},getTags:function(_1,_2,_3){
if(this.tags!=null){
_1.call(null,this.tags);
}
this.callback=_1;
},convertTags:function(_4){
this.isFirstLoad=false;
var _5=lconn.communities.catalog.util.getNodes(_4,"/atom:feed/ibmsc:facets/ibmsc:facet[@id='tag']/ibmsc:facetValue");
this.tags=[];
for(var i=0;i<_5.length;i++){
var _6={};
_6.name=lconn.communities.catalog.util.getXpathAttrValue(_4,"@label",_5[i]);
_6.frequency=parseInt(lconn.communities.catalog.util.getXpathAttrValue(_4,"@weight",_5[i]));
this.tags.push(_6);
}
this.tags=this.tags.sort(function(_7,_8){
return _7.name>_8.name?1:-1;
});
if(this.callback!=null){
this.callback.call(null,this.tags);
}
},redirect:function(_9){
if(this.isFirstLoad){
return;
}
dojo.publish(lconn.communities.catalog.REMOVE_FILTER,["tag"]);
if(_9!=null&&_9!=""){
var _a=_9.split(" ");
for(var i=0;i<_a.length;i++){
var _b=_a[i];
dojo.publish(lconn.communities.catalog.ADD_FILTER,["tag",_b]);
}
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
}else{
dojo.publish(lconn.communities.catalog.FETCH_RESULTS_TOPIC,[]);
}
}});
}


;dojo.cache("lconn.communities.catalog", "templates/tagFilter.html", "<div class=\"lotusSection\" aria-labelledby=\"${id}tagCloudTitle\" role=\"region\"> <label id=\"label_filter_tags.cloud\" dojoAttachPoint=\"toggleLabel\" class=\"lotusOffScreen\" aria-live=\"polite\">${resourceBundle.expandedSection}</label> <h2> <a title=\"${resourceBundle.close}\" dojoAttachPoint=\"toggleLink\" dojoAttachEvent=\"onclick: toggle\" href=\"javascript:;\" class=\"lotusSprite lotusArrow lotusTwistyOpen\" role=\"button\" aria-label=\"${resourceBundle.toggleTagFilter}\"> <span dojoAttachPoint=\"toggleSpan\" class=\"lotusAltText\">&#x25bc;</span></a><span id=\"${id}tagCloudTitle\" class=\"lotusLeft\">${resourceBundle.popularTags}</span> <a dojoAttachPoint=\"helpLink\" class=\"lotusRight\"></a> </h2> <div class=\"lotusSectionBody\" dojoAttachPoint=\"tagCloudContent\"/></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.TagFilter"]){
dojo._hasResource["lconn.communities.catalog.widgets.TagFilter"]=true;












dojo.requireLocalization("lconn.communities.catalog","placeCenter");
dojo.provide("lconn.communities.catalog.widgets.TagFilter");
dojo.declare("lconn.communities.catalog.widgets.TagFilter",[dijit._Widget,dijit._Templated,lconn.communities.catalog.Filter],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/tagFilter.html"),widgetsInTemplate:true,resourceBundle:null,blankIcon:null,typeAheadFeedUrl:"",typeAheadTemplate:"",tagsTypeaheadEnabled:true,multiSelected:true,ajaxCall:null,filterType:"tag",postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
this.toggle=dojo.hitch(this,lconn.communities.catalog.util.toggle,"tagCloudContent");
lconn.communities.catalog.util.registerFilter(this);
},postCreate:function(){
lconn.core.HelpLauncher.createHelpLink(this.helpLink,this.resourceBundle.tags,this.resourceBundle.tagsTip,{HELP:this.resourceBundle.helpTagFilter,CLOSE:this.resourceBundle.closeHelpTagFilter},false);
this.ajaxCall=new lconn.communities.catalog.widgets.CatalogAjaxCall();
this.ajaxCall.HANDLE_AS="json";
this.ajaxCall.TAG_TEMPLATE="#tag";
var _1={typeAheadFeedUrl:this.typeAheadFeedUrl,typeAheadTemplate:this.typeAheadTemplate,tagsTypeaheadEnabled:this.tagsTypeaheadEnabled,multiSelected:this.multiSelected,ajaxCall:this.ajaxCall};
var _2=document.createElement("div");
this.tagCloudContent.appendChild(_2);
this.tagWidget=new lconn.core.CommonTags.TagWidget(_1,_2);
},startup:function(){
dojo.publish(lconn.communities.catalog.REGISTER_FACET,["{\"id\":\"tag\",\"count\": 30}"]);
},getFilterType:function(){
return this.filterType;
},isExclusive:function(){
return false;
},getConstraint:function(_3){
return {"type":"field","id":"tag","values":[_3]};
},formatBreadCrumb:function(_4){
return dojo.string.substitute(this.resourceBundle.tagsBreadCrumbText,[_4+"&rlm;"]);
},addFilter:function(_5){
var _6=this.ajaxCall.redirect;
this.ajaxCall.redirect=function(){
};
dojo.publish("lconn/core/CommonTags/AddTag",[_5]);
this.ajaxCall.redirect=_6;
},removeFilter:function(_7){
if(_7!=undefined){
dojo.publish("lconn/core/CommonTags/RemoveTag",[_7]);
}
}});
}


;dojo.cache("lconn.communities.catalog", "templates/welcomeBox.html", "<div dojoAttachPoint=\"welcomeBox\" class=\"lotusWelcomeBox\" style=\"display:none\" aria-labelledby=\"welcomeHeading\" role=\"region\"> <h2 id=\"welcomeHeading\" class=\"lotusHeading\">${resourceBundle.welcomeTitle}</h2> <p>${resourceBundle.welcomeDetail}</p> <ul> <li id=commWelcomeMsg1 dojoAttachPoint=\"commWelcomeMsg1\"></li> <li id=commWelcomeMsg2 dojoAttachPoint=\"commWelcomeMsg2\"></li> <li id=commWelcomeMsg3 dojoAttachPoint=\"commWelcomeMsg3\"></li> <li id=commWelcomeMsg4 dojoAttachPoint=\"commWelcomeMsg4\"></li> </ul> <a class=\"lotusBtnImg lotusClose\" title=\"${resourceBundle.welcomeClosePanel}\" href=\"javascript:void(0);\" dojoAttachEvent=\"onclick:close\"> <img aria-label=\"${resourceBundle.welcomeClosePanel}\" alt=\"${resourceBundle.welcomeClosePanel}\" src=\"${blankIcon}\"><span class=\"lotusAltText\">X</span> </a></div>");

;if(!dojo._hasResource["lconn.communities.catalog.widgets.WelcomeBox"]){
dojo._hasResource["lconn.communities.catalog.widgets.WelcomeBox"]=true;




dojo.requireLocalization("lconn.communities.catalog","placeCenter");
dojo.provide("lconn.communities.catalog.widgets.WelcomeBox");


dojo.declare("lconn.communities.catalog.widgets.WelcomeBox",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.communities.catalog","templates/welcomeBox.html"),resourceBundle:null,blankIcon:null,userId:"",cookie:false,isSmartCloud:"false",canCreate:null,canViewPublic:null,createLink:function createLink(li,_1,_2,_3){
if(li){
var _4=_1.replace("${0}","<a href=\"javascript:;\">");
_4=_4.replace("${1}","</a>");
li.innerHTML=_4;
var _5=_2.replace("${0}","");
_5=_5.replace("${1}","");
var _6=li.getElementsByTagName("a")[0];
_6.setAttribute("aria-label",_5);
_6.onclick=function(){
openCatalogHelpWindow(_3);
return false;
};
}
},postMixInProperties:function(){
this.resourceBundle=dojo.i18n.getLocalization("lconn.communities.catalog","placeCenter");
this.cookie=(dojo.cookie("lcCommWelClose")!=null);
},postCreate:function(){
if(!this.cookie){
dojo.style(this.welcomeBox,"display","");
this.handleJoinLink();
this.handleForumLink();
this.handleBookmarkLink();
this.handleCreateLink();
}
},handleJoinLink:function(){
if(this.canViewPublic){
this.createLink(this.commWelcomeMsg1,this.resourceBundle.welcomeMsg1,this.resourceBundle.welcomeMsg1,"t_com_join.html");
}else{
dojo.style(this.commWelcomeMsg1,"display","none");
}
},handleForumLink:function(){
this.createLink(this.commWelcomeMsg2,this.resourceBundle.welcomeMsg2,this.resourceBundle.welcomeMsg2,"t_com_forum_topic_add.html");
},handleBookmarkLink:function(){
if(this.isSmartCloud==="true"){
this.createLink(this.commWelcomeMsg3,this.resourceBundle.welcomeMsg3,this.resourceBundle.welcomeMsg3,"t_com_bookmarks_add_web.html");
}else{
this.createLink(this.commWelcomeMsg3,this.resourceBundle.welcomeMsg3,this.resourceBundle.welcomeMsg3,"community_bookmarks_frame.html");
}
},handleCreateLink:function(){
if(this.canCreate){
this.createLink(this.commWelcomeMsg4,this.resourceBundle.welcomeMsg4,this.resourceBundle.welcomeMsg4,"t_com_create.html");
}else{
dojo.style(this.commWelcomeMsg4,"display","none");
}
},buildRendering:function(){
if(!this.cookie){
this.inherited(arguments);
}
},close:function(){
dojo.style(this.welcomeBox,"display","none");
dojo.cookie("lcCommWelClose","1",{"expires":3650});
}});
function openCatalogHelpWindow(_7){
lconn.core.help.launchHelp(_7);
};
}


;if(!dojo._hasResource["lconn.core.auth.whiteListHelper"]){
dojo._hasResource["lconn.core.auth.whiteListHelper"]=true;
dojo.provide("lconn.core.auth.whiteListHelper");
dojo.declare("lconn.core.auth.whiteListHelper",null,{_list:null,_serviceJson:null,_proxyUrl:null,constructor:function(_1,_2){
if(_1==null){
throw new Error("serviceJson or proxyUrl is null");
}
this._serviceJson=_1;
if(_2!=null){
this._proxyUrl=_2;
}
this._initList();
},_initList:function(){
if(this._list==null){
this._list=[];
try{
for(var _3 in this._serviceJson){
if((this._serviceJson[_3].url!=null)&&(dojo.isString(this._serviceJson[_3].url))){
var _4=this._serviceJson[_3].url.replace("http://","");
var _4=_4.replace("https://","");
if(dojo.indexOf(this._list,_4)==-1){
this._list.push(_4);
}
}
if((this._serviceJson[_3].secureUrl!=null)&&(dojo.isString(this._serviceJson[_3].secureUrl))){
var _4=this._serviceJson[_3].secureUrl.replace("http://","");
var _4=_4.replace("https://","");
if(dojo.indexOf(this._list,_4)==-1){
this._list.push(_4);
}
}
}
}
catch(e){
console.log("Error while creating the whitelisted urls");
console.log(e);
this._list=[];
}
}
},isWhiteListedURL:function(_5){
var _6=false;
if(typeof (_5)=="undefined"){
return false;
}
if((_5.indexOf("http://")!=0)&&(_5.indexOf("https://")!=0)&&((this._proxyUrl==null)||(this._proxyUrl!=null&&_5.indexOf(this._proxyUrl)==-1))){
_6=true;
}else{
if((this._proxyUrl!=null)&&(_5.indexOf(this._proxyUrl)==0)){
_5=unescape(_5);
_5=_5.replace(this._proxyUrl,"");
}
_6=!dojo.every(this._list,function(_7){
return (_5.indexOf(_7)==-1);
});
}
return _6;
}});
}


;if(!dojo._hasResource["lconn.comm.formBasedUtility"]){
dojo._hasResource["lconn.comm.formBasedUtility"]=true;






dojo.provide("lconn.comm.formBasedUtility");
dojo.declare("lconn.comm.formBasedUtility",null,{_contextRoot:null,REDIRECT_PATH:"/service/html/login",COOKIE_NAME:"CommunitiesReqURL",constructor:function(_1){
if(!lconn.comm.formBasedUtility.prototype._init){
lconn.comm.formBasedUtility.prototype._init=true;
this._contextRoot=_1;
this._overrideXhrCalls();
}else{
throw new Error("lconn.comm.formBasedUtility is a singleton. It cannot be instantiated twice");
}
},_overrideXhrCalls:function(){
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility: overrideXhrCalls");
}
var _2=com.ibm.ajax.auth;
var _3=this._contextRoot+this.REDIRECT_PATH;
var _4=this;
var _5={url:_3,authenticationRequired:function(_6,_7,_8){
var _9=window.location.href.replace(/,/g,"%2C");
document.cookie=_4.COOKIE_NAME+"="+_9+"; path="+_4._contextRoot;
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility:handler: Hit authenticationRequired");
}
location.href=this.url;
},onSuccess:function(_a,_b){
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility.handler: Successfully loaded");
}
}};
var _c=dojo.hitch(com.ibm.ajax.auth,com.ibm.ajax.auth.isAuthenticationRequired);
var _d=function(_e,_f,_10){
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility: checking for common proxy /proxy/commonProxy/");
}
if(_10&&_10.url&&_10.url.indexOf("/proxy/commonProxy/")!=-1){
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility: Request from common proxy, skipping authentication check.");
}
return false;
}else{
return _c(_f,_10);
}
};
com.ibm.ajax.auth.setAuthenticationTest(_d);
var _11=function(_12,_13){
if(_12&&_12.dojoType=="cancel"){
return false;
}
try{
if(_13&&_13.xhr){
var h=_13.xhr.getResponseHeader("X-LConn-Auth");
if(h=="true"){
if(window.debugComm!=null&&window.console!=null){
console.log("lconn.comm.formBasedUtility: X-LConn-Auth is true; no login redirect needed.");
}
return false;
}
}
}
catch(ignore){
}
if(typeof _13.xhr.status=="unknown"){
return true;
}
var _14=_13.xhr.status;
if(_14==302||(dojo.isIE&&(_14==12150||_14==0))){
return true;
}
return false;
};
var _15=_11;
if(typeof (CUSTOM_AUTH_JS_CLASS)!=="undefined"){
_2.setAuthenticationHandler(dojo.hitch(_5,_5.authenticationRequired));
}else{
_2.setAuthenticationHandler(dojo.hitch(_5,_5.authenticationRequired));
}
var _16=new lconn.core.auth.whiteListHelper(lconn_comm_global_services,lconn_comm_global_proxyUrl);
var _17=function(url){
return _16.isWhiteListedURL(url);
};
_2.interceptDojoXhr(_17);
originaldojoxhr=dojo.xhr;
dojo.xhr=function(){
var _18=arguments[1];
var p=null;
if(typeof _18.auth!="undefined"){
p=_18.auth;
}
if(window.debugComm!=null){
if(window.console!=null){
console.log("lconn.comm.formBasedUtility.js: begin");
if(p!=null){
console.log("lconn.comm.formBasedUtility.js found \"auth\" object");
if(typeof p.secured!="undefined"&&p.secured!=null&&typeof p.isAuthRequired!="undefined"&&p.isAuthRequired!=null){
console.log("lconn.comm.formBasedUtility.js uses default originaldojoxhr, because of embedded \"auth\" object");
}else{
console.log("lconn.comm.formBasedUtility.js - bad \"auth\" object");
}
}
console.log("lconn.comm.formBasedUtility.js: end");
}
}
if(p!=null&&typeof p.secured!="undefined"&&p.secured!=null&&typeof p.isAuthRequired!="undefined"&&p.isAuthRequired!=null){
return originaldojoxhr(arguments[0],arguments[1],arguments[2]);
}
if(_16.isWhiteListedURL(_18.url)){
if(typeof _18.handleAs=="undefined"){
_18.handleAs="text";
}
try{
_18[1]=_2.prepareSecure(_18,_15);
}
catch(e){
console.log("exception in overriden dojo.xhr (form-based auth");
console.log(e);
}
}
return originaldojoxhr(arguments[0],arguments[1],arguments[2]);
};
}});
lconn.comm.formBasedUtility.prototype._init=false;
}


;if(!dojo._hasResource["lconn.communities.catalog.catalog"]){
dojo._hasResource["lconn.communities.catalog.catalog"]=true;
dojo.provide("lconn.communities.catalog.catalog");


















































}


window['_js_modules']=(window['_js_modules']||[]).concat(["lconn.communities.catalog.catalog"]);
