if(!dojo.hostenv.findModule("xg.shared.googleAnalytics",false)){ dojo.provide("xg.shared.googleAnalytics"); xg.shared.googleAnalytics=(function(){ var _={}; var _2={}; _2.trackPageview=function(_3){ if(typeof ning_gaq!="undefined"&&ning_gaq){ ning_gaq.push(["_ning_ga._trackPageview",_3]); } }; return _2; })(); } if(!dojo.hostenv.findModule("xg.shared.CookieStore",false)){ dojo.provide("xg.shared.CookieStore"); xg.shared.CookieStore=(function(){ var _1={}; var _={}; var _3="xg_sc"; var _4="xg_pc"; var _5=366; var _6={}; var _7={}; _.initialize=function(){ _1.reloadSessionCookie(); _1.reloadPersistentCookie(); }; _1.reloadSessionCookie=function(){ var _8=xg.shared.util.getCookie(_3); if(_8){ try{ _6=x$.evalJSON(_8); } catch(e){ try{ _6=x$.evalJSON(decodeURIComponent(_8.replace(/\+/g," "))); } catch(e){ } } } if(_6 instanceof Array){ _6={}; } }; _1.reloadPersistentCookie=function(){ var _9=xg.shared.util.getCookie(_4); if(_9){ try{ _7=x$.evalJSON(_9); } catch(e){ try{ _7=x$.evalJSON(decodeURIComponent(_9.replace(/\+/g," "))); } catch(e){ } } } if(_7 instanceof Array){ _7={}; } }; _1.setSessionCookieValue=function(_a,_b){ if(_b===null||_b.length===0){ delete _6[_a]; }else{ _6[_a]=_b; } _.setCookieProper(_3,x$.toJSON(_6),0); }; _1.getSessionCookieValue=function(_c){ return _6[_c]; }; _1.setPersistentCookieValue=function(_d,_e){ if(_e===null||_e.length===0){ delete _7[_d]; }else{ _7[_d]=_e; } _.setCookieProper(_4,x$.toJSON(_7),_5); }; _1.getPersistentCookieValue=function(_f){ return _7[_f]; }; _.setCookieProper=function(_10,_11,_12){ xg.shared.util.setCookie(_10,_11,_12,"."+window.location.hostname); }; xg.addOnRequire(function(){ _.initialize(); }); return _1; })(); } if(!dojo.hostenv.findModule("xg.shared.EngagementUtil",false)){ dojo.provide("xg.shared.EngagementUtil"); xg.shared.EngagementUtil={addEngagementContextToParams:function(_1,_2){ var _3=x$(_2).attr("data-page-type"); if(_3){ _1["pageType"]=_3; if(_3=="main"||_3=="profile"||_3=="group"){ var _4=xg.shared.util.getModule(_2); var _5=_4?xg.shared.util.extractModuleName(_4):""; if(_5){ _1["moduleName"]=_5; } } } return _1; }}; } if(!dojo.hostenv.findModule("xg.index.like.likeLink",false)){ dojo.provide("xg.index.like.likeLink"); xg.index.like.likeLink=function(_1){ var _2={}; var _={}; var _4="like"; var _5=false; _.initialize=function(){ _1.on("click",".like-link",_.clickLink); _.processPendingLike(); }; _.processPendingLike=function(){ var _6=xg.shared.CookieStore.getSessionCookieValue(_4); xg.shared.CookieStore.setSessionCookieValue(_4,null); if(!ning.CurrentProfile||!_6){ return; } x$(".like-link").each(function(){ $likeLink=x$(this); if($likeLink.data("contentId")===_6){ _.postLike($likeLink,true); } }); }; _.clickLink=function(_7){ _7.preventDefault(); $likeLink=x$(this); if(!ning.CurrentProfile){ xg.shared.CookieStore.setSessionCookieValue(_4,$likeLink.data("contentId")); window.location.href=$likeLink.data("signUpUrl"); return; } _.postLike($likeLink,!$likeLink.hasClass("liked")); }; _.postLike=function(_8,_9){ if(_5){ return; } _5=true; var _a=xg.shared.EngagementUtil.addEngagementContextToParams({contentId:_8.data("contentId")},_8); _a["logLike"]=_8.data("logLike"); var _b=_8.data("likeUrl"); var _c=_8.data("unlikeUrl"); xg.post(_9?_b:_c,_a,function(_d,_e){ _5=false; _.ajaxCallback(_e,_8); }); var _f=_9?"/like/ning/create/":"/like/ning/delete/"; xg.shared.googleAnalytics.trackPageview(_f+_8.data("contentType")+"/"+_8.data("contentId")); }; _.ajaxCallback=function(_10,_11){ if(_10.success){ _11.find(".value").html(""+_10.likeCount); _11.find(".details").html(""+_10.likeDescriptor); _11.toggleClass("liked"); _11.find(".change").html(_11.hasClass("liked")?"-1":"+1"); _11.removeClass("hover"); } }; _.initialize(); return _2; }; } if(!dojo.hostenv.findModule("xg.index.like.desktopLike",false)){ dojo.provide("xg.index.like.desktopLike"); xg.index.like.desktopLike=(function(){ var _={}; _.initialize=function(){ xg.index.like.likeLink(x$(".xg_module")); x$(".xg_module").on("hover",".like-link",_.onHover); }; _.onHover=function(_2){ $likeLink=x$(this); if(_2.type==="mouseenter"&&!$likeLink.data("changeSpanPositionFixed")){ var _3=$likeLink.find(".change"); var _4=_3.parent(); _3.remove().appendTo(_4); $likeLink.data("changeSpanPositionFixed",true); } $likeLink.toggleClass("hover"); }; xg.addOnRequire(function(){ _.initialize(); }); })(); } if(!dojo.hostenv.findModule("xg.index.util.ScrollIntoView",false)){ dojo.provide("xg.index.util.ScrollIntoView"); xg.index.util.ScrollIntoView={scrollIntoView:function(_1){ var _2=x$(_1); var _3=_2.css("padding-top"); var _4=_2.css("padding-bottom"); var _5=_3&&_3.indexOf("px")>-1?parseInt(_3,10):0; var _6=_4&&_4.indexOf("px")>-1?parseInt(_4,10):0; var _7={top:_2.offset().top+_5,bottom:_2.offset().top+_2.height()+_6}; var _8={top:x$(window).scrollTop(),bottom:x$(window).scrollTop()+x$(window).height()}; var _9; if(_7.top<_8.top){ _9=_7.top; }else{ if(_7.bottom>_8.bottom){ _9=Math.min(_7.top,_8.top+(_7.bottom-_8.bottom)); } } if(_9){ x$("html,body").animate({scrollTop:_9},100); } }}; } if(!dojo.hostenv.findModule("xg.shared.EventRegistry",false)){ dojo.provide("xg.shared.EventRegistry"); xg.shared.EventRegistry=(function(){ var _={}; var _2={}; _.eventListeners={}; _2.fire=function(_3,_4){ var _5=_.eventListeners[_3]; if(!_5){ return; } var _6=[]; x$.each(_5,function(_7,_8){ _6.push(_8(_4)); }); return _6; }; _2.listen=function(_9,_a){ if(!_.eventListeners[_9]){ _.eventListeners[_9]=[]; } _.eventListeners[_9].push(_a); }; _2.listenMultiple=function(_b){ x$.each(_b,function(_c,_d){ _2.listen(_c,_d); }); }; _2.unlisten=function(_e,_f){ var _10=_.eventListeners[_e]; if(!_10){ return; } _.eventListeners[_e]=x$.grep(_10,function(_11,_12){ return _11!==_f; }); }; _2.listenOnce=function(_13,_14){ if(_.eventListeners[_13]){ for(var i=0;i<_.eventListeners[_13].length;i++){ if(_.eventListeners[_13][i]+""===_14+""){ return; } } } _2.listen(_13,_14); }; return _2; })(); } if(!dojo.hostenv.findModule("xg.shared.EditUtil",false)){ dojo.provide("xg.shared.EditUtil"); xg.shared.EditUtil={showModuleForm:function(_1,_2,_3){ _1.style.height="0px"; dojo.html.show(_1); dojo.lfx.html.wipeIn(_1,200).play(); },hideModuleForm:function(_4,_5,_6,_7){ dojo.html.removeClass(_6,"close"); dojo.lfx.html.wipeOut(_4,200,null,function(){ dojo.html.hide(_4); if(_7){ _7(); } }).play(); }}; } if(!dojo.hostenv.findModule("xg.shared.Facebook",false)){ dojo.provide("xg.shared.Facebook"); xg.shared.Facebook=(function(){ var _1={}; var _={}; _1._=_; _.initCalled=false; _.initFinished=false; _.onConnectedListeners=[]; _.onNotConnectedListeners=[]; _.callIfDefined=function(_3){ if(_3){ _3(); } }; _1.parseXfbml=function(_4){ xg.addOnFacebookLoad(function(){ FB.XFBML.parse(_4); }); }; _1.requirePublishStreamPermission=function(_5,_6,_7,_8){ xg.addOnFacebookLoad(function(){ _1.requireSession(function(){ if(_7){ _.isUserPageAdmin(_7,function(){ _.requirePublishStreamPermissionProper(_5,_6,_7); },function(){ _.disconnectUserFromPage(); _.callIfDefined(_8); _.requirePublishStreamPermissionProper(_5,_6); },function(){ _.callIfDefined(_6); }); }else{ _.requirePublishStreamPermissionProper(_5,_6); } },function(){ _.callIfDefined(_6); }); }); }; _1.requireManagePagesPermission=function(_9,_a){ xg.addOnFacebookLoad(function(){ _1.requireSession(function(){ _.requireManagePagesPermissionProper(_9,_a); },function(){ _.callIfDefined(_a); }); }); }; _.requireManagePagesPermissionProper=function(_b,_c){ _.userHasManagePagesPermission(function(_d){ if(_d){ _.callIfDefined(_b); return; }else{ _.showPermissionDialog("publish_actions,manage_pages,publish_pages",function(_e){ if(_e.authResponse){ _.callIfDefined(_b); }else{ _.callIfDefined(_c); } }); } }); }; _1.getLoginStatus=function(_f){ FB.getLoginStatus(_f); }; _1.requireSession=function(_10,_11){ _11=_11||function(){ }; FB.getLoginStatus(function(_12){ if(_12.authResponse){ _10(); }else{ FB.login(function(_13){ if(_13.authResponse){ _10(); }else{ _11(); } }); } }); }; _1.logout=function(_14){ FB.logout(_14); }; _1.getCurrentUid=function(){ return FB.getAuthResponse().userID; }; _1.getCurrentUserName=function(_15){ FB.api("/me",function(_16){ if(_16.error){ return; } _15(_16.name); }); }; _1.getPagesAdministeredByCurrentUser=function(_17){ FB.api("/me/accounts","get",{},function(_18){ if(_18.error){ _17({error_code:_18.error.code}); return; } var _19=[]; for(var i=0;i<_18.data.length;i++){ if(x$.inArray("ADMINISTER",_18.data[i].perms)>-1){ _19.push({name:_18.data[i].name,page_id:_18.data[i].id}); } } _17(_19); }); }; _1.streamPublish=function(_1b,_1c,_1d,_1e,_1f,_20){ FB.ui({method:"stream.publish",display:"iframe",user_message_prompt:_1e,message:_1b,attachment:_1c,action_links:_1d,from:_20},_1f); }; _1.publishPost=function(_21,_22){ _1.requireSession(function(){ if(_22==null){ FB.api("/me/feed","post",_21,function(){ }); return; } FB.api("/me/accounts","get",{},function(_23){ for(var i=0;i<_23.data.length;i++){ if(_22==_23.data[i].id){ _21["access_token"]=_23.data[i].access_token; break; } } FB.api("/me/feed","post",_21,function(){ }); }); }); }; _.showPermissionDialog=function(_25,_26){ xg.shared.util.alert({bodyHtml:xg.shared.nls.html("facebookWillOpen"),onOk:function(){ FB.login(_26,{scope:_25}); }}); }; _.isUserPageAdmin=function(_27,_28,_29,_2a){ _1.requireManagePagesPermission(function(){ FB.api("/me/accounts","get",{},function(_2b){ if(_2b.error){ _2a(); return; } for(var i=0;i<_2b.data.length;i++){ if(_27==_2b.data[i].id){ if(x$.inArray("ADMINISTER",_2b.data[i].perms)>-1){ _28(); }else{ _29(); } return; } } _29(); }); },_2a); }; _.disconnectUserFromPage=function(){ xg.post("/profiles/connections/update?xn_out=json",{pageId:"",pageName:"",userId:_1.getCurrentUid()},function(){ }); }; _.requirePublishStreamPermissionProper=function(_2d,_2e,_2f){ _.userHasPublishStreamPermission(function(_30){ if(_30){ _.callIfDefined(_2d); return; }else{ _.showPermissionDialog(_2f?"publish_actions,manage_pages,publish_pages":"publish_actions",function(_31){ if(_31.authResponse){ _.callIfDefined(_2d); }else{ _.callIfDefined(_2e); } }); } },_2f); }; _.userHasPublishStreamPermission=function(_32,_33){ var _34=["publish_actions"]; if(_33){ _34.push("manage_pages"); _34.push("publish_pages"); } _.userHasPermissions(_34,_32); }; _.userHasManagePagesPermission=function(_35){ _.userHasPermissions(["manage_pages","publish_pages"],_35); }; _.userHasPermissions=function(_36,_37){ FB.api("/me/permissions",function(_38){ for(var i=0;i<_36.length;i++){ var _3a=false; for(var j=0;j<_38.data.length;j++){ if(_36[i]==_38.data[j].permission&&_38.data[j].status=="granted"){ _3a=true; break; } } if(!_3a){ _37(false); return; } } _37(true); }); }; return _1; })(); } if(!dojo.hostenv.findModule("xg.profiles.embed.status",false)){ dojo.provide("xg.profiles.embed.status"); xg.profiles.embed.status={statusDiv:null,currentStatusSpan:null,currentUpdatedSpan:null,form:null,submitButton:null,clearStatusLink:null,statusInput:null,hintContainer:null,ownedByUser:false,activityModule:null,columnForAF:null,textEntered:false,defaultHeight:18,pageId:null,setStatusCount:1,clearStatusCount:1,requirePermissionsIsProcessing:false,facebookPermissionsGranted:false,pendingFacebookStatus:null,initialize:function(){ this.statusDiv=x$("div.xj_status"); if(this.statusDiv.length>0){ this.form=x$("form",this.statusDiv[0]); if(this.form.attr("_twitterAuthenticationNeeded")){ x$("input[name=postToTwitter]",this.form).click(function(){ if(x$(this).is(":checked")){ xg.profiles.embed.status.showTwitterAuthenticationDialog(); } }); } var _1=this; if(this.form.attr("_facebookEnabled")){ xg.profiles.embed.status.pageId=this.form.attr("_pageId"); onClickFacebookCheckbox=function(_2){ if(!_1.requirePermissionsIsProcessing&&x$("input[name=postToFacebook]",_1.form).prop("checked")){ _1.requirePermissionsIsProcessing=true; xg.addOnFacebookLoad(function(){ xg.shared.Facebook.requirePublishStreamPermission(function(){ _1.facebookPermissionsGranted=true; _1.requirePermissionsIsProcessing=false; if(_1.pendingFacebookStatus){ _1.updateFacebookStatus(_1.pendingFacebookStatus); _1.pendingFacebookStatus=null; } },function(){ if(x$("input[name=postToFacebook]",_1.form).prop("checked")){ x$("input[name=postToFacebook]",_1.form).prop("checked",false); } _1.facebookPermissionsGranted=false; _1.requirePermissionsIsProcessing=false; _1.pendingFacebookStatus=null; _1.updateFacebookStatus(""); },xg.profiles.embed.status.pageId); }); }else{ _1.facebookPermissionsGranted=false; } }; x$("input[name=postToFacebook]",this.form).click(onClickFacebookCheckbox); if(x$("input[name=postToFacebook]",_1.form).prop("checked")){ onClickFacebookCheckbox(); } } this.submitButton=x$("button.xj_submit",this.statusDiv[0]); this.clearStatusLink=x$("a.xj_clear_status",this.statusDiv[0]); this.statusInput=x$("textarea.xj_status_input",this.statusDiv[0]); this.hintContainer=x$("div.xj_hint_container",this.statusDiv[0]); this.inputContainer=x$("div.xj_input_container",this.statusDiv[0]); this.defaultHeight=this.statusInput.height(); if(this.submitButton.length>0){ this.ownedByUser=true; this.setStatusCount=0; this.clearStatusCount=0; } var _3=x$("span.xj_remaining_count",this.statusDiv[0]); xg.shared.util.setMaxLengthWithCount(this.statusInput[0],_3[0],_3.attr("_maxLength"),{onNonNegative:dojo.lang.hitch(this,this.clearStatusInputErrors),showCharsLabel:false,neverHideCount:true}); this.statusInput.bind("keyup",dojo.lang.hitch(this,function(_4){ var _5=this.statusInput.val(); if(_5.length>0){ this.clearStatusInputErrors(); this.textEntered=true; }else{ this.textEntered=false; } })); var _6=this; this.statusInput.blur(function(e){ var _8=x$(this).val(); if(_8.length==0){ x$(this).height(_6.defaultHeight); } }); this.activityModule=x$("div[data-module_name='activity']").filter(":first"); if(this.ownedByUser&&(this.activityModule.length>0)){ this.columnForAF=this.activityModule.attr("_columnCount"); } xg.shared.util.addHints(x$(".xj_hint",this.statusDiv[0]),true); this.statusInput.autoResize({extraSpace:10}); this.form.bind("submit",dojo.lang.hitch(this,this.onSubmit)); this.submitButton.bind("click",dojo.lang.hitch(this,this.onSubmit)); this.clearStatusLink.bind("click",dojo.lang.hitch(this,this.onClearStatus)); } x$(".xj_status textarea").focus(function(){ x$(".xj_remaining_count",this.hintContainer).removeAttr("_noUpdate"); x$(".xj_status").addClass("xg_active"); }); x$(".xj_status textarea").blur(function(){ x$(".xj_status").removeClass("xg_active"); }); x$(".xj_status textarea").removeAttr("style"); },onSubmit:function(_9){ _9.preventDefault(); var _a=this; x$(this.submitButton).add(this.statusInput).prop("disabled",true).css("opacity",".4"); var _b=x$.trim(this.statusInput.val()); if((_b===this.statusInput.attr("_hint"))&&!this.textEntered){ _b=""; } if(_b.length==0){ this.setInputError(xg.profiles.nls.html("statusCannotBeEmpty")); return; } this.setStatus(_b); },onClearStatus:function(_c){ _c.preventDefault(); this.setStatus(""); },updateFacebookStatus:function(_d){ var _e={postStatus:_d}; xg.post("/profiles/profile/setPostFacebookStatusPreference",_e); if(_d.length>0){ xg.shared.Facebook.publishPost({message:_d},xg.profiles.embed.status.pageId); } },setStatus:function(_f){ var _10=x$("[_maxLength]:first",this.hintContainer).attr("_maxLength"); var url=this.form.attr("_ajaxAction"); if(this.columnForAF){ url=xg.shared.util.addParameter(url,"columnForAF",this.columnForAF); } var _12={xg_token:xg.token,status:_f,source:"status"}; var _13=x$(this.form).closest(".xg_module_activity"); if(_13){ _12["parentAfOwner"]=_13.data("ownerName"); } var _12=xg.shared.EngagementUtil.addEngagementContextToParams(_12,this.form); if(_f.length>parseInt(_10)){ this.setInputError(xg.profiles.nls.html("statusTooLong",_10)); return; } xg.post(url,_12,dojo.lang.hitch(this,function(xhr,_15){ var _16=this; var _17=function(){ _16.updateStatusInterface(xhr,_15,function(){ if(_16.form.attr("_facebookEnabled")){ if(_16.facebookPermissionsGranted){ _16.updateFacebookStatus(_f); }else{ if(x$("input[name=postToFacebook]",_16.form).is(":checked")){ _16.pendingFacebookStatus=_f; }else{ _16.updateFacebookStatus(""); } } } if(_16.form.attr("_twitterEnabledForUser")){ if(x$("input[name=postToTwitter]",_16.form).is(":checked")){ if(_16.form.attr("_twitterAuthenticationNeeded")){ _16.showTwitterAuthenticationDialog(); return; } _12["tweetStatus"]=1; }else{ delete _12["status"]; _12["tweetStatus"]=0; } xg.post("/profiles/profile/setTwitterStatus?xn_out=json",_12,function(xhr,_19){ if(_19.warning){ this.setInputError(_16.statusDiv,_19.warning); _16.hintContainer.find("span:last-child").addClass("twitter-warning"); } }); } }); }; x$(_16.statusInput).fadeTo("fast",0,_17); })); },showTwitterAuthenticationDialog:function(){ xg.shared.util.confirm({title:xg.profiles.nls.html("connectToTwitter"),bodyText:xg.profiles.nls.html("toPostStatus",xg.qh(ning.CurrentApp.name)),okButtonText:xg.profiles.nls.html("connect"),onOk:function(){ window.location="/profiles/connections/authenticateWithTwitter?callback=p"; },onCancel:dojo.lang.hitch(this,function(){ x$("input[name=postToTwitter]",this.form).prop("checked",false); })}); },updateStatusInterface:function(_1a,_1b,_1c){ if(!_1c){ _1c=function(){ }; } if(_1b.success){ var _1d=_1b.status; if(_1d.length>0){ this.clearStatusInputErrors(); this.resetCurrentStatusInput(); _1c(); if(this.setStatusCount==0){ if(window.xn&&xn.track&&xn.track.pageView){ xn.track.pageView(4556,"set-status",String(_1d.length)); } } this.setStatusCount++; if(this.activityModule&&x$(".module-feed",this.activityModule).length>0&&_1b.newAFHtml){ xg.activity.embed.ActivityFeedUpdater.addItemsToFeed(this.activityModule.attr("id"),_1b.newAFHtml,function(){ xg.profiles.embed.status.enable(); }); } }else{ this.hideCurrentStatus(); if(this.clearStatusCount==0){ if(window.xn&&xn.track&&xn.track.pageView){ xn.track.pageView(4556,"clear-status"); } } this.clearStatusCount++; } this.statusInput.blur(); }else{ if(_1b&&"errorMessage" in _1b){ this.setInputError(_1b.errorMessage); }else{ this.setInputError(xg.profiles.nls.html("errorUpdatingStatus")); } } },hideCurrentStatus:function(){ if(this.ownedByUser){ this.resetCurrentStatusInput(); }else{ this.statusDiv.hide("fast"); } },resetCurrentStatusInput:function(){ var _1e=x$(".xj_remaining_count",this.hintContainer); _1e.attr("_noUpdate","true"); this.statusInput.val(this.statusInput.attr("_hint")); x$(this.statusInput).change(); this.textEntered=false; this.clearStatusInputErrors(); _1e.html(_1e.attr("_maxLength")).removeClass("length-exceeded"); },clearStatusInputErrors:function(){ this.inputContainer.removeClass("error"); this.statusDiv.removeClass("form-error"); this.hintContainer.removeClass("form-error"); var _1f=this.hintContainer.find("span:last-child"); _1f.removeClass("form-validation-msg").text(_1f.attr("_hint")); _1f.removeClass("twitter-warning"); },setInputError:function(_20){ this.inputContainer.addClass("error"); xg.profiles.embed.publisher.setInputError(this.statusDiv,_20); this.enable(); },enable:function(){ x$(this.submitButton).add(this.statusInput).prop("disabled",false).css("opacity","1"); }}; } if(!dojo.hostenv.findModule("xg.shared.DateFormatter",false)){ dojo.provide("xg.shared.DateFormatter"); xg.shared.DateFormatter=(function(){ var _1={}; var _={}; _1.elapsedTime=function(_3,_4){ _4=typeof _4==="undefined"?true:_4; var _5=new Date(); var _6=0; var _7=0; if(_3){ _7=Date.parse(_3); _6=_5.getTime()-_7; _6=Math.floor(_6/1000); } if(_6<=0){ return xg.shared.nls.text("justNow"); } if(_6<60){ return xg.shared.nls.text("nSecondsAgo",_6); } if(_6<3600){ var _8=Math.floor(_6/60); return xg.shared.nls.text("nMinutesAgo",_8); } if(_6<86400){ var _9=Math.floor(_6/60/60); var _8=Math.floor((_6-60*60*_9)/60); return xg.shared.nls.text("nHoursAgo",_9); } if(_6<3600*48){ return xg.shared.nls.text("yesterday"); } var _a=new Date(_7); if(_6<6*24*60*60){ var _b=_a.getUTCDay(); return _4?xg.shared.nls.text("onDay"+_b):xg.events.nls.text(_c[_b]); } if(_5.getUTCFullYear()===_a.getUTCFullYear()){ return _1.monthDay(_a.getUTCMonth(),_a.getUTCDate()); } return _1.monthDayYear(_a.getUTCMonth(),_a.getUTCDate(),_a.getUTCFullYear()); }; var _c=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]; _1.monthDay=function(_d,_e){ return xg.shared.nls.text("month"+_d+"Day",_e); }; _1.monthDayYear=function(_f,_10,_11){ return xg.shared.nls.text("month"+_f+"DayYear",_10,_11); }; return _1; })(); } if(!dojo.hostenv.findModule("xg.shared.timeUpdater",false)){ dojo.provide("xg.shared.timeUpdater"); xg.addOnRequire(function(){ var _={}; _.initialize=function(){ xg.shared.EventRegistry.listenOnce("activity-feed-updated",_.updateTimes); window.setInterval(_.updateTimes,60000); }; _.updateTimes=function(){ var _2; x$(".event-info-timestamp").each(function(){ if(x$(this).data("time")){ _2=xg.shared.DateFormatter.elapsedTime(x$(this).data("time"),false); x$(this).html(xg.qh(_2)); } }); }; _.initialize(); }); } if(!dojo.hostenv.findModule("xg.activity.embed.ActivityModule",false)){ dojo.provide("xg.activity.embed.ActivityModule"); dojo.widget.defineWidget("xg.activity.embed.ActivityModule",dojo.widget.HtmlWidget,{_setValuesUrl:"",_displaySet:"",_displayOptionsJson:"",_activityNum:"",_excerptLengthOptionsJson:"",_excerptLengthSet:"",_numOptionsJson:"",_settingsUrl:"",_privacySettingsUrl:"",_isProfile:"",_isAdmin:"",_activityOptionsAvailable:"",isContainer:true,fillInTemplate:function(_1,_2){ this.module=this.getFragNodeRef(_2); this.h2=this.module.getElementsByTagName("h2")[0]; if(this._setValuesUrl){ dojo.dom.insertAfter(dojo.html.createNodesFromText("
"+xg.activity.nls.html("edit")+"
")[0],this.h2); dojo.event.connect(this.module.getElementsByTagName("a")[0],"onclick",dojo.lang.hitch(this,function(_3){ dojo.event.browser.stopEvent(_3); if((!this.form)||(this.form.style.height=="0px")){ this.showForm(); }else{ this.hideForm(); } })); } },showForm:function(){ var _4=this.module.getElementsByTagName("a")[0]; var _5=""; dojo.lang.forEach(dj_eval(this._displayOptionsJson),function(_6){ _5+=""; }); var _7=""; dojo.lang.forEach(dj_eval(this._numOptionsJson),function(_8){ _7+=""; }); var _9=""; dojo.lang.forEach(dj_eval(this._excerptLengthOptionsJson),function(_a){ _9+=""; }); this.head=dojo.html.getElementsByClass("xg_module_head",this.module)[0]; if(!this.form){ var _b=""; if(this._activityOptionsAvailable&&!this._isProfile){ _b+="