
;if(!dojo._hasResource["dijit.Calendar"]){
dojo._hasResource["dijit.Calendar"]=true;
dojo.provide("dijit.Calendar");
dojo.require("dojo.cldr.supplemental");
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.declare("dijit.Calendar",[dijit._Widget,dijit._Templated],{templateString:dojo.cache("dijit","templates/Calendar.html","<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" dojoAttachEvent=\"onkeypress: _onKeyPress\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div class=\"dijitVisible\">\n\t\t\t\t\t<div class=\"dijitPopup dijitMenu dijitMenuPassive dijitHidden\" dojoAttachPoint=\"monthDropDown\" dojoAttachEvent=\"onmouseup: _onMonthSelect, onmouseover: _onMenuHover, onmouseout: _onMenuHover\">\n\t\t\t\t\t\t<div class=\"dijitCalendarMonthLabelTemplate dijitCalendarMonthLabel\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelSpacer\" class=\"dijitSpacer\"></div>\n\t\t\t\t<div dojoAttachPoint=\"monthLabelNode\" class=\"dijitCalendarMonthLabel dijitInline dijitVisible\" dojoAttachEvent=\"onmousedown: _onMonthToggle\"></div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' dojoAttachPoint=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" waiRole=\"presentation\">\n\t\t\t\t<span dojoAttachPoint=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\"></span></th>\n\t\t</tr>\n\t</thead>\n\t<tbody dojoAttachEvent=\"onclick: _onDayClick, onmouseover: _onDayMouseOver, onmouseout: _onDayMouseOut\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">\n\t\t\t<td class=\"dijitReset dijitCalendarDateTemplate\" role=\"gridcell\"><span class=\"dijitCalendarDateLabel\"></span></td>\n\t\t</tr>\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\">\n\t\t\t\t<h3 class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\"></span>\n\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\"></span>\n\t\t\t\t</h3>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"),value:new Date(),datePackage:"dojo.date",dayWidth:"narrow",tabIndex:"0",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{tabIndex:"domNode"}),setValue:function(_1){
dojo.deprecated("dijit.Calendar:setValue() is deprecated.  Use attr('value', ...) instead.","","2.0");
this.attr("value",_1);
},_getValueAttr:function(){
var _2=new this.dateClassObj(this.value);
_2.setHours(0,0,0,0);
if(_2.getDate()<this.value.getDate()){
_2=this.dateFuncObj.add(_2,"hour",1);
}
return _2;
},_setValueAttr:function(_3){
if(!this.value||this.dateFuncObj.compare(_3,this.value)){
_3=new this.dateClassObj(_3);
_3.setHours(1);
this.displayMonth=new this.dateClassObj(_3);
if(!this.isDisabledDate(_3,this.lang)){
this.value=_3;
this.onChange(this.attr("value"));
}
dojo.attr(this.domNode,"aria-label",this.dateLocaleModule.format(_3,{selector:"date",formatLength:"full"}));
this._populateGrid();
}
},_setText:function(_4,_5){
while(_4.firstChild){
_4.removeChild(_4.firstChild);
}
_4.appendChild(dojo.doc.createTextNode(_5));
},_populateGrid:function(){
var _6=this.displayMonth;
_6.setDate(1);
var _7=_6.getDay(),_8=this.dateFuncObj.getDaysInMonth(_6),_9=this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(_6,"month",-1)),_a=new this.dateClassObj(),_b=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
if(_b>_7){
_b-=7;
}
dojo.query(".dijitCalendarDateTemplate",this.domNode).forEach(function(_c,i){
i+=_b;
var _d=new this.dateClassObj(_6),_e,_f="dijitCalendar",adj=0;
if(i<_7){
_e=_9-_7+i+1;
adj=-1;
_f+="Previous";
}else{
if(i>=(_7+_8)){
_e=i-_7-_8+1;
adj=1;
_f+="Next";
}else{
_e=i-_7+1;
_f+="Current";
}
}
if(adj){
_d=this.dateFuncObj.add(_d,"month",adj);
}
_d.setDate(_e);
if(!this.dateFuncObj.compare(_d,_a,"date")){
_f="dijitCalendarCurrentDate "+_f;
}
if(this._isSelectedDate(_d,this.lang)){
_f="dijitCalendarSelectedDate "+_f;
}
if(this.isDisabledDate(_d,this.lang)){
_f="dijitCalendarDisabledDate "+_f;
}
var _10=this.getClassForDate(_d,this.lang);
if(_10){
_f=_10+" "+_f;
}
_c.className=_f+"Month dijitCalendarDateTemplate";
_c.dijitDateValue=_d.valueOf();
var _11=dojo.query(".dijitCalendarDateLabel",_c)[0],_12=_d.getDateLocalized?_d.getDateLocalized(this.lang):_d.getDate();
this._setText(_11,_12);
},this);
var _13=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);
this._setText(this.monthLabelNode,_13[_6.getMonth()]);
var y=_6.getFullYear()-1;
var d=new this.dateClassObj();
dojo.forEach(["previous","current","next"],function(_14){
d.setFullYear(y++);
this._setText(this[_14+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));
},this);
var _15=this;
var _16=function(_17,_18,adj){
_15._connects.push(dijit.typematic.addMouseListener(_15[_17],_15,function(_19){
if(_19>=0){
_15._adjustDisplay(_18,adj);
}
},0.8,500));
};
_16("incrementMonth","month",1);
_16("decrementMonth","month",-1);
_16("nextYearLabelNode","year",1);
_16("previousYearLabelNode","year",-1);
},goToToday:function(){
this.attr("value",new this.dateClassObj());
},constructor:function(_1a){
var _1b=(_1a.datePackage&&(_1a.datePackage!="dojo.date"))?_1a.datePackage+".Date":"Date";
this.dateClassObj=dojo.getObject(_1b,false);
this.datePackage=_1a.datePackage||this.datePackage;
this.dateFuncObj=dojo.getObject(this.datePackage,false);
this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);
},postMixInProperties:function(){
if(isNaN(this.value)){
delete this.value;
}
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
dojo.setSelectable(this.domNode,false);
var _1c=dojo.hitch(this,function(_1d,n){
var _1e=dojo.query(_1d,this.domNode)[0];
for(var i=0;i<n;i++){
_1e.parentNode.appendChild(_1e.cloneNode(true));
}
});
_1c(".dijitCalendarDayLabelTemplate",6);
_1c(".dijitCalendarDateTemplate",6);
_1c(".dijitCalendarWeekTemplate",5);
var _1f=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang);
var _20=dojo.cldr.supplemental.getFirstDayOfWeek(this.lang);
dojo.query(".dijitCalendarDayLabel",this.domNode).forEach(function(_21,i){
this._setText(_21,_1f[(i+_20)%7]);
},this);
var _22=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang);
_1c(".dijitCalendarMonthLabelTemplate",_22.length-1);
dojo.query(".dijitCalendarMonthLabelTemplate",this.domNode).forEach(function(_23,i){
dojo.attr(_23,"month",i);
this._setText(_23,_22[i]);
dojo.place(_23.cloneNode(true),this.monthLabelSpacer);
},this);
var _24=this.value;
this.value=null;
this.attr("value",new this.dateClassObj(_24));
},_onMenuHover:function(e){
dojo.stopEvent(e);
dojo.toggleClass(e.target,"dijitMenuItemHover");
},_adjustDisplay:function(_25,_26){
this.displayMonth=this.dateFuncObj.add(this.displayMonth,_25,_26);
this._populateGrid();
},_onMonthToggle:function(evt){
dojo.stopEvent(evt);
if(evt.type=="mousedown"){
var _27=dojo.position(this.monthLabelNode);
var dim={width:_27.w+"px",top:-this.displayMonth.getMonth()*_27.h+"px"};
if((dojo.isIE&&dojo.isQuirks)||dojo.isIE<7){
dim.left=-_27.w/2+"px";
}
dojo.style(this.monthDropDown,dim);
this._popupHandler=this.connect(document,"onmouseup","_onMonthToggle");
}else{
this.disconnect(this._popupHandler);
delete this._popupHandler;
}
dojo.toggleClass(this.monthDropDown,"dijitHidden");
dojo.toggleClass(this.monthLabelNode,"dijitVisible");
},_onMonthSelect:function(evt){
this._onMonthToggle(evt);
this.displayMonth.setMonth(dojo.attr(evt.target,"month"));
this._populateGrid();
},_onDayClick:function(evt){
dojo.stopEvent(evt);
for(var _28=evt.target;_28&&!_28.dijitDateValue;_28=_28.parentNode){
}
if(_28&&!dojo.hasClass(_28,"dijitCalendarDisabledDate")){
this.attr("value",_28.dijitDateValue);
this.onValueSelected(this.attr("value"));
}
},_onDayMouseOver:function(evt){
var _29=evt.target;
if(_29&&(_29.dijitDateValue||_29==this.previousYearLabelNode||_29==this.nextYearLabelNode)){
dojo.addClass(_29,"dijitCalendarHoveredDate");
this._currentNode=_29;
}
},_onDayMouseOut:function(evt){
if(!this._currentNode){
return;
}
for(var _2a=evt.relatedTarget;_2a;){
if(_2a==this._currentNode){
return;
}
try{
_2a=_2a.parentNode;
}
catch(x){
_2a=null;
}
}
dojo.removeClass(this._currentNode,"dijitCalendarHoveredDate");
this._currentNode=null;
},_onKeyPress:function(evt){
var dk=dojo.keys,_2b=-1,_2c,_2d=this.value;
switch(evt.keyCode){
case dk.RIGHT_ARROW:
_2b=1;
case dk.LEFT_ARROW:
_2c="day";
if(!this.isLeftToRight()){
_2b*=-1;
}
break;
case dk.DOWN_ARROW:
_2b=1;
case dk.UP_ARROW:
_2c="week";
break;
case dk.PAGE_DOWN:
_2b=1;
case dk.PAGE_UP:
_2c=evt.ctrlKey?"year":"month";
break;
case dk.END:
_2d=this.dateFuncObj.add(_2d,"month",1);
_2c="day";
case dk.HOME:
_2d=new Date(_2d).setDate(1);
break;
case dk.ENTER:
this.onValueSelected(this.attr("value"));
break;
case dk.ESCAPE:
default:
return;
}
dojo.stopEvent(evt);
if(_2c){
_2d=this.dateFuncObj.add(_2d,_2c,_2b);
}
this.attr("value",_2d);
},onValueSelected:function(_2e){
},onChange:function(_2f){
},_isSelectedDate:function(_30,_31){
return !this.dateFuncObj.compare(_30,this.value,"date");
},isDisabledDate:function(_32,_33){
},getClassForDate:function(_34,_35){
}});
}


;if(!dojo._hasResource["dijit.form._DateTimeTextBox"]){
dojo._hasResource["dijit.form._DateTimeTextBox"]=true;
dojo.provide("dijit.form._DateTimeTextBox");
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
dojo.require("dojo.date.stamp");
dojo.require("dijit.form.ValidationTextBox");
dojo.declare("dijit.form._DateTimeTextBox",dijit.form.RangeBoundTextBox,{regExpGen:dojo.date.locale.regexp,datePackage:"dojo.date",compare:dojo.date.compare,format:function(_1,_2){
if(!_1){
return "";
}
return this.dateLocaleModule.format(_1,_2);
},parse:function(_3,_4){
return this.dateLocaleModule.parse(_3,_4)||(this._isEmpty(_3)?null:undefined);
},serialize:function(_5,_6){
if(_5.toGregorian){
_5=_5.toGregorian();
}
return dojo.date.stamp.toISOString(_5,_6);
},value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_7){
var _8=_7.datePackage?_7.datePackage+".Date":"Date";
this.dateClassObj=dojo.getObject(_8,false);
this.value=new this.dateClassObj("");
this.datePackage=_7.datePackage||this.datePackage;
this.dateLocaleModule=dojo.getObject(this.datePackage+".locale",false);
this.regExpGen=this.dateLocaleModule.regexp;
},postMixInProperties:function(){
if(!this.value||this.value.toString()==dijit.form._DateTimeTextBox.prototype.value.toString()){
this.value=null;
}
var _9=this.constraints;
_9.selector=this._selector;
_9.fullYear=true;
var _a=dojo.date.stamp.fromISOString;
if(typeof _9.min=="string"){
_9.min=_a(_9.min);
}
if(typeof _9.max=="string"){
_9.max=_a(_9.max);
}
this.inherited(arguments);
},_onFocus:function(_b){
this._open();
this.inherited(arguments);
},_setValueAttr:function(_c,_d,_e){
if(_c instanceof Date&&!(this.dateClassObj instanceof Date)){
_c=new this.dateClassObj(_c);
}
this.inherited(arguments);
if(this._picker){
if(!_c){
_c=new this.dateClassObj();
}
this._picker.attr("value",_c);
}
},_open:function(){
if(this.disabled||this.readOnly||!this.popupClass){
return;
}
var _f=this;
if(!this._picker){
var _10=dojo.getObject(this.popupClass,false);
this._picker=new _10({onValueSelected:function(_11){
if(_f._tabbingAway){
delete _f._tabbingAway;
}else{
_f.focus();
}
setTimeout(dojo.hitch(_f,"_close"),1);
dijit.form._DateTimeTextBox.superclass._setValueAttr.call(_f,_11,true);
},id:this.id+"_popup",lang:_f.lang,constraints:_f.constraints,datePackage:_f.datePackage,isDisabledDate:function(_12){
var _13=dojo.date.compare;
var _14=_f.constraints;
return _14&&(_14.min&&(_13(_14.min,_12,_f._selector)>0)||(_14.max&&_13(_14.max,_12,_f._selector)<0));
}});
this._picker.attr("value",this.attr("value")||new this.dateClassObj());
}
if(!this._opened){
dijit.popup.open({parent:this,popup:this._picker,orient:{"BL":"TL","TL":"BL"},around:this.domNode,onCancel:dojo.hitch(this,this._close),onClose:function(){
_f._opened=false;
}});
this._opened=true;
}
dojo.marginBox(this._picker.domNode,{w:this.domNode.offsetWidth});
},_close:function(){
if(this._opened){
dijit.popup.close(this._picker);
this._opened=false;
}
},_onBlur:function(){
this._close();
if(this._picker){
this._picker.destroy();
delete this._picker;
}
this.inherited(arguments);
},_getDisplayedValueAttr:function(){
return this.textbox.value;
},_setDisplayedValueAttr:function(_15,_16){
this._setValueAttr(this.parse(_15,this.constraints),_16,_15);
},destroy:function(){
if(this._picker){
this._picker.destroy();
delete this._picker;
}
this.inherited(arguments);
},postCreate:function(){
this.inherited(arguments);
this.connect(this.focusNode,"onkeypress",this._onKeyPress);
this.connect(this.focusNode,"onclick",this._open);
},_onKeyPress:function(e){
var p=this._picker,dk=dojo.keys;
if(p&&this._opened&&p.handleKey){
if(p.handleKey(e)===false){
return;
}
}
if(this._opened&&e.charOrCode==dk.ESCAPE&&!(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){
this._close();
dojo.stopEvent(e);
}else{
if(!this._opened&&e.charOrCode==dk.DOWN_ARROW){
this._open();
dojo.stopEvent(e);
}else{
if(e.charOrCode===dk.TAB){
this._tabbingAway=true;
}else{
if(this._opened&&(e.keyChar||e.charOrCode===dk.BACKSPACE||e.charOrCode==dk.DELETE)){
setTimeout(dojo.hitch(this,function(){
if(this._picker&&this._opened){
dijit.placeOnScreenAroundElement(p.domNode.parentNode,this.domNode,{"BL":"TL","TL":"BL"},p.orient?dojo.hitch(p,"orient"):null);
}
}),1);
}
}
}
}
}});
}


;if(!dojo._hasResource["dijit.form.DateTextBox"]){
dojo._hasResource["dijit.form.DateTextBox"]=true;
dojo.provide("dijit.form.DateTextBox");
dojo.require("dijit.Calendar");
dojo.require("dijit.form._DateTimeTextBox");
dojo.declare("dijit.form.DateTextBox",dijit.form._DateTimeTextBox,{baseClass:"dijitTextBox dijitDateTextBox",popupClass:"dijit.Calendar",_selector:"date",value:new Date("")});
}


;if(!dojo._hasResource["dojox.timing._base"]){
dojo._hasResource["dojox.timing._base"]=true;
dojo.provide("dojox.timing._base");
dojo.experimental("dojox.timing");
dojox.timing.Timer=function(_1){
this.timer=null;
this.isRunning=false;
this.interval=_1;
this.onStart=null;
this.onStop=null;
};
dojo.extend(dojox.timing.Timer,{onTick:function(){
},setInterval:function(_2){
if(this.isRunning){
window.clearInterval(this.timer);
}
this.interval=_2;
if(this.isRunning){
this.timer=window.setInterval(dojo.hitch(this,"onTick"),this.interval);
}
},start:function(){
if(typeof this.onStart=="function"){
this.onStart();
}
this.isRunning=true;
this.timer=window.setInterval(dojo.hitch(this,"onTick"),this.interval);
},stop:function(){
if(typeof this.onStop=="function"){
this.onStop();
}
this.isRunning=false;
window.clearInterval(this.timer);
}});
}

dojo.provide("lconn.blogs.nls.strings")._built=true;
dojo.provide("lconn.blogs.nls.strings.en_gb");
lconn.blogs.nls.strings.en_gb={"Oct":"Oct","upload":"Upload","rs_removeTagLinkLabel":"Add or remove tags on this item","Apr":"Apr","small":"200 pixels wide","left1":"Left 1","rs_addOrRemoveLabel":"Add or Remove Tags","left2":"Left 2","right":"Right","rs_searchSubmit":"submit search","Today":"Today","chooseLayout":"Choose Layout","rs_errorIcon":"Error icon","Tomorrow":"Tomorrow","imageText":"image","rs_vote":"Vote","Tuesday":"Tuesday","sizeHelpText":"Large images shown at original size will require users to scroll.","Monday":"Monday","rs_member_only":"You must be a member of this community to vote.","rs_vote_limit_Str":"\x3cstrong\x3eIdeation Blog voting limit: ${0}\x3c/strong\x3e (You have ${1} votes remaining)","Wednesday":"Wednesday","rs_warningIcon":"Warning icon","July":"July","large":"Large","rs_voted":"Voted","rs_addTagLabel":"Add Tags","Mar":"Mar","Sep":"Sep","addImageFromComputer":"Add an image from your computer","noSelectedImage":"You have not selected an image.","rs_tagLinkTitle":"Filter by tag \'${0}\'","rs_searchNoInput":"Please enter text to search for","rs_vote_end":"Ideation Blog voting ended.","May":"May","rs_enterUser":"Enter a blog user","rs_remaining_vote":"You have ${0} out of ${1} votes remaining.","insertImageTitle":"Add an Image","rs_Cancel":"Cancel","title":"Message","rs_Content":"Content","rs_confirmIcon":"Confirmation icon","urlInvalidMessage":"Invalid URL.  Enter a full URL. For example, \'http://www.dojotoolkit.org\'","closeDialog":"close dialog","Yesterday":"Yesterday","June":"June","rs_searchAlt":"select search option","Feb":"Feb","RatingRecommandComment":"Recommend this comment","RatingRecommentedBy":"Recommended by:","rs_confirmUnvote":"Do you want to remove your vote?","fitPageWidth":"Fit page width","RatingClickToRateEntry":"Click the + beside the star icon to recommend this entry.","setAsDefault":"Set this layout as the default","rs_vote_limit_Str_single":"\x3cstrong\x3eIdeation Blog voting limit: ${0}\x3c/strong\x3e (You have 1 vote remaining)","medium":"400 pixels wide","cancel":"Cancel","RatingRecommand":"Recommend this entry","rs_no_vote_left":"You have no votes left.","Friday":"Friday","RatingCommentLoginToRate":"Log in to recommend this comment.","RatingsAltRatings":"Ratings","chooseImageFromPhoto":"Add an image from your recent photos","rs_infoIcon":"Information icon","rs_clickToUnvote":"Click to remove your vote for this idea.","selectFolder":"Select a folder:","rs_collapse_section":"Collapsed section","Aug":"Aug","rs_OK":"OK","rs_noTag":"None","RECOMMEND":{"RECOMMEND_TOOLTIP":"Recommend this entry to your colleagues","ALT_TEXT":"Recommendations","UNRECOMMEND":"Undo","YOU_HAVE_RECOMMENDED":"You have recommended","YOU_AND_ONE_HAVE_RECOMMENDED":"You and 1 other","UNRECOMMEND_TOOLTIP":"Remove your recommendation from this entry","LABEL_A_MANY":"${0} people recommended this:","ERROR":"An error has occurred.","LABEL_HIDDEN_MANY":"${0} others not shown","X_HAVE_RECOMMENDED":"${0} people","LABEL_R_ONE":"1 other person recommended this:","NOT_RECOMMENDED":"No recommendations","ERROR_RETRIEVE":"Unable to retrieve recommendations at this time.","YOU_AND_X_HAVE_RECOMMENDED":"You and ${0} others","LABEL_R_MANY":"${0} other people recommended this:","LABEL_FALSE":"Recommend this entry.","LABEL_TRUE":"You have recommended this entry.","LOADING":"Loading...","LABEL_HIDDEN_ONE":"1 other not shown","RECOMMEND":"Recommend","ONE_HAS_RECOMMENDED":"1 person","LABEL_A_ONE":"1 person recommended this:"},"RECOMMEND_COMMENT":{"RECOMMEND_TOOLTIP":"Recommend this comment to your colleagues","ALT_TEXT":"Recommendations","UNRECOMMEND":"Undo","YOU_HAVE_RECOMMENDED":"You have recommended","YOU_AND_ONE_HAVE_RECOMMENDED":"You and 1 other","UNRECOMMEND_TOOLTIP":"Remove your recommendation from this comment","LABEL_A_MANY":"${0} people recommended this:","ERROR":"An error has occurred.","LABEL_HIDDEN_MANY":"${0} others not shown","X_HAVE_RECOMMENDED":"${0} people","LABEL_R_ONE":"1 other person recommended this:","NOT_RECOMMENDED":"No recommendations","ERROR_RETRIEVE":"Unable to retrieve recommendations at this time.","YOU_AND_X_HAVE_RECOMMENDED":"You and ${0} others","LABEL_R_MANY":"${0} other people recommended this:","LABEL_FALSE":"Recommend this comment.","LABEL_TRUE":"You have recommended this comment.","LOADING":"Loading...","LABEL_HIDDEN_ONE":"1 other not shown","RECOMMEND":"Recommend","ONE_HAS_RECOMMENDED":"1 person","LABEL_A_ONE":"1 person recommended this:"},"rs_expanded_section":"Expanded section","nextItem":"Next","rs_searchDirectory":"Search Directory","rs_sessionTimeout":"Fail to process your request, session timeout. The problem has been recovered. Please try your operation again.","previousItem":"Previous","RatingStar":"Stars","rs_clickToVote":"Click to vote for this idea.","addImageFromWeb":"Add an image from the web","centered":"Centered","Nov":"Nov","rs_tagLabel":"Tags: ","insert":"Insert","htmlToggleTitle":"HTML Source","RatingCommentRated":"You have recommended this comment.","rs_uploading":"Uploading, please wait...","RatingLoginToRate":"Log in to recommend this entry.","RatingEntryRated":"You have recommended this entry.","original":"Original","rs_removeMember_title":"Remove","RatingRecommendation":"Recommendations","RatingClickToRateComment":"Click the + beside the star icon to recommend this comment.","Saturday":"Saturday","ok":"OK","rs_removeTagLabel":"Remove tag \'${0}\'","Dec":"Dec","Sunday":"Sunday","blankFile":"You have chosen no files to upload.","rs_cancelTagEditing":"Cancel tag editing","Jan":"Jan","invalidURL":"The image URL is invalid.","urlSample":"URL(Web address of the image) For example, www.url.com/images/photo.jpg","Thursday":"Thursday","imageSize":"Image Size:"};
dojo.registerModulePath("lconn.blogs", "../lconn.blogs");

;if(!dojo._hasResource["lconn.blogs.utils"]){
dojo._hasResource["lconn.blogs.utils"]=true;
dojo.provide("lconn.blogs.utils");
dojo.require("dojo.i18n");
dojo.require("dijit.Dialog");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs._utils",null,{toggleControl:function(_1){
var _2=dojo.byId(_1);
var _3=dojo.byId("i"+_1);
if(_2.style.display=="none"){
_2.style.display="";
if(_3){
_3.innerHTML="-";
}
}else{
_2.style.display="none";
if(_3){
_3.innerHTML="+";
}
}
},toggleSubs:function(_4,_5){
var el=dojo.byId(_4);
var _6=dojo.byId(_5);
if(el.style.display!="none"){
new dojo.fx.Toggler({node:_4,showDuration:500,showFunc:dojo.fx.wipeOut}).show();
_6.className="lotusSprite lotusArrow lotusTwistyClosed";
}else{
new dojo.fx.Toggler({node:_4,showDuration:500,showFunc:dojo.fx.wipeIn}).show();
_6.className="lotusSprite lotusArrow lotusTwistyOpen";
}
},toggleSection:function(_7,_8,_9){
var el=dojo.byId("section_"+_7.id);
if(typeof el=="undefined"||el==null){
var t=dojo.query("[name=\"section_"+_7.id+"\"]");
if(typeof t!="undefined"&&t.length&&t.length>0){
el=t[0];
}
}
var _a=dojo.byId(_7.id+"_section_hint_label");
if(el.style.display!="none"){
new dojo.fx.Toggler({node:el,showDuration:500,showFunc:dojo.fx.wipeOut}).show();
_7.className="lotusSprite lotusArrow lotusTwistyClosed";
if(_9){
dojo.attr(_7,{"aria-label":_9,"title":_9});
_7.innerHTML="<span class=\"lotusAltText\">&#x25ba;</span>";
}
if(_7.getAttribute("aria-pressed")){
_7.setAttribute("aria-pressed","false");
}
if(_a){
_a.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_collapse_section;
}
var _b=dojo.query("[name=\""+_7.id+"_section_mainpart\"]");
if(_b&&_b.length>0){
_b[0].setAttribute("aria-expanded",false);
}
}else{
new dojo.fx.Toggler({node:el,showDuration:500,showFunc:dojo.fx.wipeIn}).show();
_7.className="lotusSprite lotusArrow lotusTwistyOpen";
if(_8){
dojo.attr(_7,{"aria-label":_8,"title":_8});
_7.innerHTML="<span class=\"lotusAltText\">&#x25bc;</span>";
}
if(_7.getAttribute("aria-pressed")){
_7.setAttribute("aria-pressed","true");
}
if(_a){
_a.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_expanded_section;
}
var _b=dojo.query("[name=\""+_7.id+"_section_mainpart\"]");
if(_b&&_b.length>0){
_b[0].setAttribute("aria-expanded",true);
}
}
},isblank:function(s){
for(var i=0;i<s.length;s++){
var c=s.charAt(i);
if((c!=" ")&&(c!="\n")&&(c!="")){
return false;
}
}
return true;
},isEmail:function(s){
return !this.isblank(s)&&s.match(/.*@.*\..*/);
},purifyEmail:function(s){
if(s){
var _c=s.indexOf("<");
var _d=s.indexOf(">");
if(_c>-1&&_c<_d){
s=s.substring(_c+1,_d);
}
}
return s;
},escapeHTML:function(s){
s=s.replace(/&/g,"&amp;");
s=s.replace(/</g,"&lt;");
s=s.replace(/>/g,"&gt;");
s=s.replace(/\"/g,"&quot;");
return s;
},showSearchTagField:function(){
dojo.byId("tagSearchText").style.display="none";
dojo.byId("tagSearchField").style.display="block";
dijit.byId("taginput").focus();
},removeTagForURL:function(_e,s){
var rt="";
var _f=false;
for(var i=0;i<_e.length;i++){
if(!_f){
if(s!=_e[i]){
rt=rt+" "+_e[i];
}else{
_f=true;
}
}else{
rt=rt+" "+_e[i];
}
}
return rt.replace(/^\s+|\s+$/g,"");
},getUTF8ByteLength:function(s){
return unescape(encodeURIComponent(s)).length;
},refreshSecurityNonce:function(_10){
window.__security_nonce=_10;
var f=document.forms;
if(typeof f!="undefined"){
for(var i=0;i<f.length;i++){
var t=f[i].dangerousurlnonce;
if(typeof t!="undefined"){
t.value=_10;
}
}
}
},showElements:function(ids){
for(var i=0;i<ids.length;i++){
var id=ids[i];
var t=dojo.byId(id);
if(typeof (t)!="undefined"&&t){
t.style.display="";
}
}
},hideElements:function(ids){
for(var i=0;i<ids.length;i++){
var id=ids[i];
var t=dojo.byId(id);
if(typeof (t)!="undefined"&&t){
t.style.display="none";
}
}
},_underlay:null,disableUI:function(){
if(this._underlay==null){
this._underlay=new dijit.DialogUnderlay();
}
window.onscroll=dojo.hitch(this,function(){
this._underlay.layout();
});
this._underlay.show();
dojo.style(this._underlay.node,"opacity","0");
},aria:{announce:function(_11,_12){
var _13=false;
var t=dojo.query("[name=\"aria-announce\"]",_11);
if(t&&t.length>0){
_13=t[0];
}
if(!_13){
_13=document.createElement("div");
_13.className="lotusOffScreen";
_13.setAttribute("name","aria-announce");
dijit.setWaiRole(_13,"alert");
_11.appendChild(_13);
}
while(_13.firstChild){
_13.removeChild(_13.firstChild);
}
_13.appendChild(document.createTextNode(_12));
}},isSecure:function(){
var _14=(window.location.protocol||"http").replace(":","");
return (_14==="https");
},openHelpWindow:function(_15){
var _16=window.screen.width/4;
if(_16<950){
_16=950;
}
var _17=window.screen.height/4;
if(_17<550){
_17=550;
}
if(typeof (helpWindow)!="undefined"){
helpWindow.close();
}
var _18="height="+_17+",width="+_16+",status=yes,toolbar=yes,menubar=no,location=yes,scrollbars=yes,resizable=yes";
var url="";
var _19=lconn.core.config.services.help;
if(typeof (_19)=="undefined"){
return;
}
var _1a=(this.isSecure()?_19.secureUrl:_19.url);
if(typeof (_15)!="undefined"){
url=_1a+"/topic/com.ibm.lotus.connections.blogs.help/"+_15;
}else{
url=_1a+"/topic/com.ibm.lotus.connections.blogs.help/bframe.html";
}
helpWindow=window.open(url,"help",_18);
if(window.focus){
helpWindow.focus();
}
},loginAction:function(){
var _1b=window.location.href.replace(/,/g,"%2C");
lconn.core.auth.login(getLoginRedirectURL(_1b));
},getLCLocale:function(){
var _1c=dojo.locale;
if(_1c=="pt-pt"){
_1c="pt";
}
if(_1c=="he"){
_1c="iw";
}
return _1c.replace("-","_");
}});
lconn.blogs.utils=new lconn.blogs._utils();
if(dojo.isIE&&typeof lconn.blogs.utils.applyDojoOnLoads=="undefined"){
lconn.blogs.utils.dojoOnLoads=[];
var origDojoOnLoads=dojo._loaders;
dojo._loaders=[];
var origAddOnLoad;
lconn.blogs.utils.applyDojoOnLoads=function(){
if(!lconn.blogs.utils.dojoOnLoads){
return;
}
var t=lconn.blogs.utils.dojoOnLoads;
dojo._loaders=origDojoOnLoads;
dojo.addOnLoad=origAddOnLoad;
for(var i=0;i<t.length;i++){
var _1d=t[i];
if(_1d){
dojo.addOnLoad.apply(dojo,_1d);
}
}
dojo.addOnLoad(function(){
});
lconn.blogs.utils.dojoOnLoads=null;
};
origAddOnLoad=dojo.addOnLoad;
dojo.addOnLoad=function(){
var _1e=arguments;
lconn.blogs.utils.dojoOnLoads.push(_1e);
};
var orgiWindowOnLoad=window.onload;
window.onload=function(){
if(orgiWindowOnLoad){
orgiWindowOnLoad();
}
lconn.blogs.utils.applyDojoOnLoads();
};
}
function activateFooterLinks(){
var _1f=dojo.byId("lotusFooterULTools");
if(_1f!=null){
var _20=_1f.getElementsByTagName("LI");
var len=_20.length;
for(var i=1;i<len;i++){
var li=_20[i];
var a=li.getElementsByTagName("a");
var _21=a[0].className;
var idx=_21.indexOf("lotusHidden");
if(idx!=-1){
a[0].className=_21.substring(0,idx)+_21.substring(idx+11);
}
}
}
};
function showDialog(_22,_23){
var div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="dialog";
var _24="";
_24+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_24+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_24+="</span>";
_24+="</div>";
_24+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_24+="<div class=\"lotusDialogBorder\" style=\"width: 300px;\">";
_24+="<form role=\"application\" class=\"lotusDialog lotusForm\">";
_24+="<div class=\"lotusDialogHeader\">";
_24+="<h1 class=\"lotusHeading\"><span id=\"dialogTitle\">"+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).title+"</span></h1>";
_24+="<a class=\"lotusRight lotusDialogClose\" role=\"button\" href=\"javascript:dijit.byId("+"'dialog'"+").onCancel();\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_24+="<img role=\"presentation\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+dijit._Widget.prototype._blankGif+"\"/>";
_24+="<span class=\"lotusAltText\">X</span>";
_24+="</a>";
_24+="</div>";
_24+="<div>";
_24+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_24+=_22;
_24+="</div>";
_24+="</div>";
_24+="<div class=\"lotusDialogFooter\">";
_24+="<input class=\"lotusFormButton\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'dialog'"+").onCancel()\"/>";
_24+="</div>";
_24+="</form>";
_24+="</div>";
_24+="</div>";
div.innerHTML=_24;
document.body.appendChild(div);
var _25=new dijit.Dialog({"aria-describedby":"dialogContent"},div);
dojo.connect(_25,"onShow",function(){
_25.domNode.setAttribute("aria-labelledby","dialogTitle");
});
_25.onCancel=function(){
this.hide();
this.destroy();
if(typeof _23!="undefined"&&_23){
if(typeof (_23)=="string"&&dojo.byId(_23)){
dojo.byId(_23).focus();
}else{
_23.focus();
}
}
};
_25.show();
};
lconn.blogs.utils.confirm=function(_26,_27,_28,_29){
var div=document.getElementById("confirmDialog");
if(!div){
div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="confirmDialog";
document.body.appendChild(div);
}
var _2a="";
_2a+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_2a+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_2a+="</span>";
_2a+="</div>";
_2a+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_2a+="<div class=\"lotusDialogBorder\" style=\"width: 300px;\">";
_2a+="<form role=\"application\" class=\"lotusDialog lotusForm\">";
_2a+="<div class=\"lotusDialogHeader\">";
_2a+="<h1 class=\"lotusHeading\"><span id=\"dialogTitle\">";
if(_28&&typeof _28!="undefined"&&typeof _28.title!="undefined"){
_2a+=_28.title;
}else{
_2a+=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).title;
}
_2a+="</span></h1>";
_2a+="<a class=\"lotusRight lotusDialogClose\" href=\"#\"  role=\"button\" onclick=\"dijit.byId("+"'confirmDialog'"+").onCancel();\""+" aria-label=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\""+" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_2a+="<img role=\"presentation\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+dijit._Widget.prototype._blankGif+"\"/>";
_2a+="<span class=\"lotusAltText\">X</span>";
_2a+="</a>";
_2a+="</div>";
_2a+="<div>";
_2a+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_2a+=_26;
_2a+="</div>";
_2a+="</div>";
_2a+="<div class=\"lotusDialogFooter\">";
_2a+="<input class=\"lotusFormButton\" name=\"okBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'confirmDialog'"+").onOk()\"/>";
_2a+="<input class=\"lotusFormButton\" name=\"cancelBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel+"\" onclick=\"dijit.byId("+"'confirmDialog'"+").onCancel()\"/>";
_2a+="</div>";
_2a+="</form>";
_2a+="</div>";
_2a+="</div>";
div.innerHTML=_2a;
var _2b=new dijit.Dialog({"aria-describedby":"dialogContent"},div);
dojo.connect(_2b,"onShow",function(){
_2b.domNode.setAttribute("aria-labelledby","dialogTitle");
});
_2b.onOk=function(){
this.hide();
this.destroy();
_27();
if(typeof _29!="undefined"&&_29){
if(typeof (_29)=="string"&&dojo.byId(_29)){
dojo.byId(_29).focus();
}else{
_29.focus();
}
}
};
_2b.onCancel=function(){
this.hide();
this.destroy();
if(typeof _29!="undefined"&&_29){
if(typeof (_29)=="string"&&dojo.byId(_29)){
dojo.byId(_29).focus();
}else{
_29.focus();
}
}
};
_2b.show();
};
lconn.blogs.utils.showCustomInputDialog=function(_2c,_2d,_2e,_2f,_30,_31){
var div=document.getElementById("inputDialog");
if(!div){
div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="inputDialog";
document.body.appendChild(div);
}
var _32="";
_32+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_32+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_32+="</span>";
_32+="</div>";
_32+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_32+="<div class=\"lotusDialogBorder\" style=\"width: 400px;\">";
_32+="<form role=\"application\" class=\"lotusDialog lotusForm\">";
_32+="<div class=\"lotusDialogHeader\">";
_32+="<h1 class=\"lotusHeading\"><span id=\"dialogTitle\">"+_2c+"</span></h1>";
_32+="<a class=\"lotusRight lotusDialogClose\" role=\"button\" href=\"javascript:dijit.byId("+"'inputDialog'"+").onCancel();\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_32+="<img role=\"presentation\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+dijit._Widget.prototype._blankGif+"\"/>";
_32+="<span class=\"lotusAltText\">X</span>";
_32+="</a>";
_32+="</div>";
_32+="<div>";
_32+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_32+="<div name=\"error_messages\" class=\"lotusMessage\" role=\"alert\" style=\"display:none\"><img src=\""+dijit._Widget.prototype._blankGif+"\" class=\"lconnSprite lconnSprite-iconError16\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"\" /><span class=\"lotusAltText\">"+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"</span><span name=\"message_text\"></span></div>";
_32+=_2d;
_32+="</div>";
_32+="</div>";
_32+="<div class=\"lotusDialogFooter\">";
_32+="<input class=\"lotusFormButton\" name=\"okBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'inputDialog'"+").onOk()\"/>";
_32+="<input class=\"lotusFormButton\" name=\"cancelBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel+"\" onclick=\"dijit.byId("+"'inputDialog'"+").onCancel()\"/>";
_32+="</div>";
_32+="</form>";
_32+="</div>";
_32+="</div>";
div.innerHTML=_32;
var _33=null;
if(typeof _31!="undefined"&&_31){
_33={"aria-describedby":_31};
}
var _34=new dijit.Dialog(_33,div);
dojo.connect(_34,"onShow",function(){
_34.domNode.setAttribute("aria-labelledby","dialogTitle");
});
_34.onOk=function(){
if(typeof _2f!="undefined"&&_2f){
var err=_2f(dojo.byId("inputDialog_content").value);
if(err){
var t1=dojo.query("[name=\"error_messages\"]",document.getElementById("inputDialog"));
var t2=dojo.query("[name=\"message_text\"]",t1[0]);
t2[0].innerHTML=err;
t1[0].style.display="";
t1[0].setAttribute("role","alert");
return;
}
}
_2e();
this.hide();
this.destroy();
if(typeof _30!="undefined"&&_30){
if(typeof (_30)=="string"&&dojo.byId(_30)){
dojo.byId(_30).focus();
}else{
_30.focus();
}
}
};
_34.onCancel=function(){
this.hide();
this.destroy();
if(typeof _30!="undefined"&&_30){
if(typeof (_30)=="string"&&dojo.byId(_30)){
dojo.byId(_30).focus();
}else{
_30.focus();
}
}
};
_34.show();
};
lconn.blogs.utils.showInputDialog=function(_35,_36,_37,_38,_39){
var div=document.getElementById("inputDialog");
if(!div){
div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="inputDialog";
document.body.appendChild(div);
}
var _3a="";
_3a+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_3a+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_3a+="</span>";
_3a+="</div>";
_3a+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_3a+="<div class=\"lotusDialogBorder\" style=\"width: 400px;\">";
_3a+="<form role=\"application\" class=\"lotusDialog lotusForm\">";
_3a+="<div class=\"lotusDialogHeader\">";
_3a+="<h1 class=\"lotusHeading\"><span id=\"dialogTitle\">"+_35+"</span></h1>";
_3a+="<a class=\"lotusRight lotusDialogClose\" role=\"button\" href=\"javascript:dijit.byId("+"'inputDialog'"+").onCancel();\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_3a+="<img role=\"presentation\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+dijit._Widget.prototype._blankGif+"\"/>";
_3a+="<span class=\"lotusAltText\">X</span>";
_3a+="</a>";
_3a+="</div>";
_3a+="<div>";
_3a+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_3a+="<div name=\"error_messages\" class=\"lotusMessage\" role=\"alert\" style=\"display:none\"><img src=\""+dijit._Widget.prototype._blankGif+"\" class=\"lconnSprite lconnSprite-iconError16\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"\" /><span class=\"lotusAltText\">"+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon+"</span><span name=\"message_text\"></span></div>";
_3a+="<label for=\"inputDialog_content\">"+_36+"</label>";
_3a+="<textarea id=\"inputDialog_content\" style=\"width: 350px;\" rows=\"10\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_Content+"\" name=\"content\"></textarea>";
_3a+="</div>";
_3a+="</div>";
_3a+="<div class=\"lotusDialogFooter\">";
_3a+="<input class=\"lotusFormButton\" name=\"okBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'inputDialog'"+").onOk()\"/>";
_3a+="<input class=\"lotusFormButton\" name=\"cancelBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel+"\" onclick=\"dijit.byId("+"'inputDialog'"+").onCancel()\"/>";
_3a+="</div>";
_3a+="</form>";
_3a+="</div>";
_3a+="</div>";
div.innerHTML=_3a;
var _3b=new dijit.Dialog(null,div);
dojo.connect(_3b,"onShow",function(){
_3b.domNode.setAttribute("aria-labelledby","dialogTitle");
});
_3b.onOk=function(){
if(typeof _38!="undefined"&&_38){
var err=_38(dojo.byId("inputDialog_content").value);
if(err){
var t1=dojo.query("[name=\"error_messages\"]",document.getElementById("inputDialog"));
var t2=dojo.query("[name=\"message_text\"]",t1[0]);
t2[0].innerHTML=err;
t1[0].style.display="";
t1[0].setAttribute("role","alert");
return;
}
}
_37();
this.hide();
this.destroy();
if(typeof _39!="undefined"&&_39){
if(typeof (_39)=="string"&&dojo.byId(_39)){
dojo.byId(_39).focus();
}else{
_39.focus();
}
}
};
_3b.onCancel=function(){
this.hide();
this.destroy();
if(typeof _39!="undefined"&&_39){
if(typeof (_39)=="string"&&dojo.byId(_39)){
dojo.byId(_39).focus();
}else{
_39.focus();
}
}
};
_3b.show();
};
lconn.blogs.utils.showPopupForm=function(_3c,_3d,_3e,_3f,_40){
var div=document.getElementById("popupForm");
if(!div){
div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="popupForm";
document.body.appendChild(div);
}
var _41="";
_41+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_41+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_41+="</div>";
_41+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_41+="<div class=\"lotusDialogBorder\" style=\"width: 450px;\">";
_41+="<div class=\"lotusDialog lotusForm\">";
_41+="<div class=\"lotusDialogHeader\">";
_41+="<h1 class=\"lotusHeading\"><span id=\"dialogTitle\">"+_3c+"</span></h1>";
_41+="<a class=\"lotusRight lotusDialogClose\" role=\"button\" href=\"javascript:dijit.byId("+"'popupForm'"+").onCancel();\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_41+="<img role=\"presentation\" alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+dijit._Widget.prototype._blankGif+"\"/>";
_41+="<span class=\"lotusAltText\">X</span>";
_41+="</a>";
_41+="</div>";
_41+="<div>";
_41+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_41+="</div>";
_41+="</div>";
_41+="<div class=\"lotusDialogFooter\">";
_41+="<input class=\"lotusFormButton\" name=\"okBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'popupForm'"+").onOk()\"/>";
_41+="<input class=\"lotusFormButton\" name=\"cancelBtn\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel+"\" onclick=\"dijit.byId("+"'popupForm'"+").onCancel()\"/>";
_41+="</div>";
_41+="</div>";
_41+="</div>";
_41+="</div>";
div.innerHTML=_41;
var _42=dojo.query("#dialogContent",div)[0];
_42.innerHTML="";
_42.appendChild(_3d);
var _43=new dijit.Dialog(null,div);
dojo.connect(_43,"onShow",function(){
_43.domNode.setAttribute("aria-labelledby","dialogTitle");
});
_43.onOk=function(){
if(_3e){
_3e();
}
if(_3f&&_3f()){
this.hide();
this.destroy();
}
if(typeof _40!="undefined"&&_40){
if(typeof (_40)=="string"&&dojo.byId(_40)){
dojo.byId(_40).focus();
}else{
_40.focus();
}
}
};
_43.onCancel=function(){
this.hide();
this.destroy();
if(typeof _40!="undefined"&&_40){
if(typeof (_40)=="string"&&dojo.byId(_40)){
dojo.byId(_40).focus();
}else{
_40.focus();
}
}
};
_43.show();
};
lconn.blogs.utils.showMessage=function(_44,id,_45,_46,_47){
if(dojo.byId(id)){
dojo.destroy(dojo.byId(id));
}
if(dojo.byId(_44)){
var _48=dojo.create("div",{"id":id,"class":"lotusMessage","role":"alert"},_44,"first");
var _49;
var _4a;
if(typeof (_47)!="undefined"){
if(_47=="info"){
dojo.addClass(_48,"lotusInfo");
_49="lconnSprite-iconAttention16";
_4a=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_infoIcon;
}else{
if(_47=="confirm"){
dojo.addClass(_48,"lotusConfirm");
_49="lconnSprite-iconConfirmation16";
_4a=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_confirmIcon;
}else{
if(_47=="warning"){
dojo.addClass(_48,"lotusWarning");
_49="lconnSprite-iconWarning16";
_4a=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_warningIcon;
}else{
if(_47=="error"){
_49="lconnSprite-iconError16";
_4a=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_errorIcon;
}
}
}
}
}else{
dojo.addClass(_48,"lotusConfirm");
_49="lconnSprite-iconConfirmation16";
_4a=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_confirmIcon;
}
var _4b=dojo.create("img",{"title":_46,"alt":_46,"src":dijit._Widget.prototype._blankGif,"class":"lconnSprite "+_49},_48);
var _4c=dojo.create("span",{"class":"lotusAltText"},_48);
_4c.innerHTML=_4a;
var _4d=dojo.create("span",{},_48);
_4d.innerHTML=_45;
}
};
lconn.blogs.utils.setIndicator=function(id,_4e){
var _4f=dojo.byId("blogsIndicatorsDiv");
if(!_4f){
return;
}
var t=dojo.query("[id='"+id+"']",_4f);
if(!t||t.length==0){
return;
}
if(_4e==null){
t[0].innerHTML="";
t[0].style.display="none";
}else{
t[0].innerHTML=_4e;
t[0].style.display="";
}
var _50=0;
var x=dojo.query("[name='indicator']",_4f);
if(x){
for(var i=0;i<x.length;i++){
if(x[i].style.display!="none"){
_50++;
}
}
}
if(_50>0){
_4f.style.display="";
}else{
_4f.style.display="none";
}
};
openDemoWindow=function(url){
var _51=window.screen.width/4;
if(_51<950){
_51=950;
}
var _52=window.screen.height/4;
if(_52<550){
_52=550;
}
if(typeof (demoWindow)!="undefined"){
demoWindow.close();
}
var _53="height="+_52+",width="+_51+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes";
demoWindow=window.open(url,"demo",_53);
if(window.focus){
demoWindow.focus();
}
};
dojo.addOnLoad(function(){
var _54=document.getElementsByTagName("body")[0].className.split(" ");
for(var i in _54){
if("dijit_a11y"==_54[i]){
document.getElementsByTagName("body")[0].className+=" lotusImagesOff";
}
}
var _55=dojo.query("[class~='aria_toolbar']");
for(var i=0;i<_55.length;i++){
new lconn.core.aria.Toolbar(_55[i]);
}
var _56=dojo.query("[class~='aria_tablist']");
for(var i=0;i<_56.length;i++){
new lconn.core.aria.TabPanel(_56[i]);
}
if(typeof (initialSearchBar)!="undefined"){
initialSearchBar();
}
var _57=dojo.byId("logoutLink");
if(_57){
var _58=_57.href;
dojo.attr(_57,{href:"javascript:;"});
if(_58!=null){
dojo.connect(_57,"onclick",this,function(){
if(lconn.core.auth.isAuthenticated()){
lconn.core.auth.logout(_58);
}else{
lconn.core.auth.login(_58);
}
});
}
}
if(typeof (lconn.communities.bizCard.core)!="undefined"&&currentLogin.auth){
lconn.communities.bizCard.core._firstActionShown=true;
}
});
if(typeof getLoginRedirectURL=="undefined"){
window.getLoginRedirectURL=function(url){
if(!url){
url=window.location.href;
}
return BlogsBaseUrl+"/roller-ui/login-redirect.jsp?redirect="+encodeURIComponent(url);
};
}
dojo.addOnLoad(function(){
var t1=dojo.query(".lotusSection");
if(t1&&t1.length>0){
for(var i=0;i<t1.length;i++){
var e1=t1[i];
var t2=dojo.query("a.lotusArrow",e1);
if(!t2||t2.length==0){
continue;
}
var e2=t2[0];
var _59=t2[0].getAttribute("id");
e1.setAttribute("name",_59+"_section_mainpart");
var e3=dojo.byId("section_"+_59);
if(typeof e3=="undefined"||e3==null){
var t3=dojo.query("[name=\"section_"+_59+"\"]");
if(typeof t3!="undefined"&&t3.length&&t3.length>0){
e3=t3[0];
}
}
if(!e3){
continue;
}
var _5a=(e3.style.display!="none");
var e4=document.createElement("label");
e4.setAttribute("id",_59+"_section_hint_label");
e4.setAttribute("aria-live","polite");
dojo.addClass(e4,"lotusOffScreen");
if(_5a){
e1.setAttribute("aria-expanded","true");
e4.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_expanded_section;
}else{
e1.setAttribute("aria-expanded","false");
e4.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_collapse_section;
}
var t4=dojo.query("h2",e1);
if(!t4){
continue;
}
e1.insertBefore(e4,t4[0]);
}
}
});
if(dojo.isChrome||dojo.isWebKit){
var oldDialogShow=dijit.Dialog.prototype.show;
dijit.Dialog.prototype.show=function(){
var t=dojo.query("iframe[type=\"application/x-shockwave-flash\"]");
if(t&&t.length>0){
for(var i=0;i<t.length;i++){
t[i].style.visibility="hidden";
}
}
this.__flashs=t;
dojo.hitch(this,oldDialogShow)();
};
var oldDialogHide=dijit.Dialog.prototype.hide;
dijit.Dialog.prototype.hide=function(){
var t=this.__flashs;
if(t&&t.length>0){
for(var i=0;i<t.length;i++){
t[i].style.visibility="";
}
}
dojo.hitch(this,oldDialogHide)();
};
}
}


;if(!dojo._hasResource["dijit._editor._Plugin"]){
dojo._hasResource["dijit._editor._Plugin"]=true;
dojo.provide("dijit._editor._Plugin");
dojo.require("dijit._Widget");
dojo.require("dijit.form.Button");
dojo.declare("dijit._editor._Plugin",null,{constructor:function(_1,_2){
this.params=_1||{};
dojo.mixin(this,this.params);
this._connects=[];
},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:dijit.form.Button,getLabel:function(_3){
return this.editor.commands[_3];
},_initButton:function(){
if(this.command.length){
var _4=this.getLabel(this.command);
var _5=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);
if(!this.button){
var _6=dojo.mixin({label:_4,showLabel:false,iconClass:_5,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});
this.button=new this.buttonClass(_6);
}
}
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
if(this.dropDown){
this.dropDown.destroyRecursive();
}
},connect:function(o,f,tf){
this._connects.push(dojo.connect(o,f,this,tf));
},updateState:function(){
var e=this.editor,c=this.command,_7,_8;
if(!e||!e.isLoaded||!c.length){
return;
}
if(this.button){
try{
_8=e.queryCommandEnabled(c);
if(this.enabled!==_8){
this.enabled=_8;
this.button.attr("disabled",!_8);
}
if(typeof this.button.checked=="boolean"){
_7=e.queryCommandState(c);
if(this.checked!==_7){
this.checked=_7;
this.button.attr("checked",e.queryCommandState(c));
}
}
}
catch(e){
console.log(e);
}
}
},setEditor:function(_9){
this.editor=_9;
this._initButton();
if(this.command.length&&!this.editor.queryCommandAvailable(this.command)){
if(this.button){
this.button.domNode.style.display="none";
}
}
if(this.button&&this.useDefaultCommand){
this.connect(this.button,"onClick",dojo.hitch(this.editor,"execCommand",this.command,this.commandArg));
}
this.connect(this.editor,"onNormalizedDisplayChanged","updateState");
},setToolbar:function(_a){
if(this.button){
_a.addChild(this.button);
}
}});
}


;if(!dojo._hasResource["dijit.form.Form"]){
dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.form._FormMixin");
dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${nameAttrSetting}></form>",attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){
this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";
this.inherited(arguments);
},execute:function(_1){
},onExecute:function(){
},_setEncTypeAttr:function(_2){
this.encType=_2;
dojo.attr(this.domNode,"encType",_2);
if(dojo.isIE){
this.domNode.encoding=_2;
}
},postCreate:function(){
if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
var _3=this.srcNodeRef.attributes.getNamedItem("encType");
if(_3&&!_3.specified&&(typeof _3.value=="string")){
this.attr("encType",_3.value);
}
}
this.inherited(arguments);
},onReset:function(e){
return true;
},_onReset:function(e){
var _4={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e.currentTarget,target:e.target};
if(!(this.onReset(_4)===false)&&_4.returnValue){
this.reset();
}
dojo.stopEvent(e);
return false;
},_onSubmit:function(e){
var fp=dijit.form.Form.prototype;
if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
this.onExecute();
this.execute(this.getValues());
}
if(this.onSubmit(e)===false){
dojo.stopEvent(e);
}
},onSubmit:function(e){
return this.isValid();
},submit:function(){
if(!(this.onSubmit()===false)){
this.containerNode.submit();
}
}});
}

dojo.provide("dijit._editor.nls.LinkDialog")._built=true;
dojo.provide("dijit._editor.nls.LinkDialog.en_gb");
dijit._editor.nls.LinkDialog.en_gb={"newWindow":"New Window","target":"Target:","set":"Set","createLinkTitle":"Link Properties","topWindow":"Topmost Window","insertImageTitle":"Image Properties","currentWindow":"Current Window","parentWindow":"Parent Window","text":"Description:","url":"URL:"};

;if(!dojo._hasResource["lconn.blogs.BlogsImage"]){
dojo._hasResource["lconn.blogs.BlogsImage"]=true;
dojo.provide("lconn.blogs.BlogsImage");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._editor._Plugin");
dojo.require("dijit.Dialog");
dojo.require("dijit.form.Form");
dojo.require("dijit.form.Button");
dojo.require("dojo.i18n");
dojo.require("dojo.string");
dojo.require("dojo.io.iframe");
dojo.require("dojo.cookie");
dojo.require("dijit.form.ValidationTextBox");
dojo.requireLocalization("lconn.blogs","strings");
dojo.requireLocalization("dijit._editor","LinkDialog");
dojo.declare("dijit._editor.plugins.UrlTextBox",dijit.form.ValidationTextBox,{regExp:"((https?|ftps?)\\://|)(([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+(arpa|aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:(0|[1-9]\\d*))?(/([^?#/]+/)*)?([^?#/]+(\\?[^?#/]*)?(#[A-Za-z][\\w.:-]*)?)?",required:true,postMixInProperties:function(){
this.inherited("postMixInProperties",arguments);
this.invalidMessage=dojo.i18n.getLocalization("lconn.blogs","strings",this.lang).urlInvalidMessage;
},getValue:function(){
var t=this.textbox.value;
t=t.replace(/^\s+|\s+$/g,"");
if(!/^(https?|ftps?)/.test(t)){
t="http://"+t;
}
this.textbox.value=t;
return this.textbox.value;
}});
dojo.declare("lconn.blogs.BlogsImage",dijit._editor._Plugin,{buttonClass:dijit.form.Button,useDefaultCommand:false,command:"insertImage",imgDialogTemplate:["<div class='lotusDialogBorder' style='width:557px;'>","<div class='lotusDialog '>","<div class='lotusDialogHeader'>","<h1 class='lotusHeading'><span id='dialogTitle'>${insertImageTitle}</span></h1>","<a class='lotusRight lotusDialogClose' id='closeDialog' href='#' title='${closeDialog}' role='button'>","<img alt='${closeDialog}' role='presentation' src='"+dijit._Widget.prototype._blankGif+"'/>","<span class='lotusAltText'>X</span>","</a>","</div>","<div class='lotusDialogContent'>","<div class='lotusMessage' role='alert' id='insertImageErrors' style='display:none;'></div>","<p><input id='radio_upload' name='insertMethod' checked='checked' value='upload' type='radio'/><label for='radio_upload'><strong>${addImageFromComputer}</strong><br></label></p>","<form id='uploadFiles' name='uploadFiles' role='application' title='${addImageFromComputer}' dojoType='dijit.form.Form' method='' enctype='multipart/form-data'>","<input size='50' type='file' class='lotusLTR lotusAlignLeft' id='uploadedFile0' name='uploadedFile0' /><br>","<input type='hidden' name='method' value='upload' />","<input type='hidden' name='weblog' value=''>","<input type='hidden' name='path' value=''>","<input type='hidden' name='dangerousurlnonce' value=''/>","<input type='hidden' name='callType' value='ajax'/></form>","<p><span id='uploadHint'></span></p><hr>","<p><input id='radio_chooseFromPhoto' name='insertMethod' value='choose' type='radio' /><label for='radio_chooseFromPhoto'><strong>${chooseImageFromPhoto}</strong></label>","<div id='uploadedPhotos'>","<div id='dirDiv'></div>","<table role='presentation' id='uploadedImageTable' height='100' cellspacing='3' cellpadding='0' width='100%'>","<tr>","<td style='vertical-align:middle;'><a id='previousButton'><img src='"+dijit._Widget.prototype._blankGif+"' class='otherFramework16 otherFramework16-PopupSharkfinDarkLeft' alt='${previousItem}' /></a></td>","<td class='uploadedImageTd' width='20%'><div class='uploadedImageDiv' id='uploadedImageDiv1'></div></td>","<td class='uploadedImageTd' width='20%'><div class='uploadedImageDiv' id='uploadedImageDiv2'></div></td>","<td class='uploadedImageTd' width='20%'><div class='uploadedImageDiv' id='uploadedImageDiv3'></div></td>","<td class='uploadedImageTd' width='20%'><div class='uploadedImageDiv' id='uploadedImageDiv4'></div></td>","<td class='uploadedImageTd' width='20%'><div class='uploadedImageDiv' id='uploadedImageDiv5'></div></td>","<td style='vertical-align:middle;'><a id='nextButton'><img src='"+dijit._Widget.prototype._blankGif+"' class='otherFramework16 otherFramework16-PopupSharkfinDarkRight' alt='${nextItem}' /></a></td>","</tr>","</table>","</div><hr>","<p><input id='radio_fromUrl' name='insertMethod' value='url' type='radio' /><label for='radio_fromUrl'><strong>${addImageFromWeb}</strong><br></label></p>","<input dojoType='dijit._editor.plugins.UrlTextBox' id='imgUrl' name='imgUrl' title='${addImageFromWeb}'/><hr>","<form id='insertImageSettings' name='inertImageSettings' role='application' dojoType='dijit.form.Form'>","<p><strong>${chooseLayout}</strong></p>","<table role='presentation' width='400'>","<tr>"].concat(bidir=="ltr"?["<td><img src='${imageBase}/blogImage_layout_left.png' alt='${left1}'></td>","<td><img src='${imageBase}/blogImage_layout_left2.png' alt='${left2}'></td>","<td><img src='${imageBase}/blogImage_layout_center.png' alt='${centered}'></td>","<td><img src='${imageBase}/blogImage_layout_right.png' alt='${right}'></td>"]:["<td><img src='${imageBase}/blogImage_layout_right.png' alt='${right}'></td>","<td><img src='${imageBase}/blogImage_layout_center.png' alt='${centered}'></td>","<td><img src='${imageBase}/blogImage_layout_left2.png' alt='${left2}'></td>","<td><img src='${imageBase}/blogImage_layout_left.png' alt='${left1}'></td>"]).concat(["</tr>","<tr>"]).concat(bidir=="ltr"?["<td><input id='radio_left1' name='blogImageLayout' checked='checked' value='left1' type='radio' /><label for='radio_left1'><strong> ${left1} </strong></label></td>","<td><input id='radio_left2' name='blogImageLayout' value='left2' type='radio' /><label for='radio_left2'><strong> ${left2} </strong></label></td>","<td><input id='radio_center' name='blogImageLayout' value='center' type='radio' /><label for='radio_center'><strong> ${centered} </strong></label></td>","<td><input id='radio_right' name='blogImageLayout' value='right' type='radio' /><label for='radio_right'><strong> ${right} </strong></label></td>"]:["<td><input id='radio_right' name='blogImageLayout' value='right' type='radio' /><label for='radio_right'><strong> ${right} </strong></label></td>","<td><input id='radio_center' name='blogImageLayout' value='center' type='radio' /><label for='radio_center'><strong> ${centered} </strong></label></td>","<td><input id='radio_left2' name='blogImageLayout' value='left2' type='radio' /><label for='radio_left2'><strong> ${left2} </strong></label></td>","<td><input id='radio_left1' name='blogImageLayout' checked='checked' value='left1' type='radio' /><label for='radio_left1'><strong> ${left1} </strong></label></td>"]).concat(["</tr>","</table>","<table role='presentation' cellspacing='0' cellpadding='0' width='100%' style='margin-bottom: 10px;'>","<tr><td style='vertical-align: top;'>","<strong><nobr><span class='blogsPaddingRight'>${imageSize}</span><a href='javascript:;' id='sizeHelpLink'></a></nobr></strong>","</td><td style='vertical-align: top;'>","<div class='lotusLeft'><nobr><input id='radio_original' name='imageSize'  value='original' checked='checked' type='radio' /><label for='radio_original' class='blogsPaddingRight'><strong> ${original} </strong></label></nobr></div>","<div class='lotusLeft'><nobr><input id='radio_small' name='imageSize' value='small' type='radio' /><label for='radio_small' class='blogsPaddingRight'><strong> ${small} </strong></label></nobr></div>","<div class='lotusLeft'><nobr><input id='radio_medium' name='imageSize' value='medium' type='radio' /><label for='radio_medium' class='blogsPaddingRight'><strong> ${medium} </strong></label></nobr></div>","<div class='lotusLeft'><nobr><input id='radio_fit' name='imageSize'  value='fit' type='radio' /><label for='radio_fit' class='blogsPaddingRight'><strong> ${fitPageWidth} </strong></label></nobr></div>","</td></tr></table>","<input id='check_default'  name='setAsDefault' checked='checked' value='on' type='checkbox'/><label for='check_default'><strong> ${setAsDefault} </strong></label> ","</form><br></div><div id='insertImageDialogBottom' class='lotusDialogFooter'><input type='button' id='insertButton' value='${insert}' class='lotusFormButton'/><input type='button' id='cancelButton' value='${cancel}' class='lotusFormButton'/></div>","<form id='createSubdir' name='createSubdir' role='application' method='post' style='display:none;'>","<input type='hidden' name='method' value='createSubdir' />","<input type='hidden' name='weblog' value=''>","<input type='hidden' name='path' value=''>","<input type='hidden' id='newDir' name='newDir'/>","<input type='hidden' name='dangerousurlnonce' value=''/>","<input type='hidden' name='callType' value='ajax'/></form>","</div></div>"]).join(""),isFirstOpen:true,_initButton:function(){
this.inherited("_initButton",arguments);
dojo.connect(this.button,"onClick",this,function(){
this.showDiv();
});
},constructor:function(){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings",this.lang);
var _1=this;
this.tag="img";
this.imageBase=dojo.moduleUrl("lconn.blogs","images");
this.messages.imageBase=this.imageBase;
var _2=document.getElementsByTagName("head");
if(_2[0]){
var _3=document.createElement("link");
_3.rel="stylesheet";
_3.href=dojo.moduleUrl("lconn.blogs","blogsImage.css");
_3.type="text/css";
_3.media="screen";
_2[0].appendChild(_3);
}
var _4=document.createElement("div");
_4.id="blogsImageDiv";
document.body.appendChild(_4);
var _5=new dijit.Dialog({onCancel:function(){
setTimeout(dojo.hitch(_1,"_onCloseDialog"),1);
},onClose:dojo.hitch(_1,"_onCloseDialog")},dojo.byId("blogsImageDiv"));
dojo.connect(_5,"onShow",function(){
_5.domNode.setAttribute("aria-labelledby","dialogTitle");
});
dojo.connect(_5,"show",this,"_onOpenDialog");
_5.setContainerNodeStyle=function(){
this.containerNode.setAttribute("style","");
dojo.forEach(_5._modalconnects,function(_6){
if(_6[1]=="onresize"||_6[1]=="onscroll"){
dojo.disconnect(_6);
dojo.connect(window,"onscroll",function(){
if(_5.open){
dijit._underlay.layout();
}
});
dojo.connect(window,"onresize",function(){
if(_5.open){
dijit._underlay.layout();
}
});
}
});
};
dojo.connect(_5,"show",_5,"setContainerNodeStyle");
_5.setContent(dojo.string.substitute(this.imgDialogTemplate,this.messages));
_5.startup();
dojo.connect(dojo.byId("insertButton"),"onclick",this,"insertClicked");
dojo.connect(dojo.byId("cancelButton"),"onclick",this,"hideDiv");
dojo.connect(dojo.byId("closeDialog"),"onclick",this,"hideDiv");
dojo.connect(dojo.byId("cancelButton"),"onclick",this,"_onCloseDialog");
dojo.connect(dojo.byId("closeDialog"),"onclick",this,"_onCloseDialog");
dojo.connect(dojo.byId("previousButton"),"onclick",this,"showPreviousCollection");
dojo.connect(dojo.byId("nextButton"),"onclick",this,"showNextCollection");
lconn.core.HelpLauncher.createHelpLink(dojo.byId("sizeHelpLink"),null,this.messages.sizeHelpText);
dojo.byId("uploadHint").innerHTML=imageSizeLimitStr;
document.forms["uploadFiles"].action=fileUploadActionURL;
document.forms["uploadFiles"].weblog.value=weblogHandle;
document.forms["uploadFiles"].path.value=insertImagePath;
document.forms["uploadFiles"].dangerousurlnonce.value=dangerousurlnonceValue;
document.forms["createSubdir"].action=fileUploadActionURL;
document.forms["createSubdir"].weblog.value=weblogHandle;
document.forms["createSubdir"].newDir.value=insertImagePath;
document.forms["createSubdir"].dangerousurlnonce.value=dangerousurlnonceValue;
if(!upload_enabled){
dojo.byId("radio_upload").disabled="disabled";
dojo.byId("uploadedFile0").disabled="disabled";
dojo.byId("radio_chooseFromPhoto").checked="checked";
}
this.hideDiv();
},showDiv:function(_7){
dojo.byId("blogsImageDiv").style.display="block";
dijit.byId("blogsImageDiv").show();
dijit.byId("imgUrl").setDisabled(false);
if(dojo.isFF){
dojo.byId("widget_imgUrl").style.display="-moz-inline-stack";
}else{
if(dojo.isIE){
dojo.byId("widget_imgUrl").style.display="inline";
}else{
dojo.byId("widget_imgUrl").style.display="inline-block";
}
}
},hideDiv:function(_8){
dijit.byId("blogsImageDiv").hide();
dojo.byId("blogsImageDiv").style.display="none";
dijit.byId("imgUrl").setDisabled(true);
dojo.byId("widget_imgUrl").style.display="none";
},imageClicked:function(_9){
this.clearAllSelect();
var _a=_9.parentNode.parentNode;
if(!dojo.hasClass(_a,"blogInsertImageSelected")){
dojo.addClass(_a,"blogInsertImageSelected");
}
},selectFirst:function(_b){
var _b=dojo.byId("uploadedImage1");
if(_b){
this.imageClicked(_b);
}
},clearAllSelect:function(){
dojo.query("td",document).forEach(function(td){
if(dojo.hasClass(td,"blogInsertImageSelected")){
dojo.removeClass(td,"blogInsertImageSelected");
}
});
},selectDirectory:function(){
var _c=dojo.byId(dirSelect);
updateImages(0,_c.options[_c.selectedIndex].value);
},updateImages:function(_d,_e){
var _f=this;
dojo.addClass(dojo.byId("uploadedPhotos"),"lotusLoading");
var _10=dojo.byId("uploadedImageTable");
dojo.fadeOut({node:_10,duration:1500,onEnd:function(){
for(var i=1;i<6;i++){
var _11="uploadedImageDiv"+i;
dojo.byId(_11).innerHTML="";
}
var _12=_f.getImages(_d,_e);
if(_12){
dojo.forEach(_12.images,function(_13,_14,_15){
var _16="uploadedImage"+(_14+1);
var _17="uploadedImageDiv"+(_14+1);
var _18=document.createElement("img");
_18.id=_16;
_18.setAttribute("class","blogInsertImage");
_18.setAttribute("src",_13.url);
_18.setAttribute("title",_13.name);
_18.setAttribute("width","90");
_18.setAttribute("height","90");
dojo.byId(_17).appendChild(_18);
if(dojo.isIE){
_18.attachEvent("onclick",dojo.hitch(_f,"imageClicked",dojo.byId(_16)));
}else{
_18.addEventListener("click",dojo.hitch(_f,"imageClicked",dojo.byId(_16)),true);
}
});
_f.totalImageCount=_12.total;
_f.currentDir=_12.currentDir;
if(typeof (_e)=="undefined"&&_f.haveSubDir){
var _19=dojo.byId("dirSelect");
_f.defaultDir=_f.currentDir;
dojo.forEach(_19.options,function(_1a,_1b){
if(_1a.value==_f.defaultDir){
_1a.selected=true;
}
});
}
}
dojo.removeClass(dojo.byId("uploadedPhotos"),"lotusLoading");
_f.clearAllSelect();
dojo.fadeIn({node:_10,duration:1500}).play();
}}).play();
},getImages:function(_1c,_1d){
var rt;
var url=blogsContext+"/roller-ui/authoring/insertimage?handle="+weblogHandle+"&start="+_1c;
if(typeof (_1d)!="undefined"){
url+="&dir="+encodeURIComponent(_1d);
}
var kw={url:url,handleAs:"json",load:function(_1e){
rt=_1e;
},error:function(_1f){
if(dojo.isFF){
console.debug("An error occurred: "+_1f);
}
},sync:true};
dojo.xhrGet(kw);
return rt;
},getDirectories:function(){
var rt;
var kw={url:blogsContext+"/roller-ui/authoring/imagefolder?handle="+weblogHandle,handleAs:"json",load:function(_20){
rt=_20;
},error:function(_21){
if(dojo.isFF){
console.debug("An error occurred: "+_21);
}
},sync:true};
dojo.xhrGet(kw);
return rt;
},showPreviousCollection:function(){
if(this.startIndex-1>=0){
this.updateImages(this.startIndex-1,this.currentDir);
this.startIndex--;
}
},showNextCollection:function(){
if(this.startIndex+5<=this.totalImageCount){
this.updateImages(this.startIndex+1,this.currentDir);
this.startIndex++;
}
},changeFolder:function(){
var _22=dojo.byId("dirSelect");
this.updateImages(0,_22.options[_22.selectedIndex].value);
},checkFile:function(){
var _23=document.getElementById("uploadedFile0");
if(lconn.blogs.utils.isblank(_23.value)){
this.showError(this.messages.blankFile);
return false;
}else{
return this.upload();
}
},upload:function(){
this.clearError();
this.createDir();
var _24=this;
var _25=dojo.byId("uploadFiles");
if(dojo.isIE){
var _26=_25.getAttributeNode("method");
_26.value="POST";
}
var _27="";
var kw={form:_25,method:"POST",url:fileUploadActionURL,handleAs:"json",handle:function(rt){
_24.hideWait();
if(rt){
var _28=rt.returnCode.value;
var _29="";
dojo.forEach(rt.returnCode.messages,function(_2a,_2b,_2c){
var _2d="";
if(_28!="0"){
_2d=_2a+"\n";
_29+=_2d;
}else{
_29=_2a;
}
});
if(_28!="0"){
if(_28=="2"){
lconn.blogs.utils.refreshSecurityNonce(rt.returnCode.messages[0]);
var _2e=dojo.i18n.getLocalization("lconn.blogs","strings").rs_sessionTimeout;
_24.showError(_2e);
}else{
_24.showError(_29);
}
}else{
_27=_29;
_24.insertImage(_27);
_24.hideDiv();
}
}
},error:function(_2f){
_24.hideWait();
if(dojo.isFF){
console.debug("An error occurred: "+_2f);
}
if(dojo.isIE&&typeof (_2f.number)!="undefined"&&_2f.number==-2147024891){
_24.showError(invalidFilePathStr);
}
},sync:true};
this.showWait();
var _30=dojo.io.iframe.send(kw);
},createDir:function(){
if(insertImagePath==""){
return;
}
var _31=this;
var kw={form:"createSubdir",url:fileUploadActionURL,handleAs:"json",load:function(_32){
},error:function(_33){
if(dojo.isFF){
console.debug("An error occurred: "+_33);
}
},sync:false};
dojo.xhrPost(kw);
},showError:function(_34){
var _35=dojo.byId("insertImageErrors");
_35.innerHTML="<img title='"+this.messages.rs_errorIcon+"' alt='"+this.messages.rs_errorIcon+"' class='blogsPaddingRight lconnSprite lconnSprite-iconError16' src='"+dijit._Widget.prototype._blankGif+"'/><span class='lotusAltText'>"+this.messages.rs_errorIcon+"</span>"+_34;
_35.style.display="";
},clearError:function(){
var _36=dojo.byId("insertImageErrors");
_36.innerHTML="";
_36.style.display="none";
},showWait:function(){
if(!dijit.byId("blogsImgWaitDiv")){
var _37=document.createElement("div");
_37.id="blogsImgWaitDiv";
document.body.appendChild(_37);
var _38=new dijit.Dialog({"aria-describedby":"uploadingDialogContent"},dojo.byId("blogsImgWaitDiv"));
_38.setContent("<div class='lotusDialogBorder'><div class='lotusDialog ' id='uploadingDialogContent'>"+this.messages.rs_uploading+"</div></div>");
_38.startup();
}
dijit.byId("blogsImgWaitDiv").show();
},hideWait:function(){
dijit.byId("blogsImgWaitDiv").hide();
},insertClicked:function(){
var _39;
dojo.query("input[name='insertMethod']").forEach(function(_3a){
if(_3a.checked){
_39=_3a.value;
}
});
var _3b="";
switch(_39){
case "upload":
this.checkFile();
break;
case "choose":
if(dojo.query("td[class~='blogInsertImageSelected']").length!=1){
this.showError(this.messages.noSelectedImage);
return;
}
_3b=dojo.query("td[class~='blogInsertImageSelected']")[0].firstChild.firstChild.src;
this.insertImage(_3b);
this.hideDiv();
break;
case "url":
if(dijit.byId("imgUrl").getValue()==""||!dijit.byId("imgUrl").isValid()){
this.showError(this.messages.invalidURL);
return;
}
_3b=dijit.byId("imgUrl").getValue();
this.insertImage(_3b);
this.hideDiv();
break;
}
},insertImage:function(url){
insertImageURL=url;
this._onCloseDialog();
var _3c=new Object();
_3c.tag=this.tag;
_3c.refAttr=this.tag=="img"?"src":"href";
_3c.imageText=this.messages.imageText;
var _3d;
for(var i=0;i<document.forms["insertImageSettings"].blogImageLayout.length;i++){
if(document.forms["insertImageSettings"].blogImageLayout[i].checked){
_3d=document.forms["insertImageSettings"].blogImageLayout[i].value;
}
}
var _3e;
for(var i=0;i<document.forms["insertImageSettings"].imageSize.length;i++){
if(document.forms["insertImageSettings"].imageSize[i].checked){
_3e=document.forms["insertImageSettings"].imageSize[i].value;
}
}
var _3f="";
switch(_3d){
case "left1":
if(_3e!="fit"){
_3f=" display:block; margin: 1em 1em 0pt 0pt; float: left;";
}else{
_3f=" display:block; margin: 1em 0pt 0pt 0pt; float: left;";
}
break;
case "left2":
_3f=" display:block; margin: 1em 0pt 0pt 0pt; float: left;";
break;
case "center":
_3f=" display:block; margin: 0 auto;text-align: center;";
break;
case "right":
if(_3e!="fit"){
_3f=" display:block; margin: 1em 0pt 0pt 1em; float: right;";
}else{
_3f=" display:block; margin: 1em 0pt 0pt 0pt; float: right;";
}
break;
}
var _40="";
switch(_3e){
case "original":
break;
case "small":
_40=" width:200px;";
break;
case "medium":
_40=" width:400px;";
break;
case "fit":
_40=" width:100%;";
break;
}
if(document.forms["insertImageSettings"].check_default.checked){
dojo.cookie("com.ibm.lc.blogs.insertImage.layout.cookie",_3d,{expires:90});
dojo.cookie("com.ibm.lc.blogs.insertImage.size.cookie",_3e,{expires:90});
dojo.cookie("com.ibm.lc.blogs.insertImage.setDefault.cookie","on",{expires:90});
}else{
dojo.cookie("com.ibm.lc.blogs.insertImage.layout.cookie","",{expires:-1});
dojo.cookie("com.ibm.lc.blogs.insertImage.size.cookie","",{expires:-1});
dojo.cookie("com.ibm.lc.blogs.insertImage.setDefault.cookie","off");
}
_3c.styleStr=_40+" "+_3f;
var _41,_42,_43;
if(_3d=="left2"||_3d=="center"){
_41=this.editor.document.createElement("a",{attributes:{href:insertImageURL,target:"_blank",style:"width: 100%; display: inline-block;"}});
_42=this.editor.document.createElement("img",{attributes:{src:insertImageURL,style:_3c.styleStr,alt:_3c.imageText}});
_41.append(_42);
this.editor.insertElement(_41);
}else{
_41=this.editor.document.createElement("a",{attributes:{href:insertImageURL,target:"_blank"}});
_42=this.editor.document.createElement("img",{attributes:{src:insertImageURL,style:_3c.styleStr,alt:_3c.imageText}});
_41.append(_42);
this.editor.insertElement(_41);
}
},_onCloseDialog:function(){
var _44=this;
setTimeout(function(){
_44.editor.focus();
},500);
},_onOpenDialog:function(){
this.startIndex=0;
this.totalImageCount=0;
var _45=this.getDirectories();
if(_45.folders.length==1){
this.haveSubDir=false;
this.currentDir=_45.folders[0].name;
}else{
this.haveSubDir=true;
}
if(this.haveSubDir){
var _46="<label for='dirSelect' class='blogsPaddingRight'>"+this.messages.selectFolder+"</label><select id='dirSelect' title='"+this.messages.selectFolder+"'>";
dojo.forEach(_45.folders,function(_47,_48){
var _49=_47.name;
if(_49!="/"){
_49="/"+_49;
}
_46+="<option value=\""+lconn.blogs.utils.escapeHTML(_47.name)+"\">"+lconn.blogs.utils.escapeHTML(_49)+"</option>";
});
_46+="</select>";
dojo.byId("dirDiv").innerHTML=_46;
var _4a=dojo.byId("dirSelect");
dojo.connect(_4a,"onchange",this,"changeFolder");
this.updateImages(0);
}else{
this.updateImages(0,this.currentDir);
}
dijit.byId("imgUrl").setValue("");
if(this.isFirstOpen){
var _4b=dojo.cookie("com.ibm.lc.blogs.insertImage.layout.cookie");
var _4c=dojo.cookie("com.ibm.lc.blogs.insertImage.size.cookie");
var _4d=dojo.cookie("com.ibm.lc.blogs.insertImage.setDefault.cookie");
dojo.query("input[name='blogImageLayout']").forEach(function(_4e){
if(_4e.value==_4b){
dojo.byId(_4e.id).checked=true;
}
});
dojo.query("input[name='imageSize']").forEach(function(_4f){
if(_4f.value==_4c){
dojo.byId(_4f.id).checked=true;
}
});
if(_4d=="on"){
dojo.byId("check_default").checked=true;
}else{
dojo.byId("check_default").checked=false;
}
}
this.isFirstOpen=false;
this.clearError();
}});
}


;if(!dojo._hasResource["lconn.blogs.HtmlToggle"]){
dojo._hasResource["lconn.blogs.HtmlToggle"]=true;
dojo.provide("lconn.blogs.HtmlToggle");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.HtmlToggle",dijit._editor._Plugin,{buttonClass:dijit.form.ToggleButton,useDefaultCommand:false,command:"createLink",realCommand:"htmlToogle",_initButton:function(){
this.inherited("_initButton",arguments);
this.mode=0;
this.isFirstChange=true;
this.heightFlagForIE=false;
this.editingArea=this.editor.editingArea;
this.myRichText=this.editingArea.getElementsByTagName("iframe")[0];
this.myPlantText=document.createElement("textarea");
this.myPlantText.style.border="none";
this.myPlantText.style.display="none";
this.myPlantText.onchange=this.editor.onChange;
this.editingArea.appendChild(this.myPlantText);
dojo.connect(this.button,"onClick",this,function(){
this.switchMode();
});
this.editor.editingArea.myPlantText=this.myPlantText;
this.editor.mode=this.mode;
this.editor.getValueFromBothModes=this.getEditorValue;
this.button.titleNode.title=dojo.i18n.getLocalization("lconn.blogs","strings",this.lang).htmlToggleTitle;
var _1=this.button.titleNode.getElementsByTagName("span")[0];
_1.style.backgroundImage="none";
_1.style.fontFamily="Verdana,Trebuchet,Tahoma,Arial";
_1.style.fontSize="13px";
_1.style.width="28px";
_1.innerHTML="&lt;h&gt;";
this.connect(this.editor,"onNormalizedDisplayChanged","_updateHeight");
},switchMode:function(_2){
if(this.mode==0){
this.editor.mode=this.mode=1;
this.accessOhterPlugins(true);
this.uncheckOhterPlugins();
this.myRichText.style.display="none";
this.myPlantText.style.display="";
this.myPlantText.style.height=this.myRichText.style.height;
if(this.isFirstChange==true){
this.myPlantText.style.width=this.myRichText.style.width;
this.isFirstChange=false;
}
if(dojo.isIE&&dojo.marginBox(this.myPlantText).h<100){
this.myPlantText.style.height="100px";
}
var _3=this.editor.getValue();
if(dojo.isFF){
if(_3.toLowerCase()=="<br _moz_editor_bogus_node=\"true\" />"||_3.toLowerCase()=="<br _moz_editor_bogus_node='true' />"||_3.toLowerCase()=="<br _moz_editor_bogus_node=\"true\" />\n"||_3.toLowerCase()=="<br _moz_editor_bogus_node='true' />\n"){
_3="";
}
}
this.myPlantText.value=_3;
}else{
this.editor.mode=this.mode=0;
this.accessOhterPlugins(false);
this.myRichText.style.display="";
this.myPlantText.style.display="none";
this.editor.setValue(this.myPlantText.value);
}
},getEditorValue:function(){
if(this.mode==0){
return this.getValue();
}else{
return this.editingArea.myPlantText.value;
}
},updateState:function(){
var _4=this.editor;
if(!_4){
return;
}
if(!_4.isLoaded){
return;
}
if(this.button){
try{
if(this.mode==0){
this.button.setAttribute("checked",false);
}else{
this.button.setAttribute("checked",true);
}
}
catch(e){
console.debug(e);
}
}
},accessOhterPlugins:function(_5){
for(var i=0;i<this.editor._plugins.length;i++){
if(!this.editor._plugins[i].realCommand){
if(this.editor._plugins[i].button){
if(this.editor._plugins[i].button.setDisabled){
this.editor._plugins[i].button.setDisabled(_5||!this.editor._plugins[i].enabled);
}
}
}
}
},uncheckOhterPlugins:function(){
for(var i=0;i<this.editor._plugins.length;i++){
if(!this.editor._plugins[i].realCommand){
if(this.editor._plugins[i].button){
if(this.editor._plugins[i].button.setChecked){
this.editor._plugins[i].button.setAttribute("checked",false);
}
}
}
}
},_updateHeight:function(){
var e=this.editor;
if(!e.isLoaded){
return;
}
if(e.height){
return;
}
var _6=dojo.marginBox(e.editNode).h;
if(dojo.isOpera){
_6=e.editNode.scrollHeight;
}
if(!_6){
_6=dojo.marginBox(e.document.body).h;
}
if(_6==0){
console.debug("Can not figure out the height of the editing area!");
return;
}
if(_6!=this._lastHeight){
this._lastHeight=_6;
dojo.marginBox(e.iframe,{h:this._lastHeight});
}
}});
}


;if(!dojo._hasResource["lconn.blogs._Templated"]){
dojo._hasResource["lconn.blogs._Templated"]=true;
dojo.provide("lconn.blogs._Templated");
dojo.require("lconn.core.HTMLUtil");
dojo.declare("lconn.blogs._Templated",dijit._Templated,{escapeText:function(_1){
return lconn.core.HTMLUtil.escapeText(_1,false);
},escapeInlineText:function(_2){
return lconn.core.HTMLUtil.escapeInlineText(_2);
},destroy_AP:dojo.isIE<7?function(){
for(var ap in this){
if(ap.indexOf("_AP")>0){
delete this[ap];
}
}
}:function(){
}});
}


;if(!dojo._hasResource["lconn.blogs.Res"]){
dojo._hasResource["lconn.blogs.Res"]=true;
dojo.provide("lconn.blogs.Res");
dojo.require("dojo.i18n");
dojo.require("dojo.string");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.Res",[],{bundleFor:"lconn.blogs",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(_1){
this.resBundle=dojo.i18n.getLocalization(_1,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(_2){
return dojo.i18n.getLocalization(_2,"strings");
},getStringFrom:function(_3,_4,_5){
var _6=dojo.i18n.getLocalization(_3,"strings")[_4];
if(_5==undefined){
return _6;
}else{
return dojo.string.substitute(_6,_5);
}
},getString:function(_7,_8){
var _9=dojo.i18n.getLocalization(this.bundleFor,"strings")[_7];
if(_8==undefined){
return _9;
}else{
return dojo.string.substitute(_9,_8);
}
}});
}


;if(!dojo._hasResource["lconn.blogs.SearchBar"]){
dojo._hasResource["lconn.blogs.SearchBar"]=true;
dojo.provide("lconn.blogs.SearchBar");
dojo.require("dijit._Widget");
dojo.require("lconn.blogs._Templated");
dojo.require("lconn.blogs.Res");
var w={};
w.templatePath=dojo.moduleUrl("lconn.blogs","templates/SearchBar.html");
w.rs_searchAlt="rs_searchAlt";
w.rs_searchSubmit="rs_searchSubmit";
w.rs_searchNoInput="rs_searchNoInput";
w.rs_searchDash="rs_searchDash";
w.rs_searchAllEntries="rs_searchAllEntries";
w.rs_searchAuthor="rs_searchAuthor";
w.rs_searchComment="rs_searchComment";
w.rs_searchContent="rs_searchContent";
w.rs_searchTag="rs_searchTag";
w.rs_searchTitle="rs_searchTitle";
w.rs_searchDesc="rs_searchDesc";
w.rs_searchAllBlogs="rs_searchAllBlogs";
w.searchScope=null;
w.context=null;
w.currOption=null;
w.cPath=null;
w.cTarget=null;
w.searchMenu_W=null;
w.postMixInProperties=function(){
this.cPath=cPath;
this.cTarget=cTarget;
this.searchScope=cField;
var _1=new lconn.blogs.Res();
_1.loadDefaultBundle();
var b=_1.resBundle;
this.rs_searchAlt=b[this.rs_searchAlt];
this.rs_searchSubmit=b[this.rs_searchSubmit];
this.rs_searchNoInput=b[this.rs_searchNoInput];
this.rs_searchDash=rs_searchDash;
this.rs_searchAuthor=rs_searchAuthor;
this.rs_searchTag=rs_searchTag;
this.rs_searchTitle=rs_searchTitle;
if(this.cTarget=="entry"){
this.rs_searchAllEntries=rs_searchAllEntries;
this.rs_searchComment=rs_searchComment;
this.rs_searchContent=rs_searchContent;
}
if(this.cTarget=="blog"){
this.rs_searchAllBlogs=rs_searchAllBlogs;
this.rs_searchDesc=rs_searchDesc;
}
};
w.postCreate=function(){
dojo.subscribe("p_dashboard",this,"switchDashboard");
};
w.setSearchPrompt=function(_2){
this.searchField_AP.value=_2;
this.searchField_AP.title=_2;
dojo.addClass(this.searchField_AP,"lotusInactive");
};
w.switchDashboard=function(_3){
this.prepMenu();
};
w.prepMenu=function(){
dojo.addClass(this.searchField_AP,"lotusInactive");
this.searchScope_AP.value=this.searchScope;
if(this.searchMenu_W!=null){
this.searchMenu_W.destroy();
this.searchMenu_W=null;
}
this.searchMenu_W=new dijit.Menu({id:"BlogSearchMenu",onItemClick:dojo.hitch(this,"selectOption")});
var _4=this.searchMenu_W;
if(!this.cTarget){
this.cTarget=="entry";
}
var _5="prepMenu_"+this.cTarget;
this[_5](_4,this.searchScope);
};
w.selectOption=function(_6){
if(_6.disabled){
return false;
}
if(_6.popup){
if(!this.searchMenu_W.is_open){
this.searchMenu_W._openPopup();
}
}else{
this.searchMenu_W.onExecute();
if(this.currOption){
dojo.removeClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
}
dojo.addClass(_6.iconNode,"dijitMenuItemIcon lotusCheckmark");
this.currOption=_6;
this.setSearchPrompt(_6.label);
this.searchScope=this.currOption.value;
this.searchScope_AP.value=this.searchScope;
}
dijit.popup.close(this.searchMenu_W);
};
w.prepMenu_entry=function(_7,_8){
var _9=new dijit.MenuItem({label:this.rs_searchAllEntries,value:"all",parentMenu:_7});
var _a=new dijit.MenuItem({label:this.rs_searchAuthor,value:"author",parentMenu:_7});
var _b=new dijit.MenuItem({label:this.rs_searchComment,value:"comment",parentMenu:_7});
var _c=new dijit.MenuItem({label:this.rs_searchContent,value:"content",parentMenu:_7});
var _d=new dijit.MenuItem({label:this.rs_searchTag,value:"tag",parentMenu:_7});
var _e=new dijit.MenuItem({label:this.rs_searchTitle,value:"title",parentMenu:_7});
_7.addChild(_9);
_7.addChild(_a);
_7.addChild(_b);
_7.addChild(_c);
_7.addChild(_d);
_7.addChild(_e);
var _f=_7.getChildren();
for(var i=0;i<_f.length;i++){
var _10=_f[i];
if(dojo.string.trim(_10.value)==dojo.trim(_8)){
this.currOption=_10;
this.setSearchPrompt(_10.label);
dojo.addClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
break;
}
}
};
w.prepMenu_blog=function(_11,_12){
var _13=new dijit.MenuItem({label:this.rs_searchAllBlogs,value:"all",parentMenu:_11});
var _14=new dijit.MenuItem({label:this.rs_searchAuthor,value:"author",parentMenu:_11});
var _15=new dijit.MenuItem({label:this.rs_searchDesc,value:"description",parentMenu:_11});
var _16=new dijit.MenuItem({label:this.rs_searchTag,value:"tag",parentMenu:_11});
var _17=new dijit.MenuItem({label:this.rs_searchTitle,value:"title",parentMenu:_11});
_11.addChild(_13);
_11.addChild(_14);
_11.addChild(_15);
_11.addChild(_16);
_11.addChild(_17);
var _18=_11.getChildren();
for(var i=0;i<_18.length;i++){
var _19=_18[i];
if(dojo.string.trim(_19.value)==dojo.trim(_12)){
this.currOption=_19;
this.setSearchPrompt(_19.label);
dojo.addClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
break;
}
}
};
w.focusField=function(){
this.searchField_AP.value="";
dojo.removeClass(this.searchField_AP,"lotusInactive");
};
w.processSearch=function(_1a){
if(dojo.hasClass(this.searchField_AP,"lotusInactive")){
this.focusField();
}
};
dojo.declare("lconn.blogs.SearchBar",[dijit._Widget,lconn.blogs._Templated,lconn.blogs.Res],w);
}


;dojo.cache("lconn.blogs", "templates/AddMembers.html", "<div class=\"AddMembers\"> <input type=\"hidden\" name=\"owners\" dojoAttachPoint=\"owners_P_AP\" /> <input type=\"hidden\" name=\"authors\" dojoAttachPoint=\"authors_P_AP\" /> <input type=\"hidden\" name=\"draft\" dojoAttachPoint=\"draft_P_AP\" /> <label>${rs_addMemberDescription}</label> <div class=\"field\"> <div dojoAttachPoint=\"memberList_AP\" class=\"memberList\" role=\"list\"></div> </div> <div class=\"field\"> <select dojoAttachPoint=\"aclLevel_AP\" aria-label=\"Member permission\"> <option dojoAttachPoint=\"owners_AP\" value=\"owners\">${rs_owner}</option> <option value=\"authors\" selected=\"selected\">${rs_author}</option> <option value=\"draft\">${rs_draft}</option> </select> <label dojoAttachPoint=\"typeHeadLabel_AP\" class=\"lotusHidden\" id=\"typeHeadLabel_AP\"></label> <input dojoAttachPoint=\"membersCombo_AP\" title=\"${rs_member_title}\"></input> <button title=\"${rs_addMember_title}\" class=\"fieldAdd\" dojoAttachEvent=\"onclick: newMember\"> </button> <a href=\"javascript:;\" title=\"${rs_addMember_title}\" class=\"fieldAddText\" dojoAttachEvent=\"onclick: newMember\">+</a> </div> </div>");

;if(!dojo._hasResource["lconn.blogs.AddMembers"]){
dojo._hasResource["lconn.blogs.AddMembers"]=true;
dojo.provide("lconn.blogs.AddMembers");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("lconn.core.PeopleTypeAhead");
dojo.require("lconn.core.PeopleDataStore");
dojo.require("lconn.core.NameUtil");
var w={templatePath:dojo.moduleUrl("lconn.blogs","templates/AddMembers.html")};
w.rs_addMemberDescription="rs_addMemberDescription";
w.rs_notification="rs_notification";
w.rs_author="rs_author";
w.rs_draft="rs_draft";
w.rs_owner="rs_owner";
w.rs_addMember="rs_addMember";
w.rs_authorLower="rs_authorLower";
w.rs_ownerLower="rs_ownerLower";
w.rs_draftLower="rs_draftLower";
w.rs_addMember_title="rs_addMember_title";
w.rs_member_title="rs_member_title";
w.rs_removeMember_title="rs_removeMember_title";
w.lowerLabels={};
w.memberStore=null;
w.typeAhead_W=null;
w.members={};
w.scrollThreshold=4;
w.postMixInProperties=function(){
this.rs_addMemberDescription=rs_addMemberDescription;
this.rs_author=rs_author;
this.rs_owner=rs_owner;
this.rs_draft=rs_draft;
this.rs_authorLower=rs_authorLower;
this.rs_ownerLower=rs_ownerLower;
this.rs_draftLower=rs_draftLower;
this.rs_addMember_title=rs_addMember_title;
this.rs_member_title=rs_member_title;
this.rs_removeMember_title=rs_removeMember_title;
this.lowerLabels={owners:this.rs_ownerLower,authors:this.rs_authorLower,draft:this.rs_draftLower};
};
w.postCreate=function(){
this.members={P:{owners:[],authors:[],draft:[]}};
var _1=blogsContext+"/roller-services/json/typeaheadpeople";
this.memberStore=new lconn.core.PeopleDataStore({url:_1,queryParam:"name"},this.memberStore_AP);
var _2={minChars:2,searchDelay:600,multipleValues:false,store:this.memberStore,"class":"typeAhead"};
this.typeAhead_W=new lconn.core.PeopleTypeAhead(_2,this.membersCombo_AP);
this.typeAhead_W.textbox.title=dojo.i18n.getLocalization("lconn.blogs","strings").rs_enterUser;
this.typeHeadLabel_AP.innerHTML=this.typeAhead_W.hintText;
dojo.attr(this.typeAhead_W.textbox,"aria-labelledby","typeHeadLabel_AP");
dojo.connect(this.typeAhead_W,"onSelect",this,"newMember");
this.memberList_AP.style.height="";
this.memberList_AP.className="memberList";
};
w.uninitialize=function(){
this.members=null;
};
w.reset=function(){
this.members={P:{owners:[],authors:[],draft:[]}};
this.aclLevel_AP.value="authors";
this.typeAhead_W.setValue("");
this.owners_P_AP.value=this.authors_P_AP.value=this.draft_P_AP.value="";
this.memberList_AP.innerHTML="";
this.memberList_AP.style.height="";
this.memberList_AP.className="memberList";
this.memberList_AP.style.visibility="";
};
w.newMember=function(){
var _3=null;
var _4="";
var _5=[];
var _6=false;
_3=this.typeAhead_W.getItem();
_4=this.aclLevel_AP.value;
var _7,_8;
if(_3){
switch(parseInt(_3.type)){
case 0:
_7="P";
break;
default:
_7="P";
}
_8=_3.userid;
}else{
_7="P";
_8=this.typeAhead_W.getTextBoxValue();
if(!_8.match(/.*@.*\..*/)){
return;
}
}
if(_8){
this.members[_7][_4].push(_8);
var _9=document.createElement("div");
dojo.addClass(_9,"member");
dojo.attr(_9,"role","listitem");
_9.innerHTML="<div class=\""+(_7!=undefined?_7:"P")+"\"></div>";
var _a=document.createElement("div");
dojo.addClass(_a,"nameContent");
var _b;
if(_3){
var _c=_3.name+(_3.member?"<"+_3.member+">":"");
_b=lconn.core.NameUtil.getHTML(_c,null,_3.userid,null,true);
}else{
_b=lconn.core.NameUtil.getHTML(_8,_8,null,null,true);
}
_b=_b.replace(/&lt;/g,"&lrm;&lt;").replace(/&gt;/g,"&gt;&lrm;");
_a.innerHTML+=_b+" <span class=\"type\">("+this.lowerLabels[_4]+")</span>";
var _d=document.createElement("input");
_d.className="fieldDel";
_d.type="button";
_d.title=this.rs_removeMember_title;
this.connect(_d,"ondijitclick",dojo.hitch(this,"removeMember",_8,_7,_4,_9));
var _e=document.createElement("a");
_e.className="fieldDelText";
_e.title=this.rs_removeMember_title;
_e.href="javascript:;";
_e.innerHTML="X";
this.connect(_e,"ondijitclick",dojo.hitch(this,"removeMember",_8,_7,_4,_9));
_a.appendChild(_d);
_a.appendChild(_e);
_9.appendChild(_a);
if(this.memberList_AP.firstChild){
this.memberList_AP.insertBefore(_9,this.memberList_AP.firstChild);
}else{
this.memberList_AP.appendChild(_9);
}
this.memberList_AP.style.visibility="visible";
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,_9);
}
if(this.howManyMembers()>=this.scrollThreshold){
this.memberList_AP.style.height=this.memberList_AP.offsetHeight+"px";
dojo.addClass(this.memberList_AP,"scroll");
}
this.typeAhead_W.reset();
lconn.blogs.utils.aria.announce(this.memberList_AP.parentNode,"Selected "+(_3?_3.name:_8)+" as a "+this.lowerLabels[_4]);
}
};
w.howManyMembers=function(){
var _f=0;
for(type in this.members){
for(level in this.members[type]){
_f+=this.members[type][level].length;
}
}
return _f;
};
w.removeMember=function(_10,_11,_12,_13,evt){
if(_13){
this.memberList_AP.removeChild(_13);
}
var i=0;
while(i<this.members[_11][_12].length&&this.members[_11][_12][i]!=_10){
i++;
}
if(i<this.members[_11][_12].length){
this.members[_11][_12].splice(i,1);
}
var _14=this.howManyMembers();
if(_14==0){
this.memberList_AP.style.visibility="hidden";
}else{
if(_14<this.scrollThreshold){
dojo.removeClass(this.memberList_AP,"scroll");
this.memberList_AP.style.height="";
}
}
};
w.setHiddenFields=function(){
var _15={};
var len=0;
for(type in this.members){
_15[type]={};
for(level in this.members[type]){
_15[type][level]=this.members[type][level].join(",");
}
}
this.owners_P_AP.value=_15.P.owners;
this.authors_P_AP.value=_15.P.authors;
this.draft_P_AP.value=_15.P.draft;
};
dojo.declare("lconn.blogs.AddMembers",[lconn.blogs.Res,dijit._Widget,dijit._Templated],w);
}


;if(!dojo._hasResource["lconn.blogs.localDate"]){
dojo._hasResource["lconn.blogs.localDate"]=true;
dojo.provide("lconn.blogs.localDate");
dojo.require("dojo.i18n");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs._localDate",null,{now:new Date(),MILLS_IN_DAY:86400000,init:false,tempDate:new Date(),localize:function(_1,_2){
if(!this.init){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
this.days=[this.messages.Sunday,this.messages.Monday,this.messages.Tuesday,this.messages.Wednesday,this.messages.Thursday,this.messages.Friday,this.messages.Saturday];
this.months=[this.messages.Jan,this.messages.Feb,this.messages.Mar,this.messages.Apr,this.messages.May,this.messages.June,this.messages.July,this.messages.Aug,this.messages.Sep,this.messages.Oct,this.messages.Nov,this.messages.Dec];
var t=new Date();
t.setHours(0);
t.setMinutes(0);
t.setSeconds(0);
t.setMilliseconds(0);
this.todayMidnight=t.getTime();
this.timeline=[this.todayMidnight-this.MILLS_IN_DAY-this.MILLS_IN_DAY,this.todayMidnight-this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY+this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY+this.MILLS_IN_DAY+this.MILLS_IN_DAY];
this.init=true;
}
this.tempDate.setTime(_1);
var _3=this.tempDate;
var d=_3.getDay();
var _4="";
if(_1>=this.todayMidnight&&_1<this.timeline[2]){
if(_2===undefined){
_4=this.messages.Today+" "+this.getLocalizedTime(_3);
}else{
_4=this.messages.Today;
}
}else{
if(_1<this.todayMidnight&&_1>=this.timeline[1]){
if(_2===undefined){
_4=this.messages.Yesterday+" "+this.getLocalizedTime(_3);
}else{
_4=this.messages.Yesterday;
}
}else{
if(_1<this.timeline[1]&&_1>=this.timeline[0]){
if(_2===undefined){
_4=this.days[d]+" "+this.getLocalizedTime(_3);
}else{
_4=this.days[d];
}
}else{
if(_1<this.timeline[3]&&_1>=this.timeline[2]){
_4=this.messages.Tomorrow;
}else{
if(_1<this.timeline[4]&&_1>=this.timeline[3]){
_4=this.days[d];
}else{
if(this.now.getFullYear()==_3.getFullYear()){
if(typeof (this.isEnglishLocale)=="undefined"){
var _5=dojo.locale.substring(0,2).toLowerCase();
var _6="";
if(dojo.locale.length>2){
_6=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_5=="en"&&(_6==""||_6=="us"));
}
if(this.isEnglishLocale){
_4=this.months[_3.getMonth()]+" "+_3.getDate();
}else{
_4=this.getLocalizedDate(_3);
}
}else{
if(typeof (this.isEnglishLocale)=="undefined"){
var _5=dojo.locale.substring(0,2).toLowerCase();
var _6="";
if(dojo.locale.length>2){
_6=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_5=="en"&&(_6==""||_6=="us"));
}
if(this.isEnglishLocale){
_4=this.months[_3.getMonth()]+" "+_3.getDate()+" "+_3.getFullYear();
}else{
_4=this.getLocalizedDate(_3);
}
}
}
}
}
}
}
return "<span class=\"blogsDateTime\" title=\""+_4+"\">"+_4+"</span>";
},getLocalizedTime:function(_7){
return dojo.date.locale.format(_7,{formatLength:"short",selector:"time",locale:dojo.locale});
},getLocalizedDate:function(_8){
return dojo.date.locale.format(_8,{formatLength:"medium",selector:"date",locale:dojo.locale});
}});
lconn.blogs.localDate=new lconn.blogs._localDate();
if(typeof blogsDate=="undefined"){
blogsDate={};
}
if(typeof blogsDate.date=="undefined"){
blogsDate.date=lconn.blogs.localDate;
}
}


;if(!dojo._hasResource["lconn.blogs.tags"]){
dojo._hasResource["lconn.blogs.tags"]=true;
dojo.provide("lconn.blogs.tags");
dojo.require("dojo.cookie");
dojo.declare("lconn.blogs._tags",null,{pivotBrowseTag:function(_1){
var s=_1;
if(!s){
var e=dojo.byId("taginput");
if(typeof (tagList)!="undefined"){
var _2="";
for(var i=0;i<tagList.length;i++){
_2=_2+" "+tagList[i];
}
s=_2+" "+e.value;
}else{
s=e.value;
e.value="";
}
}
if(s!=""){
var a=dojo.byId("actualtagform").action;
if(a.indexOf("?")==-1){
document.location.href=dojo.byId("actualtagform").action+encodeURIComponent(s)+"?lang="+langParaValue;
}else{
document.location.href=dojo.byId("actualtagform").action+encodeURIComponent(s)+"&lang="+langParaValue;
}
}
},minVisThreshold:0,showTagVis:function(){
var e=dojo.byId("tagbin");
if(!e){
return;
}
var as=e.getElementsByTagName("span");
for(var i=0;i<as.length;i++){
var a=as[i];
var m=a.className.match(/^f\d+-(\d+)/);
if(m){
a.style.display=(m[1]>=(100-this.minVisThreshold))?"inline":"none";
}
}
},updateTagVis:function(t){
this.minVisThreshold=t;
dojo.cookie("sliderVis_value",t,{path:"/"});
this.showTagVis();
},createSlider:function(_3){
var t;
t=dojo.cookie("sliderVis_value");
this.minVisThreshold=(typeof t=="undefined"?0:Math.max(Math.min(parseFloat(t),100),0));
var s=["<div dojoType=\"dijit.form.HorizontalSlider\" id=\"",_3,"\" value=\"",this.minVisThreshold,"\"","maximum=\"100\" minimum=\"0\" pageIncrement=\"1\" showButtons=\"false\" intermediateChanges=\"true\"","style=\"height: 17px; float: left; padding-top: 5px\" onChange=\"lconn.blogs.tags.updateTagVis(arguments[0]);\"></div>"].join("");
document.write(s);
dojo.addOnLoad(function(){
dijit.byId(_3).sliderBarContainer.style.width="100%";
});
}});
lconn.blogs.tags=new lconn.blogs._tags();
}


;if(!dojo._hasResource["lconn.blogs.rating"]){
dojo._hasResource["lconn.blogs.rating"]=true;
dojo.provide("lconn.blogs.rating");
dojo.require("dojo.i18n");
dojo.require("lconn.blogs.utils");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs._rating",null,{displayRecommendeeList:function(_1,_2,id,_3,_4){
if(typeof MenuPopup=="undefined"){
return;
}
if(dojo.isIE){
if(typeof this.__last!="undefined"&&this.__last&&typeof this.__last[id]!="undefined"&&this.__last[id]){
var n=new Date().getTime();
if(n-this.__last[id]<=Popup.Effect.DURATION*2){
return;
}
}
this.__last={};
this.__last[id]=new Date().getTime();
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
var _5=dojo.byId("popup_recommendeelist");
if(!_5){
_5=document.createElement("div");
_5.className="ratingPopup popup";
_5.setAttribute("id","popup_recommendeelist");
_5.setAttribute("role","alert");
document.body.appendChild(_5);
}
var _6="<h3 class=\"lotusAlignLeft\">";
var _7=eval("ratings['"+_2+"_"+id+"_recommentees']");
if(_3==1){
if(!currentLogin.auth){
_6=_6+"<a href=\""+getLoginRedirectURL()+"\">"+(_2=="entry"?this.messages.RatingLoginToRate:this.messages.RatingCommentLoginToRate)+"</a>";
}else{
if(typeof _7!="undefined"&&_7.size>0&&_7[currentLogin.uid]){
_6=_6+(_2=="entry"?this.messages.RatingEntryRated:this.messages.RatingCommentRated);
}else{
_6=_6+(_2=="entry"?this.messages.RatingClickToRateEntry:this.messages.RatingClickToRateComment);
}
}
}
if(typeof _7!="undefined"&&_7.size>0){
if(_3==1){
_6=_6+"<br>";
}
_6=_6+this.messages.RatingRecommentedBy;
_6=_6+"</h3>";
if(!_7["_"]){
var s="";
for(uid in _7){
if(uid=="size"){
continue;
}
if(uid=="_"){
continue;
}
if(s!=""){
s+=", ";
}
s+=_7[uid];
}
_7["_"]=s;
}
_6=_6+"<span class=\"lotusOffScreen\">"+lconn.blogs.utils.escapeHTML(_7["_"])+"</span>";
_6=_6+"<textarea readonly=\"readonly\" style=\"border: 1px solid gray; background-color: rgb(255, 255, 255);\">"+lconn.blogs.utils.escapeHTML(_7["_"])+"</textarea>";
}
_5.innerHTML=_6;
MenuPopup.showMenu("popup_recommendeelist",_1,{focus:_4});
},hideRecommendeeList:function(_8,_9,id,_a,_b){
if(dojo.isIE){
MenuPopup.returnFocusElement=false;
}
MenuPopup.hideMenu();
},recommend:function(_c,_d,id,_e){
if(!currentLogin.auth){
return;
}
var _f=eval("ratings['"+_c+"_"+id+"_recommentees']");
if(typeof _f!="undefined"&&_f.size>0&&_f[currentLogin.uid]){
return;
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
dojo.xhrPost({url:_d,handleAs:"json",content:_c=="entry"?{version:250,rating:5,dangerousurlnonce:window.__security_nonce}:{version:250,rating:5,dangerousurlnonce:window.__security_nonce,commentid:id},load:function(_10){
if(_10.success){
var _11=eval("ratings['"+_c+"_"+id+"_recommentees']");
if(typeof _11=="undefined"){
eval("ratings['"+_c+"_"+id+"_recommentees']={'size':0, '_':''}");
_11=eval("ratings['"+_c+"_"+id+"_recommentees']");
}
if(_11.size>0&&_11[currentLogin.uid]){
return;
}
_11[currentLogin.uid]=window.currentLogin.name;
_11.size++;
_11["_"]=null;
var e=dojo.byId(_c+"_rating_"+id);
var x=dojo.query("[name=\"rating_btn\"]",e);
if(x&&x.length==1){
x[0].style.display="none";
}
var r=Math.min(Math.floor(_11.size/10)+1,8);
x=dojo.query("[name=\"rating_icon\"]",e);
if(x&&x.length==1){
x[0].innerHTML="";
var img=document.createElement("img");
img.border="0";
if(r==1){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating16_on.png";
}else{
if(r==2){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating2-16.png";
}else{
if(r==3){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating3-16.png";
}else{
img.src=BlogsBaseUrl+"/nav/common/styles/images/iconRating"+r+".gif";
}
}
}
img.alt=lconn.blogs.rating.messages.RatingsAltRatings;
x[0].appendChild(img);
}
x=dojo.query("[name=\"rating_count\"]",e);
if(x&&x.length==1){
x[0].innerHTML=_11.size;
}
var rl=dojo.query("[name=\"recommendLink_"+_c+"_"+id+"\"]");
if(rl&&rl.length==1){
rl[0].onclick=function(){
};
dojo.addClass(rl[0],"disabledLink");
rl[0].tabIndex=0;
rl[0].setAttribute("aria-pressed","true");
rl[0].setAttribute("aria-disabled","true");
rl[0].title=(_c=="entry"?dojo.i18n.getLocalization("lconn.blogs","strings").RatingEntryRated:dojo.i18n.getLocalization("lconn.blogs","strings").RatingCommentRated);
}
if(typeof _e!="undefined"&&_e!=null&&_e.focusElem){
_e.focusElem.focus();
}else{
dojo.query("[name=\"rating_icon_link\"]",e)[0].focus();
}
}else{
if(_10.error){
if("session timeout"==_10.error){
lconn.blogs.utils.refreshSecurityNonce(_10.nonce);
var _12=dojo.i18n.getLocalization("lconn.blogs","strings").rs_sessionTimeout;
showDialog(_12);
}else{
showDialog(_10.error);
}
}
}
}});
}});
lconn.blogs.rating=new lconn.blogs._rating();
}


;dojo.cache("lconn.blogs", "templates/voting.html", "<div class=\"ideaVotingDiv\" dojoAttachPoint=\"votingDiv\"> <div class=\"ideaVotingNumber\" dojoAttachPoint=\"currentVoteDiv\">${currentVote}</div> <div class=\"ideaVotingButtonDiv\" dojoAttachPoint=\"votingButtonDiv\"> <a href=\"javascript:;\" role=\"button\" class=\"ideaVotingButton\" dojoAttachPoint=\"voteButton\" dojoAttachEvent=\"onclick: doVote, onmouseenter: updateTooltip\"> <img dojoAttachPoint=\"voteImg\" alt=\"\" role=\"presentation\"> <span dojoAttachPoint=\"voteImgAlt\" class=\"lotusAltText\">&#8593;</span> <span dojoAttachPoint=\"voteText\">${rs_vote}</span> </a> </div></div>");

;if(!dojo._hasResource["lconn.blogs.voting"]){
dojo._hasResource["lconn.blogs.voting"]=true;
dojo.provide("lconn.blogs.voting");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.Tooltip");
dojo.require("dojo.i18n");
dojo.require("lconn.blogs.utils");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.voting",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.blogs","templates/voting.html"),entryId:"",uri:"",currentVote:0,isVoted:false,isDisabled:false,canVote:false,loginVoteStr:"",loginRedirectURL:"",messages:null,tooltip:null,inProcess:false,postMixInProperties:function(){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
this.rs_vote=this.messages.rs_vote;
this.rs_voted=this.messages.rs_voted;
},postCreate:function(){
this.inherited(arguments);
if(!currentLogin.auth){
this.voteButton.title=this.loginVoteStr;
}else{
this.tooltip=new lconn.blogs.voting.Tooltip({connectId:this.voteButton,label:this.messages.rs_vote_end});
}
this.update(this.isVoted);
if(this.isDisabled){
this.disable();
}
},updateTooltip:function(){
if(!currentLogin.auth||this.isDisabled){
return;
}
if(!this.canVote){
this.tooltip.label=this.messages.rs_member_only;
return;
}
var _1;
if(this.isVoted){
_1=this.messages.rs_clickToUnvote;
}else{
_1=this.messages.rs_clickToVote;
}
if(!currentLogin.voteMax){
this.tooltip.label=_1;
}else{
if(currentLogin.votedCount>=currentLogin.voteMax){
if(this.isVoted){
this.tooltip.label=_1+" "+this.messages.rs_no_vote_left;
}else{
this.tooltip.label=this.messages.rs_no_vote_left;
}
}else{
var _2=currentLogin.voteMax-currentLogin.votedCount;
this.tooltip.label=_1+" "+dojo.string.substitute(this.messages.rs_remaining_vote,[_2,currentLogin.voteMax]);
}
}
},doVote:function(e){
if(!currentLogin.auth){
window.location.replace(this.loginRedirectURL);
dojo.stopEvent(e);
return;
}
if(this.isDisabled||!this.canVote){
return;
}
if(this.isVoted){
lconn.blogs.utils.confirm(this.messages.rs_confirmUnvote,dojo.hitch(this,"unvote"),null,this.voteButton);
}else{
this.vote();
this.voteButton.focus();
}
},disable:function(){
this.isDisabled=true;
dojo.removeClass(this.votingDiv,"ideaVotingDiv");
dojo.addClass(this.votingDiv,"ideaVotingDivDisabled");
dojo.removeClass(this.votingButtonDiv,"ideaVotingButtonDiv");
dojo.addClass(this.votingButtonDiv,"ideaVotingButtonDivDisabled");
dojo.attr(this.voteButton,"aria-disabled","true");
dojo.removeClass(this.voteButton,"ideaVotingButton");
dojo.addClass(this.voteButton,"ideaVotingButtonDisabled");
if(this.tooltip){
this.tooltip.label=this.messages.rs_vote_end;
}
},enable:function(){
this.isDisabled=false;
dojo.removeClass(this.votingDiv,"ideaVotingDivDisabled");
dojo.addClass(this.votingDiv,"ideaVotingDiv");
dojo.removeClass(this.votingButtonDiv,"ideaVotingButtonDivDisabled");
dojo.addClass(this.votingButtonDiv,"ideaVotingButtonDiv");
dojo.attr(this.voteButton,"aria-disabled","false");
dojo.addClass(this.voteButton,"ideaVotingButton");
dojo.removeClass(this.voteButton,"ideaVotingButtonDisabled");
},update:function(_3){
this.currentVoteDiv.innerHTML="<span class=\"lotusOffScreen\">"+this.messages.rs_voted+":</span>"+this.currentVote;
if(_3){
if(this.canVote){
dojo.addClass(this.voteText,"lotusInactive");
dojo.attr(this.voteButton,"aria-pressed","true");
dojo.attr(this.voteImg,"class","otherFramework16 otherFramework16-menuCheckmark12");
this.voteImg.setAttribute("src",dijit._Widget.prototype._blankGif);
this.voteImgAlt.innerHTML="&#8730;";
this.voteText.innerHTML=this.messages.rs_voted;
}else{
if(!this.isDisabled){
dojo.addClass(this.voteText,"lotusInactive");
dojo.addClass(this.voteButton,"ideaVotingButtonDisabled");
}
dojo.attr(this.voteButton,"aria-pressed","true");
dojo.attr(this.voteImg,"class","otherFramework16 otherFramework16-menuCheckmark12");
this.voteImg.setAttribute("src",dijit._Widget.prototype._blankGif);
this.voteImgAlt.innerHTML="&#8730;";
this.voteText.innerHTML=this.messages.rs_voted;
}
}else{
if(this.canVote){
dojo.removeClass(this.voteText,"lotusInactive");
dojo.attr(this.voteButton,"aria-pressed","false");
dojo.attr(this.voteImg,"class","iconsOther16 iconsOther16-Vote14");
this.voteImg.setAttribute("src",dijit._Widget.prototype._blankGif);
this.voteImgAlt.innerHTML="&#8593;";
this.voteText.innerHTML=this.messages.rs_vote;
}else{
if(currentLogin.auth&&!this.isDisabled){
dojo.addClass(this.voteText,"lotusInactive");
dojo.addClass(this.voteButton,"ideaVotingButtonDisabled");
}else{
dojo.removeClass(this.voteText,"lotusInactive");
}
dojo.attr(this.voteButton,"aria-pressed","false");
dojo.attr(this.voteImg,"class","iconsOther16 iconsOther16-Vote14");
this.voteImg.setAttribute("src",dijit._Widget.prototype._blankGif);
this.voteImgAlt.innerHTML="&#8593;";
this.voteText.innerHTML=this.messages.rs_vote;
}
}
this.updateTooltip();
},updateVotLimitNumber:function(_4){
var _5;
if(_4>1||_4==0){
_5=dojo.string.substitute(this.messages.rs_vote_limit_Str,[currentLogin.voteMax,_4]);
}else{
_5=dojo.string.substitute(this.messages.rs_vote_limit_Str_single,[currentLogin.voteMax]);
}
if(dojo.byId("voteLimitStrSpan")){
dojo.byId("voteLimitStrSpan").innerHTML=_5;
}
},vote:function(){
if(!currentLogin.auth){
return;
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
if(this.inProcess){
return;
}
this.inProcess=true;
var _6={url:this.uri,handleAs:"json",content:{action:"add",entryid:this.entryId,dangerousurlnonce:window.__security_nonce},load:dojo.hitch(this,function loadFunct(_7,_8){
if(_7.success){
this.currentVote++;
this.isVoted=true;
if(currentLogin.voteMax){
currentLogin.votedCount++;
this.updateVotLimitNumber(currentLogin.voteMax-currentLogin.votedCount<0?0:currentLogin.voteMax-currentLogin.votedCount);
}
if(this.tooltip){
this.tooltip.close();
}
this.update(true);
}else{
if("session timeout"==_7.error){
lconn.blogs.utils.refreshSecurityNonce(_7.nonce);
var _9=this.messages.rs_sessionTimeout;
showDialog(_9);
}else{
showDialog(_7.error);
}
}
this.inProcess=false;
})};
dojo.xhrPost(_6);
},unvote:function(){
if(!currentLogin.auth){
return;
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
var _a={url:this.uri,handleAs:"json",content:{action:"remove",entryid:this.entryId,dangerousurlnonce:window.__security_nonce},load:dojo.hitch(this,function loadFunct(_b,_c){
if(_b.success){
this.currentVote--;
this.isVoted=false;
if(currentLogin.voteMax){
currentLogin.votedCount--;
this.updateVotLimitNumber(currentLogin.voteMax-currentLogin.votedCount<0?0:currentLogin.voteMax-currentLogin.votedCount);
}
if(this.tooltip){
this.tooltip.close();
}
this.update(false);
}else{
if("session timeout"==_b.error){
lconn.blogs.utils.refreshSecurityNonce(_b.nonce);
var _d=this.messages.rs_sessionTimeout;
showDialog(_d);
}else{
showDialog(_b.error);
}
}
})};
dojo.xhrPost(_a);
}});
dojo.declare("lconn.blogs.voting._MasterTooltip",[dijit._MasterTooltip],{show:function(){
this.inherited(arguments);
dojo.addClass(this.domNode,"blogsVotingTooltip");
}});
dojo.declare("lconn.blogs.voting.Tooltip",[dijit.Tooltip],{open:function(_e){
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
lconn.blogs.voting.showTooltip(this.label||this.domNode.innerHTML,_e,this.position);
this._connectNode=_e;
this.onShow(_e,this.position);
},close:function(){
if(this._connectNode){
lconn.blogs.voting.hideTooltip(this._connectNode);
delete this._connectNode;
this.onHide();
}
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
}});
lconn.blogs.voting.showTooltip=function(_f,_10,_11){
if(!lconn.blogs.voting._masterTT){
lconn.blogs.voting._masterTT=new lconn.blogs.voting._MasterTooltip();
}
return lconn.blogs.voting._masterTT.show(_f,_10,_11);
};
lconn.blogs.voting.hideTooltip=function(_12){
if(!lconn.blogs.voting._masterTT){
lconn.blogs.voting._masterTT=new lconn.blogs.voting._MasterTooltip();
}
return lconn.blogs.voting._masterTT.hide(_12);
};
dojo.addOnLoad(function(){
var _13=currentLogin.voteMax;
var _14=currentLogin.votedCount;
var _15=dojo.i18n.getLocalization("lconn.blogs","strings");
if(currentLogin.auth&&currentLogin.canVoteBlog!=-1&&_13){
var _16=_13-_14;
if(_16<0){
_16=0;
}
var _17;
if(_16>1||_16==0){
_17=dojo.string.substitute(_15.rs_vote_limit_Str,[_13,_16]);
}else{
_17=dojo.string.substitute(_15.rs_vote_limit_Str_single,[_13]);
}
lconn.blogs.utils.setIndicator("voteLimitIndicator","<span id=\"voteLimitStrSpan\">"+_17+"</span>");
}
});
}


;if(!dojo._hasResource["lconn.blogs.TimezonePicker"]){
dojo._hasResource["lconn.blogs.TimezonePicker"]=true;
dojo.provide("lconn.blogs.TimezonePicker");
dojo.require("dojo.i18n");
dojo.requireLocalization("lconn.blogs","strings");
getClientBrowserTimezone=function(){
var _1=function(_2){
var _3;
_2=Math.abs(_2);
var a=Math.floor(_2);
var b=(_2-a)*60;
if(_2<10){
_3="0"+a+(b==0?"00":b);
}else{
_3=""+a+(b==0?"00":b);
}
return _3;
};
timeZoneMapping={"n1200":"Etc/GMT+12","n1100":"Pacific/Pago_Pago","n1000":"Pacific/Honolulu","n0900":"America/Anchorage","n0800":"America/Los_Angeles","n0700":"America/Phoenix","n0600":"America/Guatemala","n0500":"America/Lima","n0400":"America/Halifax","n0330":"America/St_Johns","n0300":"America/Sao_Paulo","n0200":"Atlantic/South_Georgia","n0100":"Atlantic/Azores","_00":"Europe/London","p0100":"Europe/Amsterdam","p0200":"Asia/Amman","p0300":"Asia/Baghdad","p0330":"Asia/Tehran","p0400":"Asia/Muscat","p0430":"Asia/Kabul","p0500":"Asia/Yekaterinburg","p0530":"Asia/Calcutta","p0545":"Asia/Katmandu","p0600":"Asia/Almaty","p0630":"Asia/Rangoon","p0700":"Asia/Bangkok","p0800":"Asia/Hong_Kong","p0900":"Asia/Tokyo","p0930":"Australia/Adelaide","p1000":"Australia/Brisbane","p1100":"Pacific/Noumea","p1200":"Pacific/Auckland","p1300":"Pacific/Tongatapu"};
var _4=new Date();
var _5=_4.toString();
_5=_5.substring(_5.length-8);
if(_5==dojo.byId("serverDefaultTimezoneOffset").value&&dojo.byId("serverDefaultTimezoneID").value!=""){
return dojo.byId("serverDefaultTimezoneID").value;
}
var _6=new Date(_4.getFullYear(),0,1,0,0,0,0);
var _7=new Date(_6.toGMTString().substring(0,_6.toGMTString().lastIndexOf(" ")-1));
var _8=(_7-_6)/(1000*60*60);
var _9;
if(_8<0){
_9="p"+_1(_8);
}else{
if(_8>0){
_9="n"+_1(_8);
}else{
_9="_00";
}
}
var _a=eval("timeZoneMapping."+_9);
return _a;
};
}


;if(!dojo._hasResource["lconn.blogs.TabContainer"]){
dojo._hasResource["lconn.blogs.TabContainer"]=true;
dojo.provide("lconn.blogs.TabContainer");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.declare("lconn.blogs.TabContainer",[dijit._Widget,dijit._Templated,dijit._Container],{selected:"",templateString:"<DIV>"+"<DIV class=\"lotusTabContainer\">"+"<UL class=\"lotusTabs\" dojoAttachPoint=\"tabsNode\" role=\"toolbar\"></UL>"+"</DIV>"+"<DIV dojoAttachPoint=\"containerNode\" style=\"height:auto !important\"></DIV>"+"</DIV>",startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(_1){
this.addTab(_1);
},this);
this.containerNode.setAttribute("id",this.id+"_containerNode");
this.tabsNode.setAttribute("aria-controls",this.containerNode.getAttribute("id"));
new lconn.core.aria.Toolbar(this.tabsNode);
this.inherited(arguments);
},addTab:function(_2){
var li=document.createElement("LI");
li.name=_2.name;
dojo.addClass(li,"lotusTab");
this.tabsNode.appendChild(li);
var _3=document.createElement("DIV");
li.appendChild(_3);
var _4=document.createElement("A");
_4.setAttribute("name",_2.name+"_LINK");
_4.title=_2.title;
_4.href="#";
_4.onclick=dojo.hitch(this,"selectTab",_2.name);
_4.setAttribute("role","button");
_4.setAttribute("aria-pressed","false");
_4.innerHTML=_2.title;
_3.appendChild(_4);
if(_2.name==this.selected){
dojo.addClass(li,"lotusSelected");
li.style.fontWeight="bold";
_4.setAttribute("aria-pressed","true");
_2.domNode.style.display="";
}
},selectTab:function(_5,_6){
if(!_6&&this.selected==_5){
return false;
}
this.selected=_5;
dojo.forEach(dojo.query(".lotusTab",this.tabsNode),function(_7){
if(_7.name==_5){
dojo.addClass(_7,"lotusSelected");
_7.style.fontWeight="bold";
dojo.attr(dojo.query("a",_7)[0],"aria-pressed","true");
}else{
dojo.removeClass(_7,"lotusSelected");
_7.style.fontWeight="";
dojo.attr(dojo.query("a",_7)[0],"aria-pressed","false");
}
});
dojo.forEach(dojo.query(".lotusTabContent",this.containerNode),function(_8){
_8.style.display=(dojo.attr(_8,"name")==_5)?"":"none";
});
return false;
}});
dojo.declare("lconn.blogs.TabContent",[dijit._Widget,dijit._Templated,dijit._Contained],{name:"",title:"",templateString:"<DIV dojoAttachPoint=\"containerNode\" name=\"${name}\" class=\"lotusTabContent\" style=\"display:none;\"></DIV>"});
}


;if(!dojo._hasResource["lconn.blogs.notification.receivers"]){
dojo._hasResource["lconn.blogs.notification.receivers"]=true;
dojo.provide("lconn.blogs.notification.receivers");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dojo.i18n");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.notification.receivers",[dijit._Widget,dijit._Templated],{templateString:"<DIV dojoAttachPoint=\"receiversContainer\" tabindex=\"0\" role=\"list\">"+"<DIV class=\"lotusFilters2\" dojoAttachPoint=\"receiverList_AP\"></DIV>"+"<INPUT type=\"hidden\" name=\"receivers\" dojoAttachPoint=\"receivers_AP\" value=\"\">"+"</DIV>",receivers:[],inputBox:false,ariaHelper:false,startup:function(){
this.receivers_AP.clear=dojo.hitch(this,"clear");
this.receiversContainer.setAttribute("id",this.id+"_receiversContainer");
this.receiversContainer.onfocus=dojo.hitch(this,function(){
this.ariaHelper.selIdx=this.ariaHelper.allItems.length-1;
for(var i=0;i<this.ariaHelper.allItems.length;i++){
this.ariaHelper.allItems[i].tabIndex=-1;
}
});
},form:function(){
return this.receivers_AP.form;
},onChange:null,add:function(_1,_2,_3){
if(typeof _2=="undefined"&&typeof _3=="undefined"){
return;
}
var t=[];
for(var i=0;i<this.receivers.length;i++){
if((typeof _2=="undefined"||this.receivers[i].extid!=_2)&&(typeof _3=="undefined"||this.receivers[i].email!=_3)){
t.push(this.receivers[i]);
}
}
t.push({"extid":_2,"email":_3,"fullname":_1});
this.receivers=t;
if(this.onChange){
this.onChange({"extid":_2,"email":_3,"fullname":_1},"add");
}
this.repaint();
lconn.blogs.utils.aria.announce(this.receiversContainer.parentNode,"Selected "+_1+" as a notification receiver");
},remove:function(_4,_5){
if(typeof _4=="undefined"&&typeof _5=="undefined"){
return;
}
var t=[];
for(var i=0;i<this.receivers.length;i++){
if((typeof _4=="undefined"||this.receivers[i].extid!=_4)&&(typeof _5=="undefined"||this.receivers[i].email!=_5)){
t.push(this.receivers[i]);
}
}
this.receivers=t;
if(this.onChange){
this.onChange({"extid":_4,"email":_5},"remove");
}
this.repaint();
if(this.receivers.length>0){
this.receiversContainer.focus();
}else{
if(this.inputBox){
this.inputBox.focus();
}
}
},clear:function(){
this.receivers=[];
if(this.onChange){
this.onChange(this.receivers);
}
this.repaint();
},repaint:function(){
if(this.ariaHelper){
this.ariaHelper.destroy();
this.ariaHelper=false;
}
var _6=dojo.i18n.getLocalization("lconn.blogs","strings");
var s="";
for(var i=0;i<this.receivers.length;i++){
if(s.length>0){
s=s+", ";
}
var _7=this.receivers[i];
s=s+"<"+(typeof _7.extid=="undefined"?_7.email:_7.extid)+">";
}
this.receivers_AP.value=s;
this.receiverList_AP.innerHTML="";
for(var i=0;i<this.receivers.length;i++){
var _7=this.receivers[i];
var _8=document.createElement("a");
dojo.addClass(_8,"lotusFilter");
dojo.attr(_8,"id","receiver_"+i);
dojo.attr(_8,"role","listitem");
dojo.attr(_8,"title",_6.rs_removeMember_title);
dojo.attr(_8,"href","javascript:dojo.byId('receiver_"+i+"')._onclick();");
_8._onclick=dojo.hitch(this,"remove",_7.extid,_7.email);
_8.onblur=function(){
this.tabIndex=-1;
};
this.receiverList_AP.appendChild(_8);
var _9=document.createElement("label");
dojo.addClass(_9,"lotusOffScreen");
_9.innerHTML=_6.rs_removeMember_title;
_8.appendChild(_9);
var _a=document.createElement("nobr");
_8.appendChild(_a);
var _b=document.createElement("span");
dojo.addClass(_b,"vcard");
_a.appendChild(_b);
var _c=document.createElement("span");
if(_7.extid!=-1){
dojo.addClass(_c,"lotusPerson");
dojo.addClass(_c,"fn");
dojo.addClass(_c,"person");
}
_c.innerHTML=_7.fullname;
_b.appendChild(_c);
if(typeof _7.extid!="undefined"){
var _d=document.createElement("span");
dojo.addClass(_d,"x-lconn-userid");
_d.style.display="none";
_d.innerHTML=_7.extid;
_b.appendChild(_d);
}
if(typeof _7.email!="undefined"){
var _d=document.createElement("span");
dojo.addClass(_d,"email");
_d.style.display="none";
_d.innerHTML=_7.email;
_b.appendChild(_d);
}
var _e=document.createElement("img");
dojo.addClass(_e,"lotusDelete");
dojo.attr(_e,"role","presentation");
dojo.attr(_e,"alt",_6.rs_removeMember_title);
dojo.attr(_e,"src",dijit._Widget.prototype._blankGif);
_a.appendChild(_e);
var _f=document.createElement("span");
dojo.addClass(_f,"lotusAltText");
_f.innerHTML="X";
_a.appendChild(_f);
}
var _10=document.createTextNode(" ");
this.receiverList_AP.appendChild(_10);
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.receiverList_AP);
}
this.ariaHelper=new lconn.core.aria._Helper(this.id+"_receiversContainer",{containerRole:"list",itemRole:"listitem"});
dojo.connect(this.ariaHelper,"_focusItem",function(){
if(this.allItems.length==1){
dijit.focus(this.allItems[0]);
this.selIdx=0;
}
});
}});
}


;if(!dojo._hasResource["lconn.blogs.Menu"]){
dojo._hasResource["lconn.blogs.Menu"]=true;
dojo.provide("lconn.blogs.Menu");
dojo.declare("lconn.blogs.PopupClass",null,{open:{},returnFocusElement:false,numOpenPopups:0,passedState:{},toggler:null,CONTAINER:"oa-popup-container",BACKGROUND:"oa-popup-iframe",constructor:function(){
},show:function(id,_1,_2){
_2=_2||{};
if(this.isOpen(id)){
this.hide(id);
}else{
if(_2.focus){
this.returnFocusElement=_2.focus;
}
_1=dojo.fixEvent(_1);
var _3=_1.target;
var _4=dojo.byId(id);
var _5={element:_4,state:_2.state||{},placement:_2.placement||"",callFunction:_2.closeFunction||""};
var _6=this.getPopupContainer();
_6.appendChild(_4);
var _7=this.getPopupBackground();
this.open[id]=_5;
this.numOpenPopups++;
this.sizeBackground(_4,_7,_3,_1);
var _8=this.calculatePosition(_4,_3,_1,_5.placement);
new Popup.Effect.Appear(id,_8.left,_8.top);
new Popup.Effect.Appear(this.BACKGROUND,_8.left,_8.top);
dojo.stopEvent(_1);
}
},hide:function(id,_9){
var _a=dojo.byId(id);
dojo.byId(this.BACKGROUND).style.display="none";
new Popup.Effect.Fade(_a);
var _b=this.open[id];
this.numOpenPopups--;
if(this.numOpenPopups==0&&this.returnFocusElement){
dojo.byId(this.returnFocusElement).focus();
this.returnFocusElement=false;
}
this.open[id]=false;
if(dojo.isString(_b.callFunction)){
eval(_b.callFunction);
}else{
if(dojo.isFunction(_b.callFunction)){
_b.callFunction();
}
}
},isOpen:function(id){
var _c=this.open[id];
return _c!=false&&_c!==null&&_c!==undefined;
},getState:function(id){
return this.open[id].state;
},getReturnFocus:function(){
return this.returnFocusElement;
},clearReturnFocus:function(){
var _d=this.returnFocusElement;
this.returnFocusElement=false;
return _d;
},getPopupBackground:function(){
var _e=dojo.byId(this.BACKGROUND);
if(_e==null){
var _e=dojo.doc.createElement("iframe");
_e.setAttribute("id",this.BACKGROUND);
_e.setAttribute("frameBorder","no");
_e.setAttribute("tabindex","-1");
_e.src="javascript:\"\"";
document.body.appendChild(_e);
_e=dojo.byId(this.BACKGROUND);
_e.style.position="absolute";
_e.style.left="0";
_e.style.top="0";
_e.style.zIndex="899";
}else{
_e.style.display="block";
}
return _e;
},getPopupContainer:function(){
var _f=dojo.byId(this.CONTAINER);
if(_f==null){
var _f=document.createElement("div");
_f.setAttribute("id",this.CONTAINER);
document.body.appendChild(_f);
popupBackground=dojo.byId(this.CONTAINER);
popupBackground.style.position="absolute";
popupBackground.style.left="0";
popupBackground.style.top="0";
popupBackground.style.zIndex="1100";
}
return _f;
},menuGetOffsetTop:function(_10,_11){
var _12=0;
var _13=_10;
while(_13){
_12+=_13.offsetTop;
_13=_13.offsetParent;
if(_13){
_12-=_13.scrollTop;
}
}
return _12;
},menuGetOffsetLeft:function(_14,_15){
var _16=0;
var _17=_14;
while(_17){
_16+=_17.offsetLeft;
_17=_17.offsetParent;
if(_17){
_16-=_17.scrollLeft;
}
}
return _16;
},calculatePosition:function(_18,_19,_1a,_1b){
var _1c;
if(_1b==""){
if(typeof (bidir)!="undefined"&&bidir!=null&&bidir=="rtl"){
_1c=(_18.offsetWidth>0)?_18.offsetWidth:175;
_1c=24-_1c;
}else{
_1c=_19.offsetWidth-24;
}
var _1d=(this.menuGetOffsetTop(_19,0)+_19.offsetHeight-10);
var _1e=(this.menuGetOffsetLeft(_19,0)+_1c);
}else{
_1c=0;
var _1f=_1b.split(",");
switch(_1f[0]){
case "left":
_1e=this.menuGetOffsetLeft(_19,0);
break;
case "right":
_1e=this.menuGetOffsetLeft(_19,0)+_19.offsetWidth;
break;
default:
_1e=parseInt(_1f[0]);
}
switch(_1f[1]){
case "above":
_1d=this.menuGetOffsetTop(_19,0)-_18.offsetHeight;
break;
case "top":
_1d=this.menuGetOffsetTop(_19,0);
break;
case "bottom":
_1d=this.menuGetOffsetTop(_19,0)+_19.offsetHeight;
break;
default:
_1d=parseInt(_1f[1]);
}
}
var _20=document.documentElement?document.documentElement:document.body;
var _21=window.innerHeight?window.innerHeight:_20.clientHeight;
var _22=window.innerWidth?window.innerWidth:_20.clientWidth;
var _23=document.all?document.body.scrollLeft:window.pageXOffset;
var _24=document.all?document.body.scrollTop:window.pageYOffset;
if((_1d+_18.offsetHeight)>(_21+_24)){
_1d-=_18.offsetHeight;
}
if((_1e+_18.offsetWidth)>(_22+_23)){
_1e-=_18.offsetWidth;
}
if(_1d<_24){
_1d=_24;
}
if(_1e<_23){
_1e=_23;
}
if(dojo.isSafari||dojo.isChrome){
_1e+=_23;
_1d+=_24;
}
return {left:_1e+"px",top:_1d+"px"};
},sizeBackground:function(_25,_26,_27,_28){
dojo.style(_25,"display","inline");
_26.width=_25.offsetWidth;
_26.height=_25.offsetHeight;
}});
dojo.declare("lconn.blogs.MenuPopupClass",lconn.blogs.PopupClass,{currentMenu:false,hideMenu:function(_29){
if(this.currentMenu){
this.hide(this.currentMenu);
this.currentMenu=false;
}
},showMenu:function(id,_2a,_2b){
var _2c=this.currentMenu;
this.hideMenu();
if(id!=_2c){
this.currentMenu=id;
this.show(id,_2a,_2b);
}
},hideOnKeypress:function(_2d){
if(typeof (_2d)!="undefined"&&_2d!==null&&_2d.keyCode==Event.KEY_ESC){
MenuPopup.hideMenu();
}
},isMenuOpen:function(){
if(this.currentMenu){
return true;
}
return false;
},getState:function(){
if(this.currentMenu){
return this.open[this.currentMenu].state;
}
}});
Popup=new lconn.blogs.PopupClass();
MenuPopup=new lconn.blogs.MenuPopupClass();
Popup.Effect={};
Popup.Effect.DURATION=250;
Popup.Effect.Fade=function(_2e){
_2e=dojo.byId(_2e);
var _2f=dojo.style(_2e,"opacity");
var _30=dojo.fadeOut({node:_2e,duration:Popup.Effect.DURATION});
dojo.connect(_30,"onEnd",function(){
dojo.style(_2e,"opacity",_2f);
dojo.style(_2e,"left","-9999px");
dojo.style(_2e,"display","none");
});
_30.play();
};
Popup.Effect.Appear=function(_31,x,y){
_31=dojo.byId(_31);
dojo.style(_31,"opacity",0);
dojo.style(_31,"left",x);
dojo.style(_31,"top",y);
dojo.style(_31,"display","inline");
dojo.fadeIn({node:_31,duration:Popup.Effect.DURATION}).play();
};
}


;if(!dojo._hasResource["lconn.blogs.TypeAhead"]){
dojo._hasResource["lconn.blogs.TypeAhead"]=true;
dojo.provide("lconn.blogs.TypeAhead");
dojo.require("lconn.core.TypeAhead");
dojo.declare("lconn.blogs.TypeAhead",[lconn.core.TypeAhead],{onsubmit:"",_onKeyPress:function(_1){
var _2=this._isShowingNow;
this.inherited("_onKeyPress",arguments);
var _3=_1.charOrCode;
if(_1.altKey||(_1.ctrlKey&&(_3!="x"&&_3!="v"))||_1.key==dojo.keys.SHIFT){
return;
}
var pw=this._popupWidget;
var dk=dojo.keys;
switch(_3){
case dk.ENTER:
if(!_2&&this.onsubmit!=""){
eval(this.onsubmit);
}
}
}});
}


;if(!dojo._hasResource["lconn.blogs.CommonTags.BlogsAjaxCall"]){
dojo._hasResource["lconn.blogs.CommonTags.BlogsAjaxCall"]=true;
dojo.provide("lconn.blogs.CommonTags.BlogsAjaxCall");
dojo.require("lconn.core.CommonTags.AjaxCall");
dojo.declare("lconn.blogs.CommonTags.BlogsAjaxCall",[lconn.core.CommonTags.AjaxCall],{isAllBlogsPage:false,redirect:function(_1){
if(_1!="undefined"&&_1!=null&&_1!=""){
if(this.REDIRECT_URL.indexOf("?")>0){
this.REDIRECT_URL=this.REDIRECT_URL.substring(0,this.REDIRECT_URL.indexOf("?"));
}
if(!this.isAllBlogsPage){
this.REDIRECT_URL+="/tags/"+encodeURIComponent(_1);
}
this.REDIRECT_URL+="?";
if(this.isAllBlogsPage){
this.REDIRECT_URL+=this.TAG_TEMPLATE+"="+encodeURIComponent(_1);
}
for(var i in this.REDIRECT_URL_PARAMETERS){
var _2=encodeURIComponent(this.REDIRECT_URL_PARAMETERS[i]);
this.REDIRECT_URL+=i+"="+_2+"&";
}
location.href=this.REDIRECT_URL;
}else{
location.href=this.REDIRECT_URL;
}
}});
}


;if(!dojo._hasResource["lconn.blogs.CommonTags.BlogsTagWidget"]){
dojo._hasResource["lconn.blogs.CommonTags.BlogsTagWidget"]=true;
dojo.provide("lconn.blogs.CommonTags.BlogsTagWidget");
dojo.require("lconn.blogs.CommonTags.BlogsAjaxCall");
dojo.require("lconn.core.CommonTags.TagWidget");
dojo.declare("lconn.blogs.CommonTags.BlogsTagWidget",[lconn.core.CommonTags.TagWidget],{isAllBlogs:false,postCreate:function(){
this.inherited(arguments);
this.ajaxCall=new lconn.blogs.CommonTags.BlogsAjaxCall();
this.ajaxCall.TAG_URL=this.tagUrl;
this.ajaxCall.REDIRECT_URL=this.redirectUrl;
this.ajaxCall.TAG_TEMPLATE=this.tagTemplate;
this.ajaxCall.URL_PARAMETERS=this.urlParameters;
this.ajaxCall.REDIRECT_URL_PARAMETERS=this.redirectUrlParameters;
this.ajaxCall.TYPEAHEAD_URL=this.typeAheadFeedUrl;
this.ajaxCall.TYPEAHEAD_TEMPLATE=this.typeAheadTemplate;
this.ajaxCall.isAllBlogsPage=this.isAllBlogs;
if(this.handleAs=="xml"||this.handleAs=="json"){
this.ajaxCall.HANDLE_AS=this.handleAs;
}else{
this.ajaxCall.HANDLE_AS="xml";
}
}});
}


;dojo.cache("lconn.blogs", "addtags/templates/typeAhead.html", "<input type=\"text\" id=\"widget_${id}\" autocomplete=\"off\" name=\"${name}\" size=\"30\"dojoAttachEvent=\"onkeypress:_onKeyPress, compositionend\"dojoAttachPoint=\"comboNode,textbox,focusNode\" waiRole=\"textbox\" waiState=\"haspopup-true,autocomplete-list\" waiRole=\"combobox\"/> ");

;if(!dojo._hasResource["lconn.blogs.addtags.TagsTypeAhead"]){
dojo._hasResource["lconn.blogs.addtags.TagsTypeAhead"]=true;
dojo.provide("lconn.blogs.addtags.TagsTypeAhead");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("lconn.core.TypeAhead");
dojo.declare("lconn.blogs.addtags.TagsTypeAhead",[lconn.core.TypeAhead],{templateString:null,templatePath:dojo.moduleUrl("lconn.blogs","addtags/templates/typeAhead.html"),hideEmptyResults:true});
}


;dojo.cache("lconn.blogs", "addtags/templates/addTagWidget.html", "<div> <div dojoAttachPoint=\"_tagField\" class=\"lotusTags lotusTiny lotusMeta\"> <span style=\"display:none;\">${rs_tagLabel}</span> <span dojoAttachPoint=\"_noTags\" class=\"blogsEmpty\" style=\"display:none;\">${rs_noTag}</span> <span style=\"display:none\" dojoAttachPoint=\"_hasTags\"> <div dojoAttachPoint=\"_selectedTagsSection\" style=\"display:none;\" role=\"list\"> </div> </span> <div dojoAttachPoint=\"_tagSearch\"> <a class=\"blogsAdd lotusAction\" dojoAttachPoint=\"_tagTypeAheadLink\" href=\"javascript:void(0);\" dojoAttachEvent=\"onclick: _showAddTagForm\" title=\"${rs_addTagLabel}\" role=\"button\" aria-label=\"${rs_addTagLabel}\"></a> </div> <div dojoAttachPoint=\"_tagSearchForm\" style=\"display:none\" class=\"lotusSearch\"> <form style=\"display:inline;\" action=\"\" role=\"application\" dojoAttachPoint=\"_tagSearchFormElem\"><label for=\"${id}AddTagsTypeAhead\" class=\"lotusAccess\">${rs_addTagLabel}</label> <input class=\"lotusText\" dojoAttachPoint=\"_typeAheadDom\"/> <input dojoAttachEvent=\"onclick:_addTags\" type=\"button\" value=\"${rs_OK}\"> <a href=\"javascript:;\" dojoAttachEvent=\"onclick: _hideTypeAhead\" title=\"${rs_cancelTagEditing}\" role=\"button\" aria-label=\"${rs_cancelTagEditing}\">${rs_Cancel}</a> </form> </div> </div> <input type=\"hidden\" name=\"tagsAsString\" id=\"tagsAsString\" value=\"\" dojoAttachPoint=\"_tagsAsString\"/></div>");

;if(!dojo._hasResource["lconn.blogs.addtags.AddTagWidget"]){
dojo._hasResource["lconn.blogs.addtags.AddTagWidget"]=true;
dojo.provide("lconn.blogs.addtags.AddTagWidget");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.Dialog");
dojo.require("lconn.core.TypeAheadDataStore");
dojo.require("lconn.blogs.addtags.TagsTypeAhead");
dojo.declare("lconn.blogs.addtags.AddTagWidget",[dijit._Widget,dijit._Templated],{tags:null,typeAheadFeedUrl:"",typeAheadTemplate:"",contextPath:"",templatePath:dojo.moduleUrl("lconn.blogs","addtags/templates/addTagWidget.html"),postMixInProperties:function(){
var b=dojo.i18n.getLocalization("lconn.blogs","strings");
this.rs_tagLabel=b.rs_tagLabel;
this.rs_noTag=b.rs_noTag;
this.rs_OK=b.rs_OK;
this.rs_addTagLabel=b.rs_addTagLabel;
this.rs_removeTagLabel=b.rs_removeTagLabel;
this.rs_Cancel=b.rs_Cancel;
this.rs_addOrRemoveLabel=b.rs_addOrRemoveLabel;
this.rs_tagLinkTitle=b.rs_tagLinkTitle;
this.rs_removeTagLinkLabel=b.rs_removeTagLinkLabel;
this.rs_cancelTagEditing=b.rs_cancelTagEditing;
},postCreate:function(){
this.inherited(arguments);
this._tagSearchFormElem.onsubmit=dojo.hitch(this,function(){
this._addTags();
return false;
});
this._show();
},_show:function(){
if(this.tags==null||this.tags.length==0){
this._noTags.style.display="inline";
this._hasTags.style.display="none";
this._tagTypeAheadLink.innerHTML=this.rs_addTagLabel;
dojo.attr(this._tagTypeAheadLink,{"aria-label":this.rs_addTagLabel,"title":this.rs_addTagLabel});
this._tagsAsString.value="";
}else{
this._showExistingTags();
}
this._tagSearch.style.display="inline";
this._tagSearchForm.style.display="none";
},_createTypeAhead:function(){
var _1=dijit.byId(this.id+"AddTagsTypeAhead");
if(_1!=null){
return;
}
var _2=new lconn.core.TypeAheadDataStore({url:this.typeAheadFeedUrl,queryParam:this.typeAheadTemplate});
var _3={minChars:2,searchDelay:400,multipleValues:true,store:_2,token:" ","name":this.id+"AddTagsTypeAhead","id":this.id+"AddTagsTypeAhead"};
var _4=new lconn.blogs.addtags.TagsTypeAhead(_3,this._typeAheadDom);
_4.submitFormOnNonSelectingEnter=true;
dojo.connect(_4,"onSelect",dojo.hitch(_4,function(){
var t=this.item;
if(t){
this.domNode.value=t;
}
}));
},_hideTypeAhead:function(){
window.skipBeforeUnload=true;
this._tagSearch.style.display="inline";
this._tagSearchForm.style.display="none";
this._show();
dijit.byId("addtagwidget")._tagTypeAheadLink.focus();
},_showAddTagForm:function(){
window.skipBeforeUnload=true;
this._tagSearch.style.display="none";
this._tagSearchForm.style.display="inline";
this._showExistingTags(true);
this._createTypeAhead();
dojo.byId(this.id+"AddTagsTypeAhead").focus();
},_showExistingTags:function(_5){
if(_5==undefined){
_5=false;
}
if(this.tags!=null&&this.tags.length>0){
this._noTags.style.display="none";
this._hasTags.style.display="inline";
this._tagsAsString.value=this.tags.join(" ");
}else{
this._noTags.style.display="inline";
this._hasTags.style.display="none";
this._tagsAsString.value="";
}
this._tagTypeAheadLink.innerHTML=this.rs_addOrRemoveLabel;
dojo.attr(this._tagTypeAheadLink,{"aria-label":this.rs_addOrRemoveLabel,"title":this.rs_addOrRemoveLabel});
this.tags.sort();
this._selectedTagsSection.innerHTML="";
for(var i=0;i<this.tags.length;i++){
var _6=document.createElement("span");
_6.setAttribute("role","listitem");
this._selectedTagsSection.appendChild(_6);
var _7=document.createElement("a");
_7.href=this.contextPath+this.weblogEntryHandle+"/tags/"+encodeURIComponent(this.tags[i]);
_7.className="lotusAction";
_7.appendChild(document.createTextNode(this.tags[i]));
_6.appendChild(_7);
if(_5){
var _8=document.createElement("a");
_8.href="javascript:void(0);";
_8.className="blogsRemoveIcon";
_6.appendChild(_8);
_6.appendChild(document.createTextNode(" "));
var _9=document.createElement("img");
_9.className="lotusDelete";
_9.setAttribute("src",dijit._Widget.prototype._blankGif);
_9.setAttribute("alt",dojo.string.substitute(this.rs_removeTagLabel,[this.tags[i]]));
_8.appendChild(_9);
_8.setAttribute("role","button");
_8.setAttribute("aria-label",dojo.string.substitute(this.rs_removeTagLabel,[this.tags[i]]));
_8.setAttribute("title",dojo.string.substitute(this.rs_removeTagLabel,[this.tags[i]]));
this.connect(_8,"onclick",dojo.hitch(this,"_removeOneTag",this.tags[i]));
}
if(i<this.tags.length-1){
this._selectedTagsSection.appendChild(document.createTextNode(", "));
}
}
this._selectedTagsSection.style.display="inline";
},_addTags:function(){
if(dojo.byId(this.id+"AddTagsTypeAhead")){
var _a=dojo.byId(this.id+"AddTagsTypeAhead").value;
_a=_a.replace(/,/g," ");
_a=_a.replace(/\u3000/g," ");
_a=_a.replace(/\s+/g," ");
_a=dojo.trim(_a);
if(_a.length>0){
var _b=_a.split(" ");
for(var i=0;i<_b.length;i++){
var _c=_b[i];
var _d=false;
for(var j=0;j<this.tags.length;j++){
if(_c==this.tags[j]){
_d=true;
break;
}
}
if(!_d){
if(this.tags!=null&&this.tags.length!=0){
this.tags.push(_c);
}else{
this.tags=new Array(_c);
}
}
}
}
dojo.byId(this.id+"AddTagsTypeAhead").value="";
}
this._hideTypeAhead();
window.skipBeforeUnload=false;
},_removeOneTag:function(_e){
if(this.tags!=null){
for(var i=0;i<this.tags.length;i++){
if(_e==this.tags[i]){
this.tags.splice(i,1);
i--;
}
}
}
this._showExistingTags(true);
dojo.byId(this.id+"AddTagsTypeAhead").focus();
window.skipBeforeUnload=true;
}});
}

dojo.registerModulePath("lconn.share", "../lconn.share");

;if(!dojo._hasResource["lconn.share.widget.AbstractRecommendInfo"]){
dojo._hasResource["lconn.share.widget.AbstractRecommendInfo"]=true;
dojo.provide("lconn.share.widget.AbstractRecommendInfo");
dojo.require("dijit._Widget");
dojo.require("dojo.number");
dojo.require("lconn.core.widget.MenuLauncher");
dojo.declare("lconn.share.widget.AbstractRecommendInfo",lconn.core.widget.MenuLauncher,{openDelay:250,preloadDelay:150,hideDelay:400,hesitateToggleDelay:800,userRecommended:false,timesRated:-1,countOnly:false,_strings:{},postMixInProperties:function(){
this.nls=this._strings=this.nls||this._strings;
},buildRendering:function(){
var d=document;
if(this.srcNodeRef.nodeName.toLowerCase()!="a"){
throw "AbstractRecommendInfo requires an 'A' element passed as the dom node";
}
this.inherited(arguments);
var el=this.domNode;
if(this.baseClass){
dojo.addClass(el,this.baseClass);
}
dijit.setWaiRole(el,"button");
if(!this._rendered){
this.update();
}
},getIconUrl:function(){
return dojo.config.blankGif;
},getIconClassName:function(){
var _1="lconnSprite lconnSprite-iconRating";
_1+=this.small?"11":(this.large?"16":"14");
_1+=(this.timesRated>0?"-on":"-off");
return _1;
},_initMenu:function(){
},update:function(){
var d=document;
var el=this.domNode;
var _2=this.countOnly;
var _3=this._strings;
var _4=dojo.number.format(this.timesRated);
if(!el.firstChild){
dojo.attr(this.domNode,"aria-owns",this.menuId);
var _5=this.imgNode=el.appendChild(d.createElement("img"));
_5.src=this.getIconUrl();
if(_2){
var _6=el.appendChild(d.createElement("span"));
_6.className="lotusAltText";
_6.appendChild(d.createTextNode(_3.ALT_TEXT));
_6.appendChild(d.createTextNode(" "));
}
var _7=this.labelNode=el.appendChild(d.createElement("span"));
_7.className="lotusMeta";
}
var _5=this.imgNode;
_5.className=this.getIconClassName();
_5.alt=_2?_3.ALT_TEXT:"";
var _7=this.labelNode;
while(_7.firstChild){
_7.removeChild(_7.firstChild);
}
var _8;
if(_2){
_8="\xa0"+_4;
}else{
dijit.setWaiState(el,"pressed",this.userRecommended);
if(this.timesRated<=0){
if(this.userRecommended){
_8=_3.ERROR_RETRIEVE;
}else{
_8=_3.NOT_RECOMMENDED;
}
}else{
if(this.userRecommended){
if(this.timesRated==1){
_8=_3.YOU_HAVE_RECOMMENDED;
}else{
if(this.timesRated==2){
_8=_3.YOU_AND_ONE_HAVE_RECOMMENDED;
}else{
_8=dojo.string.substitute(_3.YOU_AND_X_HAVE_RECOMMENDED,[_4-1]);
}
}
}else{
if(this.timesRated==1){
_8=_3.ONE_HAS_RECOMMENDED;
}else{
_8=dojo.string.substitute(_3.X_HAVE_RECOMMENDED,[_4]);
}
}
}
}
_7.appendChild(d.createTextNode(_8));
},onrecommend:function(_9,_a){
this.userRecommended=_9;
this.timesRated=_a;
this.update();
},onBeforeOpen:function(_b){
var _c=(_b=="click");
var _d=this.menu;
var _e=false;
if(!this.countOnly){
if(_d.info&&(_d.info.timesRated-_d.info.isUserRecommended?1:0)<1){
var r=_d.recommender;
if(r&&_c){
r.toggleRecommend();
}
_e=!!(!_c||r);
}
}else{
if(_d.info&&_d.info.timesRated==0&&!_c){
_e=true;
}
}
if(_e){
var s;
if(_d.recommender){
s=this.nls.RECOMMEND_TOOLTIP;
}else{
if(_d.info&&_d.info.timesRated==0){
s=this.nls.NOT_RECOMMENDED;
}
}
this.domNode.title=s;
}else{
dojo.removeAttr(this.domNode,"title");
}
return _e;
},onOpen:function(_f){
var _10=(_f=="click");
if(_10){
this.focusMenu();
}
var _11=this.menu;
if(_11&&_11.recommender&&_10){
var r=_11.recommender;
if(this._openedLong||!this.countOnly){
r.toggleRecommend();
}else{
r.recommend(true);
}
}
if(!this._ot){
this._ot=setTimeout(dojo.hitch(this,function(){
this._openedLong=true;
}),this.hesitateToggleDelay);
}
},onClose:function(){
clearTimeout(this._ot);
this._ot=null;
this._openedLong=false;
}});
}


;if(!dojo._hasResource["lconn.share.widget.TooltipDialog"]){
dojo._hasResource["lconn.share.widget.TooltipDialog"]=true;
dojo.provide("lconn.share.widget.TooltipDialog");
dojo.require("dijit.Dialog");
dojo.declare("lconn.share.widget.TooltipDialog",dijit.TooltipDialog,{closeOnLinkClick:true,_attachTemplateNodes:function(){
this.inherited(arguments);
this.connect(this.domNode,"onmouseover","onMouseOver");
this.connect(this.domNode,"onmouseout","onMouseOut");
if(this.closeOnLinkClick){
this.connect(this.domNode,"onclick","onTooltipClick");
}
},orient:function(_1,_2,_3){
var s=this["class"]+" dijitTooltipAB"+(_3.charAt(1)=="L"?"Left":"Right");
if(_2.charAt(0)!=_3.charAt(0)){
s+=" dijitTooltip"+(_3.charAt(0)=="T"?"Below":"Above");
}
this.domNode.className=s;
},onTooltipClick:function(e){
var el=e.target;
for(var i=0;el&&i<5;i++){
if(el.nodeName.toLowerCase()=="a"){
this.onCancel();
return;
}else{
el=el.parentNode;
}
}
}});
}


;if(!dojo._hasResource["lconn.share.widget.tooltip.DialogBase"]){
dojo._hasResource["lconn.share.widget.tooltip.DialogBase"]=true;
dojo.provide("lconn.share.widget.tooltip.DialogBase");
dojo.require("lconn.share.widget.TooltipDialog");
dojo.declare("lconn.share.widget.tooltip.DialogBase",lconn.share.widget.TooltipDialog,{"class":"lotusTooltipDialog",placement:{"BL":"TL","TL":"BL","BR":"TR","TR":"BR"},placementRTL:{"BR":"TR","TR":"BR","BL":"TL","TL":"BL"},parseOnLoad:false,loadEarly:true,baseWidth:200,postMixInProperties:function(){
this.inherited(arguments);
this.ioMethod=dojo.hitch(this,this._ioMethod);
this.nls=this._strings=this.nls||this._strings;
},postCreate:function(){
this.inherited(arguments);
if(this.role){
dijit.setWaiRole(this.containerNode,this.role);
}
},destroy:function(){
dijit.popup.close(this);
this.inherited(arguments);
},_ioMethod:function(_1){
_1.handle=dojo.hitch(this,this.handleLoad);
return this.net.get(_1);
},handleLoad:function(_2,_3){
if(_2 instanceof Error){
return _2;
}
return this.renderHtml(_2,_3);
},renderLoading:function(){
var d=document;
var _4=d.createElement("div");
_4.className="lotusHelp";
if(dojo.isIE){
_4.style.width=this.baseWidth/2+"px";
}
var _5=d.createElement("div");
_5.className="lotusInfoBox";
if(this.header){
var h3=d.createElement("h3");
h3.appendChild(d.createTextNode(this.header));
_5.appendChild(h3);
}
_5.appendChild(d.createTextNode(this.label));
_4.appendChild(_5);
return _4;
},onDownloadStart:function(){
return this.renderLoading();
},onDownloadError:function(_6){
var _7=this.getErrorMessage(_6);
var d=document;
var _8=d.createElement("div");
_8.className="lotusHelp";
if(dojo.isIE){
_8.style.width=this.baseWidth/2+"px";
}
var _9=d.createElement("div");
_9.className="lotusInfoBox";
if(this.header){
var h3=d.createElement("h3");
h3.appendChild(d.createTextNode(this.header));
_9.appendChild(h3);
}
_9.appendChild(d.createTextNode(_7));
_8.appendChild(_9);
return _8;
},getErrorMessage:function(_a){
if(_a.msg){
return _a.msg;
}
var _b;
var _c=_a.code;
if(this.nls){
if(_c=="cancel"){
_b=this.nls.ERROR_CANCEL;
}else{
if(_c=="timeout"){
_b=this.nls.ERROR_TIMEOUT;
}else{
if(_c=="AccessDenied"){
_b=this.nls.ERROR_ACCESS_DENIED;
}else{
if(_c=="ItemNotFound"){
_b=this.nls.ERROR_NOT_FOUND;
}
}
}
}
if(!_b){
_b=this.nls.ERROR;
}
}
return _b||this.msgError;
},updatePosition:function(){
}});
}


;if(!dojo._hasResource["lconn.share.widget.tooltip.AbstractRecommend"]){
dojo._hasResource["lconn.share.widget.tooltip.AbstractRecommend"]=true;
dojo.provide("lconn.share.widget.tooltip.AbstractRecommend");
dojo.require("lconn.share.widget.tooltip.DialogBase");
dojo.declare("lconn.share.widget.tooltip.AbstractRecommend",lconn.share.widget.tooltip.DialogBase,{label:null,width:250,alwaysReload:true,limitPeopleList:25,renderHtml:function(_1,_2){
var _3=this.info=this.getInfo(_1,_2);
var _4=_3.isUserRecommended;
var _5=_3.canRecommend;
var _6=_3.users;
var _7=Math.min(_6.length,this.limitPeopleList);
var _8=_3.timesRated;
var _9=_8-(_4?1:0);
this.onrecommend(_4,_8);
var _a=this.nls;
var d=document;
var el=d.createElement("div");
el.className="lotusHelp";
var _b=el.style;
_b.position="relative";
_b.width="auto";
_b.top="0";
if(this.width){
_b.width=this.width+"px";
}
var _c=d.createElement("div");
_c.className="lotusInfoBox";
var _d=_a.LABEL_A_MANY;
var _e=_a.LABEL_A_ONE;
if(_5){
var _d=_a.LABEL_R_MANY;
var _e=_a.LABEL_R_ONE;
var _f=this.recommender=this.createRecommendToggle(d,_c,_4,_8);
this.connect(_f,"onrecommend","onrecommend");
}else{
if(_9==0){
var _10=_c.appendChild(d.createElement("div"));
_10.appendChild(d.createTextNode(_a.NOT_RECOMMENDED));
}
}
if(_9>0){
var _10=_c.appendChild(d.createElement("div"));
if(_5){
_10.className="lotusChunk";
}
_10.appendChild(d.createTextNode(_9>1?dojo.string.substitute(_d,[dojo.number.format(_9)]):_e));
var ul=d.createElement("ul");
ul.className="lotusList XlotusCompactList";
if(_7>5){
ul.style.overflowY="scroll";
ul.style.height="100px";
}
for(var i=0;i<_7;i++){
var li=ul.appendChild(d.createElement("li"));
var tn=d.createTextNode(_6[i].name);
if(this.generateLinkToPerson){
var a=d.createElement("a");
this.generateLinkToPerson(_6[i],a);
a.appendChild(tn);
li.appendChild(a);
}else{
li.appendChild(tn);
}
}
var _11=_9-_7;
if(_11>0){
var li=ul.appendChild(d.createElement("li"));
li.className="lotusMeta";
li.appendChild(d.createTextNode(_11==1?_a.LABEL_HIDDEN_ONE:dojo.string.substitute(_a.LABEL_HIDDEN_MANY,[dojo.number.format(_11)])));
}
ul.firstChild.className="lotusFirst";
_c.appendChild(ul);
}
el.appendChild(_c);
return el;
},getErrorMessage:function(_12){
return this.nls.ERROR_RETRIEVE;
},onrecommend:function(_13,_14){
var l=this._launcher;
if(l&&l.onrecommend){
l.onrecommend(_13,_14);
}
}});
}


;if(!dojo._hasResource["lconn.share.widget.AbstractRecommend"]){
dojo._hasResource["lconn.share.widget.AbstractRecommend"]=true;
dojo.provide("lconn.share.widget.AbstractRecommend");
dojo.require("dijit._Widget");
dojo.declare("lconn.share.widget.AbstractRecommend",dijit._Widget,{userRecommended:false,timesRated:-1,baseClass:"lotusRecommend",_strings:{},postMixInProperties:function(){
this.nls=this._strings=this.nls||this._strings;
},buildRendering:function(){
var d=document;
var el=this.domNode=this.srcNodeRef;
if(this.baseClass){
dojo.addClass(el,this.baseClass);
}
this.update();
},getIconUrl:function(){
return dojo.config.blankGif;
},getIconClassName:function(){
var _1="lconnSprite lconnSprite-iconRating";
_1+=this.small?"11":(this.large?"16":"14");
_1+=this.userRecommended?"-on":"-off";
return _1;
},update:function(){
var d=document;
var el=this.domNode;
if(!el){
return;
}
dojo.addClass(el,"lotusClickable");
var _2=this._strings;
var _3=this.userRecommended;
if(!el.firstChild){
var _4=this.imgNode=d.createElement("img");
var _5=_4.id=this.id+"_link";
_4.alt="";
el.appendChild(_4);
var _6=this.labelNode=d.createElement("label");
_6.className="lotusClickable";
dojo.attr(_6,"for",_5);
_6.appendChild(d.createTextNode(_2.LABEL_TRUE+" "));
_6.style.display="none";
el.appendChild(_6);
var a=this.linkNode=d.createElement("a");
dijit.setWaiRole(a,"button");
a.className="lotusAction";
a.href="javascript:;";
el.appendChild(a);
dojo.connect(el,"onclick",dojo.hitch(this,this.toggleRecommend));
}
var i=this.imgNode;
i.className=this.getIconClassName();
i.src=this.getIconUrl();
el.title=_3?_2.UNRECOMMEND_TOOLTIP:_2.RECOMMEND_TOOLTIP;
var n=this.labelNode;
n.style.display=_3?"":"none";
var a=this.linkNode;
while(a.firstChild){
a.removeChild(a.firstChild);
}
a.appendChild(d.createTextNode(_3?_2.UNRECOMMEND:_2.LABEL_FALSE));
a.title=el.title;
},toggleRecommend:function(e){
this.recommend(!this.userRecommended,e);
},onrecommend:function(_7,_8){
}});
}


;if(!dojo._hasResource["lconn.blogs.widget.Recommend"]){
dojo._hasResource["lconn.blogs.widget.Recommend"]=true;
dojo.provide("lconn.blogs.widget.Recommend");
dojo.require("lconn.share.widget.AbstractRecommend");
dojo.declare("lconn.blogs.widget.Recommend",lconn.share.widget.AbstractRecommend,{urlRecommendation:null,urlFeed:null,recommend:function(_1,e){
if(e){
dojo.stopEvent(e);
}
if(!_1){
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _2={action:"remove",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _2={action:"remove",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _3={url:this.urlRecommendation,handleAs:"json",content:_2,load:dojo.hitch(this,function loadFunct(_4,_5){
var _6;
if(_4.items){
_6=_4.items.length;
}
this.handleRecommend(false,_6,_4,_5);
})};
dojo.xhrPost(_3).addCallback(dojo.hitch(this,function callBack(){
console.log("Unrecommend");
}));
}else{
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _2={action:"add",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _2={action:"add",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _3={url:this.urlRecommendation,handleAs:"json",content:_2,load:dojo.hitch(this,function loadFunct(_7,_8){
var _9;
if(_7.items){
_9=_7.items.length;
}
this.handleRecommend(true,_9,_7,_8);
})};
dojo.xhrPost(_3).addCallback(dojo.hitch(this,function callBack(){
console.log("recommend");
}));
}
},handleRecommend:function(_a,_b,_c,_d){
try{
if(_c instanceof Error){
error=_c.code;
if(_a&&error=="ItemExists"){
_b--;
}else{
if(!_a&&error=="ItemNotFound"){
_b++;
}else{
this.onError(error);
return;
}
}
}
this.userRecommended=_a;
this.timesRated=_b;
this.update();
this.onrecommend(this.userRecommended,this.timesRated);
}
finally{
this._request=null;
}
},onError:function(_e){
var _f;
if(_e=="cancel"){
_f=this._strings.SAVE_ERROR_CANCEL;
}else{
if(_e=="timeout"){
_f=this._strings.SAVE_ERROR_TIMEOUT;
}else{
if(_e=="ItemNotFound"){
_f=this._strings.SAVE_ERROR_NOT_FOUND;
}else{
if(_e=="AccessDenied"){
_f=this._strings.SAVE_ERROR_ACCESS_DENIED;
}else{
if(_e=="unauthenticated"){
}else{
_f=this._strings.SAVE_ERROR;
}
}
}
}
}
if(_f){
showDialog(_f);
}
}});
}


;if(!dojo._hasResource["lconn.blogs.widget.tooltip.Recommend"]){
dojo._hasResource["lconn.blogs.widget.tooltip.Recommend"]=true;
dojo.provide("lconn.blogs.widget.tooltip.Recommend");
dojo.require("lconn.share.widget.tooltip.AbstractRecommend");
dojo.require("lconn.blogs.widget.Recommend");
dojo.declare("lconn.blogs.widget.tooltip.Recommend",lconn.share.widget.tooltip.AbstractRecommend,{ioArgs:{noStatus:true,handleAs:"json"},handleAs:"json",autofocus:false,getInfo:function(_1,_2){
var _3=dojo.filter(_1.items,function(i){
var b=(i.id==this.authenticatedUserId);
if(b){
_1.recommended=true;
}
return !b;
},this);
_3.length=Math.min(_3.length,this.limitPeopleList);
return {canRecommend:this.canRecommend,isUserRecommended:!!_1.recommended,users:_3,timesRated:_1.totalSize};
},createRecommendToggle:function(d,el,_4,_5){
var _6={baseClass:"lotusRecommend",timesRated:_5,userRecommended:_4,net:this.net};
if(this.toggleArgs){
dojo.mixin(_6,this.toggleArgs);
}
return new lconn.blogs.widget.Recommend(_6,el.appendChild(d.createElement("label")));
},_ioMethod:function(_7){
_7.handle=dojo.hitch(this,this.handleLoad);
return dojo.xhrGet(_7);
}});
}


;if(!dojo._hasResource["lconn.blogs.widget.RecommendInfo"]){
dojo._hasResource["lconn.blogs.widget.RecommendInfo"]=true;
dojo.provide("lconn.blogs.widget.RecommendInfo");
dojo.require("lconn.share.widget.AbstractRecommendInfo");
dojo.require("lconn.blogs.widget.tooltip.Recommend");
dojo.declare("lconn.blogs.widget.RecommendInfo",lconn.share.widget.AbstractRecommendInfo,{itemId:null,type:"",readOnly:false,_initMenu:function(e){
var d=document;
var _1=(currentLogin.auth?currentLogin.uid:null);
var _2=dojo.i18n.getLocalization("lconn.blogs","strings").RECOMMEND;
if(this.type=="comment"){
_2=dojo.i18n.getLocalization("lconn.blogs","strings").RECOMMEND_COMMENT;
}
this.nls=_2;
this.menu=new lconn.blogs.widget.tooltip.Recommend({connectId:[this.domNode],label:_2.LOADING,baseUri:BlogsBaseUrl,canRecommend:!!_1&&!this.readOnly,authenticatedUserId:_1,href:this.ratingUri,generateLinkToPerson:function(_3,a){
dojo.attr(a,{"class":"fn person lotusPerson vcard","href":BlogsBaseUrl+"/roller-ui/blog/"+encodeURIComponent(_3.userIDForDisplay)});
var _4=dojo.create("span",{"class":"x-lconn-userid"},a,"first");
_4.style.display="none";
_4.innerHTML=_3.extid;
if(typeof (SemTagSvc)!="undefined"){
SemTagSvc.parseDom(null,a);
}
},toggleArgs:{urlRecommendation:this.ratingUri,itemId:this.itemId,type:this.type,urlFeed:this.ratingUri,nls:_2},nls:_2});
var _5=this._dlgDfd;
if(!_5){
_5=this._dlgDfd=new dojo.Deferred();
_5.callback(true);
}
return _5;
}});
}


;if(!dojo._hasResource["lconn.blogs.ckeditor"]){
dojo._hasResource["lconn.blogs.ckeditor"]=true;
(function(){
dojo.provide("lconn.blogs.ckeditor");
dojo.require("lconn.core.ckeditor");
lconn.core.ckeditor.addCustomConfig(function(){
dojo.mixin(CKEDITOR.config,{toolbar:[{name:"tools",items:["Undo","Redo","MenuPaste","Find","LotusSpellChecker","ShowBlocks"]},{name:"styles",items:["Format","Font","FontSize","Bold","Italic","Underline","Strike","TextColor","BGColor","Subscript","Superscript","RemoveFormat"]},{name:"paragraph",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","NumberedList","BulletedList","Indent","Outdent","Blockquote","BidiLtr","BidiRtl"]},{name:"insert",items:["Table","InsertImage","Link","Iframe","Flash","PageBreak","HorizontalRule","SpecialChar","Smiley"]}],language:djConfig.locale,resize_enabled:false,toolbarCanCollapse:false,autoGrow_onStartup:true,ibmFloatToolbar:true,autoGrow_minHeight:400,ignoreEmptyParagraph:true,disableNativeSpellChecker:false,dialog_backgroundCoverColor:"black",dialog_backgroundCoverOpacity:0.3,extraPlugins:"sametimeemoticons,autogrow"});
});
})();
}


;if(!dojo._hasResource["lconn.core.FollowMenu"]){
dojo._hasResource["lconn.core.FollowMenu"]=true;
dojo.provide("lconn.core.FollowMenu");
dojo.require("dijit._Widget");
dojo.require("dijit.Menu");
dojo.require("dijit.MenuItem");
dojo.require("lconn.core.MenuUtility");
dojo.declare("lconn.core.FollowMenu",dijit._Widget,{_subscriptions:[],disableContained:false,FOLLOW_TOPIC:"lconn.comm.commFollowed",UNFOLLOW_TOPIC:"lconn.comm.commUnFollowed",menuId:"followDropDownMenu",items:[{_strings:{OFF_LABEL:"Follow this <Item>",ON_LABEL:"Stop Following this <Item>",DISABLED_LABEL:"<Item> updates are included with the <Container> updates."},enabled:true|false,activate:function(){
return new dojo.Deferred();
},deactivate:function(){
return new dojo.Deferred();
},on:true|false}],_menuItems:[],wrapperClass:"lconn.core._FollowMenuItem",disableMenuItemsContained:true,postMixInProperties:function(_1){
this._validateItems();
if(this.disableContained){
this._subscriptions.push(dojo.subscribe(this.FOLLOW_TOPIC,dojo.hitch(this,this._handleFollowCommunityTopic)));
this._subscriptions.push(dojo.subscribe(this.UNFOLLOW_TOPIC,dojo.hitch(this,this._handleUnfollowCommunityTopic)));
}
},buildRendering:function(){
var d=document;
this.domNode=this.srcNodeRef;
this.menu=new dijit.Menu({id:this.menuId});
dojo.addClass(this.menu.domNode,"lotusPlain");
dojo.forEach(this.items,dojo.hitch(this,function(_2,i){
var _3=dojo.getObject(this.wrapperClass);
var _4=new _3(_2);
var _5=new dijit.MenuItem({label:_4.label,_item:_4,disabled:!_4.enabled});
dojo.connect(_5,"onClick",dojo.hitch(_4,_4.execute));
if(this.disableMenuItemsContained){
dojo.connect(_4,"onActivate",dojo.hitch(this,this._toggleMenuItems,false,i));
dojo.connect(_4,"onDeactivate",dojo.hitch(this,this._toggleMenuItems,true,i));
}
if(_4.setMenuItem){
_4.setMenuItem(_5);
}
this._menuItems.push(_5);
this.menu.addChild(_5);
}));
var _6=this.domNode.appendChild(d.createElement("span"));
_6.style.display="none";
_6.setAttribute("widgetid",this.id);
dojo.connect(this.domNode,"onclick",dojo.partial(function(_7,a,e){
try{
var _8={orient:(dojo._isBodyLtr()?{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}:{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"})};
menuUtility.openMenu(e,_7.id,a,_8);
dojo.stopEvent(e);
}
catch(e){
console.log(e);
}
},this.menu,this.domNode));
},destroy:function(){
dojo.forEach(this._subscriptions,dojo.hitch(dojo,dojo.unsubscribe));
this._subscriptions=[];
if(this.menu){
this.menu.destroyRecursive();
}
this.menu=null;
this.inherited(arguments);
},_handleFollowCommunityTopic:function(_9){
this._handleCommunityTopic(false);
},_handleUnfollowCommunityTopic:function(_a){
this._handleCommunityTopic(true);
},_handleCommunityTopic:function(_b){
dojo.forEach(this._menuItems,dojo.partial(function(_c,_d){
_d._item.setEnabled(_c);
},_b));
},_toggleMenuItems:function(_e,n){
dojo.forEach(this._menuItems,function(_f,i){
if(i>=n){
return;
}
_f._item.setEnabled(_e);
});
},_validateItems:function(){
var _10=false;
for(var i=this.items.length-1;i>=0;i--){
if(!_10&&this.items[i].on){
_10=true;
continue;
}
if(_10&&this.items[i].enabled){
throw "Invalid items array. When following a container, the action to follow content must be disabled";
}
}
}});
dojo.declare("lconn.core._FollowMenuItem",null,{enabled:true,menuItem:null,constructor:function(_11){
dojo.safeMixin(this,_11||{});
this.label=this.enabled?this.isOn()?this._strings.ON_LABEL:this._strings.OFF_LABEL:this._strings.DISABLED_LABEL;
},isOn:function(){
return this.on;
},activate:function(){
console.warn("Implementors must override activate()");
var _12=new dojo.Deferred();
setTimeout(function(){
_12.callback();
},100);
return _12;
},deactivate:function(){
console.warn("Implementors must override deactivate()");
var _13=new dojo.Deferred();
setTimeout(function(){
_13.callback();
},100);
return _13;
},execute:function(e){
if(e){
dojo.stopEvent(e);
}
if(!this.enabled){
return;
}
try{
if(this.isOn()){
var d=this.deactivate();
d.addCallback(dojo.hitch(this,this.onDeactivate));
d.addErrback(dojo.hitch(this,this.onerror));
this.on=false;
}else{
var d=this.activate();
d.addCallback(dojo.hitch(this,this.onActivate));
d.addErrback(dojo.hitch(this,this.onerror));
this.on=true;
}
}
catch(e){
console.error("lconn.core.FollowMenu: exception: "+e);
}
finally{
this._updateLabel();
}
},onerror:function(){
this.on=!this.on;
this._updateLabel();
this.onError();
},onActivate:function(){
},onDeactivate:function(){
},onError:function(){
},setEnabled:function(_14){
this.enabled=_14;
this._updateLabel();
},setMenuItem:function(_15){
this.menuItem=_15;
this._updateLabel();
},_updateLabel:function(){
this.label=this.enabled?this.isOn()?this._strings.ON_LABEL:this._strings.OFF_LABEL:this._strings.DISABLED_LABEL;
if(this.menuItem){
dojo.attr(this.menuItem,"label",this.label);
this.menuItem.attr("disabled",!this.enabled);
}
}});
}


;dojo.cache("lconn.core", "templates/FilteringCheckbox.html", "<div class=\"notifyList lotusHidden\"> <fieldset> <legend dojoAttachPoint=\"notifyControlsLegend_AP\" style=\"display:none;\"></legend> <div dojoAttachPoint=\"filteringContainer_AP\"> <div class=\"lotusSearch\" dojoAttachPoint=\"filterRow_AP\"> <select style=\"display:none\" dojoAttachPoint=\"groupSelect_AP\" dojoAttachEvent=\"onchange: _optionChanged\" aria-label=\"${rs_filterGroupLabel}\"></select> <input class=\"lotusInactive\" type=\"text\" id=\"${id}FilterTextbox\" aria-label=\"${rs_filterListPrompt}\" dojoAttachPoint=\"filterTextbox_AP\" value=\"${rs_filterListPrompt}\" dojoAttachEvent=\"onfocus:readySearch, onkeypress:timedFilter, onchange:timedFilter,onblur:_onBlur\"></input> </div> <div class=\"peopleList\" dojoAttachPoint=\"notifyList_AP\" tabindex=\"-1\"></div> <div dojoAttachPoint=\"notifyPaging_AP\" class=\"lotusTiny lotusHidden\"></div> </div> <div class=\"lotusAccess\" aria-relevant=\"all\" aria-live=\"polite\" dojoAttachPoint=\"access_AP\"></div> </fieldset></div>");

;if(!dojo._hasResource["lconn.core.FilteringCheckbox"]){
dojo._hasResource["lconn.core.FilteringCheckbox"]=true;
dojo.provide("lconn.core.FilteringCheckbox");
dojo.require("dijit._Widget");
dojo.require("lconn.core.Res");
dojo.require("dojo.regexp");
var w={templatePath:dojo.moduleUrl("lconn.core","templates/FilteringCheckbox.html")};
w.rs_filterListPrompt="rs_filterListPrompt";
w.rs_navPrevLabel="rs_navPrevLabel";
w.rs_navNextLabel="rs_navNextLabel";
w.rs_pagepos="rs_pagepos";
w.rs_loading="rs_loading";
w.rs_filterGroupLabel="rs_filterGroupLabel";
w.gotList=false;
w.oldTextValue="";
w.dirty=false;
w.currPage=1;
w.peopleSelected=null;
w.peopleList=null;
w.filterTimer=null;
w.autoFiltertime=200;
w.controlsLegend="";
w.feedFunction=null;
w.isSingleSelect=false;
w.defaultSelectText=null;
w.defaultSelectValue=null;
w.lastPersonSelected=null;
w.groupOptions=null;
w.scrollVertical=true;
w.scrollHorizontal=true;
w.firstIndex=null;
w.index=0;
w.indexingList=new Array();
w.currentFocusItem=null;
w.domNode=null;
w.notifyList_AP=null;
w.notifyPaging_AP=null;
w.filterTextbox_AP=null;
w.notifyControlsLegend_AP=null;
w.postMixInProperties=function postMixInProperties(){
this.loadDefaultBundle();
var b=this.resBundle;
this.rs_filterListPrompt=b[this.rs_filterListPrompt];
this.rs_navPrevLabel=b[this.rs_navPrevLabel];
this.rs_navNextLabel=b[this.rs_navNextLabel];
this.rs_pagepos=b[this.rs_pagepos];
this.rs_loading=b[this.rs_loading];
this.rs_filterGroupLabel=b[this.rs_filterGroupLabel];
};
w.postCreate=function postCreate(){
this.showDefaultOption=this.defaultSelectText||this.defaultSelectValue;
this.notifyControlsLegend_AP.innerHTML=this.controlsLegend;
if(dojo.isIE){
dojo.style(this.filterTextbox_AP,"width","auto");
}
this.reset();
if(!this.isSingleSelect){
this._connects.push(dojo.connect(this.notifyList_AP,"onkeydown",this,"onKeyDown"));
}
};
w.onKeyDown=function onKeyDown(_1){
var dk=dojo.keys;
var _2=dojo._isBodyLtr()?dk.RIGHT_ARROW:dk.LEFT_ARROW;
var _3=dojo._isBodyLtr()?dk.LEFT_ARROW:dk.RIGHT_ARROW;
switch(_1.keyCode){
case this.scrollHorizontal?_2:-1:
case this.scrollVertical?dk.DOWN_ARROW:-1:
dojo.stopEvent(_1);
this.focusNextItem();
break;
case this.scrollHorizontal?_3:-1:
case this.scrollVertical?dk.UP_ARROW:-1:
dojo.stopEvent(_1);
this.focusPrevItem();
break;
}
};
w.focusPrevItem=function focusPrevItem(){
if(this.index==0){
}else{
var _4=dojo.byId(this.indexingList[this.index]);
this.index--;
var _5=dojo.byId(this.indexingList[this.index]);
_5.setAttribute("tabindex","0");
_4.setAttribute("tabindex","-1");
_5.focus();
}
};
w.focusNextItem=function focusNextItem(){
if(this.index==this.indexingList.length-1){
}else{
var _6=dojo.byId(this.indexingList[this.index]);
this.index++;
var _7=dojo.byId(this.indexingList[this.index]);
_7.setAttribute("tabindex","0");
_6.setAttribute("tabindex","-1");
_7.focus();
}
};
w.getCurrentSelected=function getCurrentSelected(){
var _8=dojo.query("input[type='checkbox']",this.notifyList_AP);
for(var i=0;i<_8.length;i++){
if(_8[i].getAttribute("tabindex")==0){
this.currentFocusItem=_8[i];
this.index=i;
return _8[i];
}
}
};
w.getList=function getList(){
if(!this.gotList){
this.gotList=true;
this.access_AP.innerHTML=this.notifyList_AP.innerHTML=this.rs_loading;
this.feedFunction(this.currPage,dojo.hitch(this,"parsePeople"));
}
dojo.removeClass(this.domNode,"lotusHidden");
};
w.setFocus=function setFocus(){
if(this.groupOptions){
dijit.focus(this.groupSelect_AP);
}else{
dijit.focus(this.filterTextbox_AP);
}
};
w.isDirty=function isDirty(){
return this.dirty;
};
w.setDisabled=function setDisabled(_9){
var _a=document.getElementsByName(this.id+"notifyPerson");
var _b=document.getElementById(this.id+"pagingButtons");
if(_9){
dojo.addClass(this.notifyList_AP,"disabled");
if(_b){
dojo.addClass(_b,"lotusHidden");
}
}else{
dojo.removeClass(this.notifyList_AP,"disabled");
if(_b){
dojo.removeClass(_b,"lotusHidden");
}
}
this.filterTextbox_AP[(_9?"setAttribute":"removeAttribute")]("disabled",true);
this.groupSelect_AP[(_9?"setAttribute":"removeAttribute")]("disabled",true);
for(var i=0;i<_a.length;i++){
if(!dojo.hasAttr(_a[i],"alwaysDisable")){
_a[i][(_9?"setAttribute":"removeAttribute")]("disabled",true);
var _c=document.getElementById(_a[i].id+"Label");
if(_c){
_c[(_9?"setAttribute":"removeAttribute")]("disabled",true);
}
if(_9){
_a[i].checked=false;
}else{
_a[i].checked=!!this.peopleSelected[_a[i].value];
}
}
}
};
w.reset=function reset(){
this.currPage=1;
this.gotList=false;
this.peopleList=null;
this.peopleSelected=new Object();
this.filterTextbox_AP.value=this.rs_filterListPrompt;
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
this.oldTextValue="";
if(this.filterTimer){
window.clearTimeout(this.filterTimer);
}
if(this.isSingleSelect){
if((!this.lastPersonSelected||!this.lastPersonSelected.uuid)&&this.showDefaultOption){
this.lastPersonSelected={uuid:this.defaultSelectValue,name:this.defaultSelectText};
}
if(this.lastPersonSelected&&this.lastPersonSelected.uuid){
this.peopleSelected[this.lastPersonSelected.uuid]=this.lastPersonSelected.name;
}
}
if(this.groupOptions){
this.groupSelect_AP.options.length=0;
for(var i=0;i<this.groupOptions.length;++i){
this.groupSelect_AP.options[this.groupSelect_AP.options.length]=new Option(this.groupOptions[i].name,this.groupOptions[i].value);
}
this.groupSelect_AP.style.display="";
dojo.query(".lotusSearch",this.domNode).addClass("hasGroup");
}
this.access_AP.innerHTML="";
};
w.selectItem=function selectItem(_d,_e){
var _f=dojo.byId(this.id+"notifyCheckbox"+_d.uuid);
if(_f){
_f.checked=_e;
}
this._setItemSelected(_d,_e);
};
w.groupChanged=function groupChanged(_10){
};
w.personSelected=function personSelected(_11,_12){
};
w._optionChanged=function _optionChanged(_13){
var _14=this.groupSelect_AP.options[this.groupSelect_AP.selectedIndex];
this.currPage=1;
this.groupChanged({name:_14.text,value:_14.value});
};
w.readySearch=function readySearch(_15){
if(dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
window.setTimeout(dojo.hitch(this,function(){
this.filterTextbox_AP.select();
}),0);
}
};
w.timedFilter=function timedFilter(_16){
dojo.removeClass(this.filterTextbox_AP,"lotusInactive");
if(this.filterTimer){
window.clearTimeout(this.filterTimer);
this.filterTimer=null;
}
this.filterTimer=window.setTimeout(dojo.hitch(this,"filterNames"),this.autoFiltertime);
};
w._onBlur=function _onBlur(_17){
if(this.filterTextbox_AP.value==this.rs_filterListPrompt){
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
}
};
w.filterNames=function filterNames(_18){
if(this.peopleList&&this.filterTextbox_AP.value!=this.oldTextValue&&this.filterTextbox_AP.value!=this.rs_filterListPrompt){
this.oldTextValue=this.filterTextbox_AP.value;
this.showList(this.peopleList);
}
};
w.parsePeople=function parsePeople(_19){
this.peopleList=_19;
this.showList(_19);
};
w.showList=function showList(_1a){
this.notifyList_AP.innerHTML="";
if(_1a){
var _1b,_1c,opt,_1d,_1e,_1f;
if(!dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
_1f=this.filterTextbox_AP.value;
}
if(_1f){
_1f=dojo.regexp.escapeString(_1f);
var _20=_1f.replace(/\s+/g," ").split(" ");
_1f="(?=.*"+_20.join(")(?=.*")+")";
_1e=new RegExp(_1f,"i");
}
var _21=_1a.totalResults||_1a.names.length;
var _22=_1a.names.length;
this._currPeople={};
if(this.isSingleSelect&&this.showDefaultOption){
++_21;
if(this.currPage==1&&!_1e){
var _23=this._getDefaultPerson();
this.createOption(_23);
++_22;
}
}
for(var i=0;i<_1a.names.length;i++){
if(_1e){
var eml=_1a.names[i].email;
if(eml){
eml=eml.substring(0,eml.indexOf("@"));
}
if(!_1e.test(_1a.names[i].name)&&!_1e.test(eml)){
--_22;
continue;
}
}
if(i==0){
this.firstIndex=this.id+"notifyCheckbox"+_1a.names[i].userid;
}
this.indexingList[i]=this.id+"notifyCheckbox"+_1a.names[i].userid;
this.createOption(_1a.names[i]);
}
if(_22==0){
this.notifyList_AP.innerHTML=this.resBundle.rs_noResults;
}
if(_1a.hasNext||_1a.hasPrev){
this.notifyPaging_AP.innerHTML="";
var _24="";
if(_1a.startIndex&&_1a.totalResults){
var _25=_1a.startIndex;
var _26=_25+_1a.names.length-1;
_24=dojo.string.substitute(this.rs_pagepos,[_25,_26,_1a.totalResults]);
}
var _27=document.createTextNode(_24);
var _28=document.createElement("ul");
_28.id=this.id+"pagingButtons";
_28.className="lotusRight lotusInlinelist";
var _29=document.createElement("a");
_29.innerHTML=this.rs_navNextLabel;
_29.href="javascript:void(0)";
_29.onclick=dojo.hitch(this,"notifyNext");
_29.setAttribute("role","button");
var _2a=document.createElement("li");
_2a.appendChild(_29);
_29=document.createElement("a");
_29.innerHTML=this.rs_navPrevLabel;
_29.href="javascript:void(0)";
_29.onclick=dojo.hitch(this,"notifyPrev");
_29.setAttribute("role","button");
var _2b=document.createElement("li");
_2b.appendChild(_29);
if(_1a.hasPrev){
_28.appendChild(_2b);
dojo.addClass(_2b,"lotusFirst");
}
if(_1a.hasNext){
_28.appendChild(_2a);
if(!_1a.hasPrev){
dojo.addClass(_2a,"lotusFirst");
}
}
this.notifyPaging_AP.appendChild(_28);
this.notifyPaging_AP.appendChild(_27);
dojo.removeClass(this.notifyPaging_AP,"lotusHidden");
}else{
dojo.addClass(this.notifyPaging_AP,"lotusHidden");
}
this.access_AP.innerHTML=dojo.string.substitute(this.resBundle.rs_numResults,[_22,_21]);
}
if(this.isSingleSelect){
this.getCurrentSelected();
}
};
w.createOption=function createOption(_2c){
var _2d=_2c.name;
var _2e=_2c.userid;
var _2f,opt,_30;
var id=_2e;
_2c.uuid=_2e;
this._currPeople[_2e]=_2c;
_2f=document.createElement("div");
_2f.className="lotusLeft";
if(this.isSingleSelect){
if(dojo.isIE){
opt=document.createElement("<input type=\"radio\" name=\"assignToGroup\" />");
}else{
opt=document.createElement("input");
}
opt.type="radio";
opt.name="assignToGroup";
}else{
_2f.className="lconnNotify lotusLeft";
if(dojo.isIE){
opt=document.createElement("<input name='"+this.id+"notifyPerson'>");
}else{
opt=document.createElement("input");
opt.setAttribute("name",this.id+"notifyPerson");
}
opt.className="lotusLeft";
opt.type="checkbox";
}
opt.id=this.id+"notifyCheckbox"+id;
opt.value=_2e;
this.connect(opt,"onclick","setValue");
this.connect(opt,"onclick","setDirty");
_30=document.createElement("label");
_30.innerHTML=lconn.core.HTMLUtil.escapeText(_2d);
_30.htmlFor=opt.id;
_30.id=opt.id+"Label";
_30.className="lotusCheckbox";
dojo.style(_30,"position","static");
_30.title=lconn.core.HTMLUtil.escapeText(_2d);
if(!this.isSingleSelect){
dojo.addClass(_30,"lotusLeft");
}
if(_2c.disabled){
opt.setAttribute("disabled",true);
_30.setAttribute("disabled",true);
opt.setAttribute("alwaysDisable",true);
_30.setAttribute("alwaysDisable",true);
}
_2f.appendChild(opt);
_2f.appendChild(_30);
this.notifyList_AP.appendChild(_2f);
if(this.isSingleSelect){
dojo.create("div",{"class":"lotusClear"},this.notifyList_AP);
}
if(this.peopleSelected[_2e]){
if(_2c.disabled){
if(this.isSingleSelect){
if(this.showDefaultOption){
var _31=this._getDefaultPerson();
this.selectItem(_31,true);
this.personSelected(_31,true);
}else{
console.warn("selected item is disabled and no default selection. select state inavlid.");
}
}else{
this._doSelectPerson(_2c,false);
}
}else{
opt.checked=true;
}
}
};
w.setDirty=function setDirty(){
this.dirty=true;
};
w.setValue=function setValue(_32){
var _33;
if(this._currPeople[_32.target.value]){
_33=this._currPeople[_32.target.value];
}else{
_33={uuid:_32.target.value,name:document.getElementById(_32.target.id+"Label").innerHTML};
}
this._doSelectPerson(_33,_32.target.checked);
};
w._doSelectPerson=function _doSelectPerson(_34,_35){
this._setItemSelected(_34,_35);
this.personSelected(_34,_35);
};
w._setItemSelected=function _setItemSelected(_36,_37){
if(this.isSingleSelect){
if(this.lastPersonSelected&&this.lastPersonSelected.uuid){
delete this.peopleSelected[this.lastPersonSelected.uuid];
}
this.lastPersonSelected=_36;
this.peopleSelected[_36.uuid]=_36.name;
}else{
if(_37){
this.peopleSelected[_36.uuid]=_36.name;
}else{
delete this.peopleSelected[_36.uuid];
}
}
};
w._getDefaultPerson=function _getDefaultPerson(){
return {name:this.defaultSelectText,userid:this.defaultSelectValue,uuid:this.defaultSelectValue};
};
w.clearSearch=function clearSearch(){
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
this.filterTextbox_AP.value=this.rs_filterListPrompt;
};
w.notifyNext=function(){
this.clearSearch();
this.notifyList_AP.innerHTML="";
++this.currPage;
this.gotList=false;
this.getList();
};
w.notifyPrev=function(){
this.clearSearch();
this.notifyList_AP.innerHTML="";
if(this.currPage>1){
--this.currPage;
}
this.gotList=false;
this.getList();
};
dojo.declare("lconn.core.FilteringCheckbox",[dijit._Widget,dijit._Templated,lconn.core.Res],w);
}

dojo.registerModulePath("com.ibm.social.layout", "../com.ibm.social.layout");

;if(!dojo._hasResource["com.ibm.social.layout.people"]){
dojo._hasResource["com.ibm.social.layout.people"]=true;
dojo.provide("com.ibm.social.layout.people");
com.ibm.social.layout.people={createLink:function(_1){
return null;
},createImage:function(_2,_3,_4){
return null;
},getImageUrl:function(_5,_6){
return null;
},isImageEnabled:function(){
return false;
}};
}


;if(!dojo._hasResource["com.ibm.lconn.layout.people"]){
dojo._hasResource["com.ibm.lconn.layout.people"]=true;
(function com_ibm_lconn_layout_people(){
var _1=dojo.provide("com.ibm.lconn.layout.people");
dojo.require("com.ibm.social.layout.people");
dojo.require("lconn.core.config.services");
dojo.require("lconn.core.url");
dojo.require("com.ibm.oneui.util.Url");
dojo.require("dojo.i18n");
dojo.requireLocalization("lconn.core","strings");
var _2=com.ibm.social.layout.people;
var _3="fn vcard";
var _4="fn";
var _5={className:_3};
var _6={className:"x-lconn-userid",style:{display:"none"}};
var _7={className:"email",style:{display:"none"}};
var _8="/html/profileView.do";
var _9="/photo2.do";
var _a=dojo.i18n.getLocalization("lconn.core","strings");
var _b=(dojo.isChrome>11||dojo.isIE>8||dojo.isFF>4)?true:null;
var _c=lconn.core.config.services.profiles;
var _d=(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString();
function _e(_f){
this.src=_f;
};
var _10={id:"userid",userid:"userid",uid:"uid",email:"email",dn:"distinguishedName",profileId:"key"};
function _11(_12,_13){
for(var key in _10){
if(_12[key]){
_13[_10[key]]=_12[key];
break;
}
}
return _13;
};
function _14(_15){
for(var key in _10){
if(_15[key]){
return _10[key]+"_"+encodeURIComponent(_15[key]);
}
}
};
if(_c){
var _16=com.ibm.oneui.util.Url.secure;
var url;
if(_16){
url=_c.secureUrl;
}else{
url=_c.url;
}
dojo.mixin(_1,{getProfileUrl:function(_17){
var _18=url+_8+lconn.core.url.writeParameters(_11(_17,{}));
return _18;
},createLink:function(_19,_1a,_1b){
var _1c=url+_8+lconn.core.url.writeParameters(_11(_19,{}));
var a;
var _1d=_19.name;
if(_19.state=="inactive"){
_1d=dojo.string.substitute(_a.rs_inactivePerson,[_1d]);
}
if(_1b){
dojo.addClass(_1b,_3);
if(_19.state=="inactive"){
dojo.addClass(_1b,"lotusPersonInactive");
}else{
dojo.addClass(_1b,"lotusPerson");
}
dojo.attr(_1b,"href",_1c);
a=_1b;
a.setAttribute("aria-describedby","semtagmenu");
a.appendChild(_1a?_1a:dojo.doc.createTextNode(_1d));
if((_19.uid!=null)&&(_19.uid!="")){
var _1e=dojo.create("span",_6,a);
_1e.appendChild(dojo.doc.createTextNode(_19.uid));
}else{
if((_19.userid!=null)&&(_19.userid!="")){
var _1e=dojo.create("span",_6,a);
_1e.appendChild(dojo.doc.createTextNode(_19.userid));
}else{
if((_19.email!=null)&&(_19.email!="")){
var _1f=dojo.create("span",_7,a);
_1f.appendChild(dojo.doc.createTextNode(_19.email));
}
}
}
}else{
a=dojo.create("a",{href:_1c});
dojo.addClass(a,_4);
if(_19.state=="inactive"){
dojo.addClass(a,"lotusPersonInactive");
}else{
dojo.addClass(a,"lotusPerson");
}
a.setAttribute("aria-describedby","semtagmenu");
a.appendChild(_1a?_1a:dojo.doc.createTextNode(_1d));
if((_19.uid!=null)&&(_19.uid!="")){
var _1e=dojo.create("span",_6,a);
_1e.appendChild(dojo.doc.createTextNode(_19.uid));
}else{
if((_19.userid!=null)&&(_19.userid!="")){
var _1e=dojo.create("span",_6,a);
_1e.appendChild(dojo.doc.createTextNode(_19.userid));
}else{
if((_19.email!=null)&&(_19.email!="")){
var _1f=dojo.create("span",_7,a);
_1f.appendChild(dojo.doc.createTextNode(_19.email));
}
}
}
}
return a;
},createImage:function(_20,_21,_22){
var _23=(!dojo._postLoad&&_21>=0);
var src=this.getImageUrl(_20,_21);
var _24=dojo.string.substitute(_a.rs_PersonPicture,[_20.name]);
var img=dojo.create("img",{src:_23?_d:src,alt:_22?_24:"",style:(_21>=0)?{width:_21+"px",height:_21+"px"}:null});
if(_23){
dojo.addOnLoad(dojo.hitch(img,_e,src));
}
var out=_22?_1.createLink(_20,img):img;
out.title=_20.name;
return out;
},getImageUrl:function(_25,_26){
var _27={r:_b,small:(_26<=64)?true:null};
_11(_25,_27);
return url+_9+lconn.core.url.writeParameters(_27);
},isImageEnabled:function(){
return true;
}});
dojo.mixin(_2,_1);
}else{
com.ibm.lconn.layout.people=_2;
return null;
}
})();
}

dojo.provide("com.ibm.oneui.controls.nls.HoverPopup")._built=true;
dojo.provide("com.ibm.oneui.controls.nls.HoverPopup.en_gb");
com.ibm.oneui.controls.nls.HoverPopup.en_gb={"help":"Help","close":"Close","popup":"Popup","closeHint":"Click here to close this popup"};

;dojo.cache("com.ibm.oneui", "controls/templates/HoverPopup.html", "<div class=\"dijitPopup\" style=\"display: none;\" role=\"presentation\"> <div dojoAttachPoint=\"wrapper\" class=\"lotusPopup\" role=\"dialog\" aria-hidden=\"true\"> <div role=\"document\"> <a dojoAttachPoint=\"closeNode\" class=\"lotusPopupClose\" href=\"#\" dojoAttachEvent=\"click:clickClose\" role=\"button\" title=\"${messages.close}\" role=\"button\" aria-describedby=\"${id}_content\"><img src=\"${_blankGif}\" alt=\"${messages.close}\"><span class=\"lotusAltText\">X</span></a> <div dojoAttachPoint=\"contentWrapper\" role=\"presentation\"> <div dojoAttachPoint=\"content\" class=\"lotusPopupContent\" id=\"${id}_content\"> </div> </div> </div> <div dojoAttachPoint=\"arrow\" class=\"lotusPopupConnector\" role=\"presentation\"></div> </div></div>");

;if(!dojo._hasResource["com.ibm.oneui.controls.HoverPopup"]){
dojo._hasResource["com.ibm.oneui.controls.HoverPopup"]=true;
dojo.provide("com.ibm.oneui.controls.HoverPopup");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
(function(){
dojo.require("dojo.i18n");
dojo.requireLocalization("com.ibm.oneui.controls","HoverPopup");
var _1=500;
var _2=350;
var _3=2;
var _4=50;
var _5=20;
var _6=10;
var _7=dojo.isIE?200:500;
var _8=dojo.i18n.getLocalization("com.ibm.oneui.controls","HoverPopup");
var _9;
dojo.declare("com.ibm.oneui.controls.HoverPopup",dijit._Widget,{content:null,around:null,html:null,onOpen:null,onClose:null,onVisible:null,openDelay:600,closeDelay:800,maxWidth:_1,maxHeight:_2,fixedMaxHeight:false,persist:true,enabled:true,programmatic:false,orientation:null,dialogTitle:_8.popup,dialogLabelledBy:false,offset:0,hideCSS:false,open:function(_a){
if(!this.isEnabled()){
return;
}
if(!_a){
if(this._aroundNodes&&this._aroundNodes.length==1){
_a=this._aroundNodes[0];
}else{
return;
}
}
if(this._openTimer){
clearTimeout(this._openTimer);
delete this._openTimer;
}
var m=this._getMasterPopup();
if(m._showing&&m._showing.programmatic==="block"){
return;
}
if(m._showing===this){
if(this._target===_a){
if(dojo.isFunction(this.onVisible)){
this.onVisible(this);
}
return;
}
this.close();
}
if(this.persist){
this._events=[];
this._events.push(this.connect(m.domNode,"onmouseover",this._hoverPopup));
this._events.push(this.connect(m.domNode,"onmouseout",this._mouseOutPopup));
this._events.push(this.connect(m.domNode,"onhover",this._hoverPopup));
this._events.push(this.connect(m.domNode,"onunhover",this._unHoverPopup));
}
this._isOpen=true;
this._target=_a;
if(this._lastOpen==-1&&this.createContents){
this.content=this.createContents(this);
if(!this.content){
console.error("HoverPopup: The createContents function must return a valid dom node.");
this.close();
return;
}
}
if(this.onOpen&&dojo.isFunction(this.onOpen)){
this.onOpen(this,this._lastOpen);
}
this._lastOpen=new Date().getTime();
m.setContent(this.content);
if(this.onContentSet&&dojo.isFunction(this.onContentSet)){
this.onContentSet();
}
var _b=m.closeNode;
if(_b){
_b.style.display=this.hideClose?"none":"";
dojo.attr(_b,"tabIndex",this.closeTabIndex||0);
}
this._doManagedConnects();
m.show(_a,this);
dijit.setWaiState(_a,"owns",this.id+"_popup");
this._validate();
},close:function(e,_c){
if(!_c&&this.clickToClose){
return;
}
this.clickToClose=false;
if(this._closeTimer){
clearTimeout(this._closeTimer);
delete this._closeTimer;
}
if(this._validateTimeout){
clearTimeout(this._validateTimeout);
delete this._validateTimeout;
}
if(this._events){
while(this._events.length>0){
this.disconnect(this._events.pop());
}
}
var m=this._getMasterPopup();
if(m._showing!==this){
return;
}
this._doManagedDisconnects();
this._isOpen=false;
if(this.onClose&&dojo.isFunction(this.onClose)){
this.onClose(this);
}
this._target=null;
m.hide();
},clickClose:function(e){
if(e){
dojo.stopEvent(e);
}
this.close(e,true);
},isOpen:function(_d){
if(!this._isOpen){
return false;
}
if(_d){
return _d===this._target;
}
return true;
},managedConnect:function(_e,_f,_10,_11,_12){
var _13={arg1:_e,arg2:_f,arg3:_10,arg4:_11,arg5:_12};
this._mConnects.push(_13);
if(this._isOpen){
this._doManagedConnect(_13);
}
},isEnabled:function(){
return this.enabled;
},updateDimensions:function(_14,_15,_16){
},position:function(_17){
var _18=this._getMasterPopup();
if(!_17){
if(!this._isOpen||!this._target){
return;
}
_17=this._target;
}
var _19=dojo.position(_17,true);
var _1a=dojo.position(_17,false);
var _1b=dojo.position(document.body);
var _1c=_1b.w;
var _1d=_19.x;
var _1e=_19.y;
var _1f=_1a.x;
var _20=_1a.y;
var _21=_1a.w;
var _22=_1a.h;
var _23=dijit.getViewport();
var _24=_23.w;
var _25=_23.h;
var _26=_23.l;
var _27=_23.t;
this.updateDimensions(_23,_19,_1a);
var _28=this.effectiveMaxWidth=Math.min(this.maxWidth,_24-60);
var _29=this.effectiveMaxHeight=Math.min(this.maxHeight,_25-30);
var _2a=_18.contentWrapper;
var _2b=_18.content;
var _2c=_18.wrapper;
var _2d=_18.domNode;
var _2e=_18.arrow;
var _2f=_2d.style;
var _30=this._dimArrow;
if(!_30){
_30=this._dimArrow={};
var _31=_2c.className;
_2c.className=_31+" lotusPopupLeft";
_30.left=dojo.marginBox(_2e);
_2c.className=_31+" lotusPopupBottom";
_2e.className=_2e.className+" ";
_30.bottom=dojo.marginBox(_2e);
_2c.className=_31;
}
var _32=this._dimBorders;
if(!_32){
var _33=dojo.position(_2b);
var _34=dojo.position(_2d);
var _35=_33.x-_34.x;
var top=_33.y-_34.y;
_32=this._dimBorders={l:_35,t:top,r:_34.w-_33.w-_35,b:_34.h-_33.h-top};
}
if(!dojo.isIE||dojo.isIE>=8){
_2a.style.maxWidth=_28==_1?"":(_28+"px");
}
if(!this.fixedMaxHeight){
_2a.style.maxHeight=_29==_2?"":(_29+"px");
}
var _36=this.orientation;
switch(_36){
case "L":
case "l":
var _35=true;
break;
case "R":
case "r":
var _35=false;
break;
default:
var l=_1f;
var r=_24-_1f-_21;
var _35=l>r;
}
if("BbTt".indexOf(_36)!=-1){
var _37=Math.min(_28,_2c.scrollWidth);
var _38=_36=="t"||_36=="T";
dojo.addClass(_2c,"lotusPopupBottom");
var _39=_1d+_21/2;
var _3a=_30.bottom.w/2;
var _3b=_37/2;
_2f.top=(_27+_20+_22+this.offset)+"px";
if(_35){
var _3c=Math.min(_1c-_6-_37,_39-_3b);
_2f.left=_3c+"px";
}else{
var _3c=Math.max(_6,_39-_3b);
_2f.left=_3c+"px";
}
_2e.style.left=Math.max(_39-_3a-_3c-_32.l,0)+"px";
_2e.style.right="auto";
}else{
var _3d=_30.left;
var _3e=_35?{"TL":"TR","BL":"BR"}:{"TR":"TL","BR":"BL"};
var _3f=dijit.placeOnScreenAroundRectangle(_2d,{x:_1d-_3d.w-this.offset+_32.l,y:_1e,width:_21+(_3d.w+this.offset-_32.l)*2,height:_22},_3e);
var _40=_3f.aroundCorner;
var _41=("R"==_40.charAt(1));
var _38=("T"==_40.charAt(0));
if(!this.hideCSS){
dojo.addClass(_2c,_41?"lotusPopupRight":"lotusPopupLeft");
}
var _42=_3f.h;
var _43=_3f.y;
var _44=_22/2;
var _45=_3d.h/2;
var _46=Math.round(_45-_44);
var _47=_38?(_43-_27):(_27+_25-_43-_42);
if(_22>_42){
var _48=_42/2;
var _49=Math.round(_44-_48);
var _4a=Math.round(_48-_45);
}else{
var _49=Math.min(_47,_45);
var _4a=Math.round(_49-_46);
}
if(_3f.overflow>0){
var _4b=Math.min(_47,_3f.overflow);
_49+=_4b;
_4a+=_4b;
}
_2e.style[_38?"top":"bottom"]=Math.max(_4a-_32[_38?"t":"b"],0)+"px";
_2e.style[_38?"bottom":"top"]="auto";
_2f.top=_43+((_38?-1:1)*_49)+"px";
if(_35){
_2f.right=(_1c-_3f.x-_3f.w+(dojo._isBodyLtr()?0:_1b.x))+"px";
_2f.left="auto";
}
}
_2a.scrollTop=1;
_2a.scrollTop=0;
if(dojo.isIE<8){
_2b.className=_2b.className;
}
},destroy:function(){
if(this._isOpen){
this.close();
}
this.content=null;
this._doManagedDisconnects();
this.inherited(arguments);
},_getMasterPopup:function(){
if(!_9){
_9=new com.ibm.oneui.controls.internal._MasterPopup();
}
return _9;
},postCreate:function(){
this._lastOpen=-1;
this._aroundNodes=[];
this._aConnects=[];
this._mConnects=[];
this._mHandlers=[];
this._attachArounds();
this.createManagedConnects();
},createManagedConnects:function(){
},createContents:function(tip){
var d=dojo.create("div");
if(this.html){
d.innerHTML=this.html;
}
return d;
},_attachArounds:function(){
var a=this.around;
if(dojo.isArray(a)){
for(var i=0;i<a.length;i++){
this._attachAround(a[i]);
}
}else{
this._attachAround(a);
}
delete this.around;
},_attachAround:function(c){
if(!c){
return;
}
if(c.nodeType){
var _4c=c;
}else{
var _4c=dojo.byId(c);
}
if(_4c){
var _4d=this._aConnects;
this._aroundNodes.push(_4c);
dijit.setWaiRole(_4c,"button");
_4d.push(this.connect(_4c,"onmouseover",this._hover));
_4d.push(this.connect(_4c,"onmouseout",this._mouseOut));
_4d.push(this.connect(_4c,"onhover",this._hover));
_4d.push(this.connect(_4c,"onunhover",this._unHover));
if(this._clickAround){
_4d.push(this.connect(_4c,"onclick",this._clickAround));
}
}
},setAround:function(_4e){
this._aroundNodes=[];
dojo.forEach(this._aConnects,this.disconnect,this);
this._aConnects=[];
this.around=_4e;
if(this._isOpen&&this._target&&dojo.indexOf(_4e,this._target)==-1){
this.close();
}
this._attachArounds();
},_doManagedConnects:function(){
for(var i=0;i<this._mConnects.length;i++){
this._doManagedConnect(this._mConnects[i]);
}
},_doManagedConnect:function(_4f){
this._mHandlers.push(dojo.connect(_4f.arg1,_4f.arg2,_4f.arg3,_4f.arg4,_4f.arg5));
},_doManagedDisconnects:function(){
while(this._mHandlers.length>0){
dojo.disconnect(this._mHandlers.pop());
}
},_validate:function(){
if(dojo.isDescendant(this._target,document.body)==true){
if(dojo.isIE<8){
var m=this._getMasterPopup();
var c=m.content;
var cw=m.contentWrapper;
cw.style.width=(c.clientWidth>=(this.effectiveMaxWidth-1)-(m._scrollbarSize||0))?this.effectiveMaxWidth+"px":"";
if(!m._scrollbarSize&&cw.clientWidth!=cw.offsetWidth){
m._scrollbarSize=cw.offsetWidth-cw.clientWidth;
}
}
this._validateTimeout=setTimeout(dojo.hitch(this,this._validate),_7);
return;
}
this.close();
},_mouseOut:function(e){
if(dojo.isDescendant(e.relatedTarget,e.target)==true){
return;
}
this._unHover(e);
},_hover:function(e){
if(this.programmatic){
return;
}
if(this._closeTimer){
clearTimeout(this._closeTimer);
delete this._closeTimer;
}
if(!this._isOpen&&!this._openTimer){
var _50=e.target;
this._openTimer=setTimeout(dojo.hitch(this,function(){
this.open(this._determineTarget(_50));
}),this.openDelay);
}
},_unHover:function(e){
if(this.programmatic){
return;
}
if(this._openTimer){
clearTimeout(this._openTimer);
delete this._openTimer;
}
this._closeTimer=setTimeout(dojo.hitch(this,function(){
if(!this._isTipHovered){
this.close();
}
}),this.closeDelay);
},_hoverPopup:function(e){
this._isTipHovered=true;
},_mouseOutPopup:function(e){
if(dojo.isDescendant(e.relatedTarget,this._getMasterPopup().domNode)==true){
return;
}
this._unHoverPopup(e);
},_unHoverPopup:function(e){
this._isTipHovered=false;
if(e.relatedTarget==this._target||dojo.isDescendant(e.relatedTarget,this._target)==true){
return;
}
this._unHover(e);
},_determineTarget:function(_51){
if(!_51){
return _51;
}
var _52=null;
for(var i=0;i<this._aroundNodes.length;i++){
if(!this._aroundNodes[i]){
continue;
}
if(this._aroundNodes[i]==_51){
return _51;
}
if(dojo.isDescendant(_51,this._aroundNodes[i])==true&&(!_52||dojo.isDescendant(this._aroundNodes[i],_52)==true)){
_52=this._aroundNodes[i];
}
}
return _52?_52:_51;
}});
var _53=[];
dojo.declare("com.ibm.oneui.controls.internal._MasterPopup",[dijit._Widget,dijit._Templated],{zIndex:10000,templatePath:dojo.moduleUrl("com.ibm.oneui","controls/templates/HoverPopup.html"),messages:_8,postCreate:function(){
dojo.style(this.domNode,{display:"none",zIndex:this.zIndex});
var _54=dojo.query(".dijitPopup",document.body)[0];
var _55=this.place;
if(!_54||!_55){
_54=dojo.body();
_55=null;
}
dojo.place(this.domNode,_54,_55);
},show:function(_56,_57){
if(this._showing){
this._showing.close();
}
this._showing=_57;
var _58=this.domNode;
var _59=this.wrapper;
_59.id=_57.id+"_popup";
if(!this._showing.dialogLabelledBy){
dijit.setWaiState(_59,"label",_57.dialogTitle!==null?_57.dialogTitle:_57.title||"");
}else{
dijit.setWaiRole(_59,"presentation");
}
if(_57.customClass){
dojo.addClass(_59,_57.customClass);
}
_58.style.visibility="hidden";
_58.style.display="block";
if(this.zIndex&&!_58.style.zIndex){
_58.style.zIndex=this.zIndex;
}
try{
_57.position(_56);
_58.style.visibility="";
if(dojo.isFunction(_57.onVisible)){
_57.onVisible(_57);
}
dijit.setWaiState(_59,"hidden","false");
_53.push(this);
}
catch(e){
_57.close();
if(djConfig.isDebug){
console.error(e);
}
}
},hide:function(){
for(var i=0;i<_53.length;i++){
if(_53[i]==this){
var _5a=_53[i+1];
if(_5a&&_5a._showing){
_5a._showing.close();
}
_53.pop();
}
}
var _5b=this.domNode.style;
_5b.cssText="";
_5b.display="none";
this.arrow.style.cssText="";
this.contentWrapper.style.cssText="";
var _5c=this.wrapper;
dijit.setWaiState(_5c,"hidden","true");
if(!this._showing.dialogLabelledBy){
dijit.setWaiState(_5c,"label","");
}else{
dijit.setWaiRole(_5c,"presentation");
}
dojo.removeClass(_5c,["lotusPopupLeft","lotusPopupRight","lotusPopupBottom"]);
if(this._showing&&this._showing.customClass){
dojo.removeClass(_5c,this._showing.customClass);
}
this._showing=null;
},setContent:function(_5d){
if(this.content.firstChild){
this.content.replaceChild(_5d,this.content.firstChild);
}else{
this.content.appendChild(_5d);
}
},clickClose:function(_5e){
if(this._showing){
this._showing.clickClose(_5e);
}
}});
com.ibm.oneui.controls.internal._getPopupForNode=function(_5f){
for(var i=0,l=_53.length;i<l;i++){
var _60=_53[i];
if(dojo.isDescendant(_5f,_60.domNode)){
return _60._showing;
}
}
};
})();
}


;if(!dojo._hasResource["com.ibm.oneui.controls._HoverDialogMixin"]){
dojo._hasResource["com.ibm.oneui.controls._HoverDialogMixin"]=true;
(function(){
dojo.provide("com.ibm.oneui.controls._HoverDialogMixin");
dojo.require("dijit.DialogUnderlay");
dojo.require("dijit._DialogMixin");
dojo.require("dojo.i18n");
dojo.requireLocalization("com.ibm.oneui.controls","HoverPopup");
var _1=dojo.i18n.getLocalization("com.ibm.oneui.controls","HoverPopup");
dojo.declare("com.ibm.oneui.controls._HoverDialogMixin",dijit._DialogMixin,{underlay:false,_hasF:false,createManagedConnects:function(){
this.managedConnect(dojo.body(),"onkeypress",this,"_onKeyPress");
this.managedConnect(dojo.body(),"onclick",this,"_onBodyClick");
var _2=this.underlay;
if(_2===true){
var _3=true;
_2=this.underlay=new dijit.DialogUnderlay({dialogId:this.id,"class":_3?"lotusPopupUnderlayFixed":""});
if(_3){
_2.layout=function(){
};
}else{
this.managedConnect(window,"onscroll",_2,"layout");
this.managedConnect(window,"onresize",_2,"layout");
}
_2.domNode.title=_1.closeHint;
}
},openWithFocus:function(_4){
this._takeF=true;
this.open(_4);
this._takeF=false;
},_onKeyPress:function(_5){
var _6=_5.target;
var dk=dojo.keys;
if(_5.charOrCode===dk.TAB){
this._getFocusItems(this._getDomNode());
}
var _7=(this._firstFocusItem==this._lastFocusItem);
if(_5.charOrCode==dk.ESCAPE){
if(_5._cancelled){
return;
}
_5._cancelled=true;
var _8=com.ibm.oneui.controls.internal._getPopupForNode(_6)||this;
setTimeout(dojo.hitch(_8,"close"),0);
dojo.stopEvent(_5);
}else{
if(_6==this._firstFocusItem&&_5.shiftKey&&_5.charOrCode===dk.TAB){
if(!_7){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(_5);
}else{
if(_6==this._lastFocusItem&&_5.charOrCode===dk.TAB&&!_5.shiftKey){
if(!_7){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(_5);
}else{
if(_5.charOrCode===dk.TAB){
_5.stopPropagation();
}
}
}
}
},_onBodyClick:function(e){
var _9=e&&e.target;
if(_9&&!dojo.isDescendant(_9,this._getDomNode())&&(!this._target||!dojo.isDescendant(_9,this._target))){
this._hasF=false;
this.close();
}
},_onStopEvent:function(e){
if(e.type=="click"){
this._onBodyClick(e);
}
},onVisible:function(){
if(this._takeF){
this._hasF=true;
this._getFocusItems(this._getDomNode());
dijit.focus(this._firstFocusItem);
}
},onOpen:function(){
if(this.underlay){
this.underlay.show();
}
},onClose:function(){
if(this.underlay){
this.underlay.hide();
}
if(this._hasF){
dijit.focus(this._target);
}
this._hasF=false;
},_targetClickAround:function(e){
dojo.stopEvent(e);
this.openWithFocus(this._determineTarget(e.target));
},_getDomNode:function(){
return this._getMasterPopup().domNode;
}});
})();
}


;if(!dojo._hasResource["com.ibm.oneui.controls.HoverDialog"]){
dojo._hasResource["com.ibm.oneui.controls.HoverDialog"]=true;
(function(){
dojo.provide("com.ibm.oneui.controls.HoverDialog");
dojo.require("com.ibm.oneui.controls.HoverPopup");
dojo.require("com.ibm.oneui.controls._HoverDialogMixin");
var _1;
dojo.declare("com.ibm.oneui.controls.HoverDialog",[com.ibm.oneui.controls.HoverPopup,com.ibm.oneui.controls._HoverDialogMixin],{programmatic:true,_getMasterPopup:function(){
if(!_1){
_1=new com.ibm.oneui.controls.internal._MasterPopup({place:"before"});
}
return _1;
}});
})();
}


;if(!dojo._hasResource["com.ibm.oneui.Logger"]){
dojo._hasResource["com.ibm.oneui.Logger"]=true;
(function(){
dojo.provide("com.ibm.oneui.Logger");
dojo.declare("com.ibm.oneui.Logger",null,{constructor:function(){
},error:function(){
try{
if(dojo.isIE){
console.log("ERROR: "+arguments[0]);
}else{
console.error.apply(console,arguments);
}
}
catch(ee){
}
},warn:function(){
try{
if(dojo.isIE){
console.log("WARNING: "+arguments[0]);
}else{
console.warn.apply(console,arguments);
}
}
catch(ee){
}
},info:function(){
try{
if(dojo.isIE){
console.log("INFO: "+arguments[0]);
}else{
console.info.apply(console,arguments);
}
}
catch(ee){
}
},log:function(){
try{
if(dojo.isIE){
console.log(arguments[0]);
}else{
console.log.apply(console,arguments);
}
}
catch(ee){
}
},debug:function(){
try{
if(dojo.isIE){
console.log("DEBUG: "+arguments[0]);
}else{
console.debug.apply(console,arguments);
}
}
catch(ee){
}
}});
})();
}


;if(!dojo._hasResource["com.ibm.oneui._base"]){
dojo._hasResource["com.ibm.oneui._base"]=true;
dojo.provide("com.ibm.oneui._base");
dojo.require("dijit._Widget");
dojo.declare("com.ibm.oneui._base",[dijit._Widget],{ctx:"",debug:false,_controlinit:null,strings:null,isBidi:null,locale:null,getControlInit:function(){
return this._controlinit;
},setControlInit:function(_1){
this._controlinit=_1;
},constructor:function(){
this.strings=null;
var _2=this;
this.debug=(!!this.debug)||dojo.config.isDebug||dojo.config.debugAtAllCosts;
this.EventHandler={_instance:{_sep:"__",publish:function(_3,_4,_5){
dojo.publish(_3+this._sep+_4,_5);
},subscribe:function(_6,_7,_8,_9){
dojo.subscribe(_6+this._sep+_7,_8,_9);
},unsubscribe:function(_a,_b){
dojo.unsubscribe(_b);
}},getInstance:function(){
return this._instance;
}};
this.Logger={_instance:{_logger:null,log:function(){
if(!!_2.debug&&this._logger&&typeof this._logger.log==="function"){
this._logger.log.apply(this._logger,arguments);
}
},error:function(){
if(!!_2.debug&&this._logger&&typeof this._logger.error==="function"){
this._logger.error.apply(this._logger,arguments);
}
},warn:function(){
if(!!_2.debug&&this._logger&&typeof this._logger.warn==="function"){
this._logger.warn.apply(this._logger,arguments);
}
},info:function(){
if(!!_2.debug&&this._logger&&typeof this._logger.info==="function"){
this._logger.info.apply(this._logger,arguments);
}
},debug:function(){
if(!!_2.debug&&this._logger&&typeof this._logger.debug==="function"){
this._logger.debug.apply(this._logger,arguments);
}
}},getInstance:function(){
if(!!_2.debug&&!this._instance._logger){
dojo.require("com.ibm.oneui.Logger");
this._instance._logger=new com.ibm.oneui.Logger();
}
return this._instance;
},setSystemLogger:function(_c){
if(!!_c){
var _d;
if(typeof _c==="function"){
_d=new _c;
}else{
_d=_c;
}
this._instance._logger=_d;
}
}};
},_getStateObject:function(){
this._stateObj=this._stateObj||[];
var _e=this._stateIndex||this.id;
if(!_e||_e==""){
this._stateIndex=_e="ctrl_"+new Date().getTime();
}
var _f=this;
_f.StateObject=function(_10){
var _11={strings:{},connects:[],widgets:[],styles:[]};
_11=_f._mixin(_11,_10);
return _11;
};
if(!this._stateObj[_e]){
var obj=new this.StateObject(((arguments.length>0)?arguments[0]:{}));
this._stateObj[_e]=obj;
}
return this._stateObj[_e];
},_getValue:function(idx,nam){
var _12=this._getStateObject();
var _13;
if(typeof (idx)==="number"){
_13=this.getItem(idx);
}else{
_13=idx;
}
var ret=null;
if(_13){
try{
ret=_12.store.data.getValue(_13,nam);
}
catch(ee){
}
if(!ret){
try{
ret=_12.store.data.getValue(_13,_12.store.attributes[nam]);
}
catch(ee){
}
}
if(!ret){
try{
ret=_12.store.data.getValue(_13,_12.store.attributes[nam+"Attr"]);
}
catch(ee){
}
}
if(!ret){
ret=null;
}
}
return ret;
},_getStringResource:function(str,def,_14){
var ret=def||"";
var _15=_14||this._getStateObject().strings;
if(_15){
var _16=str.split(".");
var _17=_16.length;
for(var ii=0;ii<_17;ii++){
if(_15){
_15=_15[_16[ii]];
}
}
if(typeof _15==="string"){
ret=_15;
}
}
return _15;
},_connect:function(){
var _18=this._getStateObject();
var cn=dojo.connect.apply(dojo,arguments);
_18.connects.unshift(cn);
},_addWidgetStyle:function(url){
var _19=this._getStateObject();
var css=dojo.create("link",{type:"text/css",rel:"stylesheet",href:url});
dojo.doc.getElementsByTagName("head")[0].appendChild(css);
_19.styles.unshift(css);
},_mixin:function(_1a,_1b){
var ret=dojo.clone(_1a);
for(ii in ret){
if(_1b[ii]&&typeof ret[ii]===typeof _1b[ii]){
if(typeof ret[ii]==="object"){
ret[ii]=this._mixin(ret[ii],_1b[ii]);
}else{
ret[ii]=_1b[ii];
}
}
}
for(ii in _1b){
if(typeof ret[ii]==="undefined"){
ret[ii]=_1b[ii];
}
}
return ret;
},destroy:function(){
var _1c=this._getStateObject();
try{
dojo.forEach(_1c.connects,dojo.disconnect);
}
catch(ee){
}
try{
_1c.connects.length=0;
}
catch(ee){
}
try{
dojo.forEach(_1c.widgets,function(itm){
itm.destroy();
});
}
catch(ee){
}
try{
_1c.widgets.length=0;
}
catch(ee){
}
try{
dojo.forEach(_1c.styles,function(itm){
if(itm&&itm.parentNode){
itm.parentNode.removeChild(itm);
}
});
}
catch(ee){
}
try{
_1c.styles.length=0;
}
catch(ee){
}
this.inherited(arguments);
},postMixInProperties:function(){
var obj;
var _1d=this;
if(!this.locale){
if(dojo.locale){
this.locale=dojo.locale;
}else{
this.locale="en";
}
}
if(!this.isBidi){
this.isBidi=((dojo.hasAttr(dojo.body(),"dir")&&dojo.attr(dojo.body(),"dir").toLowerCase()=="rtl")||dojo.indexOf(["ar","he"],dojo.locale)>-1);
}
if(typeof this.strings==="string"&&this.strings.length>0){
var str=this.strings;
this.strings=null;
try{
this.strings=dojo.fromJson(str);
}
catch(ee1){
}
}
if(this.strings==null){
this.strings={};
}
var _1e=this.srcNodeRef;
if(!!_1e){
dojo.forEach(_1e.childNodes,function(_1f){
var _20=_1f.nodeValue;
if(_20&&_20.indexOf("[CDATA[")==0){
try{
_20=dojo.trim(_20.substring(0,_20.length-2).substring(7).replace(/\n/g," ").replace(/\r/g," "));
var _21={};
try{
_21=dojo.fromJson(_20);
}
catch(ee2){
}
obj=dojo.mixin(obj,_21);
}
catch(ee1){
console.error("Error reading CDATA for control ("+_1d.declaredClass+"): "+ee1.message,ee1);
}
}
});
}
this._controlinit=obj;
if(this._controlinit&&this._controlinit.strings){
this.strings=dojo.mixin(this.strings,this._controlinit.strings);
}
},_getIsBidi:function(){
return this.isBidi;
},getWidgetLocation:function(){
var _22=dojo.moduleUrl((this.coreWidgetClass||this.declaredClass)).path.split("/");
_22.pop();
_22.pop();
return _22.join("/")+"/";
},getWidgetLocationDojoRelative:function(){
var _23="dojo/dojo/";
var url=this.getWidgetLocation();
var ix=url.indexOf(_23);
if(ix!=-1){
url=url.substr(ix+_23.length);
}
return url;
},parseInt:function(val){
return parseInt(val,10);
},publish:function(_24,_25){
this.EventHandler.getInstance().publish(this.ctx,_24,_25);
},subscribe:function(_26,_27,_28){
this.EventHandler.getInstance().subscribe(this.ctx,_26,_27,_28);
},unsubscribe:function(_29){
this.EventHandler.getInstance().unsubscribe(this.ctx,_29);
},logEnter:function(_2a){
if(!!this.debug){
var _2b=((_2a&&_2a.callee&&_2a.callee.nom)?_2a.callee.nom:_2a);
this.Logger.getInstance().debug("Entering: "+this.declaredClass+"."+_2b+" ("+this.id+")");
}
},logExit:function(_2c){
if(!!this.debug){
var _2d=((_2c&&_2c.callee&&_2c.callee.nom)?_2c.callee.nom:_2c);
this.Logger.getInstance().debug("Exiting: "+this.declaredClass+"."+_2d+" ("+this.id+")");
}
},logError:function(e){
var _2e=this.Logger.getInstance();
_2e.error("Error: "+this.declaredClass+((e.callee)?"."+e.callee:"")+" ("+this.id+") - "+e.message);
_2e.error(e);
}});
}

dojo.provide("com.ibm.oneui.recommend.nls.Recommender")._built=true;
dojo.provide("com.ibm.oneui.recommend.nls.Recommender.en_gb");
com.ibm.oneui.recommend.nls.Recommender.en_gb={"INLINE":{"UNRECOMMENDED":{"TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e","READONLYTEXT":"","TOOLTIP":"Like this"},"RECOMMENDED_BYMANY":{"TEXT":"${recommendCount}","READONLYTEXT":"${recommendCount}","TOOLTIP":"${recommendCount} people like this"},"RECOMMENDED_BYONE":{"TEXT":"${recommendCount}","READONLYTEXT":"${recommendCount}","TOOLTIP":"1 person likes this"},"RECOMMENDED":{"TEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e \x3cspan class=\'lotusDivider\' role=\'separator\'\x3e-\x3c/span\x3e \x3ca class=\'lotusLikeAction\' role=\'button\' aria-label=\'You like this\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eUnlike\x3c/a\x3e","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","TOOLTIP":"Unlike"},"RECOMMENDED_BYNONE":{"TEXT":"${recommendCount}","READONLYTEXT":"${recommendCount}","TOOLTIP":"0 people like this"}},"POPUP":{"RECOMMENDED_ME_MANY":{"TEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e\x3cspan class=\'lotusDivider\' role=\'separator\'\x3e-\x3c/span\x3e\x3ca class=\'lotusLikeAction\' role=\'button\' aria-label=\'You like this\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eUnlike\x3c/a\x3e","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","TOOLTIP":"Unlike"},"RECOMMENDED_ME_ONE":{"TEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e\x3cspan class=\'lotusDivider\' role=\'separator\'\x3e-\x3c/span\x3e\x3ca class=\'lotusLikeAction\' role=\'button\' aria-label=\'You like this\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eUnlike\x3c/a\x3e","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","TOOLTIP":"Unlike"},"RECOMMENDED_NOTME_MANY":{"TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e","READONLYTEXT":"","TOOLTIP":"Like this"},"RECOMMENDED_HEADER_SHOWING_ALL":"People who like this...","RECOMMENDED_HEADER_SHOWING_SOME":"People who like this... (sorted by name)","RECOMMENDED_CLOSE_TITLE":"Close list of people who like this.","RECOMMENDED_NOTME_ONE":{"TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e","READONLYTEXT":"","TOOLTIP":"Like this"},"RECOMMENDED_ME_ONLY":{"TEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e\x3cspan class=\'lotusDivider\' role=\'separator\'\x3e-\x3c/span\x3e\x3ca class=\'lotusLikeAction\' role=\'button\' aria-label=\'You like this\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eUnlike\x3c/a\x3e","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","TOOLTIP":"Unlike"}},"LOADING":"Loading...","TEMPLATE_STRINGS":{"LIKES":"Likes"}};

;if(!dojo._hasResource["com.ibm.oneui.recommend._base"]){
dojo._hasResource["com.ibm.oneui.recommend._base"]=true;
(function(){
dojo.provide("com.ibm.oneui.recommend._base");
dojo.require("com.ibm.oneui._base");
dojo.declare("com.ibm.oneui.recommend._base",[com.ibm.oneui._base],{loadIndividualStyles:false,loadDefaultStrings:true,currentUserId:null,dataStore:null,displayNameAttr:"displayName",userIdAttr:"userId",mailAttr:"mail",editable:true,size:-1,ERROR:{ITEM_NOT_FOUND:0,ITEM_LOAD_FAILURE:2,DATASTORE_NOT_FOUND:3},_getDefaultStateObject:function(){
return {store:{data:this.dataStore,request:{count:this.count},attributes:{displayNameAttr:this.displayNameAttr,userIdAttr:this.userIdAttr,mailAttr:this.mailAttr}}};
},postMixInProperties:function(){
this._loadSupplementalDojo();
var _1=this;
_1.toggleFocus=false;
var _2=this._getStateObject(this._getDefaultStateObject());
for(sAttr in _2.store.attributes){
if(sAttr){
this[sAttr]=_2.store.attributes[sAttr];
}
}
if(this.loadDefaultStrings){
dojo.requireLocalization("com.ibm.oneui.recommend","Recommender");
_2.strings=dojo.i18n.getLocalization("com.ibm.oneui.recommend","Recommender");
}
if(this.strings!==null&&typeof this.strings==="object"){
if(!_2.strings){
_2.strings=this.strings;
}else{
_2.strings=this._mixin(_2.strings,this.strings);
}
}
try{
if(typeof this.around==="string"){
this.around=dojo.byId(this.around);
}
}
catch(ee){
}
if(this.currentUserId==null||this.currentUserId==""||this.currentUserId.toLowerCase()=="anonymous"){
this.editable=false;
}
setTimeout(function(){
if(typeof _2.store.data=="undefined"||_2.store.data==null){
_1.onError({code:_1.ERROR.DATASTORE_NOT_FOUND,message:"DataStore or Request object not set.",callee:arguments.callee.nom});
}
},1);
this.inherited(arguments);
},populateRecommend:function(){
},_toggleRecommend:function(){
this.toggleFocus=true;
this.logEnter(arguments);
var _3=this;
this._setRecommend(!this._getRecommend(),function(){
setTimeout(function(){
_3.populateRecommend();
},1);
});
this.logExit(arguments);
},_isUserRecommended:false,_currentUserItem:null,_setRecommend:function(yn,_4){
var _5=this._isUserRecommended;
this._isUserRecommended=!!yn;
var _6=this;
var _7;
var ds=this._getStateObject().store.data;
if(!ds){
this.onError({code:this.ERROR.DATASTORE_NOT_FOUND,message:"Data store not found.",callee:arguments.callee.nom});
return;
}
if(this._currentUserItem==null&&this._isUserRecommended){
var _8={};
_8[ds._getIdentifierAttribute()]=this.currentUserId;
try{
_7=ds.newItem(_8);
}
catch(ee){
_7=true;
}
if(_7){
this._isPopulateLoaded=false;
}
}else{
if(this._currentUserItem!=null&&!this._isUserRecommended){
this._currentUserItem._node_=null;
try{
_7=ds.deleteItem(this._currentUserItem);
}
catch(ee){
_7=true;
}
if(_7){
this._isPopulateLoaded=false;
}
}
}
if(ds.isDirty()){
ds.save({onComplete:function(){
if(dojo.isFunction(_4)){
_4();
}
},onError:function(_9){
ds.revert();
_6._isUserRecommended=_5;
_6._onError({code:_6.ERROR.ITEM_LOAD_FAILURE},_9);
}});
}else{
if(dojo.isFunction(_4)){
_4();
}
}
this.logExit(arguments);
},_getRecommend:function(){
return !!this._isUserRecommended;
},_getWidgetClassName:function(_a){
return _a||this.coreWidgetClass||this.declaredClass;
},_loadSupplementalDojo:function(){
this.logEnter(arguments);
if(this.loadDefaultStrings){
dojo.require("dojo.i18n");
}
dojo.require("dojo.string");
dojo.require("dojo.html");
this.logExit(arguments);
},_onError:function(e,_b){
this.logEnter(arguments);
this.onError.apply(this,arguments);
this.logExit(arguments);
},onError:function(e,_c){
this.logError(e);
}});
})();
}


;dojo.cache("com.ibm.oneui", "recommend/templates/personNode.html", "<div> <div class=\"lotusLikeAvatar\"> <img dojoAttachPoint=\"personImage\" alt=\"\" src=\"../../oneUI/imageLibrary/OtherImages/People/NoPhotoPerson32.png\"/> </div> <div class=\"lotusPerson\"> ${displayName} </div></div> ");

;dojo.cache("com.ibm.oneui", "recommend/templates/PopupContents.html", "<div class=\"lotusLikeLightBox\" style=\"width:${width}px\"> <div class=\"lotusLikeHeader\"> <div class=\"lotusLike\"> <a class=\"lotusLikeCount lotusDisabled\" aria-label=\"\" dojoAttachPoint=\"popupSmiley\"> <img dojoAttachPoint=\"inlineSmiley\" class=\"lotusIconLike\" src=\"${_blankGif}\" alt=\"\"/> <span class=\"lotusAltText\" dojoAttachPoint=\"likeAltAP\"></span> <div dojoAttachPoint=\"popupLikeCount\" class=\"lotusLikeText\" role=\"presentation\">&nbsp;</div> <div class=\"lotusLikeConnector lotusHidden\"></div> </a> <span aria-live=\"assertive\" dojoAttachPoint=\"recommendMessage\">&nbsp;&nbsp;&nbsp;</span> </div> <span class=\"lotusLikeHeaderText\" dojoAttachPoint=\"popupHeaderCountMessage\"></span> </div> <ul class=\"lotusList\" dojoAttachPoint=\"recommendNames\" class=\"lotusLikeLightBox\"> </ul></div>");

;if(!dojo._hasResource["com.ibm.oneui.recommend.Popup"]){
dojo._hasResource["com.ibm.oneui.recommend.Popup"]=true;
(function(){
dojo.provide("com.ibm.oneui.recommend.Popup");
dojo.require("com.ibm.oneui.controls.HoverDialog");
dojo.require("com.ibm.oneui.recommend._base");
dojo.require("dojo.cache");
dojo.require("com.ibm.lconn.layout.people");
var _1=dojo.i18n.getLocalization("com.ibm.oneui.recommend","Recommender").POPUP.RECOMMENDED_HEADER_SHOWING_ALL;
dojo.declare("com.ibm.oneui.recommend.Popup",[com.ibm.oneui.controls.HoverDialog,com.ibm.oneui.recommend._base],{orientation:"B",coreWidgetClass:"com.ibm.oneui.recommend.Popup",showActions:true,count:25,start:0,ds:null,popupLikeNamesNode:null,popupWidth:300,dialogLabelledBy:true,dialogTitle:"",constructor:function(){
this.offset=10;
},_clickAround:function(e){
var _2=this;
setTimeout(function(){
_2.containerNode=_2._getDomNode();
_2.openWithFocus(_2._determineTarget(e.target));
},100);
},destroy:function(){
this.logEnter(arguments);
this.inherited(arguments);
this.logExit(arguments);
},postMixInProperties:function(){
this.logEnter(arguments);
this.inherited(arguments);
if(!this._getStateObject().store.data){
this._onError({code:this.ERROR.DATASTORE_NOT_FOUND,message:"Data store not found.",callee:arguments.callee.nom});
}else{
this._connect(this,"open",this,"populateRecommend");
}
this.logExit(arguments);
},postCreate:function(){
this.logEnter(arguments);
this.inherited(arguments);
this.logExit(arguments);
},position:function(){
this.inherited(arguments);
var _3=this._getMasterPopup();
if(_3){
var _4=_3.domNode;
_4.setAttribute("role","dialog");
_4.setAttribute("aria-label",this._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_ALL"));
var _5=dojo.style(_4,"left")-5;
if(_5<0){
_5=0;
}
dojo.style(_4,"left",_5+"px");
}
},_isPopulateLoaded:false,_editableLink:null,populateRecommend:function(){
this.logEnter(arguments);
if(!this._isPopulateLoaded){
var _6=this;
var ds=this._getStateObject().store.data;
var _7=function(_8){
return dojo.byId(_6.id+"__"+_8);
};
var _9=function(_a){
if(_6._getRecommend()){
try{
var _b=ds._getIdentifierAttribute();
var _c=ds.getValue(_a,_b,null);
}
catch(ee){
}
}
if(_a._node_&&_a._node_[0]){
var _d=_a._node_[0];
dojo.place(_6.createPersonNode(_a),_d,"last");
}
};
var _e=function(_f){
ds.revert();
_6._onError({code:_6.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom},_f);
};
var _10=function(_11,_12){
for(var i=0;i<_11.length;i++){
if(_11[i].userId==_12){
var cu=_11.splice(i,1);
_11.unshift(cu[0]);
break;
}
}
return (_11);
};
var _13=function(_14){
_14=_10(_14,_6.currentUserId);
var _15=_7("recommendMessage");
var _16=_7("recommendNames");
var _17=_7("popupLikeCount");
var _18=_7("popupSmiley");
if(_6.showActions==false){
if(_15!=null){
dojo.destroy(_15);
}
_15=null;
if(_18!=null){
dojo.destroy(_18);
}
_18=null;
}
var _19=_7("popupHeaderCountMessage");
var _1a=_6.size;
if(_1a<0){
_1a=_14.length;
}
if(_1a==0&&_18!=null){
var _1b=dojo.attr(_18,"class");
dojo.attr(_18,"class",_1b+" lotusNoLikes");
}else{
if(_18!=null){
var _1b=dojo.attr(_18,"class");
dojo.attr(_18,"class",_1b.replace("lotusNoLikes",""));
}
}
var str="POPUP.";
if(_1a<=0){
str+="RECOMMENDED_NOTME_MANY";
}else{
if(_6._getRecommend()){
if(_1a==1){
str+="RECOMMENDED_ME_ONLY";
}else{
if(_1a==2){
str+="RECOMMENDED_ME_ONE";
}else{
str+="RECOMMENDED_ME_MANY";
}
}
}else{
if(_1a==1){
str+="RECOMMENDED_NOTME_ONE";
}else{
str+="RECOMMENDED_NOTME_MANY";
}
}
}
var _1c={recommendCount:_1a,numshown:_6.count,total:_1a,id:_6.id};
var _1d="";
if(_6.showActions){
_1d=_6._getStringResource(str+".TOOLTIP");
_1d=dojo.string.substitute(_1d,_1c);
}
var _1e=_6._getStringResource(str+".TEXT");
_1e=dojo.string.substitute(_1e,_1c);
if(_15!=null&&_6.showActions!==false){
dojo.html.set(_15,_1e);
}
var _1f=(_1a==0)?"&nbsp;":_1a.toString();
if(_17!=null){
dojo.html.set(_17,_1f);
}
var _20="INLINE.RECOMMENDED_";
if(_1a==0){
_20+="BYNONE";
}else{
if(_1a==1){
_20+="BYONE";
}else{
_20+="BYMANY";
}
}
_20+=".TOOLTIP";
var _21=dojo.string.substitute(_6._getStringResource(_20),_1c);
var _22=dojo.byId("TOGGLE_"+_6.id);
if(_22!=null){
dojo.attr(_22,{"title":_21,"aria-label":_21});
}
if(_18!=null){
dojo.attr(_18,{title:_21,alt:_21});
}
if(_6.showActions==false){
if(_15!=null){
dojo.destroy(_15);
}
_15=null;
}
var _23="";
if(_1a>_6.count){
_23=_6._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_SOME");
}else{
_23=_6._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_ALL");
}
if(_6.showActions==true){
var _1b=dojo.attr(_19,"class");
dojo.attr(_19,"class",_1b+" lotusRight");
}
_23=dojo.string.substitute(_23,_1c);
dojo.html.set(_19,_23);
var _22=dojo.byId("TOGGLE_"+_6.id);
if(_22==null){
_22=dojo.byId("TOGGLE_["+_6.id+"]");
}
if(_22){
dojo.attr(_22,"title",_1d);
_6._connect(_22,"onclick",_6,"_toggleRecommend");
}
dojo.empty(_16);
for(var ii=0;ii<_14.length;ii++){
_14[ii].id=_14[ii].id||ds.getValue(_14[ii],ds._getIdentifierAttribute(),null);
if(ds._getNameAttribute){
_14[ii].name=_14[ii].name||ds.getValue(_14[ii],ds._getNameAttribute(),null);
}
if(ds._getUserStateAttribute){
_14[ii].userState=_14[ii].userState||ds.getValue(_14[ii],ds._getUserStateAttribute(),null);
}
_14[ii]._node_=[dojo.create("li",{id:_16.id+"__"+ii})];
dojo.place(_14[ii]._node_[0],_16,"last");
}
dojo.forEach(_14,function(_24,idx){
if(ds.isItem(_24)){
if(ds.isItemLoaded(_24)){
_9(_24);
}else{
ds.loadItem({item:_24,onItem:function(_25){
_9(_25);
}});
}
}else{
_6._onError({code:_6.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom});
}
});
var _26=_6._getMasterPopup();
if(_26){
var _27=_26.domNode;
dojo.style(_27,"zIndex",800);
}
_22=dojo.byId("TOGGLE_"+_6.id);
if(_22!=null&&_6.toggleFocus){
_22.focus();
}
};
var el=_7("recommendMessage");
if(el!=null&&_6.showActions!==false){
dojo.html.set(el,_6._getStringResource("LOADING"));
}
var _28=function(_29,req){
_6.size=_29;
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_2a){
_6._currentUserItem=_2a;
_6._setRecommend((_2a!=null),function(){
ds.fetch({onBegin:_28,onComplete:_13,onError:_e,count:_6.count});
});
}});
}else{
}
}
this.logExit(arguments);
},createPersonNode:function(_2b){
this.logEnter(arguments);
var _2c=dijit.byId(_2b.id);
if(_2c!=null){
_2c.destroy();
}
_2c=new com.ibm.oneui.recommend.internal.PersonNode(_2b);
this._getStateObject().widgets.push(_2c);
this.logExit(arguments);
return _2c.domNode;
},createContents:function(tip){
this.logEnter(arguments);
var _2d=this;
var _2e=new com.ibm.oneui.recommend.internal.PopupContents({currentUserId:this.currentUserId,width:this.popupWidth});
this.popupLikeNamesNode=_2e.recommendNames;
var _2f="dojoattachpoint";
dojo.query("*["+_2f+"!='']",_2e.domNode).forEach(function(_30,idx,arr){
if((!_30.id||_30.id.length==0)&&dojo.hasAttr(_30,_2f)){
dojo.attr(_30,"id",_2d.id+"__"+dojo.attr(_30,_2f));
dojo.removeAttr(_30,_2f);
}
});
this._getStateObject().widgets.push(_2e);
this.logExit(arguments);
return _2e.domNode;
}});
dojo.declare("com.ibm.oneui.recommend.internal.PersonNode",[com.ibm.oneui._base,dijit._Templated],{templatePath:dojo.moduleUrl("com.ibm.oneui","recommend/templates/personNode.html"),mail:null,cn:null,dn:null,displayName:null});
dojo.declare("com.ibm.oneui.recommend.internal.PopupContents",[com.ibm.oneui._base,dijit._Templated],{mail:null,cn:null,dn:null,displayName:null,templatePath:dojo.moduleUrl("com.ibm.oneui","recommend/templates/PopupContents.html"),widgetsInTemplate:true,isAuthenticated:true,strings:null,postMixInProperties:function(){
this.isAuthenticated=(this.currentUserId!=null);
},buildRendering:function(){
dojo.requireLocalization("com.ibm.oneui.recommend","Recommender");
this.strings=dojo.i18n.getLocalization("com.ibm.oneui.recommend","Recommender");
this.inherited(arguments);
}});
})();
}


;dojo.cache("com.ibm.oneui", "recommend/templates/Inline.html", "<div class=\"lotusLike\"> <a class=\"lotusLikeCount\" dojoAttachPoint=\"inlineLaunchPopup\" href=\"javascript:;\" role=\"button\" aria-haspopup=\"true\" title=\"\" aria-label=\"\"> <img dojoAttachPoint=\"inlineSmiley\" class=\"lotusIconLike\" src=\"${_blankGif}\" alt=\"\"/> <span class=\"lotusAltText\" dojoAttachPoint=\"likeAltAP\"></span> <div dojoAttachPoint=\"inlineLikeCount\" class=\"lotusLikeText\" role=\"presentation\">&nbsp;</div> <div class=\"lotusLikeConnector lotusHidden\"></div> </a> <span aria-live=\"assertive\" dojoAttachPoint=\"inlineLikeActions\">&nbsp;&nbsp;&nbsp;</span></div>");

;if(!dojo._hasResource["com.ibm.oneui.recommend.Inline"]){
dojo._hasResource["com.ibm.oneui.recommend.Inline"]=true;
(function(){
dojo.provide("com.ibm.oneui.recommend.Inline");
dojo.require("dijit._Templated");
dojo.require("dojo.cache");
dojo.require("com.ibm.oneui.recommend._base");
dojo.declare("com.ibm.oneui.recommend.Inline",[com.ibm.oneui.recommend._base,dijit._Templated],{coreWidgetClass:"com.ibm.oneui.recommend.Inline",templatePath:dojo.moduleUrl("com.ibm.oneui","recommend/templates/Inline.html"),strings:null,_popup:null,disableBackground:false,disablePopup:false,destroy:function(){
this.logEnter(arguments);
this.inherited(arguments);
if(this._popup!=null){
this._popup.destroy();
}
this.logExit(arguments);
},postMixInProperties:function(){
this.logEnter(arguments);
dojo.requireLocalization("com.ibm.oneui.recommend","Recommender");
this.strings=dojo.i18n.getLocalization("com.ibm.oneui.recommend","Recommender");
this.inherited(arguments);
this.logExit(arguments);
},postCreate:function(){
this.logEnter(arguments);
this.inherited(arguments);
if(this.editable){
dojo.query(".lotusLikeConnector",this.domNode).forEach(function(_1){
if(dojo.hasClass(_1,"lotusHidden")){
dojo.removeClass(_1,"lotusHidden");
}
});
}
this.populateRecommend();
this.logExit(arguments);
},_isPopupDirty:false,populateRecommend:function(){
var _2=this;
dojo.addClass(_2.domNode,"inlineLoading");
var ds=this._getStateObject().store.data;
var _3=function(_4,_5){
_2.size=_4;
};
var _6=function(){
dojo.removeClass(_2.domNode,"inlineLoading");
if(_2.inlineLikeActions!=null){
dojo.empty(_2.inlineLikeActions);
}
if(_2.inlineLikeCount!=null){
dojo.empty(_2.inlineLikeCount);
}
var _7="INLINE.";
var _8=".TEXT";
if(!_2.editable){
_8=".READONLYTEXT";
}
if(_2._getRecommend()){
_7+="RECOMMENDED";
}else{
_7+="UNRECOMMENDED";
}
var _9=_2.size;
if(_2.prev_iNumNames==undefined){
_2.prev_iNumNames=0;
}else{
_2.prev_iNumNames=_9;
}
if(_9==0||(_9==1&&_2._getRecommend())||_2.disablePopup){
dojo.removeAttr(_2.inlineLaunchPopup,"href");
dojo.removeAttr(_2.inlineLaunchPopup,"role");
dojo.removeAttr(_2.inlineLaunchPopup,"title");
dojo.removeAttr(_2.inlineLaunchPopup,"aria-haspopup");
dojo.removeAttr(_2.inlineLaunchPopup,"aria-label");
var _a="";
if(_2.disableBackground){
_a="lconnLikeCountNoBackground lotusDisabled";
}else{
_a="lotusLikeCount lotusDisabled";
}
dojo.attr(_2.inlineLaunchPopup,"class",_a);
}else{
if(_2.prev_iNumNames==0){
dojo.attr(_2.inlineLaunchPopup,"aria-haspopup",true);
}
}
var _b={recommendCount:_9,id:_2.id};
var _c=dojo.string.substitute(_2._getStringResource(_7+_8),_b);
if(_2.inlineLikeActions!=null&&_2.currentUserId!=null){
dojo.html.set(_2.inlineLikeActions,_c);
}
var _d=dojo.string.substitute(_2._getStringResource(_7+".TOOLTIP"),_b);
var _e=dojo.byId("TOGGLE_"+_2.id);
if(_e!=null){
dojo.attr(_e,{"title":_d,"aria-label":_d});
}
_7="INLINE.";
if(_9==0){
_7+="RECOMMENDED_BYNONE";
}else{
if(_9==1){
_7+="RECOMMENDED_BYONE";
}else{
_7+="RECOMMENDED_BYMANY";
}
}
var _d=dojo.string.substitute(_2._getStringResource(_7+".TOOLTIP"),_b);
dojo.attr(_2.inlineLaunchPopup,{"title":_d,"aria-label":_d});
dojo.attr(_2.inlineSmiley,{title:_d,alt:_d});
_c=dojo.string.substitute(_2._getStringResource(_7+_8),_b);
var _f=dojo.body();
if(_9>0){
if(_2.inlineLikeCount!=null){
dojo.html.set(_2.inlineLikeCount,_c);
}
}else{
if(dojo.hasClass(_f,"dijit_a11y")){
dojo.html.set(_2.inlineLikeCount,_c);
}else{
dojo.html.set(_2.inlineLikeCount,"&nbsp;");
}
}
if(dojo.hasClass(_f,"dijit_a11y")){
_2.inlineLikeCount.innerHTML="";
}
_2.likeAltAP.innerHTML=_d;
var _e=dojo.byId("TOGGLE_"+_2.id);
if(_e==null){
_e=dojo.byId("TOGGLE_["+_2.id+"]");
}
if(_e){
_2._connect(_e,"onclick",_2,"_toggleRecommend");
}
_e=_2.inlineLaunchPopup;
if(_9==0||(_9==1&&_2._getRecommend())||_2.disablePopup){
}else{
if(_e){
dojo.require("com.ibm.oneui.recommend.Popup");
var _10=_2._getStateObject();
var _11=_2._getPopup(_e,_10,_b);
_2.connect(_11,"onError",_2,"onError");
_2.connect(_11,"_toggleRecommend",function(){
_2._isPopupDirty=_2._getRecommend()!=_11._getRecommend();
});
_2.connect(_11,"onClose",function(){
if(_2._isPopupDirty){
setTimeout(function(){
_2.populateRecommend();
_2._isPopupDirty=false;
},100);
}
});
_10.widgets.push(_11);
}
}
_e=dojo.byId("TOGGLE_"+_2.id);
if(_e!=null&&_2.toggleFocus){
_e.focus();
}
};
var _12=function(){
ds.revert();
this._onError(arguments[0]);
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_13){
_2._currentUserItem=_13;
_2._setRecommend((_13!=null),function(){
ds.fetch({onBegin:_3,onComplete:_6,onError:_12,count:_2.count});
});
}});
}else{
}
this.logExit(arguments);
},_getPopup:function(_14,_15,_16){
return this.getPopup({debug:this.debug,editable:this.editable,around:_14,currentUserId:this.currentUserId,dataStore:_15.store.data,showActions:false});
},getPopup:function(_17){
if(this._popup==null){
this._popup=new com.ibm.oneui.recommend.Popup(_17);
}
return (this._popup);
}});
})();
}


;dojo.cache("com.ibm.oneui", "controls/templates/LikePerson.html", "<div> <div class=\"lotusLikeAvatar\"> <a href=\"${profileURL}\" target=\"_blank\" tabindex=\"-1\"><img class=\"lotusProfilePicture\" alt=\"\" src=\"${photoURL}\" style=\"width:32px; height:32px\"/></a> </div> <div class=\"vcard lotusLikeAvatarLink\" dojoAttachPoint=\"personLinkAP\"></div></div>");

;if(!dojo._hasResource["com.ibm.oneui.controls.Like"]){
dojo._hasResource["com.ibm.oneui.controls.Like"]=true;
dojo.provide("com.ibm.oneui.controls.Like");
(function(){
var _1={inline:{templatePath:dojo.moduleUrl("com.ibm.oneui","recommend/templates/Inline.html")},popup:{templatePath:dojo.moduleUrl("com.ibm.oneui","recommend/templates/PopupContents.html")}};
dojo.require("com.ibm.oneui.recommend.Popup");
dojo.require("com.ibm.oneui.recommend.Inline");
dojo.declare("com.ibm.oneui.controls.Like",[com.ibm.oneui.recommend.Inline],{getPopup:function(_2){
if(!this._popup){
_2.dataStore=this.popupDataStore||this.dataStore;
_2.getUserProfileUrl=this.getUserProfileUrl;
_2.getUserPhotoUrl=this.getUserPhotoUrl;
this._popup=new com.ibm.oneui.controls.LikePopup(_2);
}
return this._popup;
},getUserProfileUrl:function(id){
return "";
},getUserPhotoUrl:function(id){
return "";
}});
dojo.declare("com.ibm.oneui.controls.LikePopup",[com.ibm.oneui.recommend.Popup],{popupWidth:300,fixedMaxHeight:true,createPersonNode:function(_3){
_3.profileURL=this.getUserProfileUrl(_3.id);
if(!_3.photoURL){
_3.photoURL=this.getUserPhotoUrl(_3.id);
}
var _4=new com.ibm.oneui.controls.LikePerson(_3);
this._getStateObject().widgets.push(_4);
dojo.publish("com/ibm/oneui/likePopup/personAdded",[_4]);
return _4.domNode;
}});
dojo.declare("com.ibm.oneui.controls.LikePerson",[dijit._Widget,dijit._Templated],{displayName:null,photoURL:null,profileURL:null,templatePath:dojo.moduleUrl("com.ibm.oneui","controls/templates/LikePerson.html"),constructor:function(_5){
this.profileURL=_5.profileURL;
this.photoURL=_5.photoURL;
this.displayName=_5.name;
this.inherited(arguments,[null]);
},postscript:function(_6,_7){
this.inherited(arguments,[null,_7]);
var _8=com.ibm.lconn.layout.people.createLink({name:_6.name,userid:_6.id,email:_6.email,state:_6.userState});
if(!_8){
_8=dojo.create("span",{"aria-describedby":"semtagmenu",className:"fn lotusBold",href:_6.profileURL,innerHTML:_6.name+"<span style='display: none;' class='x-lconn-userid'>"+_6.id+"</span>"});
}
_8.target="_blank";
this.personLinkAP.appendChild(_8);
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.personLinkAP);
}
}});
})();
}

dojo.registerModulePath("com.ibm.social.incontext", "../com.ibm.social.incontext");

;if(!dojo._hasResource["com.ibm.social.incontext.util.proxy"]){
dojo._hasResource["com.ibm.social.incontext.util.proxy"]=true;
(function(){
dojo.provide("com.ibm.social.incontext.util.proxy");
var _1=com.ibm.social.incontext.util;
var _2=function(_3){
return _3=="https"?443:80;
};
var _4=dojo.config.proxy;
if(_4){
var _5=window.location;
var _6=_5.hostname;
var _7=(_5.protocol||"http").replace(":","");
var _8=_5.port||_2(_7);
_1.proxy=function(_9){
var _a=new dojo._Url(_9);
var _b=_a.host;
if(_b){
var _c=_a.scheme||_7;
var _d=_a.port||_2(_c);
if(_c!=_7||_d!=_8||_b!=_6){
return _4+"/"+_7+"/"+encodeURIComponent(_b+":"+_d)+(_a.path||"")+(_a.query?("?"+_a.query):"");
}
}
return _9;
};
}else{
_1.proxy=function(_e){
return _e;
};
}
})();
}


;if(!dojo._hasResource["com.ibm.social.incontext.util.url"]){
dojo._hasResource["com.ibm.social.incontext.util.url"]=true;
dojo.provide("com.ibm.social.incontext.util.url");
dojo.provide("com.ibm.social.incontext.util.url.ProxyUrlHelper");
dojo.require("com.ibm.social.incontext.util.proxy");
(function(){
var _1=com.ibm.social.incontext.util.url;
_1._const={regex:/(^[a-zA-Z]+)\:\/\/([a-zA-Z\d][\a-z\A-Z\d\-\.]*)(:\d{1,5})?([\/\?\#].*)?/,protocolPorts:{"http":80,"https":443}};
_1.parse=function(_2){
if(!_2){
return null;
}
if(typeof _2!="string"&&console.trace){
throw "Argument for URI must be a string";
}
_2=new dojo._Url(_2);
_2.queryParameters=_1.getRequestParameters(_2);
return _2;
};
_1.write=function(_3){
if(!_3){
return null;
}
var _4="";
if(_3.scheme){
_4+=_3.scheme+":";
}
if(_3.authority){
_4+="//"+_3.authority;
}
_4+=_3.path;
if(_3.queryParameters){
_4+=_1.writeParameters(_3.queryParameters);
}else{
if(_3.query){
_4+=((_3.query.charAt(0)!="?")?"?":"")+_3.query;
}
}
if(_3.fragment){
_4+="#"+_3.fragment;
}
return _4;
};
dojo._Url.prototype.toCanonicalString=function(){
return _1.write(this);
};
_1.rewrite=function(_5,p){
if(_5&&p){
_5=_1.parse(_5);
dojo.mixin(_5.queryParameters,p);
_5=_1.write(_5);
}
return _5;
};
_1.splitQuery=function(_6){
var _7={};
if(!_6){
return _7;
}
if(_6.charAt(0)=="?"){
_6=_6.substring(1);
}
var _8=_6.split("&");
for(var i=0;i<_8.length;i++){
if(_8[i].length>0){
var _9=_8[i].indexOf("=");
if(_9==-1){
var _a=decodeURIComponent(_8[i]);
var _b=_7[_a];
if(dojo.isArray(_b)){
_b.push("");
}else{
if(_b){
_7[_a]=[_b,""];
}else{
_7[_a]="";
}
}
}else{
if(_9>0){
var _a=decodeURIComponent(_8[i].substring(0,_9));
var _c=decodeURIComponent(_8[i].substring(_9+1));
var _b=_7[_a];
if(dojo.isArray(_b)){
_b.push(_c);
}else{
if(_b){
_7[_a]=[_b,_c];
}else{
_7[_a]=_c;
}
}
}
}
}
}
return _7;
};
_1.getRequestParameters=function(_d){
if(!_d){
return {};
}
if(typeof _d=="string"){
_d=new dojo._Url(_d);
}
return _1.splitQuery(_d.query);
};
_1.writeParameters=function(_e){
var _f=[];
for(var key in _e){
var _10=_e[key];
if(typeof _10!="undefined"&&_10!=null){
key=encodeURIComponent(key);
if(dojo.isArray(_10)){
for(var i=0;i<_10.length;i++){
if(_10[i]){
_f.push(_f.length==0?"?":"&");
_f.push(key);
_f.push("=");
_f.push(encodeURIComponent(_10[i]));
}
}
}else{
_f.push(_f.length==0?"?":"&");
_f.push(key);
_f.push("=");
_f.push(encodeURIComponent(_10));
}
}
}
return _f.join("");
};
_1.ProxyUrlHelper=function(){
};
_1.ProxyUrlHelper.prototype={getProxifiedURL:function(url){
return com.ibm.social.incontext.util.proxy(url);
}};
})();
}


;if(!dojo._hasResource["lconn.blogs.recommend.Inline"]){
dojo._hasResource["lconn.blogs.recommend.Inline"]=true;
dojo.provide("lconn.blogs.recommend.Inline");
dojo.require("com.ibm.oneui.controls.Like");
dojo.require("com.ibm.social.incontext.util.url");
var url=com.ibm.social.incontext.util.url;
dojo.declare("lconn.blogs.recommend.Inline",[com.ibm.oneui.controls.Like],{getUserProfileUrl:function(id){
if(dojo.getObject("lconn.core.config.services")){
var _1=lconn.core.config.services.profiles;
if(typeof (_1)!="undefined"){
this.profilesPath=(lconn.blogs.utils.isSecure()?_1.secureUrl:_1.url);
return url.rewrite(this.profilesPath+"/html/profileView.do",{userid:id});
}else{
return BlogsBaseUrl+"/roller-ui/blog/"+encodeURIComponent(id)+"?lang="+lconn.blogs.utils.getLCLocale();
}
}
},getUserPhotoUrl:function(id){
if(dojo.getObject("lconn.core.config.services")){
var _2=lconn.core.config.services.profiles;
if(typeof (_2)!="undefined"){
this.profilesPath=(lconn.blogs.utils.isSecure()?_2.secureUrl:_2.url);
return url.rewrite(this.profilesPath+"/photo.do",{userid:id});
}else{
return lconn.core.url.getServiceUrl(lconn.core.config.services.webresources)+"/web/com.ibm.lconn.core.styles.oneui3/images/personNoPhoto128.gif?etag="+lconn.core.config.versionStamp;
}
}
},success:true,_setRecommend:function(yn,_3){
var _4=this._isUserRecommended;
this._isUserRecommended=!!yn;
var _5=this;
var ds=this._getStateObject().store.data;
if(!ds){
this.onError({code:this.ERROR.DATASTORE_NOT_FOUND,message:"Data store not found.",callee:arguments.callee.nom});
return;
}
var cb=function(){
if(ds.isDirty()){
ds.save({onComplete:function(){
if(dojo.isFunction(_3)){
_3();
}
},onError:function(_6){
ds.revert();
_5._isUserRecommended=_4;
_5._onError({code:_5.ERROR.ITEM_LOAD_FAILURE},_6);
}});
}else{
if(dojo.isFunction(_3)){
_3();
}
}
};
var eb=function(){
_5._isUserRecommended=_4;
};
if(this._currentUserItem==null&&this._isUserRecommended){
var _7={};
this.success=false;
_7[ds._getIdentifierAttribute()]=this.currentUserId;
ds.newItem(_7).addCallback(cb).addErrback(eb);
}else{
if(this._currentUserItem!=null&&!this._isUserRecommended){
this._currentUserItem._node_=null;
this.success=false;
ds.deleteItem(this._currentUserItem).addCallback(cb).addErrback(eb);
}
}
if(dojo.isFunction(_3)&&this.success){
_3();
}
this.success=true;
this.logExit(arguments);
}});
}


;if(!dojo._hasResource["dojo.data.ItemFileReadStore"]){
dojo._hasResource["dojo.data.ItemFileReadStore"]=true;
dojo.provide("dojo.data.ItemFileReadStore");
dojo.require("dojo.data.util.filter");
dojo.require("dojo.data.util.simpleFetch");
dojo.require("dojo.date.stamp");
dojo.declare("dojo.data.ItemFileReadStore",null,{constructor:function(_1){
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._jsonFileUrl=_1.url;
this._ccUrl=_1.url;
this.url=_1.url;
this._jsonData=_1.data;
this.data=null;
this._datatypeMap=_1.typeMap||{};
if(!this._datatypeMap["Date"]){
this._datatypeMap["Date"]={type:Date,deserialize:function(_2){
return dojo.date.stamp.fromISOString(_2);
}};
}
this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};
this._itemsByIdentity=null;
this._storeRefPropName="_S";
this._itemNumPropName="_0";
this._rootItemPropName="_RI";
this._reverseRefMap="_RRM";
this._loadInProgress=false;
this._queuedFetches=[];
if(_1.urlPreventCache!==undefined){
this.urlPreventCache=_1.urlPreventCache?true:false;
}
if(_1.hierarchical!==undefined){
this.hierarchical=_1.hierarchical?true:false;
}
if(_1.clearOnClose){
this.clearOnClose=true;
}
if("failOk" in _1){
this.failOk=_1.failOk?true:false;
}
},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(_3){
if(!this.isItem(_3)){
throw new Error("dojo.data.ItemFileReadStore: Invalid item argument.");
}
},_assertIsAttribute:function(_4){
if(typeof _4!=="string"){
throw new Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");
}
},getValue:function(_5,_6,_7){
var _8=this.getValues(_5,_6);
return (_8.length>0)?_8[0]:_7;
},getValues:function(_9,_a){
this._assertIsItem(_9);
this._assertIsAttribute(_a);
return _9[_a]||[];
},getAttributes:function(_b){
this._assertIsItem(_b);
var _c=[];
for(var _d in _b){
if((_d!==this._storeRefPropName)&&(_d!==this._itemNumPropName)&&(_d!==this._rootItemPropName)&&(_d!==this._reverseRefMap)){
_c.push(_d);
}
}
return _c;
},hasAttribute:function(_e,_f){
this._assertIsItem(_e);
this._assertIsAttribute(_f);
return (_f in _e);
},containsValue:function(_10,_11,_12){
var _13=undefined;
if(typeof _12==="string"){
_13=dojo.data.util.filter.patternToRegExp(_12,false);
}
return this._containsValue(_10,_11,_12,_13);
},_containsValue:function(_14,_15,_16,_17){
return dojo.some(this.getValues(_14,_15),function(_18){
if(_18!==null&&!dojo.isObject(_18)&&_17){
if(_18.toString().match(_17)){
return true;
}
}else{
if(_16===_18){
return true;
}
}
});
},isItem:function(_19){
if(_19&&_19[this._storeRefPropName]===this){
if(this._arrayOfAllItems[_19[this._itemNumPropName]]===_19){
return true;
}
}
return false;
},isItemLoaded:function(_1a){
return this.isItem(_1a);
},loadItem:function(_1b){
this._assertIsItem(_1b.item);
},getFeatures:function(){
return this._features;
},getLabel:function(_1c){
if(this._labelAttr&&this.isItem(_1c)){
return this.getValue(_1c,this._labelAttr);
}
return undefined;
},getLabelAttributes:function(_1d){
if(this._labelAttr){
return [this._labelAttr];
}
return null;
},_fetchItems:function(_1e,_1f,_20){
var _21=this;
var _22=function(_23,_24){
var _25=[];
var i,key;
if(_23.query){
var _26;
var _27=_23.queryOptions?_23.queryOptions.ignoreCase:false;
var _28={};
for(key in _23.query){
_26=_23.query[key];
if(typeof _26==="string"){
_28[key]=dojo.data.util.filter.patternToRegExp(_26,_27);
}else{
if(_26 instanceof RegExp){
_28[key]=_26;
}
}
}
for(i=0;i<_24.length;++i){
var _29=true;
var _2a=_24[i];
if(_2a===null){
_29=false;
}else{
for(key in _23.query){
_26=_23.query[key];
if(!_21._containsValue(_2a,key,_26,_28[key])){
_29=false;
}
}
}
if(_29){
_25.push(_2a);
}
}
_1f(_25,_23);
}else{
for(i=0;i<_24.length;++i){
var _2b=_24[i];
if(_2b!==null){
_25.push(_2b);
}
}
_1f(_25,_23);
}
};
if(this._loadFinished){
_22(_1e,this._getItemsArray(_1e.queryOptions));
}else{
if(this._jsonFileUrl!==this._ccUrl){
dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl=this._jsonFileUrl;
this.url=this._jsonFileUrl;
}else{
if(this.url!==this._ccUrl){
this._jsonFileUrl=this.url;
this._ccUrl=this.url;
}
}
if(this.data!=null&&this._jsonData==null){
this._jsonData=this.data;
this.data=null;
}
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_1e,filter:_22});
}else{
this._loadInProgress=true;
var _2c={url:_21._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};
var _2d=dojo.xhrGet(_2c);
_2d.addCallback(function(_2e){
try{
_21._getItemsFromLoadedData(_2e);
_21._loadFinished=true;
_21._loadInProgress=false;
_22(_1e,_21._getItemsArray(_1e.queryOptions));
_21._handleQueuedFetches();
}
catch(e){
_21._loadFinished=true;
_21._loadInProgress=false;
_20(e,_1e);
}
});
_2d.addErrback(function(_2f){
_21._loadInProgress=false;
_20(_2f,_1e);
});
var _30=null;
if(_1e.abort){
_30=_1e.abort;
}
_1e.abort=function(){
var df=_2d;
if(df&&df.fired===-1){
df.cancel();
df=null;
}
if(_30){
_30.call(_1e);
}
};
}
}else{
if(this._jsonData){
try{
this._loadFinished=true;
this._getItemsFromLoadedData(this._jsonData);
this._jsonData=null;
_22(_1e,this._getItemsArray(_1e.queryOptions));
}
catch(e){
_20(e,_1e);
}
}else{
_20(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_1e);
}
}
}
},_handleQueuedFetches:function(){
if(this._queuedFetches.length>0){
for(var i=0;i<this._queuedFetches.length;i++){
var _31=this._queuedFetches[i];
var _32=_31.args;
var _33=_31.filter;
if(_33){
_33(_32,this._getItemsArray(_32.queryOptions));
}else{
this.fetchItemByIdentity(_32);
}
}
this._queuedFetches=[];
}
},_getItemsArray:function(_34){
if(_34&&_34.deep){
return this._arrayOfAllItems;
}
return this._arrayOfTopLevelItems;
},close:function(_35){
if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){
if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){
console.debug("dojo.data.ItemFileReadStore: WARNING!  Data reload "+" information has not been provided."+"  Please set 'url' or 'data' to the appropriate value before"+" the next fetch");
}
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=[];
this._loadFinished=false;
this._itemsByIdentity=null;
this._loadInProgress=false;
this._queuedFetches=[];
}
},_getItemsFromLoadedData:function(_36){
var _37=false;
var _38=this;
function _39(_3a){
var _3b=((_3a!==null)&&(typeof _3a==="object")&&(!dojo.isArray(_3a)||_37)&&(!dojo.isFunction(_3a))&&(_3a.constructor==Object||dojo.isArray(_3a))&&(typeof _3a._reference==="undefined")&&(typeof _3a._type==="undefined")&&(typeof _3a._value==="undefined")&&_38.hierarchical);
return _3b;
};
function _3c(_3d){
_38._arrayOfAllItems.push(_3d);
for(var _3e in _3d){
var _3f=_3d[_3e];
if(_3f){
if(dojo.isArray(_3f)){
var _40=_3f;
for(var k=0;k<_40.length;++k){
var _41=_40[k];
if(_39(_41)){
_3c(_41);
}
}
}else{
if(_39(_3f)){
_3c(_3f);
}
}
}
}
};
this._labelAttr=_36.label;
var i;
var _42;
this._arrayOfAllItems=[];
this._arrayOfTopLevelItems=_36.items;
for(i=0;i<this._arrayOfTopLevelItems.length;++i){
_42=this._arrayOfTopLevelItems[i];
if(dojo.isArray(_42)){
_37=true;
}
_3c(_42);
_42[this._rootItemPropName]=true;
}
var _43={};
var key;
for(i=0;i<this._arrayOfAllItems.length;++i){
_42=this._arrayOfAllItems[i];
for(key in _42){
if(key!==this._rootItemPropName){
var _44=_42[key];
if(_44!==null){
if(!dojo.isArray(_44)){
_42[key]=[_44];
}
}else{
_42[key]=[null];
}
}
_43[key]=key;
}
}
while(_43[this._storeRefPropName]){
this._storeRefPropName+="_";
}
while(_43[this._itemNumPropName]){
this._itemNumPropName+="_";
}
while(_43[this._reverseRefMap]){
this._reverseRefMap+="_";
}
var _45;
var _46=_36.identifier;
if(_46){
this._itemsByIdentity={};
this._features["dojo.data.api.Identity"]=_46;
for(i=0;i<this._arrayOfAllItems.length;++i){
_42=this._arrayOfAllItems[i];
_45=_42[_46];
var _47=_45[0];
if(!this._itemsByIdentity[_47]){
this._itemsByIdentity[_47]=_42;
}else{
if(this._jsonFileUrl){
throw new Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_46+"].  Value collided: ["+_47+"]");
}else{
if(this._jsonData){
throw new Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_46+"].  Value collided: ["+_47+"]");
}
}
}
}
}else{
this._features["dojo.data.api.Identity"]=Number;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
_42=this._arrayOfAllItems[i];
_42[this._storeRefPropName]=this;
_42[this._itemNumPropName]=i;
}
for(i=0;i<this._arrayOfAllItems.length;++i){
_42=this._arrayOfAllItems[i];
for(key in _42){
_45=_42[key];
for(var j=0;j<_45.length;++j){
_44=_45[j];
if(_44!==null&&typeof _44=="object"){
if(("_type" in _44)&&("_value" in _44)){
var _48=_44._type;
var _49=this._datatypeMap[_48];
if(!_49){
throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+_48+"'");
}else{
if(dojo.isFunction(_49)){
_45[j]=new _49(_44._value);
}else{
if(dojo.isFunction(_49.deserialize)){
_45[j]=_49.deserialize(_44._value);
}else{
throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");
}
}
}
}
if(_44._reference){
var _4a=_44._reference;
if(!dojo.isObject(_4a)){
_45[j]=this._itemsByIdentity[_4a];
}else{
for(var k=0;k<this._arrayOfAllItems.length;++k){
var _4b=this._arrayOfAllItems[k];
var _4c=true;
for(var _4d in _4a){
if(_4b[_4d]!=_4a[_4d]){
_4c=false;
}
}
if(_4c){
_45[j]=_4b;
}
}
}
if(this.referenceIntegrity){
var _4e=_45[j];
if(this.isItem(_4e)){
this._addReferenceToMap(_4e,_42,key);
}
}
}else{
if(this.isItem(_44)){
if(this.referenceIntegrity){
this._addReferenceToMap(_44,_42,key);
}
}
}
}
}
}
}
},_addReferenceToMap:function(_4f,_50,_51){
},getIdentity:function(_52){
var _53=this._features["dojo.data.api.Identity"];
if(_53===Number){
return _52[this._itemNumPropName];
}else{
var _54=_52[_53];
if(_54){
return _54[0];
}
}
return null;
},fetchItemByIdentity:function(_55){
var _56;
var _57;
if(!this._loadFinished){
var _58=this;
if(this._jsonFileUrl!==this._ccUrl){
dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl=this._jsonFileUrl;
this.url=this._jsonFileUrl;
}else{
if(this.url!==this._ccUrl){
this._jsonFileUrl=this.url;
this._ccUrl=this.url;
}
}
if(this.data!=null&&this._jsonData==null){
this._jsonData=this.data;
this.data=null;
}
if(this._jsonFileUrl){
if(this._loadInProgress){
this._queuedFetches.push({args:_55});
}else{
this._loadInProgress=true;
var _59={url:_58._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};
var _5a=dojo.xhrGet(_59);
_5a.addCallback(function(_5b){
var _5c=_55.scope?_55.scope:dojo.global;
try{
_58._getItemsFromLoadedData(_5b);
_58._loadFinished=true;
_58._loadInProgress=false;
_56=_58._getItemByIdentity(_55.identity);
if(_55.onItem){
_55.onItem.call(_5c,_56);
}
_58._handleQueuedFetches();
}
catch(error){
_58._loadInProgress=false;
if(_55.onError){
_55.onError.call(_5c,error);
}
}
});
_5a.addErrback(function(_5d){
_58._loadInProgress=false;
if(_55.onError){
var _5e=_55.scope?_55.scope:dojo.global;
_55.onError.call(_5e,_5d);
}
});
}
}else{
if(this._jsonData){
_58._getItemsFromLoadedData(_58._jsonData);
_58._jsonData=null;
_58._loadFinished=true;
_56=_58._getItemByIdentity(_55.identity);
if(_55.onItem){
_57=_55.scope?_55.scope:dojo.global;
_55.onItem.call(_57,_56);
}
}
}
}else{
_56=this._getItemByIdentity(_55.identity);
if(_55.onItem){
_57=_55.scope?_55.scope:dojo.global;
_55.onItem.call(_57,_56);
}
}
},_getItemByIdentity:function(_5f){
var _60=null;
if(this._itemsByIdentity){
_60=this._itemsByIdentity[_5f];
}else{
_60=this._arrayOfAllItems[_5f];
}
if(_60===undefined){
_60=null;
}
return _60;
},getIdentityAttributes:function(_61){
var _62=this._features["dojo.data.api.Identity"];
if(_62===Number){
return null;
}else{
return [_62];
}
},_forceLoad:function(){
var _63=this;
if(this._jsonFileUrl!==this._ccUrl){
dojo.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");
this._ccUrl=this._jsonFileUrl;
this.url=this._jsonFileUrl;
}else{
if(this.url!==this._ccUrl){
this._jsonFileUrl=this.url;
this._ccUrl=this.url;
}
}
if(this.data!=null&&this._jsonData==null){
this._jsonData=this.data;
this.data=null;
}
if(this._jsonFileUrl){
var _64={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};
var _65=dojo.xhrGet(_64);
_65.addCallback(function(_66){
try{
if(_63._loadInProgress!==true&&!_63._loadFinished){
_63._getItemsFromLoadedData(_66);
_63._loadFinished=true;
}else{
if(_63._loadInProgress){
throw new Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");
}
}
}
catch(e){
console.log(e);
throw e;
}
});
_65.addErrback(function(_67){
throw _67;
});
}else{
if(this._jsonData){
_63._getItemsFromLoadedData(_63._jsonData);
_63._jsonData=null;
_63._loadFinished=true;
}
}
}});
dojo.extend(dojo.data.ItemFileReadStore,dojo.data.util.simpleFetch);
}


;if(!dojo._hasResource["dojo.data.ItemFileWriteStore"]){
dojo._hasResource["dojo.data.ItemFileWriteStore"]=true;
dojo.provide("dojo.data.ItemFileWriteStore");
dojo.require("dojo.data.ItemFileReadStore");
dojo.declare("dojo.data.ItemFileWriteStore",dojo.data.ItemFileReadStore,{constructor:function(_1){
this._features["dojo.data.api.Write"]=true;
this._features["dojo.data.api.Notification"]=true;
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
if(!this._datatypeMap["Date"].serialize){
this._datatypeMap["Date"].serialize=function(_2){
return dojo.date.stamp.toISOString(_2,{zulu:true});
};
}
if(_1&&(_1.referenceIntegrity===false)){
this.referenceIntegrity=false;
}
this._saveInProgress=false;
},referenceIntegrity:true,_assert:function(_3){
if(!_3){
throw new Error("assertion failed in ItemFileWriteStore");
}
},_getIdentifierAttribute:function(){
var _4=this.getFeatures()["dojo.data.api.Identity"];
return _4;
},newItem:function(_5,_6){
this._assert(!this._saveInProgress);
if(!this._loadFinished){
this._forceLoad();
}
if(typeof _5!="object"&&typeof _5!="undefined"){
throw new Error("newItem() was passed something other than an object");
}
var _7=null;
var _8=this._getIdentifierAttribute();
if(_8===Number){
_7=this._arrayOfAllItems.length;
}else{
_7=_5[_8];
if(typeof _7==="undefined"){
throw new Error("newItem() was not passed an identity for the new item");
}
if(dojo.isArray(_7)){
throw new Error("newItem() was not passed an single-valued identity");
}
}
if(this._itemsByIdentity){
this._assert(typeof this._itemsByIdentity[_7]==="undefined");
}
this._assert(typeof this._pending._newItems[_7]==="undefined");
this._assert(typeof this._pending._deletedItems[_7]==="undefined");
var _9={};
_9[this._storeRefPropName]=this;
_9[this._itemNumPropName]=this._arrayOfAllItems.length;
if(this._itemsByIdentity){
this._itemsByIdentity[_7]=_9;
_9[_8]=[_7];
}
this._arrayOfAllItems.push(_9);
var _a=null;
if(_6&&_6.parent&&_6.attribute){
_a={item:_6.parent,attribute:_6.attribute,oldValue:undefined};
var _b=this.getValues(_6.parent,_6.attribute);
if(_b&&_b.length>0){
var _c=_b.slice(0,_b.length);
if(_b.length===1){
_a.oldValue=_b[0];
}else{
_a.oldValue=_b.slice(0,_b.length);
}
_c.push(_9);
this._setValueOrValues(_6.parent,_6.attribute,_c,false);
_a.newValue=this.getValues(_6.parent,_6.attribute);
}else{
this._setValueOrValues(_6.parent,_6.attribute,_9,false);
_a.newValue=_9;
}
}else{
_9[this._rootItemPropName]=true;
this._arrayOfTopLevelItems.push(_9);
}
this._pending._newItems[_7]=_9;
for(var _d in _5){
if(_d===this._storeRefPropName||_d===this._itemNumPropName){
throw new Error("encountered bug in ItemFileWriteStore.newItem");
}
var _e=_5[_d];
if(!dojo.isArray(_e)){
_e=[_e];
}
_9[_d]=_e;
if(this.referenceIntegrity){
for(var i=0;i<_e.length;i++){
var _f=_e[i];
if(this.isItem(_f)){
this._addReferenceToMap(_f,_9,_d);
}
}
}
}
this.onNew(_9,_a);
return _9;
},_removeArrayElement:function(_10,_11){
var _12=dojo.indexOf(_10,_11);
if(_12!=-1){
_10.splice(_12,1);
return true;
}
return false;
},deleteItem:function(_13){
this._assert(!this._saveInProgress);
this._assertIsItem(_13);
var _14=_13[this._itemNumPropName];
var _15=this.getIdentity(_13);
if(this.referenceIntegrity){
var _16=this.getAttributes(_13);
if(_13[this._reverseRefMap]){
_13["backup_"+this._reverseRefMap]=dojo.clone(_13[this._reverseRefMap]);
}
dojo.forEach(_16,function(_17){
dojo.forEach(this.getValues(_13,_17),function(_18){
if(this.isItem(_18)){
if(!_13["backupRefs_"+this._reverseRefMap]){
_13["backupRefs_"+this._reverseRefMap]=[];
}
_13["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(_18),attr:_17});
this._removeReferenceFromMap(_18,_13,_17);
}
},this);
},this);
var _19=_13[this._reverseRefMap];
if(_19){
for(var _1a in _19){
var _1b=null;
if(this._itemsByIdentity){
_1b=this._itemsByIdentity[_1a];
}else{
_1b=this._arrayOfAllItems[_1a];
}
if(_1b){
for(var _1c in _19[_1a]){
var _1d=this.getValues(_1b,_1c)||[];
var _1e=dojo.filter(_1d,function(_1f){
return !(this.isItem(_1f)&&this.getIdentity(_1f)==_15);
},this);
this._removeReferenceFromMap(_13,_1b,_1c);
if(_1e.length<_1d.length){
this._setValueOrValues(_1b,_1c,_1e,true);
}
}
}
}
}
}
this._arrayOfAllItems[_14]=null;
_13[this._storeRefPropName]=null;
if(this._itemsByIdentity){
delete this._itemsByIdentity[_15];
}
this._pending._deletedItems[_15]=_13;
if(_13[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_13);
}
this.onDelete(_13);
return true;
},setValue:function(_20,_21,_22){
return this._setValueOrValues(_20,_21,_22,true);
},setValues:function(_23,_24,_25){
return this._setValueOrValues(_23,_24,_25,true);
},unsetAttribute:function(_26,_27){
return this._setValueOrValues(_26,_27,[],true);
},_setValueOrValues:function(_28,_29,_2a,_2b){
this._assert(!this._saveInProgress);
this._assertIsItem(_28);
this._assert(dojo.isString(_29));
this._assert(typeof _2a!=="undefined");
var _2c=this._getIdentifierAttribute();
if(_29==_2c){
throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
}
var _2d=this._getValueOrValues(_28,_29);
var _2e=this.getIdentity(_28);
if(!this._pending._modifiedItems[_2e]){
var _2f={};
for(var key in _28){
if((key===this._storeRefPropName)||(key===this._itemNumPropName)||(key===this._rootItemPropName)){
_2f[key]=_28[key];
}else{
if(key===this._reverseRefMap){
_2f[key]=dojo.clone(_28[key]);
}else{
_2f[key]=_28[key].slice(0,_28[key].length);
}
}
}
this._pending._modifiedItems[_2e]=_2f;
}
var _30=false;
if(dojo.isArray(_2a)&&_2a.length===0){
_30=delete _28[_29];
_2a=undefined;
if(this.referenceIntegrity&&_2d){
var _31=_2d;
if(!dojo.isArray(_31)){
_31=[_31];
}
for(var i=0;i<_31.length;i++){
var _32=_31[i];
if(this.isItem(_32)){
this._removeReferenceFromMap(_32,_28,_29);
}
}
}
}else{
var _33;
if(dojo.isArray(_2a)){
var _34=_2a;
_33=_2a.slice(0,_2a.length);
}else{
_33=[_2a];
}
if(this.referenceIntegrity){
if(_2d){
var _31=_2d;
if(!dojo.isArray(_31)){
_31=[_31];
}
var map={};
dojo.forEach(_31,function(_35){
if(this.isItem(_35)){
var id=this.getIdentity(_35);
map[id.toString()]=true;
}
},this);
dojo.forEach(_33,function(_36){
if(this.isItem(_36)){
var id=this.getIdentity(_36);
if(map[id.toString()]){
delete map[id.toString()];
}else{
this._addReferenceToMap(_36,_28,_29);
}
}
},this);
for(var rId in map){
var _37;
if(this._itemsByIdentity){
_37=this._itemsByIdentity[rId];
}else{
_37=this._arrayOfAllItems[rId];
}
this._removeReferenceFromMap(_37,_28,_29);
}
}else{
for(var i=0;i<_33.length;i++){
var _32=_33[i];
if(this.isItem(_32)){
this._addReferenceToMap(_32,_28,_29);
}
}
}
}
_28[_29]=_33;
_30=true;
}
if(_2b){
this.onSet(_28,_29,_2d,_2a);
}
return _30;
},_addReferenceToMap:function(_38,_39,_3a){
var _3b=this.getIdentity(_39);
var _3c=_38[this._reverseRefMap];
if(!_3c){
_3c=_38[this._reverseRefMap]={};
}
var _3d=_3c[_3b];
if(!_3d){
_3d=_3c[_3b]={};
}
_3d[_3a]=true;
},_removeReferenceFromMap:function(_3e,_3f,_40){
var _41=this.getIdentity(_3f);
var _42=_3e[this._reverseRefMap];
var _43;
if(_42){
for(_43 in _42){
if(_43==_41){
delete _42[_43][_40];
if(this._isEmpty(_42[_43])){
delete _42[_43];
}
}
}
if(this._isEmpty(_42)){
delete _3e[this._reverseRefMap];
}
}
},_dumpReferenceMap:function(){
var i;
for(i=0;i<this._arrayOfAllItems.length;i++){
var _44=this._arrayOfAllItems[i];
if(_44&&_44[this._reverseRefMap]){
console.log("Item: ["+this.getIdentity(_44)+"] is referenced by: "+dojo.toJson(_44[this._reverseRefMap]));
}
}
},_getValueOrValues:function(_45,_46){
var _47=undefined;
if(this.hasAttribute(_45,_46)){
var _48=this.getValues(_45,_46);
if(_48.length==1){
_47=_48[0];
}else{
_47=_48;
}
}
return _47;
},_flatten:function(_49){
if(this.isItem(_49)){
var _4a=_49;
var _4b=this.getIdentity(_4a);
var _4c={_reference:_4b};
return _4c;
}else{
if(typeof _49==="object"){
for(var _4d in this._datatypeMap){
var _4e=this._datatypeMap[_4d];
if(dojo.isObject(_4e)&&!dojo.isFunction(_4e)){
if(_49 instanceof _4e.type){
if(!_4e.serialize){
throw new Error("ItemFileWriteStore:  No serializer defined for type mapping: ["+_4d+"]");
}
return {_type:_4d,_value:_4e.serialize(_49)};
}
}else{
if(_49 instanceof _4e){
return {_type:_4d,_value:_49.toString()};
}
}
}
}
return _49;
}
},_getNewFileContentString:function(){
var _4f={};
var _50=this._getIdentifierAttribute();
if(_50!==Number){
_4f.identifier=_50;
}
if(this._labelAttr){
_4f.label=this._labelAttr;
}
_4f.items=[];
for(var i=0;i<this._arrayOfAllItems.length;++i){
var _51=this._arrayOfAllItems[i];
if(_51!==null){
var _52={};
for(var key in _51){
if(key!==this._storeRefPropName&&key!==this._itemNumPropName&&key!==this._reverseRefMap&&key!==this._rootItemPropName){
var _53=key;
var _54=this.getValues(_51,_53);
if(_54.length==1){
_52[_53]=this._flatten(_54[0]);
}else{
var _55=[];
for(var j=0;j<_54.length;++j){
_55.push(this._flatten(_54[j]));
_52[_53]=_55;
}
}
}
}
_4f.items.push(_52);
}
}
var _56=true;
return dojo.toJson(_4f,_56);
},_isEmpty:function(_57){
var _58=true;
if(dojo.isObject(_57)){
var i;
for(i in _57){
_58=false;
break;
}
}else{
if(dojo.isArray(_57)){
if(_57.length>0){
_58=false;
}
}
}
return _58;
},save:function(_59){
this._assert(!this._saveInProgress);
this._saveInProgress=true;
var _5a=this;
var _5b=function(){
_5a._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
_5a._saveInProgress=false;
if(_59&&_59.onComplete){
var _5c=_59.scope||dojo.global;
_59.onComplete.call(_5c);
}
};
var _5d=function(err){
_5a._saveInProgress=false;
if(_59&&_59.onError){
var _5e=_59.scope||dojo.global;
_59.onError.call(_5e,err);
}
};
if(this._saveEverything){
var _5f=this._getNewFileContentString();
this._saveEverything(_5b,_5d,_5f);
}
if(this._saveCustom){
this._saveCustom(_5b,_5d);
}
if(!this._saveEverything&&!this._saveCustom){
_5b();
}
},revert:function(){
this._assert(!this._saveInProgress);
var _60;
for(_60 in this._pending._modifiedItems){
var _61=this._pending._modifiedItems[_60];
var _62=null;
if(this._itemsByIdentity){
_62=this._itemsByIdentity[_60];
}else{
_62=this._arrayOfAllItems[_60];
}
_61[this._storeRefPropName]=this;
for(key in _62){
delete _62[key];
}
dojo.mixin(_62,_61);
}
var _63;
for(_60 in this._pending._deletedItems){
_63=this._pending._deletedItems[_60];
_63[this._storeRefPropName]=this;
var _64=_63[this._itemNumPropName];
if(_63["backup_"+this._reverseRefMap]){
_63[this._reverseRefMap]=_63["backup_"+this._reverseRefMap];
delete _63["backup_"+this._reverseRefMap];
}
this._arrayOfAllItems[_64]=_63;
if(this._itemsByIdentity){
this._itemsByIdentity[_60]=_63;
}
if(_63[this._rootItemPropName]){
this._arrayOfTopLevelItems.push(_63);
}
}
for(_60 in this._pending._deletedItems){
_63=this._pending._deletedItems[_60];
if(_63["backupRefs_"+this._reverseRefMap]){
dojo.forEach(_63["backupRefs_"+this._reverseRefMap],function(_65){
var _66;
if(this._itemsByIdentity){
_66=this._itemsByIdentity[_65.id];
}else{
_66=this._arrayOfAllItems[_65.id];
}
this._addReferenceToMap(_66,_63,_65.attr);
},this);
delete _63["backupRefs_"+this._reverseRefMap];
}
}
for(_60 in this._pending._newItems){
var _67=this._pending._newItems[_60];
_67[this._storeRefPropName]=null;
this._arrayOfAllItems[_67[this._itemNumPropName]]=null;
if(_67[this._rootItemPropName]){
this._removeArrayElement(this._arrayOfTopLevelItems,_67);
}
if(this._itemsByIdentity){
delete this._itemsByIdentity[_60];
}
}
this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};
return true;
},isDirty:function(_68){
if(_68){
var _69=this.getIdentity(_68);
return new Boolean(this._pending._newItems[_69]||this._pending._modifiedItems[_69]||this._pending._deletedItems[_69]).valueOf();
}else{
if(!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)){
return true;
}
return false;
}
},onSet:function(_6a,_6b,_6c,_6d){
},onNew:function(_6e,_6f){
},onDelete:function(_70){
},close:function(_71){
if(this.clearOnClose){
if(!this.isDirty()){
this.inherited(arguments);
}else{
throw new Error("dojo.data.ItemFileWriteStore: There are unsaved changes present in the store.  Please save or revert the changes before invoking close.");
}
}
}});
}


;if(!dojo._hasResource["lconn.blogs.recommend.RecommendDataStore"]){
dojo._hasResource["lconn.blogs.recommend.RecommendDataStore"]=true;
dojo.provide("lconn.blogs.recommend.RecommendDataStore");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("com.ibm.oneui._base");
dojo.declare("lconn.blogs.recommend.RecommendDataStore",[dojo.data.ItemFileWriteStore,com.ibm.oneui._base],{type:null,itemId:null,urlRecommendation:null,newItem:function(_1){
if(!_1["name"]){
_1["name"]=currentLogin.name;
}
console.debug(_1.userid);
this.hasRecommended=true;
this.inherited(arguments);
return this.recommendAction(true);
},deleteItem:function(_2,_3){
console.debug(_2);
this.hasRecommended=false;
this.inherited(arguments);
return this.recommendAction(false);
},handleRecommend:function(_4,_5,_6,_7){
if(this._request){
this._request=null;
}
if(_6 instanceof Error){
this.onError(_6.code);
this.revert();
this.hasRecommended=!_4;
_5.errback();
}else{
this.hasRecommended=_4;
_5.callback();
}
},onError:function(_8){
},recommendAction:function(_9){
var d=new dojo.Deferred();
if(!_9){
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _a={action:"remove",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _a={action:"remove",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _b={url:this.urlRecommendation,handleAs:"json",content:_a,handle:dojo.hitch(this,this.handleRecommend,_9,d)};
dojo.xhrPost(_b).addCallback(dojo.hitch(this,function callBack(){
console.log("Unrecommend");
}));
}else{
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _a={action:"add",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _a={action:"add",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _b={url:this.urlRecommendation,handleAs:"json",content:_a,handle:dojo.hitch(this,this.handleRecommend,_9,d)};
dojo.xhrPost(_b).addCallback(dojo.hitch(this,function callBack(){
console.log("recommend");
}));
}
return d;
},loadItem:function(_c){
this.logEnter(arguments);
this.inherited(arguments);
var _d=_c.scope?_c.scope:dojo.global;
try{
if(_c.onItem&&_c.item){
_c.onItem.call(_d,_c.item);
}
}
catch(error){
if(_c.onError){
_c.onError.call(_d,error);
}
}
this.logExit(arguments);
}});
}


;if(!dojo._hasResource["lconn.blogs.blogsApp"]){
dojo._hasResource["lconn.blogs.blogsApp"]=true;
dojo.provide("lconn.blogs.blogsApp");
dojo.require("dojo.parser");
dojo.require("dijit.form.DateTextBox");
dojo.require("dojox.timing._base");
dojo.require("lconn.blogs.utils");
dojo.require("lconn.blogs.BlogsImage");
dojo.require("lconn.blogs.HtmlToggle");
dojo.require("lconn.blogs.SearchBar");
dojo.require("lconn.blogs.AddMembers");
dojo.require("lconn.blogs.localDate");
dojo.require("lconn.blogs.tags");
dojo.require("lconn.blogs.rating");
dojo.require("lconn.blogs.voting");
dojo.require("lconn.blogs.TimezonePicker");
dojo.require("lconn.blogs.TabContainer");
dojo.require("lconn.blogs.notification.receivers");
dojo.require("lconn.blogs.Menu");
dojo.require("lconn.blogs.TypeAhead");
dojo.require("lconn.blogs.CommonTags.BlogsTagWidget");
dojo.require("lconn.blogs.addtags.AddTagWidget");
dojo.require("lconn.blogs.widget.RecommendInfo");
dojo.require("lconn.blogs.ckeditor");
dojo.require("lconn.core.FollowMenu");
dojo.require("lconn.core.HTMLUtil");
dojo.require("lconn.core.Res");
dojo.require("lconn.core.TypeAheadDataStore");
dojo.require("lconn.core.PeopleDataStore");
dojo.require("lconn.core.PeopleTypeAhead");
dojo.require("lconn.core.NameUtil");
dojo.require("lconn.core.FilteringCheckbox");
dojo.require("lconn.core.SearchBar");
dojo.require("lconn.core.MenuUtility");
dojo.require("lconn.core.LanguageSelector");
dojo.require("lconn.core.aria.Toolbar");
dojo.require("lconn.core.aria.TabPanel");
dojo.require("lconn.core.HelpLauncher");
dojo.require("lconn.core.url");
dojo.require("lconn.core.auth");
dojo.require("com.ibm.lconn.layout.people");
dojo.require("com.ibm.ajax.auth");
dojo.require("lconn.blogs.recommend.Inline");
dojo.require("lconn.blogs.recommend.RecommendDataStore");
dojo.require("lconn.core.people");
dojo.require("lconn.communities.bizCard.bizCard");
dojo.require("lconn.core.header");
if(window.Start===undefined){
window.Start=function(){
};
}
}



window['_js_modules']=(window['_js_modules']||[]).concat(['lconn.blogs.blogsApp.js']);
