
;define("dojo/text!dijit/templates/Calendar.html", '<table cellspacing="0" cellpadding="0" class="dijitCalendarContainer" role="grid" aria-labelledby="${id}_mddb ${id}_year" data-dojo-attach-point="gridNode">\n	<thead>\n		<tr class="dijitReset dijitCalendarMonthContainer" valign="top">\n			<th class=\'dijitReset dijitCalendarArrow\' data-dojo-attach-point="decrementMonth" scope="col">\n				<span class="dijitInline dijitCalendarIncrementControl dijitCalendarDecrease" role="presentation"></span>\n				<span data-dojo-attach-point="decreaseArrowNode" class="dijitA11ySideArrow">-</span>\n			</th>\n			<th class=\'dijitReset\' colspan="5" scope="col">\n				<div data-dojo-attach-point="monthNode">\n				</div>\n			</th>\n			<th class=\'dijitReset dijitCalendarArrow\' scope="col" data-dojo-attach-point="incrementMonth">\n				<span class="dijitInline dijitCalendarIncrementControl dijitCalendarIncrease" role="presentation"></span>\n				<span data-dojo-attach-point="increaseArrowNode" class="dijitA11ySideArrow">+</span>\n			</th>\n		</tr>\n		<tr role="row">\n			${!dayCellsHtml}\n		</tr>\n	</thead>\n	<tbody data-dojo-attach-point="dateRowsNode" data-dojo-attach-event="ondijitclick: _onDayClick" class="dijitReset dijitCalendarBodyContainer">\n			${!dateRowsHtml}\n	</tbody>\n	<tfoot class="dijitReset dijitCalendarYearContainer">\n		<tr>\n			<td class=\'dijitReset\' valign="top" colspan="7" role="presentation">\n				<div class="dijitCalendarYearLabel">\n					<span data-dojo-attach-point="previousYearLabelNode" class="dijitInline dijitCalendarPreviousYear" role="button"></span>\n					<span data-dojo-attach-point="currentYearLabelNode" class="dijitInline dijitCalendarSelectedYear" role="button" id="${id}_year"></span>\n					<span data-dojo-attach-point="nextYearLabelNode" class="dijitInline dijitCalendarNextYear" role="button"></span>\n				</div>\n			</td>\n		</tr>\n	</tfoot>\n</table>\n');

;define("dijit/CalendarLite",["dojo/_base/array","dojo/_base/declare","dojo/cldr/supplemental","dojo/date","dojo/date/locale","dojo/date/stamp","dojo/dom","dojo/dom-class","dojo/_base/lang","dojo/on","dojo/sniff","dojo/string","./_WidgetBase","./_TemplatedMixin","dojo/text!./templates/Calendar.html","./a11yclick","./hccss"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,on,_a,_b,_c,_d,_e){
var _f=_2("dijit.CalendarLite",[_c,_d],{templateString:_e,dowTemplateString:"<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\" scope=\"col\"><span class=\"dijitCalendarDayLabel\">${d}</span></th>",dateTemplateString:"<td class=\"dijitReset\" role=\"gridcell\" data-dojo-attach-point=\"dateCells\"><span class=\"dijitCalendarDateLabel\" data-dojo-attach-point=\"dateLabels\"></span></td>",weekTemplateString:"<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">${d}${d}${d}${d}${d}${d}${d}</tr>",value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date(),_setSummaryAttr:"gridNode",baseClass:"dijitCalendar dijitCalendarLite",_isValidDate:function(_10){
return _10&&!isNaN(_10)&&typeof _10=="object"&&_10.toString()!=this.constructor.prototype.value.toString();
},_getValueAttr:function(){
var _11=this._get("value");
if(_11&&!isNaN(_11)){
var _12=new this.dateClassObj(_11);
_12.setHours(0,0,0,0);
if(_12.getDate()<_11.getDate()){
_12=this.dateModule.add(_12,"hour",1);
}
return _12;
}else{
return null;
}
},_setValueAttr:function(_13,_14){
if(typeof _13=="string"){
_13=_6.fromISOString(_13);
}
_13=this._patchDate(_13);
if(this._isValidDate(_13)&&!this.isDisabledDate(_13,this.lang)){
this._set("value",_13);
this.set("currentFocus",_13);
this._markSelectedDates([_13]);
if(this._created&&(_14||typeof _14=="undefined")){
this.onChange(this.get("value"));
}
}else{
this._set("value",null);
this._markSelectedDates([]);
}
},_patchDate:function(_15){
if(_15){
_15=new this.dateClassObj(_15);
_15.setHours(1,0,0,0);
}
return _15;
},_setText:function(_16,_17){
while(_16.firstChild){
_16.removeChild(_16.firstChild);
}
_16.appendChild(_16.ownerDocument.createTextNode(_17));
},_populateGrid:function(){
var _18=new this.dateClassObj(this.currentFocus);
_18.setDate(1);
_18=this._patchDate(_18);
var _19=_18.getDay(),_1a=this.dateModule.getDaysInMonth(_18),_1b=this.dateModule.getDaysInMonth(this.dateModule.add(_18,"month",-1)),_1c=new this.dateClassObj(),_1d=_3.getFirstDayOfWeek(this.lang);
if(_1d>_19){
_1d-=7;
}
if(!this.summary){
var _1e=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_18);
this.gridNode.setAttribute("summary",_1e[_18.getMonth()]);
}
this._date2cell={};
_1.forEach(this.dateCells,function(_1f,idx){
var i=idx+_1d;
var _20=new this.dateClassObj(_18),_21,_22="dijitCalendar",adj=0;
if(i<_19){
_21=_1b-_19+i+1;
adj=-1;
_22+="Previous";
}else{
if(i>=(_19+_1a)){
_21=i-_19-_1a+1;
adj=1;
_22+="Next";
}else{
_21=i-_19+1;
_22+="Current";
}
}
if(adj){
_20=this.dateModule.add(_20,"month",adj);
}
_20.setDate(_21);
if(!this.dateModule.compare(_20,_1c,"date")){
_22="dijitCalendarCurrentDate "+_22;
}
if(this.isDisabledDate(_20,this.lang)){
_22="dijitCalendarDisabledDate "+_22;
_1f.setAttribute("aria-disabled","true");
}else{
_22="dijitCalendarEnabledDate "+_22;
_1f.removeAttribute("aria-disabled");
_1f.setAttribute("aria-selected","false");
}
var _23=this.getClassForDate(_20,this.lang);
if(_23){
_22=_23+" "+_22;
}
_1f.className=_22+"Month dijitCalendarDateTemplate";
var _24=_20.valueOf();
this._date2cell[_24]=_1f;
_1f.dijitDateValue=_24;
this._setText(this.dateLabels[idx],_20.getDateLocalized?_20.getDateLocalized(this.lang):_20.getDate());
},this);
},_populateControls:function(){
var _25=new this.dateClassObj(this.currentFocus);
_25.setDate(1);
this.monthWidget.set("month",_25);
var y=_25.getFullYear()-1;
var d=new this.dateClassObj();
_1.forEach(["previous","current","next"],function(_26){
d.setFullYear(y++);
this._setText(this[_26+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));
},this);
},goToToday:function(){
this.set("value",new this.dateClassObj());
},constructor:function(_27){
this.dateModule=_27.datePackage?_9.getObject(_27.datePackage,false):_4;
this.dateClassObj=this.dateModule.Date||Date;
this.dateLocaleModule=_27.datePackage?_9.getObject(_27.datePackage+".locale",false):_5;
},_createMonthWidget:function(){
return _f._MonthWidget({id:this.id+"_mddb",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);
},buildRendering:function(){
var d=this.dowTemplateString,_28=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),_29=_3.getFirstDayOfWeek(this.lang);
this.dayCellsHtml=_b.substitute([d,d,d,d,d,d,d].join(""),{d:""},function(){
return _28[_29++%7];
});
var r=_b.substitute(this.weekTemplateString,{d:this.dateTemplateString});
this.dateRowsHtml=[r,r,r,r,r,r].join("");
this.dateCells=[];
this.dateLabels=[];
this.inherited(arguments);
_7.setSelectable(this.domNode,false);
var _2a=new this.dateClassObj(this.currentFocus);
this.monthWidget=this._createMonthWidget();
this.set("currentFocus",_2a,false);
},postCreate:function(){
this.inherited(arguments);
this._connectControls();
},_connectControls:function(){
var _2b=_9.hitch(this,function(_2c,_2d,_2e){
this[_2c].dojoClick=true;
return on(this[_2c],"click",_9.hitch(this,function(){
this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,_2d,_2e));
}));
});
this.own(_2b("incrementMonth","month",1),_2b("decrementMonth","month",-1),_2b("nextYearLabelNode","year",1),_2b("previousYearLabelNode","year",-1));
},_setCurrentFocusAttr:function(_2f,_30){
var _31=this.currentFocus,_32=this._getNodeByDate(_31);
_2f=this._patchDate(_2f);
this._set("currentFocus",_2f);
if(!this._date2cell||this.dateModule.difference(_31,_2f,"month")!=0){
this._populateGrid();
this._populateControls();
this._markSelectedDates([this.value]);
}
var _33=this._getNodeByDate(_2f);
_33.setAttribute("tabIndex",this.tabIndex);
if(this.focused||_30){
_33.focus();
}
if(_32&&_32!=_33){
if(_a("webkit")){
_32.setAttribute("tabIndex","-1");
}else{
_32.removeAttribute("tabIndex");
}
}
},focus:function(){
this._setCurrentFocusAttr(this.currentFocus,true);
},_onDayClick:function(evt){
evt.stopPropagation();
evt.preventDefault();
for(var _34=evt.target;_34&&!_34.dijitDateValue;_34=_34.parentNode){
}
if(_34&&!_8.contains(_34,"dijitCalendarDisabledDate")){
this.set("value",_34.dijitDateValue);
}
},_getNodeByDate:function(_35){
_35=this._patchDate(_35);
return _35&&this._date2cell?this._date2cell[_35.valueOf()]:null;
},_markSelectedDates:function(_36){
function _37(_38,_39){
_8.toggle(_39,"dijitCalendarSelectedDate",_38);
_39.setAttribute("aria-selected",_38?"true":"false");
};
_1.forEach(this._selectedCells||[],_9.partial(_37,false));
this._selectedCells=_1.filter(_1.map(_36,this._getNodeByDate,this),function(n){
return n;
});
_1.forEach(this._selectedCells,_9.partial(_37,true));
},onChange:function(){
},isDisabledDate:function(){
},getClassForDate:function(){
}});
_f._MonthWidget=_2("dijit.CalendarLite._MonthWidget",_c,{_setMonthAttr:function(_3a){
var _3b=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_3a),_3c=(_a("ie")==6?"":"<div class='dijitSpacer'>"+_1.map(_3b,function(s){
return "<div>"+s+"</div>";
}).join("")+"</div>");
this.domNode.innerHTML=_3c+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_3b[_3a.getMonth()]+"</div>";
}});
return _f;
});


;define("dijit/Calendar",["dojo/_base/array","dojo/date","dojo/date/locale","dojo/_base/declare","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","./CalendarLite","./_Widget","./_CssStateMixin","./_TemplatedMixin","./form/DropDownButton"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,on,_b,_c,_d,_e,_f,_10){
var _11=_4("dijit.Calendar",[_c,_d,_e],{baseClass:"dijitCalendar",cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},setValue:function(_12){
_8.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");
this.set("value",_12);
},_createMonthWidget:function(){
return new _11._MonthDropDownButton({id:this.id+"_mddb",tabIndex:-1,onMonthSelect:_a.hitch(this,"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);
},postCreate:function(){
this.inherited(arguments);
this.own(on(this.domNode,"keydown",_a.hitch(this,"_onKeyDown")),on(this.dateRowsNode,"mouseover",_a.hitch(this,"_onDayMouseOver")),on(this.dateRowsNode,"mouseout",_a.hitch(this,"_onDayMouseOut")),on(this.dateRowsNode,"mousedown",_a.hitch(this,"_onDayMouseDown")),on(this.dateRowsNode,"mouseup",_a.hitch(this,"_onDayMouseUp")));
},_onMonthSelect:function(_13){
var _14=new this.dateClassObj(this.currentFocus);
_14.setDate(1);
_14.setMonth(_13);
var _15=this.dateModule.getDaysInMonth(_14);
var _16=this.currentFocus.getDate();
_14.setDate(Math.min(_16,_15));
this._setCurrentFocusAttr(_14);
},_onDayMouseOver:function(evt){
var _17=_6.contains(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target;
if(_17&&((_17.dijitDateValue&&!_6.contains(_17,"dijitCalendarDisabledDate"))||_17==this.previousYearLabelNode||_17==this.nextYearLabelNode)){
_6.add(_17,"dijitCalendarHoveredDate");
this._currentNode=_17;
}
},_onDayMouseOut:function(evt){
if(!this._currentNode){
return;
}
if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){
return;
}
var cls="dijitCalendarHoveredDate";
if(_6.contains(this._currentNode,"dijitCalendarActiveDate")){
cls+=" dijitCalendarActiveDate";
}
_6.remove(this._currentNode,cls);
this._currentNode=null;
},_onDayMouseDown:function(evt){
var _18=evt.target.parentNode;
if(_18&&_18.dijitDateValue&&!_6.contains(_18,"dijitCalendarDisabledDate")){
_6.add(_18,"dijitCalendarActiveDate");
this._currentNode=_18;
}
},_onDayMouseUp:function(evt){
var _19=evt.target.parentNode;
if(_19&&_19.dijitDateValue){
_6.remove(_19,"dijitCalendarActiveDate");
}
},handleKey:function(evt){
var _1a=-1,_1b,_1c=this.currentFocus;
switch(evt.keyCode){
case _9.RIGHT_ARROW:
_1a=1;
case _9.LEFT_ARROW:
_1b="day";
if(!this.isLeftToRight()){
_1a*=-1;
}
break;
case _9.DOWN_ARROW:
_1a=1;
case _9.UP_ARROW:
_1b="week";
break;
case _9.PAGE_DOWN:
_1a=1;
case _9.PAGE_UP:
_1b=evt.ctrlKey||evt.altKey?"year":"month";
break;
case _9.END:
_1c=this.dateModule.add(_1c,"month",1);
_1b="day";
case _9.HOME:
_1c=new this.dateClassObj(_1c);
_1c.setDate(1);
break;
default:
return true;
}
if(_1b){
_1c=this.dateModule.add(_1c,_1b,_1a);
}
this._setCurrentFocusAttr(_1c);
return false;
},_onKeyDown:function(evt){
if(!this.handleKey(evt)){
evt.stopPropagation();
evt.preventDefault();
}
},onValueSelected:function(){
},onChange:function(_1d){
this.onValueSelected(_1d);
},getClassForDate:function(){
}});
_11._MonthDropDownButton=_4("dijit.Calendar._MonthDropDownButton",_10,{onMonthSelect:function(){
},postCreate:function(){
this.inherited(arguments);
this.dropDown=new _11._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect});
},_setMonthAttr:function(_1e){
var _1f=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_1e);
this.dropDown.set("months",_1f);
this.containerNode.innerHTML=(_b("ie")==6?"":"<div class='dijitSpacer'>"+this.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_1f[_1e.getMonth()]+"</div>";
}});
_11._MonthDropDown=_4("dijit.Calendar._MonthDropDown",[_d,_f,_e],{months:[],baseClass:"dijitCalendarMonthMenu dijitMenu",templateString:"<div data-dojo-attach-event='ondijitclick:_onClick'></div>",_setMonthsAttr:function(_20){
this.domNode.innerHTML="";
_1.forEach(_20,function(_21,idx){
var div=_7.create("div",{className:"dijitCalendarMonthLabel",month:idx,innerHTML:_21},this.domNode);
div._cssState="dijitCalendarMonthLabel";
},this);
},_onClick:function(evt){
this.onChange(_5.get(evt.target,"month"));
},onChange:function(){
}});
return _11;
});


;define("dijit/form/MappedTextBox",["dojo/_base/declare","dojo/sniff","dojo/dom-construct","./ValidationTextBox"],function(_1,_2,_3,_4){
return _1("dijit.form.MappedTextBox",_4,{postMixInProperties:function(){
this.inherited(arguments);
this.nameAttrSetting="";
},_setNameAttr:"valueNode",serialize:function(_5){
return _5.toString?_5.toString():"";
},toString:function(){
var _6=this.filter(this.get("value"));
return _6!=null?(typeof _6=="string"?_6:this.serialize(_6,this.constraints)):"";
},validate:function(){
this.valueNode.value=this.toString();
return this.inherited(arguments);
},buildRendering:function(){
this.inherited(arguments);
this.valueNode=_3.place("<input type='hidden'"+((this.name&&!_2("msapp"))?" name=\""+this.name.replace(/"/g,"&quot;")+"\"":"")+"/>",this.textbox,"after");
},reset:function(){
this.valueNode.value="";
this.inherited(arguments);
}});
});


;define("dijit/form/RangeBoundTextBox",["dojo/_base/declare","dojo/i18n","./MappedTextBox","dojo/i18n!./nls/validate"],function(_1,_2,_3){
var _4=_1("dijit.form.RangeBoundTextBox",_3,{rangeMessage:"",rangeCheck:function(_5,_6){
return ("min" in _6?(this.compare(_5,_6.min)>=0):true)&&("max" in _6?(this.compare(_5,_6.max)<=0):true);
},isInRange:function(){
return this.rangeCheck(this.get("value"),this.constraints);
},_isDefinitelyOutOfRange:function(){
var _7=this.get("value");
if(_7==null){
return false;
}
var _8=false;
if("min" in this.constraints){
var _9=this.constraints.min;
_8=this.compare(_7,((typeof _9=="number")&&_9>=0&&_7!=0)?0:_9)<0;
}
if(!_8&&("max" in this.constraints)){
var _a=this.constraints.max;
_8=this.compare(_7,((typeof _a!="number")||_a>0)?_a:0)>0;
}
return _8;
},_isValidSubset:function(){
return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();
},isValid:function(_b){
return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_b));
},getErrorMessage:function(_c){
var v=this.get("value");
if(v!=null&&v!==""&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_c)){
return this.rangeMessage;
}
return this.inherited(arguments);
},postMixInProperties:function(){
this.inherited(arguments);
if(!this.rangeMessage){
this.messages=_2.getLocalization("dijit.form","validate",this.lang);
this.rangeMessage=this.messages.rangeMessage;
}
}});
return _4;
});


;define("dijit/form/_DateTimeTextBox",["dojo/date","dojo/date/locale","dojo/date/stamp","dojo/_base/declare","dojo/_base/lang","./RangeBoundTextBox","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(_1,_2,_3,_4,_5,_6,_7,_8){
new Date("X");
var _9=_4("dijit.form._DateTimeTextBox",[_6,_7],{templateString:_8,hasDownArrow:true,cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},_unboundedConstraints:{},pattern:_2.regexp,datePackage:"",postMixInProperties:function(){
this.inherited(arguments);
this._set("type","text");
},compare:function(_a,_b){
var _c=this._isInvalidDate(_a);
var _d=this._isInvalidDate(_b);
if(_c||_d){
return (_c&&_d)?0:(!_c?1:-1);
}
var _e=this.format(_a,this._unboundedConstraints),_f=this.format(_b,this._unboundedConstraints),_10=this.parse(_e,this._unboundedConstraints),_11=this.parse(_f,this._unboundedConstraints);
return _e==_f?0:_1.compare(_10,_11,this._selector);
},autoWidth:true,format:function(_12,_13){
if(!_12){
return "";
}
return this.dateLocaleModule.format(_12,_13);
},"parse":function(_14,_15){
return this.dateLocaleModule.parse(_14,_15)||(this._isEmpty(_14)?null:undefined);
},serialize:function(val,_16){
if(val.toGregorian){
val=val.toGregorian();
}
return _3.toISOString(val,_16);
},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_17){
_17=_17||{};
this.dateModule=_17.datePackage?_5.getObject(_17.datePackage,false):_1;
this.dateClassObj=this.dateModule.Date||Date;
if(!(this.dateClassObj instanceof Date)){
this.value=new this.dateClassObj(this.value);
}
this.dateLocaleModule=_17.datePackage?_5.getObject(_17.datePackage+".locale",false):_2;
this._set("pattern",this.dateLocaleModule.regexp);
this._invalidDate=this.constructor.prototype.value.toString();
},buildRendering:function(){
this.inherited(arguments);
if(!this.hasDownArrow){
this._buttonNode.style.display="none";
}
if(!this.hasDownArrow){
this._buttonNode=this.domNode;
this.baseClass+=" dijitComboBoxOpenOnClick";
}
},_setConstraintsAttr:function(_18){
_18.selector=this._selector;
_18.fullYear=true;
var _19=_3.fromISOString;
if(typeof _18.min=="string"){
_18.min=_19(_18.min);
if(!(this.dateClassObj instanceof Date)){
_18.min=new this.dateClassObj(_18.min);
}
}
if(typeof _18.max=="string"){
_18.max=_19(_18.max);
if(!(this.dateClassObj instanceof Date)){
_18.max=new this.dateClassObj(_18.max);
}
}
this.inherited(arguments);
this._unboundedConstraints=_5.mixin({},this.constraints,{min:null,max:null});
},_isInvalidDate:function(_1a){
return !_1a||isNaN(_1a)||typeof _1a!="object"||_1a.toString()==this._invalidDate;
},_setValueAttr:function(_1b,_1c,_1d){
if(_1b!==undefined){
if(typeof _1b=="string"){
_1b=_3.fromISOString(_1b);
}
if(this._isInvalidDate(_1b)){
_1b=null;
}
if(_1b instanceof Date&&!(this.dateClassObj instanceof Date)){
_1b=new this.dateClassObj(_1b);
}
}
this.inherited(arguments,[_1b,_1c,_1d]);
if(this.value instanceof Date){
this.filterString="";
}
if(this.dropDown){
this.dropDown.set("value",_1b,false);
}
},_set:function(_1e,_1f){
if(_1e=="value"){
if(_1f instanceof Date&&!(this.dateClassObj instanceof Date)){
_1f=new this.dateClassObj(_1f);
}
var _20=this._get("value");
if(_20 instanceof this.dateClassObj&&this.compare(_1f,_20)==0){
return;
}
}
this.inherited(arguments);
},_setDropDownDefaultValueAttr:function(val){
if(this._isInvalidDate(val)){
val=new this.dateClassObj();
}
this._set("dropDownDefaultValue",val);
},openDropDown:function(_21){
if(this.dropDown){
this.dropDown.destroy();
}
var _22=_5.isString(this.popupClass)?_5.getObject(this.popupClass,false):this.popupClass,_23=this,_24=this.get("value");
this.dropDown=new _22({onChange:function(_25){
_23.set("value",_25,true);
},id:this.id+"_popup",dir:_23.dir,lang:_23.lang,value:_24,textDir:_23.textDir,currentFocus:!this._isInvalidDate(_24)?_24:this.dropDownDefaultValue,constraints:_23.constraints,filterString:_23.filterString,datePackage:_23.datePackage,isDisabledDate:function(_26){
return !_23.rangeCheck(_26,_23.constraints);
}});
this.inherited(arguments);
},_getDisplayedValueAttr:function(){
return this.textbox.value;
},_setDisplayedValueAttr:function(_27,_28){
this._setValueAttr(this.parse(_27,this.constraints),_28,_27);
}});
return _9;
});


;define("dijit/form/DateTextBox",["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(_1,_2,_3){
return _1("dijit.form.DateTextBox",_3,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:_2,_selector:"date",maxHeight:Infinity,value:new Date("")});
});

dojo.provide("lconn.blogs.nls.strings")._built=true;
dojo.provide("lconn.blogs.nls.strings.en");
lconn.blogs.nls.strings.en={"cancel":"Cancel","Oct":"Oct","rs_message_a11y_confirm":"Confirmation:","Apr":"Apr","upload":"Upload","insertImageTitle":"Add an Image","rs_loginNeeded":"This function is only available to authenticated users. Please log in first.","RatingCommentLoginToRate":"Log in to recommend this comment.","rs_remaining_vote":"You have ${0} out of ${1} votes remaining.","chooseImageFromPhoto":"Add an image from your recent photos","Saturday":"Saturday","rs_message_a11y_info":"Information:","htmlToggleTitle":"HTML Source","July":"July","RatingClickToRateEntry":"Click the + beside the star icon to recommend this entry.","RatingClickToRateComment":"Click the + beside the star icon to recommend this comment.","rs_vote_graduated_not_allow":"You can\'t vote on graduated ideas.","rs_vote":"Vote","urlSample":"URL(Web address of the image) For example, www.url.com/images/photo.jpg","large":"Large","rs_tagLabel":"Tags: ","tomorrow":"tomorrow","left2":"Left 2","left1":"Left 1","Tomorrow":"Tomorrow","rs_cancelTagEditing":"Cancel tag editing","rs_removeTagLabel":"Remove tag \'${0}\'","rs_searchDirectory":"Search Directory","invalidURL":"The image URL is invalid.","rs_searchSubmit":"submit search","rs_uploading":"Uploading, please wait...","rs_dup_dlgwarning":"This action cannot be undone.","rs_member_only":"You must be a member of this community to vote.","addImageFromComputer":"Add an image from your computer","urlInvalidMessage":"Invalid URL.  Enter a full URL. For example, \'http://www.dojotoolkit.org\'","rs_removeTagLinkLabel":"Add or remove tags on this item","RECOMMEND_COMMENT":{"LABEL_HIDDEN_MANY":"${0} others not shown","LOADING":"Loading...","LABEL_TRUE":"You have recommended this comment.","ERROR_RETRIEVE":"Unable to retrieve recommendations at this time.","LABEL_R_ONE":"1 other person recommended this:","RECOMMEND_TOOLTIP":"Recommend this comment to your colleagues","YOU_AND_X_HAVE_RECOMMENDED":"You and ${0} others","UNRECOMMEND_TOOLTIP":"Remove your recommendation from this comment","LABEL_A_MANY":"${0} people recommended this:","LABEL_A_ONE":"1 person recommended this:","LABEL_HIDDEN_ONE":"1 other not shown","YOU_AND_ONE_HAVE_RECOMMENDED":"You and 1 other","YOU_HAVE_RECOMMENDED":"You have recommended","NOT_RECOMMENDED":"No recommendations","RECOMMEND":"Recommend","LABEL_R_MANY":"${0} other people recommended this:","LABEL_FALSE":"Recommend this comment.","X_HAVE_RECOMMENDED":"${0} people","ERROR":"An error has occurred.","ONE_HAS_RECOMMENDED":"1 person","ALT_TEXT":"Recommendations","UNRECOMMEND":"Undo"},"Mar":"Mar","Sep":"Sep","rs_sessionTimeout":"Fail to process your request, session timeout. The problem has been recovered. Please try your operation again.","June":"June","May":"May","rs_ideaNotFound":"Fail to process your request, the idea  is not found ","rs_dup_desc1":"The vote counts and tags from the two ideas will be merged. The duplication action can not be undone.","nextItem":"Next","rs_dup_desc2":"The idea ${0} will be marked as a duplicate of the following idea:","addImageFromWeb":"Add an image from the web","sizeHelpText":"Large images shown at original size will require users to scroll.","COMMENT":{"RS_MSG_COMMENT_NOT_FOUND":"Comment not found.","RS_Reply_Coment_Title":"Reply to ${0}","RS_Delete_Title":"Delete this comment","RS_See_All_Reply":"See All Replies (${0})","RS_Flag_Inappropriate_Submit_Success":"The comment has been flagged and submitted for review","RS_Flag_Inappropriate_Submit_Fail":"Fail to submit the request. Server error.","RS_MSG_USER_LOGIN_NEEDED2":"You have been automatically logged out of the server due to inactivity. Copy any text you have entered to your clipboard so you won\'t lose it, then log in to start over. \x3ca href=\"${0}\"\x3eLog in\x3c/a\x3e","RS_Back_To_All_Title":"Back to all comments","RS_Post_IdeaComment_Title":"Comment on this Idea","RS_MSG_COMMENT_REJECTED":"Comment is rejected by system automatically.","RS_Community_Blog_Meta":"${0} (Community Blog)","RS_MSG_INERNAL_SERVER_ERROR":"Failed to post comment. Internal server error.","RS_COMMENT_SORT_DATE":"Date","RS_Comment_0":"Comments","RS_MODE_THREADED_TITLE":"Switch to threaded view","RS_View_Full_Thread":"View Full Thread (${0} replies)","RS_Ideation_Blog_Meta":"${0} (Ideation Blog)","RS_MODE_THREADED":"Threaded","RS_More_Title":"Show more content","RS_Add_Trackback_Label":"Add this as a new entry/idea in my blog","RS_Succeed":"Your comment has been posted.","RS_View_Full_Thread_Title":"View full thread","RS_Post_in_Progress":"Posting your comment...","RS_Select_Blog":"Select Blog:","RS_MODE_BYDATE_TITLE":"Switch to by date view","RS_Post_Comment_Title":"Comment on this Entry","RS_MSG_COMMENT_DISABLED":"Comments are closed for this entry.","RS_MODE":"Mode","RS_Delete":"Delete","RS_MSG_TARGET_WEBSITE_FORBIDDEN_FOR_NEWENTRY":"Not authorized to create new entry in target blog.","RS_Trackback_Title":"comment trackback","RS_Reason":"Provide a reason for flagging this comment (optional):","RS_Issue":"Issue:","RS_Comment_Number_Label":"Comment ${0} is from ${1}","RS_Link_Comment":"Comment Permalink","RS_Edit_Title":"Edit this comment","RS_Edit_Reply_Title":"Edit this Reply","RS_Add_Comment_Title":"Add a comment to this entry","RS_Add_IdeaComment_Title":"Add a comment to this idea","RS_Link_Thread":"Conversation Permalink","RS_MSG_COMMENT_TEXT_EXCEED_MAXSIZE":"Comment content exceeds 100K characters.","RS_Delete_Confirm":"Are you sure you want to delete this comment?","RS_Link_Thread_Title":"Link to this conversation","RS_Link_Comment_Title":"Link to this comment","RS_Edit_Comment_Title":"Edit this Comment","RS_COMMENT_LASTUPDATED_2":"Modified on ${0}","RS_COMMENT_LASTUPDATED_1":"Edited ${0} at ${1}","RS_Flag_Title":"Flag this comment as inappropriate","RS_Content_Quarantined":"This comment has been quarantined.","RS_Notify_Title":"Notify other people of this comment","RS_Post_Target_Title":"Target blog","RS_Flag_Inappropriate_Submitting":"Submitting","RS_View_Full_Thread_Single":"View Full Thread (1 reply)","RS_Flag_Inappropriate_Flag_Success":"The comment has been flagged and is quarantined by system automatically","RS_Trackback":"Trackback","RS_Edit":"Edit","RS_MSG_USER_LOGIN_NEEDED":"Log in to add a comment.","RS_MSG_TARGET_WEBSITE_FROZEN_FOR_NEWENTRY":"Ideation Blog is frozen and ideas can no longer be created.","RS_MSG_COMMENT_SUBMITTED_FOR_REVIEW":"Your comment has been submitted to the moderator for approval.","RS_Reply":"Reply","RS_Reply_Title":"Reply to this comment","RS_Comment_Toolbar_Label":"Comment actions","RS_Permalink":"Permalink","RS_Content_Deleted":"This comment has been deleted.","RS_Content_Title":"Content","RS_Add_Comment":"Add a Comment","RS_COMMENT_SORTBY":"Sort by:","RS_Cancel":"Cancel","RS_Comment":"Comments (${0})","RS_Submit":"Submit","RS_See_All_Reply_Title":"See all replies, total ${0}","RS_Comment_LoginRequired":"Log in to add a comment.","RS_Comment_Author_Number_Label":"Comment ${0} is from the author","RS_Content_Empty_Alert":"Please enter a comment.","RS_MSG_FORBIDDEN":"Not authorized.","RS_Notify":"Notify Other People","RS_MSG_ENTRY_NOT_FOUND":"Entry not found.","RS_MSG_TRACKBACK_TARGET_NOT_FOUND":"Trackback target not found.","RS_More":"More...","RS_MSG_COMMENT_TEXT_IS_BLANK":"The commment content should not be empty.","RS_More_Actions":"More Actions","RS_COMMENT_SORT_INFO_ASC":"Sort by Date in descending order. Click to sort in ascending order.","RS_No_Comment":"There are no comments to display","RS_Back_To_All":"Back to all comments","RS_Flag":"Flag as inappropriate","RS_Flag_Inappropriate_Dialog_Title":"Flag as inappropriate","RS_MODE_BYDATE":"By Date","RS_COMMENT_SORT_INFO_DESC":"Sort by Date in ascending order. Click to sort in descending order.","RS_Comment_Info":"${0} commented ${1}"},"setAsDefault":"Set this layout as the default","rs_infoIcon":"Information icon","rs_confirmIcon":"Confirmation icon","rs_clickToVote":"Click to vote for this idea.","imageSize":"Image Size:","rs_hide_Details":"Hide Details","rs_type_find_idea":"Type to find an idea","Feb":"Feb","rs_loadingIcon":"Loading icon","rs_addOrRemoveLabel":"Add or Remove Tags","RatingCommentRated":"You have recommended this comment.","right":"Right","rs_message_info":"Information icon","NOTIFICATION":{"BUTTON_SEND":"Send","LABEL_MESSAGE":"Message:","HINT_FAIL_TO_GET_MEMBERLIST":"Fail to get member list. Server error.","LABEL_NOTIFY":"Notify:","PEOPLEPICKER_TAB_PICKFROMCOMMUNITY":"Pick Community Members","LABEL_TYPE_IN_A_NAME":"Type in a Name:","DEFAULT_MESSAGE3":"Hi-  I thought you might be interested in this comment.","DEFAULT_MESSAGE1":"Hi-  I thought you might be interested in this blog entry.","SUCC_CONFIRM_MESSAGE":"The notification has been sent.","DEFAULT_MESSAGE2":"Hi-  I thought you might be interested in this idea.","HINT_ERROR":"Error:","PEOPLEPICKER_TAB_TYPEINNAME":"Type in a Name","BUTTON_CANCEL":"Cancel","TITLE":"Send Email Notification"},"closeDialog":"close dialog","Thursday":"Thursday","rs_entryNotFound":"Fail to process your request, the entry  is not found","rs_searchAlt":"select search option","RatingsAltRatings":"Ratings","rs_expanded_section":"Expanded section","rs_secarch_all_ideas":"Search all ideas","chooseLayout":"Choose Layout","small":"200 pixels wide","imageText":"image","rs_no_vote_left":"You have no votes left.","Monday":"Monday","rs_select_other":"Select a different idea","centered":"Centered","rs_visit_counts":"${0} Visits","rs_message_a11y_warning":"Warning:","rs_vote_duplicate":"Vote is disabled for duplicated idea","rs_removeMember_title":"Remove","rs_noTag":"None","RatingEntryRated":"You have recommended this entry.","rs_dup_dialog_info2":"The following idea will remain in the ideation blog:","rs_dup_dialog_info1":"You are about to make the following idea as a duplicate:","Aug":"Aug","RECOMMEND":{"LABEL_HIDDEN_MANY":"${0} others not shown","LOADING":"Loading...","LABEL_TRUE":"You have recommended this entry.","ERROR_RETRIEVE":"Unable to retrieve recommendations at this time.","LABEL_R_ONE":"1 other person recommended this:","RECOMMEND_TOOLTIP":"Recommend this entry to your colleagues","YOU_AND_X_HAVE_RECOMMENDED":"You and ${0} others","UNRECOMMEND_TOOLTIP":"Remove your recommendation from this entry","LABEL_A_MANY":"${0} people recommended this:","LABEL_A_ONE":"1 person recommended this:","LABEL_HIDDEN_ONE":"1 other not shown","YOU_AND_ONE_HAVE_RECOMMENDED":"You and 1 other","YOU_HAVE_RECOMMENDED":"You have recommended","NOT_RECOMMENDED":"No recommendations","RECOMMEND":"Recommend","LABEL_R_MANY":"${0} other people recommended this:","LABEL_FALSE":"Recommend this entry.","X_HAVE_RECOMMENDED":"${0} people","ERROR":"An error has occurred.","ONE_HAS_RECOMMENDED":"1 person","ALT_TEXT":"Recommendations","UNRECOMMEND":"Undo"},"rs_vote_limit_Str_single":"\x3cstrong\x3eIdeation Blog voting limit: ${0}\x3c/strong\x3e (You have 1 vote remaining)","Friday":"Friday","noSelectedImage":"You have not selected an image.","rs_searchNoInput":"Please enter text to search for","rs_remaining_vote_single":"You have ${0} out of ${1} vote remaining.","rs_errorIcon":"Error icon","rs_one_visit":"1 Visit","rs_datetime":"${0} ${1}","rs_no_matches":"No Match Results","RatingRecommandComment":"Recommend this comment","rs_message_warning":"Warning icon","selectFolder":"Select a directory:","Yesterday":"Yesterday","rs_Content":"Content","rs_entry_lastUpdated_2":"Modified on ${0} by ${1}","rs_entry_lastUpdated_1":"Modified ${0} by ${1}","rs_vote_limit_Str":"\x3cstrong\x3eIdeation Blog voting limit: ${0}\x3c/strong\x3e (You have ${1} votes remaining)","rs_comment_counts":"${0} Comments","rs_enterUser":"Enter a blog user","Nov":"Nov","PAGING":{"PAGING_PAGE_TITLE":"Show ${0} items per page","PRIMARY_PAGING_LABEL":"Primary paging","PAGING_PREVIOUS":"Previous","PAGING_PAGE_TITLE2":"Page ${0}","PAGING_JUMP_LABEL":"Changing the value will refresh page results","PAGING_PAGE_TITLE3":"Click to show ${0} items per page","PAGING_SHOW":"Show","PAGING_INFO_TITLE":"Show items ${0} through ${1} of ${2}","PAGING_NEXT_TITLE":"Next page","SECONDARY_PAGING_LABEL":"Secondary Paging","PAGING_PREVIOUS_TITLE":"Previous page","PAGING_INFO":"${0} - ${1} of ${2}","PAGING_ITEMS":"items","PAGING_NEXT":"Next","PAGING_JUMPTO":"Jump to page ${0} of ${1}","PAGEING_PAGE_NUM_TITLE":"Page Number"},"Sunday":"Sunday","Wednesday":"Wednesday","rs_Cancel":"Cancel","MENTION":{"NOT_SAME_ORGANIZATION_WARNING":"The following people mentioned will not be able to see the message as they are in a different organization","NOT_MEMBER_WARNING":"The following people mentioned will not be able to view the message because they are not members of the community."},"RatingRecommand":"Recommend this entry","rs_voted":"Voted","rs_collapse_section":"Collapsed section","rs_vote_disabled_in_preview":"Voting is disabled in idea preview.","rs_vote_end":"Ideation Blog voting ended.","RatingRecommentedBy":"Recommended by:","RatingLoginToRate":"Log in to recommend this entry.","previousItem":"Previous","insert":"Insert","rs_vote_graduated":"Graduated.","medium":"400 pixels wide","title":"Message","RatingRecommendation":"Recommendations","rs_clickToUnvote":"Click to remove your vote for this idea.","rs_message_close":"Close","yesterday":"yesterday","rs_vote_disabled":"Voting is disabled.","today":"today","blankFile":"You have chosen no files to upload.","rs_confirmUnvote":"Do you want to remove your vote?","Tuesday":"Tuesday","ok":"OK","RatingStar":"Stars","fitPageWidth":"Fit page width","original":"Original","Dec":"Dec","rs_addTagLabel":"Add Tags","rs_message_a11y_error":"Error:","rs_OK":"OK","rs_mark_as_dup":"Mark as Duplicate","rs_tagLinkTitle":"Filter by tag \'${0}\'","rs_show_Details":"Show Details","rs_warningIcon":"Warning icon","rs_one_comment":"1 Comment","Today":"Today","Jan":"Jan","rs_message_error":"Error icon","rs_dup_noundone":"This action can not be undone.","rs_message_confirm":"Confirmation icon"};
if(typeof define!=="undefined"&&typeof define._packages!=="undefined")define._packages["lconn.blogs"]=true;

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










dojo.requireLocalization("lconn.blogs","strings");






dojo.declare("lconn.blogs._utils",null,{trimToLength:function(s,_1){
if(!s){
return "";
}
s=lconn.core.util.text.trimEnd(s);
var _2="...";
if(s.length>_1){
s=lconn.core.util.text.trimEnd(s.substring(0,_1-_2.length))+_2;
}
return s;
},toggleControl:function(_3){
var _4=dojo.byId(_3);
var _5=dojo.byId("i"+_3);
if(_4.style.display=="none"){
_4.style.display="";
if(_5){
_5.innerHTML="-";
}
}else{
_4.style.display="none";
if(_5){
_5.innerHTML="+";
}
}
},toggleSubs:function(_6,_7){
var el=dojo.byId(_6);
var _8=dojo.byId(_7);
if(el.style.display!="none"){
el.style.display="none";
_8.className="lotusSprite lotusArrow lotusTwistyClosed";
}else{
el.style.display="";
_8.className="lotusSprite lotusArrow lotusTwistyOpen";
}
},toggleSection:function(_9,_a,_b){
var el=dojo.byId("section_"+_9.id);
if(typeof el=="undefined"||el==null){
var t=dojo.query("[name=\"section_"+_9.id+"\"]");
if(typeof t!="undefined"&&t.length&&t.length>0){
el=t[0];
}
}
var _c=dojo.byId(_9.id+"_section_hint_label");
if(el.style.display!="none"){
el.style.display="none";
_9.className="lotusSprite lotusArrow lotusTwistyClosed";
if(_b){
dojo.attr(_9,{"aria-label":_b,"title":_b});
_9.innerHTML="<span class=\"lotusAltText\">&#x25ba;</span>";
}
if(_9.getAttribute("aria-pressed")){
_9.setAttribute("aria-pressed","false");
}
if(_c){
_c.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_collapse_section;
}
var _d=dojo.query("[name=\""+_9.id+"_section_mainpart\"]");
if(_d&&_d.length>0){
_d[0].setAttribute("aria-expanded",false);
}
}else{
el.style.display="";
_9.className="lotusSprite lotusArrow lotusTwistyOpen";
if(_a){
dojo.attr(_9,{"aria-label":_a,"title":_a});
_9.innerHTML="<span class=\"lotusAltText\">&#x25bc;</span>";
}
if(_9.getAttribute("aria-pressed")){
_9.setAttribute("aria-pressed","true");
}
if(_c){
_c.innerHTML=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).rs_expanded_section;
}
var _d=dojo.query("[name=\""+_9.id+"_section_mainpart\"]");
if(_d&&_d.length>0){
_d[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 _e=s.indexOf("<");
var _f=s.indexOf(">");
if(_e>-1&&_e<_f){
s=s.substring(_e+1,_f);
}
}
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(_10,s){
var rt="";
var _11=false;
for(var i=0;i<_10.length;i++){
if(!_11){
if(s!=_10[i]){
rt=rt+" "+_10[i];
}else{
_11=true;
}
}else{
rt=rt+" "+_10[i];
}
}
return rt.replace(/^\s+|\s+$/g,"");
},getUTF8ByteLength:function(s){
return unescape(encodeURIComponent(s)).length;
},refreshSecurityNonce:function(_12){
window.__security_nonce=_12;
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=_12;
}
}
}
},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(_13,_14){
var _15=false;
var t=dojo.query("[name=\"aria-announce\"]",_13);
if(t&&t.length>0){
_15=t[0];
}
if(!_15){
_15=document.createElement("div");
_15.className="lotusOffScreen";
_15.setAttribute("name","aria-announce");
dijit.setWaiRole(_15,"alert");
_13.appendChild(_15);
}
while(_15.firstChild){
_15.removeChild(_15.firstChild);
}
_15.appendChild(document.createTextNode(_14));
}},isSecure:function(){
var _16=(window.location.protocol||"http").replace(":","");
return (_16==="https");
},openHelpWindow:function(_17){
lconn.core.help.launchHelp(_17);
},loginAction:function(){
var _18=window.location.href.replace(/,/g,"%2C");
lconn.core.auth.login(getLoginRedirectURL(_18));
},getLoginRedirectURL:function(url){
if(!url){
url=window.location.href;
}
if(url[0]!="/"){
var t=url;
var _19="http://";
var idx=t.indexOf(_19);
if(idx==-1){
_19="https://";
idx=t.indexOf(_19);
}
if(idx!=-1){
t=t.substring(_19.length);
idx=t.indexOf("/");
t=idx==-1?"/":t.substring(idx);
if(t.indexOf("$url.site")==0){
url=t;
}
}
}
return BlogsBaseUrl+"/roller-ui/login-redirect.jsp?redirect="+encodeURIComponent(url);
},getLCLocale:function(){
var _1a=dojo.locale;
if(_1a=="pt-pt"){
_1a="pt";
}
if(_1a=="he"){
_1a="iw";
}
return _1a.replace("-","_");
},getUserProfileUrl:function(id){
var url=com.ibm.social.incontext.util.url;
if(dojo.getObject("lconn.core.config.services")){
var _1b=lconn.core.config.services.profiles;
if(typeof (_1b)!="undefined"){
var _1c=(this.isSecure()?_1b.secureUrl:_1b.url);
return url.rewrite(_1c+"/html/profileView.do",{userid:id});
}else{
return BlogsBaseUrl+"/roller-ui/blog/"+encodeURIComponent(id)+"?lang="+this.getLCLocale();
}
}
},getUserPhotoUrl:function(id){
if(window.lotuslive){
return dojo.getObject("gllConnectionsData.srvUrls.profiles")+"/photo/"+id;
}
var url=com.ibm.social.incontext.util.url;
if(dojo.getObject("lconn.core.config.services")){
var _1d=lconn.core.config.services.profiles;
if(typeof (_1d)!="undefined"){
profilesPath=(this.isSecure()?_1d.secureUrl:_1d.url);
return url.rewrite(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;
}
}
},getVcard:function(_1e){
var _1f=dojo.create("span",{"class":"vcard"});
var _20=lconn.core.globalization.bidiUtil.getTextDirection(_1e.fullName);
if(!_20||_20==""){
_20="ltr";
}
var _21=dojo.create("a",{"class":"lotusPerson fn","aria-describedby":"semtagmenu","href":this.getUserProfileUrl(_1e.extid),"title":_1e.fullName,"dir":_20});
_21.innerHTML=this.escapeHTML(_1e.fullName);
var _22=dojo.create("span",{"class":"x-lconn-userid"});
_22.style.display="none";
_22.innerHTML=_1e.extid;
_1f.appendChild(_21);
_1f.appendChild(_22);
return _1f;
},isUserContent:function(_23){
if(_23.parentNode==dojo.body||_23.parentNode==null){
return false;
}else{
if(_23.parentNode.attributes!=null&&_23.parentNode.getAttribute("user_content")=="true"){
return true;
}else{
return this.isUserContent(_23.parentNode);
}
}
},renameAttribute:function(_24,_25,_26){
for(var i=0;i<_24.length;i++){
dojo.attr(_24[i],_26,_24[i].getAttribute(_25));
_24[i].removeAttribute(_25);
}
}});
lconn.blogs.utils=new lconn.blogs._utils();
dojo.addOnLoad(function(){
var _27=dojo.query("[dojoType]");
var _28=new Array();
for(var i=0;i<_27.length;i++){
if(lconn.blogs.utils.isUserContent(_27[i])){
_28.push(_27[i]);
}
}
lconn.blogs.utils.renameAttribute(_28,"dojoType","dojo_type");
dojo.parser.parse();
lconn.blogs.utils.renameAttribute(_28,"dojo_type","dojoType");
});
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 _29=t[i];
if(_29){
dojo.addOnLoad.apply(dojo,_29);
}
}
dojo.addOnLoad(function(){
});
lconn.blogs.utils.dojoOnLoads=null;
};
origAddOnLoad=dojo.addOnLoad;
dojo.addOnLoad=function(){
var _2a=arguments;
lconn.blogs.utils.dojoOnLoads.push(_2a);
};
var orgiWindowOnLoad=window.onload;
window.onload=function(){
if(orgiWindowOnLoad){
orgiWindowOnLoad();
}
lconn.blogs.utils.applyDojoOnLoads();
};
}
function activateFooterLinks(){
var _2b=dojo.byId("lotusFooterULTools");
if(_2b!=null){
var _2c=_2b.getElementsByTagName("LI");
var len=_2c.length;
for(var i=1;i<len;i++){
var li=_2c[i];
var a=li.getElementsByTagName("a");
var _2d=a[0].className;
var idx=_2d.indexOf("lotusHidden");
if(idx!=-1){
a[0].className=_2d.substring(0,idx)+_2d.substring(idx+11);
}
}
}
};
lconn.blogs.utils.focus=function(_2e){
try{
if(typeof _2e!="undefined"&&_2e){
if(typeof (_2e)=="string"&&dojo.byId(_2e)){
dojo.byId(_2e).focus();
}else{
_2e.focus();
}
}
}
catch(err){
}
};
lconn.blogs.utils.alert=function(_2f,_30){
var _31=function(){
lconn.blogs.utils.focus(_30);
};
lconn.core.DialogUtil.alert(dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).title,_2f,_31);
};
lconn.blogs.utils.confirm=function(_32,_33,_34,_35){
var _36=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).title;
if(_34&&typeof _34!="undefined"&&typeof _34.title!="undefined"){
_36=_34.title;
}
var _37=function(b){
if(b){
_33();
}
lconn.blogs.utils.focus(_35);
};
lconn.core.DialogUtil.prompt(_36,_32,dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok,dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel,_37);
};
lconn.blogs.utils.popupForm=function(_38,_39,_3a,_3b){
var _3c=function(){
if(!!_3a&&_3a()){
lconn.blogs.utils.__dialog.hide();
lconn.blogs.utils.focus(_3b);
}
lconn.blogs.utils.__dialog._dialog.destroyRecursive();
};
_onCancel=function(){
lconn.blogs.utils.__dialog.hide();
lconn.blogs.utils.focus(_3b);
lconn.blogs.utils.__dialog._dialog.destroyRecursive();
};
lconn.blogs.utils.__dialog=lconn.core.DialogUtil.popupForm(_38,_39,dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok,dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).cancel,_3c,_onCancel);
};
lconn.blogs.utils.showMessage=function(_3d,_3e,_3f,_40){
var _41=dojo.byId(_3d);
if(!_41){
var _42=dojo.byId("lotusContent");
if(_42){
_41=dojo.create("div",{id:_3d});
_42.insertBefore(_41,_42.firstChild);
}else{
return;
}
}
var _43=dojo.create("div",null,_41,"last");
var _44=dojo.i18n.getLocalization("lconn.blogs","strings");
var _45,_46,_47;
switch(_3f){
case "info":
_45=com.ibm.oneui.controls.MessageBox.TYPE.INFO;
_46=_44.rs_message_info;
_47=_44.rs_message_a11y_info;
break;
case "confirm":
case "success":
_45=com.ibm.oneui.controls.MessageBox.TYPE.SUCCESS;
_46=_44.rs_message_confirm;
_47=_44.rs_message_a11y_confirm;
break;
case "warning":
_45=com.ibm.oneui.controls.MessageBox.TYPE.WARNING;
_46=_44.rs_message_warning;
_47=_44.rs_message_a11y_warning;
break;
case "error":
_45=com.ibm.oneui.controls.MessageBox.TYPE.ERROR;
_46=_44.rs_message_error;
_47=_44.rs_message_a11y_error;
break;
}
if(dojo.isString(_3e)){
_3e=dojo.create("span",{innerHTML:_3e});
}
lconn.blogs.utils.showMessage._msgBoxes.push(new com.ibm.oneui.controls.MessageBox({canClose:_40?true:false,_strings:{icon_alt:_46,a11y_label:_47,close_btn_title:_44.rs_message_close,close_btn_alt:_44.rs_message_close},type:_45,msg:_3e,onClose:function(){
this.destroyRecursive();
}},_43));
};
lconn.blogs.utils.showMessage._msgBoxes=[];
lconn.blogs.utils.clearMessage=function(_48){
var _49;
while(_49=lconn.blogs.utils.showMessage._msgBoxes.pop()){
try{
if(typeof _48=="undefined"||typeof _48!="undefined"&&(_48==_49.domNode.parentNode.parentNode.id||_48==_49.domNode.parentNode.id)){
_49.close();
}
}
catch(e){
}
}
try{
dojo.empty(_48);
}
catch(e){
}
};
lconn.blogs.utils.setIndicator=function(id,_4a){
var _4b=dojo.byId("blogsIndicatorsDiv");
if(!_4b){
return;
}
var t=dojo.query("[id='"+id+"']",_4b);
if(!t||t.length==0){
return;
}
if(_4a==null){
t[0].innerHTML="";
t[0].style.display="none";
}else{
t[0].innerHTML=_4a;
t[0].style.display="";
}
var _4c=0;
var x=dojo.query("[name='indicator']",_4b);
if(x){
for(var i=0;i<x.length;i++){
if(x[i].style.display!="none"){
_4c++;
}
}
}
if(_4c>0){
_4b.style.display="";
}else{
_4b.style.display="none";
}
};
openDemoWindow=function(url){
lconn.core.help.launchDemo(url);
};
dojo.addOnLoad(function(){
var _4d=document.getElementsByTagName("body")[0].className.split(" ");
for(var i in _4d){
if("dijit_a11y"==_4d[i]){
document.getElementsByTagName("body")[0].className+=" lotusImagesOff";
}
}
var _4e=dojo.query("[class~='aria_toolbar']");
for(var i=0;i<_4e.length;i++){
new lconn.core.aria.Toolbar(_4e[i]);
}
var _4f=dojo.query("[class~='aria_tablist']");
for(var i=0;i<_4f.length;i++){
new lconn.core.aria.TabPanel(_4f[i]);
}
try{
document.addEventListener("DOMNodeInserted",function(_50){
try{
var t=_50.target;
if(t.nodeType!=Node.ELEMENT_NODE){
return;
}
while(!!t){
if(dojo.hasClass(t,"aria_toolbar")){
new lconn.core.aria.Toolbar(t);
break;
}else{
if(dojo.hasClass(t,"aria_tablist")){
new lconn.core.aria.TabPanel(t);
break;
}else{
if(t.parentNode==t){
break;
}
t=t.parentNode;
}
}
}
}
catch(err){
}
},false);
}
catch(err){
}
if(typeof (initialSearchBar)!="undefined"){
initialSearchBar();
}
if(typeof (renderMessagesOnLoad)!="undefined"){
renderMessagesOnLoad();
}
var _51=dojo.byId("logoutLink");
if(_51){
var _52=_51.href;
dojo.attr(_51,{href:"javascript:;"});
if(_52!=null){
dojo.connect(_51,"onclick",this,function(){
if(lconn.core.auth.isAuthenticated()){
lconn.core.auth.logout(_52);
}else{
lconn.core.auth.login(_52);
}
});
}
}
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 _53=t2[0].getAttribute("id");
e1.setAttribute("name",_53+"_section_mainpart");
var e3=dojo.byId("section_"+_53);
if(typeof e3=="undefined"||e3==null){
var t3=dojo.query("[name=\"section_"+_53+"\"]");
if(typeof t3!="undefined"&&t3.length&&t3.length>0){
e3=t3[0];
}
}
if(!e3){
continue;
}
var _54=(e3.style.display!="none");
var e4=document.createElement("label");
e4.setAttribute("id",_53+"_section_hint_label");
e4.setAttribute("aria-live","polite");
dojo.addClass(e4,"lotusOffScreen");
if(_54){
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)();
};
}
}


;define("dijit/_editor/_Plugin",["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(_1,_2,_3,_4,_5){
var _6=_2("dijit._editor._Plugin",_4,{constructor:function(_7){
this.params=_7||{};
_3.mixin(this,this.params);
this._attrPairNames={};
},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:_5,disabled:false,getLabel:function(_8){
return this.editor.commands[_8];
},_initButton:function(){
if(this.command.length){
var _9=this.getLabel(this.command),_a=this.editor,_b=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);
if(!this.button){
var _c=_3.mixin({label:_9,ownerDocument:_a.ownerDocument,dir:_a.dir,lang:_a.lang,showLabel:false,iconClass:_b,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});
delete _c.name;
this.button=new this.buttonClass(_c);
}
}
if(this.get("disabled")&&this.button){
this.button.set("disabled",this.get("disabled"));
}
},destroy:function(){
if(this.dropDown){
this.dropDown.destroyRecursive();
}
this.inherited(arguments);
},connect:function(o,f,tf){
this.own(_1.connect(o,f,this,tf));
},updateState:function(){
var e=this.editor,c=this.command,_d,_e;
if(!e||!e.isLoaded||!c.length){
return;
}
var _f=this.get("disabled");
if(this.button){
try{
_e=!_f&&e.queryCommandEnabled(c);
if(this.enabled!==_e){
this.enabled=_e;
this.button.set("disabled",!_e);
}
if(_e){
if(typeof this.button.checked=="boolean"){
_d=e.queryCommandState(c);
if(this.checked!==_d){
this.checked=_d;
this.button.set("checked",e.queryCommandState(c));
}
}
}
}
catch(e){
console.log(e);
}
}
},setEditor:function(_10){
this.editor=_10;
this._initButton();
if(this.button&&this.useDefaultCommand){
if(this.editor.queryCommandAvailable(this.command)){
this.own(this.button.on("click",_3.hitch(this.editor,"execCommand",this.command,this.commandArg)));
}else{
this.button.domNode.style.display="none";
}
}
this.own(this.editor.on("NormalizedDisplayChanged",_3.hitch(this,"updateState")));
},setToolbar:function(_11){
if(this.button){
_11.addChild(this.button);
}
},set:function(_12,_13){
if(typeof _12==="object"){
for(var x in _12){
this.set(x,_12[x]);
}
return this;
}
var _14=this._getAttrNames(_12);
if(this[_14.s]){
var _15=this[_14.s].apply(this,Array.prototype.slice.call(arguments,1));
}else{
this._set(_12,_13);
}
return _15||this;
},get:function(_16){
var _17=this._getAttrNames(_16);
return this[_17.g]?this[_17.g]():this[_16];
},_setDisabledAttr:function(_18){
this._set("disabled",_18);
this.updateState();
},_getAttrNames:function(_19){
var apn=this._attrPairNames;
if(apn[_19]){
return apn[_19];
}
var uc=_19.charAt(0).toUpperCase()+_19.substr(1);
return (apn[_19]={s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});
},_set:function(_1a,_1b){
this[_1a]=_1b;
}});
_6.registry={};
return _6;
});


;define("dijit/form/Form",["dojo/_base/declare","dojo/dom-attr","dojo/_base/kernel","dojo/sniff","../_Widget","../_TemplatedMixin","./_FormMixin","../layout/_ContentPaneResizeMixin"],function(_1,_2,_3,_4,_5,_6,_7,_8){
return _1("dijit.form.Form",[_5,_6,_7,_8],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form data-dojo-attach-point='containerNode' data-dojo-attach-event='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",postMixInProperties:function(){
this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";
this.inherited(arguments);
},execute:function(){
},onExecute:function(){
},_setEncTypeAttr:function(_9){
_2.set(this.domNode,"encType",_9);
if(_4("ie")){
this.domNode.encoding=_9;
}
this._set("encType",_9);
},reset:function(e){
var _a={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e?e.target:this.domNode,target:e?e.target:this.domNode};
if(!(this.onReset(_a)===false)&&_a.returnValue){
this.inherited(arguments,[]);
}
},onReset:function(){
return true;
},_onReset:function(e){
this.reset(e);
e.stopPropagation();
e.preventDefault();
return false;
},_onSubmit:function(e){
var fp=this.constructor.prototype;
if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
_3.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
this.onExecute();
this.execute(this.getValues());
}
if(this.onSubmit(e)===false){
e.stopPropagation();
e.preventDefault();
}
},onSubmit:function(){
return this.isValid();
},submit:function(){
if(!(this.onSubmit()===false)){
this.containerNode.submit();
}
}});
});


;define("dojo/i18n!dijit/_editor/nls/LinkDialog", {"set":"Set","parentWindow":"Parent Window","newWindow":"New Window","currentWindow":"Current Window","insertImageTitle":"Image Properties","createLinkTitle":"Link Properties","topWindow":"Topmost Window","text":"Description:","url":"URL:","target":"Target:"});

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






















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='loadingDiv' class='lotusLoading' style='display:none;'></div>","<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 "+((bidir=="ltr")?"otherFramework16-PopupSharkfinDarkLeft":"otherFramework16-PopupSharkfinDarkRight")+"' 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 "+((bidir=="ltr")?"otherFramework16-PopupSharkfinDarkRight":"otherFramework16-PopupSharkfinDarkLeft")+"' 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><nobr><input id='radio_left1' name='blogImageLayout' checked='checked' value='left1' type='radio' /><label for='radio_left1'><strong> ${left1} </strong></label></nobr></td>","<td><nobr><input id='radio_left2' name='blogImageLayout' value='left2' type='radio' /><label for='radio_left2'><strong> ${left2} </strong></label></nobr></td>","<td><nobr><input id='radio_center' name='blogImageLayout' value='center' type='radio' /><label for='radio_center'><strong> ${centered} </strong></label></nobr></td>","<td><nobr><input id='radio_right' name='blogImageLayout' value='right' type='radio' /><label for='radio_right'><strong> ${right} </strong></label></nobr></td>"]:["<td><nobr><input id='radio_right' name='blogImageLayout' checked='checked' value='right' type='radio' /><label for='radio_right'><strong> ${right} </strong></label></nobr></td>","<td><nobr><input id='radio_center' name='blogImageLayout' value='center' type='radio' /><label for='radio_center'><strong> ${centered} </strong></label></nobr></td>","<td><nobr><input id='radio_left2' name='blogImageLayout' value='left2' type='radio' /><label for='radio_left2'><strong> ${left2} </strong></label></nobr></td>","<td><nobr><input id='radio_left1' name='blogImageLayout' value='left1' type='radio' /><label for='radio_left1'><strong> ${left1} </strong></label></nobr></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");
if(dojo.isIE){
dojo.connect(dojo.byId("imgUrl"),"onpropertychange",dojo.partial(this.setImageInsertMethod,"radio_fromUrl"));
}else{
dojo.connect(dojo.byId("imgUrl"),"oninput",dojo.partial(this.setImageInsertMethod,"radio_fromUrl"));
}
dojo.connect(dojo.byId("uploadedFile0"),"onchange",dojo.partial(this.setImageInsertMethod,"radio_upload"));
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();
},setImageInsertMethod:function(_7,_8){
if(_8.target.value!=""){
dojo.byId(_7).checked=true;
}
},showDiv:function(_9){
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<=7){
dojo.byId("widget_imgUrl").style.display="inline";
}else{
dojo.byId("widget_imgUrl").style.display="inline-block";
}
}
},hideDiv:function(_a){
dijit.byId("blogsImageDiv").hide();
dojo.byId("blogsImageDiv").style.display="none";
dijit.byId("imgUrl").setDisabled(true);
dojo.byId("widget_imgUrl").style.display="none";
},imageClicked:function(_b){
this.clearAllSelect();
var _c=_b.parentNode.parentNode;
if(!dojo.hasClass(_c,"blogInsertImageSelected")){
dojo.addClass(_c,"blogInsertImageSelected");
}
dojo.byId("radio_chooseFromPhoto").checked=true;
},selectFirst:function(_d){
var _d=dojo.byId("uploadedImage1");
if(_d){
this.imageClicked(_d);
}
},clearAllSelect:function(){
dojo.query("td",document).forEach(function(td){
if(dojo.hasClass(td,"blogInsertImageSelected")){
dojo.removeClass(td,"blogInsertImageSelected");
}
});
},selectDirectory:function(){
var _e=dojo.byId(dirSelect);
updateImages(0,_e.options[_e.selectedIndex].value);
},updateImages:function(_f,_10){
dojo.byId("loadingDiv").style.display="";
var _11=dojo.byId("uploadedImageTable");
dojo.fadeOut({node:_11,duration:1500,onEnd:dojo.hitch(this,function(){
for(var i=1;i<6;i++){
var _12="uploadedImageDiv"+i;
dojo.byId(_12).innerHTML="";
}
this.getImages(_f,_10).addCallback(dojo.hitch(this,function(){
dojo.byId("loadingDiv").style.display="none";
this.clearAllSelect();
dojo.fadeIn({node:_11,duration:1500}).play();
}));
})}).play();
},getImages:function(_13,_14){
var url=blogsContext+"/roller-ui/authoring/insertimage?handle="+weblogHandle+"&start="+_13;
if(typeof (_14)!="undefined"){
url+="&dir="+encodeURIComponent(_14);
}
var kw={url:url,handleAs:"json",handle:dojo.hitch(this,this.renderImages),error:function(_15){
if(dojo.isFF){
console.debug("An error occurred: "+_15);
}
}};
return dojo.xhrGet(kw);
},renderImages:function(_16){
if(_16){
dojo.forEach(_16.images,dojo.hitch(this,function(_17,_18,_19){
var _1a="uploadedImage"+(_18+1);
var _1b="uploadedImageDiv"+(_18+1);
var _1c=document.createElement("img");
_1c.id=_1a;
_1c.setAttribute("class","blogInsertImage");
_1c.setAttribute("src",_17.url);
_1c.setAttribute("title",_17.name);
_1c.setAttribute("width","90");
_1c.setAttribute("height","90");
dojo.byId(_1b).appendChild(_1c);
if(dojo.isIE){
_1c.attachEvent("onclick",dojo.hitch(this,"imageClicked",dojo.byId(_1a)));
}else{
_1c.addEventListener("click",dojo.hitch(this,"imageClicked",dojo.byId(_1a)),true);
}
}));
this.totalImageCount=_16.total;
this.currentDir=_16.currentDir;
if(typeof (folder)=="undefined"&&this.haveSubDir){
var _1d=dojo.byId("dirSelect");
this.defaultDir=this.currentDir;
dojo.forEach(_1d.options,dojo.hitch(this,function(_1e,_1f){
if(_1e.value==this.defaultDir){
_1e.selected=true;
}
}));
}
}
},getDirectories:function(){
var kw={url:blogsContext+"/roller-ui/authoring/imagefolder?handle="+weblogHandle,handleAs:"json",load:function(_20){
},error:function(_21){
if(dojo.isFF){
console.debug("An error occurred: "+_21);
}
}};
return dojo.xhrGet(kw);
},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.showWait();
this.clearError();
var _24=this.createDir();
if(_24!=null){
_24.addCallback(dojo.hitch(this,function(){
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:"xml",load:dojo.hitch(this,function(_28){
if(_28&&_28.getElementsByTagName("code")){
this.hideWait();
var _29=_28.getElementsByTagName("code")[0].firstChild.nodeValue;
var _2a=_28.getElementsByTagName("message")[0].firstChild.nodeValue;
if(_29=="0"){
_27=_2a;
this.insertImage(_27);
this.hideDiv();
}else{
if(_29=="2"){
lconn.blogs.utils.refreshSecurityNonce(_2a);
var _2b=dojo.i18n.getLocalization("lconn.blogs","strings").rs_sessionTimeout;
this.showError(_2b);
}else{
_2a="";
var _2c=_28.getElementsByTagName("message");
for(var i=0;i<_2c.length;i++){
_2a+=_2c[i].firstChild.nodeValue;
}
this.showError(_2a);
}
}
}else{
this.showError("bad response!");
}
return _28;
}),error:dojo.hitch(this,function(_2d){
this.hideWait();
if(dojo.isIE&&typeof (_2d.number)!="undefined"&&_2d.number==-2147024891){
this.showError(invalidFilePathStr);
}else{
this.showError(_2d);
}
return _2d;
})};
var _2e=dojo.io.iframe.send(kw);
}));
}
},createDir:function(){
if(insertImagePath==""){
return null;
}
var _2f=this;
var kw={form:"createSubdir",url:fileUploadActionURL,handleAs:"json",load:function(_30){
},error:function(_31){
if(dojo.isFF){
console.debug("An error occurred: "+_31);
}
}};
return dojo.xhrPost(kw);
},showError:function(_32){
var _33=dojo.byId("insertImageErrors");
_33.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>"+_32;
_33.style.display="";
},clearError:function(){
var _34=dojo.byId("insertImageErrors");
_34.innerHTML="";
_34.style.display="none";
},showWait:function(){
if(!dijit.byId("blogsImgWaitDiv")){
var _35=document.createElement("div");
_35.id="blogsImgWaitDiv";
document.body.appendChild(_35);
var _36=new dijit.Dialog({"aria-describedby":"uploadingDialogContent"},dojo.byId("blogsImgWaitDiv"));
_36.setContent("<div class='lotusDialogBorder'><div class='lotusDialog ' id='uploadingDialogContent'>"+this.messages.rs_uploading+"</div></div>");
_36.startup();
}
dijit.byId("blogsImgWaitDiv").show();
},hideWait:function(){
dijit.byId("blogsImgWaitDiv").hide();
},insertClicked:function(){
var _37;
dojo.query("input[name='insertMethod']").forEach(function(_38){
if(_38.checked){
_37=_38.value;
}
});
var _39="";
switch(_37){
case "upload":
this.checkFile();
break;
case "choose":
if(dojo.query("td[class~='blogInsertImageSelected']").length!=1){
this.showError(this.messages.noSelectedImage);
return;
}
_39=dojo.query("td[class~='blogInsertImageSelected']")[0].firstChild.firstChild.src;
this.insertImage(_39);
this.hideDiv();
break;
case "url":
if(dijit.byId("imgUrl").getValue()==""||!dijit.byId("imgUrl").isValid()){
this.showError(this.messages.invalidURL);
return;
}
_39=dijit.byId("imgUrl").getValue();
this.insertImage(_39);
this.hideDiv();
break;
}
},insertImage:function(url){
insertImageURL=url;
this._onCloseDialog();
var _3a=new Object();
_3a.tag=this.tag;
_3a.refAttr=this.tag=="img"?"src":"href";
_3a.imageText=this.messages.imageText;
var _3b;
for(var i=0;i<document.forms["insertImageSettings"].blogImageLayout.length;i++){
if(document.forms["insertImageSettings"].blogImageLayout[i].checked){
_3b=document.forms["insertImageSettings"].blogImageLayout[i].value;
}
}
var _3c;
for(var i=0;i<document.forms["insertImageSettings"].imageSize.length;i++){
if(document.forms["insertImageSettings"].imageSize[i].checked){
_3c=document.forms["insertImageSettings"].imageSize[i].value;
}
}
var _3d="";
switch(_3b){
case "left1":
if(_3c!="fit"){
_3d=" display:block; margin: 1em 1em 0pt 0pt; float: left;";
}else{
_3d=" display:block; margin: 1em 0pt 0pt 0pt; float: left;";
}
break;
case "left2":
_3d=" display:block; margin: 1em 0pt 0pt 0pt; float: left;";
break;
case "center":
_3d=" display:block; margin: 0 auto;text-align: center;";
break;
case "right":
if(_3c!="fit"){
_3d=" display:block; margin: 1em 0pt 0pt 1em; float: right;";
}else{
_3d=" display:block; margin: 1em 0pt 0pt 0pt; float: right;";
}
break;
}
var _3e="";
switch(_3c){
case "original":
break;
case "small":
_3e=" width:200px;";
break;
case "medium":
_3e=" width:400px;";
break;
case "fit":
_3e=" width:100%;";
break;
}
if(document.forms["insertImageSettings"].check_default.checked){
dojo.cookie("com.ibm.lc.blogs.insertImage.layout.cookie",_3b,{expires:90});
dojo.cookie("com.ibm.lc.blogs.insertImage.size.cookie",_3c,{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");
}
_3a.styleStr=_3e+" "+_3d;
var _3f,_40,_41;
if(_3b=="left2"||_3b=="center"){
_3f=this.editor.document.createElement("a",{attributes:{href:insertImageURL,target:"_blank"}});
_40=this.editor.document.createElement("img",{attributes:{src:insertImageURL,style:_3a.styleStr,alt:_3a.imageText}});
_41=this.editor.document.createElement("div",{attributes:{style:"width: 100%; display: inline-block;"}});
_41.append(_40);
_3f.append(_41);
this.editor.insertElement(_3f);
}else{
_3f=this.editor.document.createElement("a",{attributes:{href:insertImageURL,target:"_blank"}});
_40=this.editor.document.createElement("img",{attributes:{src:insertImageURL,style:_3a.styleStr,alt:_3a.imageText}});
_3f.append(_40);
this.editor.insertElement(_3f);
}
},_onCloseDialog:function(){
var _42=this;
setTimeout(function(){
_42.editor.focus();
},500);
},_onOpenDialog:function(){
this.startIndex=0;
this.totalImageCount=0;
this.getDirectories().addCallback(dojo.hitch(this,function(_43){
if(_43.folders.length==1){
this.haveSubDir=false;
this.currentDir=_43.folders[0].name;
}else{
this.haveSubDir=true;
}
if(this.haveSubDir){
var _44="<label for='dirSelect' class='blogsPaddingRight'>"+this.messages.selectFolder+"</label><select id='dirSelect' title='"+this.messages.selectFolder+"'>";
dojo.forEach(_43.folders,function(_45,_46){
var _47=_45.name;
if(_47!="/"){
_47="/"+_47;
}
_44+="<option value=\""+lconn.blogs.utils.escapeHTML(_45.name)+"\">"+lconn.blogs.utils.escapeHTML(_47)+"</option>";
});
_44+="</select>";
dojo.byId("dirDiv").innerHTML=_44;
var _48=dojo.byId("dirSelect");
dojo.connect(_48,"onchange",this,"changeFolder");
this.updateImages(0);
}else{
this.updateImages(0,this.currentDir);
}
}));
dijit.byId("imgUrl").setValue("");
if(this.isFirstOpen){
var _49=dojo.cookie("com.ibm.lc.blogs.insertImage.layout.cookie");
var _4a=dojo.cookie("com.ibm.lc.blogs.insertImage.size.cookie");
var _4b=dojo.cookie("com.ibm.lc.blogs.insertImage.setDefault.cookie");
dojo.query("input[name='blogImageLayout']").forEach(function(_4c){
if(_4c.value==_49){
dojo.byId(_4c.id).checked=true;
}
});
dojo.query("input[name='imageSize']").forEach(function(_4d){
if(_4d.value==_4a){
dojo.byId(_4d.id).checked=true;
}
});
if(_4b=="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.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.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");






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");












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");
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.memberList_AP);
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.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs._localDate",null,{now:new Date(),MILLS_IN_DAY:86400000,init:false,tempDate:new Date(),initialize:function(){
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;
}
},isToday:function(_1){
if(_1>=this.todayMidnight&&_1<this.timeline[2]){
return true;
}
return false;
},isYesterday:function(_2){
if(_2<this.todayMidnight&&_2>=this.timeline[1]){
return true;
}
return false;
},localize:function(_3,_4,_5){
if(typeof (_5)=="undefined"){
_5=false;
}
this.tempDate.setTime(_3);
var _6=this.tempDate;
if(!lconn.core.globalization.BidiDateUtil.isGregorian()){
this.months=lconn.core.globalization.BidiDateUtil.getDateComponent("months","abbr");
_6=lconn.core.globalization.BidiDateUtil.fromGregorian(_6);
this.now=lconn.core.globalization.BidiDateUtil.fromGregorian(this.now);
}
var d=_6.getDay();
var _7="";
if(_3>=this.todayMidnight&&_3<this.timeline[2]){
if(_4===undefined){
_7=dojo.string.substitute(this.messages.rs_datetime,[_5?this.messages.today:this.messages.Today,this.getLocalizedTime(_6)]);
}else{
_7=_5?this.messages.today:this.messages.Today;
}
}else{
if(_3<this.todayMidnight&&_3>=this.timeline[1]){
if(_4===undefined){
_7=dojo.string.substitute(this.messages.rs_datetime,[_5?this.messages.yesterday:this.messages.Yesterday,this.getLocalizedTime(_6)]);
}else{
_7=_5?this.messages.yesterday:this.messages.Yesterday;
}
}else{
if(_3<this.timeline[1]&&_3>=this.timeline[0]){
if(_4===undefined){
_7=this.days[d]+" "+this.getLocalizedTime(_6);
}else{
_7=this.days[d];
}
}else{
if(_3<this.timeline[3]&&_3>=this.timeline[2]){
_7=_5?this.messages.tomorrow:this.messages.Tomorrow;
}else{
if(_3<this.timeline[4]&&_3>=this.timeline[3]){
_7=this.days[d];
}else{
if(this.now.getFullYear()==_6.getFullYear()){
if(typeof (this.isEnglishLocale)=="undefined"){
var _8=dojo.locale.substring(0,2).toLowerCase();
var _9="";
if(dojo.locale.length>2){
_9=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_8=="en"&&(_9==""||_9=="us"));
}
if(this.isEnglishLocale){
_7=this.months[_6.getMonth()]+" "+_6.getDate();
}else{
_7=this.getLocalizedDate(_6);
}
}else{
if(typeof (this.isEnglishLocale)=="undefined"){
var _8=dojo.locale.substring(0,2).toLowerCase();
var _9="";
if(dojo.locale.length>2){
_9=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_8=="en"&&(_9==""||_9=="us"));
}
if(this.isEnglishLocale){
_7=this.months[_6.getMonth()]+" "+_6.getDate()+" "+_6.getFullYear();
}else{
_7=this.getLocalizedDate(_6);
}
}
}
}
}
}
}
return "<span class=\"blogsDateTime\" title=\""+_7+"\">"+_7+"</span>";
},getLocalizedTime:function(_a){
return dojo.date.locale.format(_a,{formatLength:"short",selector:"time",locale:dojo.locale});
},getLocalizedDate:function(_b){
return lconn.core.globalization.BidiDateUtil.formatBidiDate(_b,{formatLength:"medium",selector:"date",locale:dojo.locale});
},getLocalizedDateTime:function(_c,_d){
var t1=lconn.core.globalization.BidiDateUtil.formatBidiDate(_c,_d);
if(_d.formatLength=="full"||_d.formatLength=="long"){
var t2=dojo.date.locale.format(new Date(),{datePattern:"z",selector:"date"});
t1=t1.replace(t2,"");
t1=dojo.trim(t1);
}
return t1;
}});
lconn.blogs.localDate=new lconn.blogs._localDate();
lconn.blogs.localDate.initialize();
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.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.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;
lconn.blogs.utils.alert(_12);
}else{
lconn.blogs.utils.alert(_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\" style=\"word-wrap: normal;\">${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.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,isVotingDisabled:false,isGraduated:false,isDuplicated:false,allowGraduatedVote: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.isVotingDisabled||(this.isGraduated&&!this.allowGraduatedVote)){
this.disable();
}
},updateTooltip:function(){
if(!currentLogin.auth||this.isVotingDisabled||(this.isGraduated&&!this.allowGraduatedVote)){
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;
if(currentLogin.voteMax!=1){
this.tooltip.label=_1+" "+dojo.string.substitute(this.messages.rs_remaining_vote,[_2,currentLogin.voteMax]);
}else{
this.tooltip.label=_1+" "+dojo.string.substitute(this.messages.rs_remaining_vote_single,[_2,currentLogin.voteMax]);
}
}
}
},doVote:function(e){
if(!currentLogin.auth){
window.location.replace(this.loginRedirectURL);
dojo.stopEvent(e);
return;
}
if(this.isVotingDisabled||!this.canVote||(this.isGraduated&&!this.allowGraduatedVote)){
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.canVote=false;
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){
if(this.isVotingDisabled){
this.tooltip.label=this.isDuplicated?this.messages.rs_vote_duplicate:this.messages.rs_vote_end;
}else{
this.tooltip.label=this.messages.rs_vote_graduated_not_allow;
}
}
},enable:function(){
this.isVotingDisabled=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");
if(typeof currentLogin!="undefined"&&typeof currentLogin.canVoteBlog!="undefined"&&currentLogin.canVoteBlog!=-1){
this.canVote=true;
}
if(this.isGraduated){
this.disable();
}
},update:function(_3){
this.currentVoteDiv.innerHTML="<span class=\"lotusOffScreen\">"+this.messages.rs_voted+":</span><nobr>"+this.currentVote+"</nobr>";
if(_3){
if(this.canVote){
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.isVotingDisabled||(this.isGraduated&&!this.allowGraduatedVote)){
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.isVotingDisabled&&!(this.isGraduated&&!this.allowGraduatedVote)){
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;
lconn.blogs.utils.alert(_9);
}else{
if("ItemNotFound"==_7.error){
lconn.blogs.utils.alert(this.messages.rs_ideaNotFound);
}else{
lconn.blogs.utils.alert(_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;
lconn.blogs.utils.alert(_d);
}else{
if("ItemNotFound"==_b.error){
lconn.blogs.utils.alert(this.messages.rs_ideaNotFound);
}else{
lconn.blogs.utils.alert(_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,(bidir=="rtl"));
};
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.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.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.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.attr(_8,"id","receiver_"+i);
dojo.attr(_8,"role","listitem");
dojo.addClass(_8,"lotusFilter");
_8.innerHTML="<label class='lotusOffScreen'>"+_6.rs_removeMember_title+": </label>";
var _9=document.createElement("span");
if(_7.extid!=-1){
dojo.addClass(_9,"lotusPerson");
dojo.addClass(_9,"fn");
dojo.addClass(_9,"person");
dojo.addClass(_9,"bidiAware");
}
_9.innerHTML=lconn.blogs.utils.escapeHTML(lconn.blogs.utils.trimToLength(_7.fullname,31));
var _a=document.createElement("span");
dojo.addClass(_a,"vcard");
_8.appendChild(_a);
_a.appendChild(_9);
dojo.attr(_8,"href","javascript:dojo.byId('receiver_"+i+"')._onclick();");
_8._onclick=dojo.hitch(this,"remove",_7.extid,_7.email);
if(typeof _7.extid!="undefined"){
var _b=document.createElement("span");
dojo.addClass(_b,"x-lconn-userid");
_b.style.display="none";
_b.innerHTML=_7.extid;
_a.appendChild(_b);
}
if(typeof _7.email!="undefined"){
var _b=document.createElement("span");
dojo.addClass(_b,"email");
_b.style.display="none";
_b.innerHTML=_7.email;
_a.appendChild(_b);
}
var _c=document.createElement("img");
dojo.addClass(_c,"lotusDelete");
dojo.attr(_c,"role","presentation");
dojo.attr(_c,"alt",_6.rs_removeMember_title);
dojo.attr(_c,"src",dijit._Widget.prototype._blankGif);
_8.appendChild(_c);
var _d=document.createElement("a");
dojo.addClass(_d,"lotusAltText");
_d.innerHTML="X";
dojo.attr(_d,"href","javascript:dojo.byId('receiver_"+i+"')._onclick();");
dojo.attr(_d,"role","button");
_8.appendChild(_d);
this.receiverList_AP.appendChild(_8);
}
var _e=document.createTextNode(" ");
this.receiverList_AP.appendChild(_e);
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.receiverList_AP);
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(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.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.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("?"));
}
this.REDIRECT_URL+="?";
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.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";
}
},renderTag:function(a,_1){
this.inherited(arguments);
a.setAttribute("aria-describedby",this.ownedContentRegion);
}});
}


;dojo.cache("lconn.blogs", "addtags/templates/typeAhead.html", "<input type=\"text\" id=\"widget_${id}\" autocomplete=\"off\" name=\"${name}\" size=\"30\"dojoAttachEvent=\"onkeypress:_onKeyPress, onkeyup:_onKeyUp\"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.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\" 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\" aria-label=\"${rs_addTagLabel}\"><label for=\"${id}AddTagsTypeAhead\" class=\"lotusAccess\">${rs_addTagLabel}</label> <input class=\"lotusText\" dojoAttachPoint=\"_typeAheadDom\"/> <input class=\"lotusBtnSmall\" dojoAttachEvent=\"onclick:_addTags\" type=\"button\" value=\"${rs_OK}\"> <a class=\"lotusBtnSmallGray\" href=\"javascript:;\" dojoAttachEvent=\"onclick: _hideTypeAhead\" 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.declare("lconn.blogs.addtags.AddTagWidget",[dijit._Widget,dijit._Templated],{tags:null,typeAheadFeedUrl:"",typeAheadTemplate:"",contextPath:"",renderExistingTagAsLink:true,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});
this._tagsAsString.value="";
this._setupAddTagFormBtnTooltips();
}else{
this._showExistingTags();
}
this._tagSearch.style.display="inline";
this._tagSearchForm.style.display="none";
this._setupAddTagsBtnTooltips();
this._setupCancelBtnTooltips();
},_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;
}
}));
_4.domNode.setAttribute("maxlength",200);
},_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});
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");
if(this.renderExistingTagAsLink){
_7.href=this.contextPath+this.weblogEntryHandle+"?tags="+encodeURIComponent(this.tags[i]);
}else{
_7.href="javascript:void(0);";
}
_7.className="lotusAction";
_7.appendChild(document.createTextNode(lconn.core.globalization.bidiUtil.enforceTextDirection(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]]));
var _a=document.createElement("span");
dojo.addClass(_a,"lotusAltText");
_a.innerHTML="X";
_8.appendChild(_a);
this.connect(_8,"onclick",dojo.hitch(this,"_removeOneTag",this.tags[i]));
this._setupTooltip(_8,dojo.string.substitute(this.rs_removeTagLabel,[this.tags[i]]));
}
if(i<this.tags.length-1){
this._selectedTagsSection.appendChild(document.createTextNode(", "));
}
}
this._selectedTagsSection.style.display="inline";
this._setupAddOrRemoveBtnTooltips();
},_addTags:function(){
if(dojo.byId(this.id+"AddTagsTypeAhead")){
var _b=dojo.byId(this.id+"AddTagsTypeAhead").value;
_b=_b.replace(/,/g," ");
_b=_b.replace(/\u3000/g," ");
_b=_b.replace(/\s+/g," ");
_b=dojo.trim(_b);
if(_b.length>0){
var _c=_b.split(" ");
for(var i=0;i<_c.length;i++){
var _d=_c[i];
var _e=false;
for(var j=0;j<this.tags.length;j++){
if(_d==this.tags[j]){
_e=true;
break;
}
}
if(!_e){
if(this.tags!=null&&this.tags.length!=0){
this.tags.push(_d);
}else{
this.tags=new Array(_d);
}
}
}
}
dojo.byId(this.id+"AddTagsTypeAhead").value="";
}
this._hideTypeAhead();
window.skipBeforeUnload=false;
},_setupAddTagFormBtnTooltips:function(){
var _f=dojo.query(".blogsAdd.lotusAction",this.domNode)[0];
this._setupTooltip(_f,this.rs_addTagLabel);
},_setupCancelBtnTooltips:function(){
var _10=dojo.query(".lotusBtnSmallGray",this.domNode)[0];
this._setupTooltip(_10,this.rs_cancelTagEditing);
},_setupAddTagsBtnTooltips:function(){
var _11=dojo.query(".lotusBtnSmall",this.domNode)[0];
this._setupTooltip(_11,this.rs_OK);
},_setupAddOrRemoveBtnTooltips:function(){
var _12=dojo.query(".blogsAdd.lotusAction",this.domNode)[0];
this._setupTooltip(_12,this.rs_addOrRemoveLabel);
},_setupTooltip:function(_13,_14){
if(_13){
return new dijit.Tooltip({connectId:[_13],label:_14,position:["below"]});
}
},_removeOneTag:function(tag){
if(this.tags!=null){
for(var i=0;i<this.tags.length;i++){
if(tag==this.tags[i]){
this.tags.splice(i,1);
i--;
}
}
}
this._showExistingTags(true);
dojo.byId(this.id+"AddTagsTypeAhead").focus();
window.skipBeforeUnload=true;
}});
}


;if(!dojo._hasResource["lconn.share.widget.AbstractRecommendInfo"]){
dojo._hasResource["lconn.share.widget.AbstractRecommendInfo"]=true;
dojo.provide("lconn.share.widget.AbstractRecommendInfo");






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.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.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;
}
if(this.heading&&!_2.title){
_2.title=this.heading;
}
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.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.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.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){
lconn.blogs.utils.alert(_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.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.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;
}});
}


;dojo.cache("lconn.blogs", "duplicateIdea/templates/ideaEntry.html", "<div> <label>${rs_dup_desc1}</label> <label>${!rs_dup_desc2}</label> <div class=\"lotusLeft\" style=\"width:95px;padding: 5px 2px;\"> <div dojoAttachPoint=\"votingNode\"></div> <div style=\"margin-top:5px;display:none\" class=\"lotusMeta\" dojoAttachPoint=\"ideaGraduateNode\"> <span class=\"ideaGraduated\" style=\"width:68px;text-align:center;\">${rs_vote_graduated}</span> </div> </div> <div id=\"duplicatedEntryInfo\"> <h4 class=\"lotusTitle\">${titleName}</h4> <div class=\"lotusMeta\" role=\"list\" dojoAttachPoint=\"authorNode\"></div> <span dojoAttachPoint=\"showHideBtn\" dojoattachevent=\"onclick:toggleDetails\"> <a role=\"presentation\" href=\"javascript:;\" dojoAttachPoint=\"showHideCursor\" class=\"lotusSprite lotusArrow lotusTwistyClosed\"> <span class=\"lotusAltText\">&#x25ba;</span> </a> <a role=\"button\" href=\"javascript:;\" dojoAttachPoint=\"showHideText\">${rs_show_Details}</a> </span> <div dojoAttachPoint=\"contentNode\" class=\"lotusHidden\"> <div class=\"blogsWrapText\" style=\"overflow-x:auto;overflow-y:visible;\" dojoAttachPoint=\"contentHtml\" role=\"article\" ></div> <span class=\"blogsUpdatedTimeInfo\" dojoAttachPoint=\"blogsUpdatedInfoNode\"></span> </div> </div> <div dojoAttachPoint=\"findAnotherbtn\" style=\"clear:both;\"> <a role=\"button\" dojoattachevent=\"onclick: findAnother\" href=\"javascript:\">${rs_select_other}</a> </div> <input type=\"hidden\" name=\"targetEntryId\" value=\"${entryId}\"/></div>");

;if(!dojo._hasResource["lconn.blogs.duplicateIdea.IdeaEntry"]){
dojo._hasResource["lconn.blogs.duplicateIdea.IdeaEntry"]=true;
dojo.provide("lconn.blogs.duplicateIdea.IdeaEntry");


















dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.duplicateIdea.IdeaEntry",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.blogs","duplicateIdea/templates/ideaEntry.html"),titleName:"",entryId:null,url:BlogsBaseUrl+"/roller-services/json/entry",json:null,postMixInProperties:function(){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
this.rs_vote_graduated=this.messages.rs_vote_graduated;
this.rs_show_Details=this.messages.rs_show_Details;
this.rs_dup_desc1=this.messages.rs_dup_desc1;
this.rs_select_other=this.messages.rs_select_other;
if(this.entryId!=null){
this.fetchEntryJson();
}
this.titleName=lconn.core.HTMLUtil.escapeText(this.json.entryTitle,false);
this.rs_dup_desc2=dojo.string.substitute(this.messages.rs_dup_desc2,["<strong>"+lconn.core.HTMLUtil.escapeText(dojo.doc.forms["duplicateForm"].oldEntryTitle.value)+"</strong>"]);
},postCreate:function(){
var _1=this.json;
if(_1.graduated){
this.ideaGraduateNode.style.display="";
}
var _2=this.createVotingNode(_1.canVoteBlog,_1.isVoted,_1.currentCount);
this.votingNode.appendChild(_2);
var _3={name:_1.creator.name,id:_1.creator.id,state:(_1.creator.state==0?"active":"inactive")};
var _4=this.createAuthorMetaNode(_3,_1.pubTime,_1.tags,_1.visits,_1.commentCount);
if(_1.lastUpdateTime){
var _5={name:_1.lastUpdateUser.name,id:_1.lastUpdateUser.id,state:(_1.lastUpdateUser.state==0?"active":"inactive")};
this.createUpdateInformation(_5,_1.lastUpdateTime);
}
if(SemTagSvc){
SemTagSvc.parseDom(null,this.domNode);
}
this.domNode.getElementsByClassName("lotusTitle")[0].innerHTML=this.domNode.getElementsByClassName("lotusTitle")[0].innerHTML.replace(/&amp;/g,"&");
},fetchEntryJson:function(){
var _6={url:this.url,sync:true,handleAs:"json",content:{entryId:this.entryId},load:dojo.hitch(this,function(_7){
this.json=_7;
})};
dojo.xhrPost(_6);
},createVotingNode:function(_8,_9,_a){
var _b=new lconn.blogs.voting({currentVote:_a,isVoted:_9,isVotingDisabled:true,canVote:_8,updateTooltip:function(){
this.tooltip.label=this.messages.rs_vote_disabled_in_preview;
},update:function(_c){
dojo.removeClass(this.votingDiv,"ideaVotingDiv");
dojo.addClass(this.votingDiv,"ideaVotingDivDisabled");
dojo.removeClass(this.votingButtonDiv,"ideaVotingButtonDiv");
dojo.addClass(this.votingButtonDiv,"ideaVotingButtonDivDisabled");
dojo.removeClass(this.voteButton,"ideaVotingButton");
dojo.addClass(this.voteButton,"ideaVotingButtonDisabled");
dojo.addClass(this.voteText,"lotusInactive");
dojo.attr(this.voteButton,"aria-pressed","true");
this.voteImg.setAttribute("src",dijit._Widget.prototype._blankGif);
this.voteImgAlt.innerHTML="&#8730;";
if(_c){
dojo.attr(this.voteImg,"class","otherFramework16 otherFramework16-menuCheckmark12");
this.voteText.innerHTML=this.messages.rs_voted;
}else{
dojo.attr(this.voteImg,"class","iconsOther16 iconsOther16-Vote14");
this.voteText.innerHTML=this.messages.rs_vote;
}
}});
return _b.domNode;
},createAuthorMetaNode:function(p,t,_d,v,c){
var _e=this.createUserLink(p);
var _f=dojo.create("span",{className:"lotusDivider",role:"img",innerHTML:"|"});
var _10=dojo.create("span",{innerHTML:blogsDate.date.localize(t)}).childNodes[0];
_10.setAttribute("role","listitem");
this.authorNode.appendChild(_e);
this.authorNode.appendChild(_f);
this.authorNode.appendChild(_10);
if(_d!=""){
this.authorNode.appendChild(_f.cloneNode(true));
var _11=dojo.create("span",{role:"listitem"});
var _12=dojo.create("span",{className:"lotusTags",role:"list"});
_12.appendChild(dojo.doc.createTextNode(this.messages.rs_tagLabel));
var _13=this.json.tagsLink;
var _14=_d.split(" ");
for(var i=0;i<_14.length;i++){
var _15=dojo.create("span",{role:"listitem",style:{paddingRight:"3px"}});
var a=dojo.create("a",{title:_14[i],href:_13+"/"+_14[i]+"?lang="+langParaValue,innerHTML:lconn.core.HTMLUtil.escapeText(_14[i],false)},_15);
_12.appendChild(_15);
}
_11.appendChild(_12);
this.authorNode.appendChild(_11);
}
if(c!=null&&c>0){
this.authorNode.appendChild(_f.cloneNode(true));
var _16="";
if(c==1){
_16=this.messages.rs_one_comment;
}else{
_16=dojo.string.substitute(this.messages.rs_comment_counts,[c]);
}
dojo.create("span",{role:"listitem",innerHTML:_16},this.authorNode);
}
if(v!=null&&v>0){
this.authorNode.appendChild(_f.cloneNode(true));
var _17="";
if(v==1){
_17=this.messages.rs_one_visit;
}else{
_17=dojo.string.substitute(this.messages.rs_visit_counts,[v]);
}
dojo.create("span",{role:"listitem",innerHTML:_17},this.authorNode);
}
},createUpdateInformation:function(p,t){
var _18=dojo.create("span",{innerHTML:blogsDate.date.localize(t,undefined,true)}).innerHTML;
var _19=dojo.create("span");
_19.appendChild(this.createUserLink(p));
var _1a=_19.innerHTML;
var _1b=dojo.string.substitute(this.messages.rs_entry_lastUpdated_2,[_18,_1a]);
if(lconn.blogs.localDate.isToday(t)||lconn.blogs.localDate.isYesterday(t)){
_1b=dojo.string.substitute(this.messages.rs_entry_lastUpdated_1,[_18,_1a]);
}
this.blogsUpdatedInfoNode.innerHTML=_1b;
},createUserLink:function(_1c){
var _1d=dojo.create("span",{role:"listttem",className:"vcard"});
var a;
if(lconn.core.config.services.profiles){
a=com.ibm.lconn.layout.people.createLink({userid:_1c.id,name:_1c.name});
}else{
a=dojo.create("a",{"class":"fn lotusPerson","href":BlogsBaseUrl+"/roller-ui/allblogs?userid="+encodeURIComponent(_1c.id)+"&lang="+langParaValue,"title":_1c.name,"innerHTML":lconn.blogs.utils.escapeHTML(_1c.name)});
}
var _1e=dojo.create("span",{className:"x-lconn-userid",style:{display:"none"}});
_1e.appendChild(dojo.doc.createTextNode(_1c.id));
_1d.appendChild(a);
_1d.appendChild(_1e);
return _1d;
},toggleDetails:function(e){
if(typeof this.__contentHtmlPopulated=="undefined"){
this.contentHtml.innerHTML=this.json.content;
}
dojo.toggleClass(this.contentNode,"lotusHidden");
e.preventDefault();
if(dojo.hasClass(this.contentNode,"lotusHidden")){
this.showHideText.innerHTML=this.messages.rs_show_Details;
dojo.removeClass(this.showHideCursor,"lotusTwistyOpen");
dojo.addClass(this.showHideCursor,"lotusTwistyClosed");
this.showHideCursor.innerHTML="<span class=\"lotusAltText\">&#x25ba;</span>";
}else{
this.showHideText.innerHTML=this.messages.rs_hide_Details;
dojo.removeClass(this.showHideCursor,"lotusTwistyClosed");
dojo.addClass(this.showHideCursor,"lotusTwistyOpen");
this.showHideCursor.innerHTML="<span class=\"lotusAltText\">&#x25bc;</span>";
}
},show:function(){
dojo.removeClass(this.domNode,"lotusHidden");
setTimeout(dojo.hitch(this,function(){
try{
this.showHideText.focus();
}
catch(err){
}
}),1);
},hide:function(){
dojo.addClass(this.domNode,"lotusHidden");
},findAnother:function(){
this.hide();
dojo.removeClass(dojo.byId("findDupInput"),"lotusHidden");
dojo.addClass(dojo.byId("dupIdeaSaveBtn"),"lotusBtnDisabled");
dojo.byId("dupIdeaSaveBtn").setAttribute("aria-disabled","true");
dojo.byId("dupIdeaSaveBtn").setAttribute("disabled","");
dojo.byId("dupIdeaSaveBtn").onclick=function(){
return;
};
setTimeout(function(){
dojo.byId("ideasAsString").focus();
},1);
}});
lconn.blogs.duplicateIdea.createEntry=function(_1f,_20){
dojo.addClass(dojo.byId("findDupInput"),"lotusHidden");
var _21=dojo.byId("dupIdeaSaveBtn");
dojo.removeClass(_21,"lotusBtnDisabled");
dojo.byId("dupIdeaSaveBtn").setAttribute("aria-disabled","false");
dojo.byId("dupIdeaSaveBtn").removeAttribute("disabled");
_21.onclick=function(){
var _22=dojo.i18n.getLocalization("lconn.blogs","strings");
var _23=function(){
dojo.doc.forms["duplicateForm"].dangerousurlnonce.value=window.__security_nonce;
dojo.doc.forms["duplicateForm"].submit();
};
var _24=dojo.create("div");
var _25=dojo.create("div",{id:"duplicateDlgMessage"},_24);
var _26=dojo.create("p",{innerHTML:_22.rs_dup_dialog_info1},_24);
var _27=dojo.create("p",{innerHTML:lconn.core.HTMLUtil.escapeText(dojo.doc.forms["duplicateForm"].oldEntryTitle.value,false)},_24);
var _28=dojo.create("p",{innerHTML:_22.rs_dup_dialog_info2},_24);
var _29=dojo.create("p",{innerHTML:lconn.core.HTMLUtil.escapeText(_20,false)},_24);
lconn.core.DialogUtil.popupForm(_22.rs_mark_as_dup,_24,_22.ok,_22.cancel,_23,null);
lconn.blogs.utils.showMessage("duplicateDlgMessage",_22.rs_dup_dlgwarning,"warning",false);
};
if(lconn.blogs.duplicateIdea.entrywidget){
var w=lconn.blogs.duplicateIdea.entrywidget;
if(w.entryId==_1f){
w.show();
return;
}else{
w.destroyRecursive();
}
}
lconn.blogs.duplicateIdea.entrywidget=new lconn.blogs.duplicateIdea.IdeaEntry({entryId:_1f});
dojo.byId("remainEntryContent").appendChild(lconn.blogs.duplicateIdea.entrywidget.domNode);
dojo.addClass(dojo.byId("remainEntryContent"),"lotusFormBody");
lconn.blogs.duplicateIdea.entrywidget.show();
};
}


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

;if(!dojo._hasResource["lconn.blogs.duplicateIdea.IdeasTypeAhead"]){
dojo._hasResource["lconn.blogs.duplicateIdea.IdeasTypeAhead"]=true;
dojo.provide("lconn.blogs.duplicateIdea.IdeasTypeAhead");








dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.duplicateIdea.IdeasTypeAhead",[lconn.core.TypeAhead],{templateString:null,templatePath:dojo.moduleUrl("lconn.blogs","duplicateIdea/templates/typeAhead.html"),hideEmptyResults:true,hintText:"",postMixInProperties:function(){
this.inherited(arguments);
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
this.hintText=this.messages.rs_type_find_idea;
this.rs_secarch_all_ideas=this.messages.rs_secarch_all_ideas;
this.rs_no_matches=this.messages.rs_no_matches;
},formatItem:function(_1,_2){
var _3="";
if(!_1||!_1.title){
return _3;
}
return lconn.core.HTMLUtil.escapeText(_1.title,false);
},onSelect:function(_4){
if(!_4){
return;
}
console.debug("select"+_4.id);
this.attr("value","");
lconn.blogs.duplicateIdea.createEntry(_4.id,_4.title);
},_startSearch:function(_5,_6){
if(!_5){
return;
}
_6=_6||{};
var _7=this.id+"_popup";
if(!this._popupWidget){
this._popupWidget=this.dropDown=new lconn.blogs.duplicateIdea.IdeasTypeAheadMenu({_strings:this._strings,rs_searchDirectory:this.rs_secarch_all_ideas,NoResultsMessage:this.rs_no_matches,onChange:dojo.hitch(this,this._selectOption),id:_7,inputWidget:this});
var _8=this.textbox.getAttribute("wairole");
if(_8){
dijit.setWaiRole(this.textbox,_8);
}
dijit.setWaiState(this._popupWidget.domNode,"live","polite");
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_7);
}else{
dijit.setWaiState(this.focusNode,"activedescendant",_7);
}
this.item=null;
var _9=dojo.clone(this.query);
this._lastQuery=_9=_5;
this.searchTimer=this.defer(dojo.hitch(this,function(_a,_b){
var _c=this.store.fetch({queryOptions:dojo.mixin({ignoreCase:this.ignoreCase,deep:true,searchDirectory:false},_6),query:_a,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_d){
console.error("dijit.form.ComboBox: "+_d);
dojo.hitch(_b,"_hideResultList")();
},start:0,count:this.pageSize});
var _e=function(_f,_10){
_f.start+=_f.count*_10;
_f.direction=_10;
this.store.fetch(_f);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_e,_c);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
_c.queryOptions.searchDirectory=true;
this.store.fetch(_c);
}));
},_9,this),this.searchDelay);
},_openResultList:function(_11,_12){
if(this.disabled||this.readOnly||(_12.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(_11.length){
var _13=new String(this.formatItem(_11[0]));
if(_13&&this.autoComplete&&!this._prev_key_backspace&&(_12.query!="")){
this._autoCompleteText(_13);
}
}
_12._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_11,_12,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(dojo.isIE&&(this.focusNode!=document.activeElement)){
this.focusNode.focus();
}
if(_12.direction){
if(1==_12.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_12.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_arrowPressed:function(){
},_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==dojo.keys.SHIFT){
return;
}
var _14=false;
var _15="_startSearchFromInput";
var pw=this._popupWidget;
var dk=dojo.keys;
var _16=null;
this._prev_key_backspace=false;
this._abortQuery();
if(this._isShowingNow){
pw.handleKey(key);
_16=pw.getHighlightedOption();
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
case dk.PAGE_UP:
case dk.UP_ARROW:
if(!this._isShowingNow){
this._arrowPressed();
_14=true;
_15="_startSearchAll";
}else{
}
dojo.stopEvent(evt);
break;
case dk.ENTER:
if(_16){
if(_16==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_16==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}else{
if(_16==pw.searchButton){
pw.searchDirectory();
dojo.stopEvent(evt);
return;
}else{
if(_16==pw.resultsNode){
dojo.stopEvent(evt);
return;
}else{
if(_16.item&&parseInt(_16.item.type)<0){
dojo.stopEvent(evt);
break;
}
}
}
}
}
pw.attr("value",{target:_16});
}else{
this._setBlurValue();
this._setCaretPos(this.focusNode,this.focusNode.value.length);
if(this.submitFormOnNonSelectingEnter){
if(this.searchTimer){
clearTimeout(this.searchTimer);
this.searchTimer=null;
}
this._lastQuery=null;
break;
}
}
if(this._isShowingNow){
this._lastQuery=null;
this._hideResultList();
}
if(!this.submitFormOnKey){
evt.preventDefault();
}
break;
case dk.TAB:
var _17=this.attr("displayedValue");
if(pw&&(_17==pw._messages["previousMessage"]||_17==pw._messages["nextMessage"])){
break;
}
if(_16){
pw.attr("value",{target:_16});
}
if(this._isShowingNow){
this._lastQuery=null;
this._hideResultList();
}
break;
case " ":
if(_16){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_14=true;
}
break;
case dk.ESCAPE:
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
if(this._currentInput){
this.focusNode.value=this._currentInput;
delete this._currentInput;
}
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_backspace=true;
_14=true;
break;
default:
dijit.setWaiState(this.focusNode,"activedescendant",this.focusNode.id);
this.focusNode.focus();
_14=typeof key=="string"||key==229;
}
if(_14){
this.item=undefined;
this.searchTimer=this.defer(dojo.hitch(this,_15),1);
}
}});
dojo.declare("lconn.blogs.duplicateIdea.IdeasTypeAheadMenu",[dijit.form._ComboBoxMenu,lconn.core.Res],{templateString:"<ul waiRole='listbox' class='dijitReset dijitMenu' dojoAttachPoint='containerNode' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' tabIndex='-1' style='overflow:\"auto\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' style='display:none' role='option'></li>"+"<li class='dijitMenuItem resultsNode'  style='overflow: hidden;' dojoAttachPoint='resultsNode' role='option'></li>"+"<li class='dijitMenuItem searchDirectory' style='overflow: hidden;' dojoAttachPoint='searchButton' role='option'>Search all ideas</li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' style='display:none' role='option'></li>"+"</ul>",postCreate:function(){
this.searchButton.selectHandler=dojo.hitch(this,function(evt){
dojo.stopEvent(evt);
this.searchDirectory();
return true;
});
this.resultsNode.selectHandler=dojo.hitch(this,function(evt){
dojo.stopEvent(evt);
return true;
});
this.inherited("postCreate",arguments);
},createOptions:function(_18,_19,_1a){
dojo.publish("lconn/core/typeahead/open");
this.clearResultList();
this.items=_18;
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_18,function(_1b,i){
var _1c=this._createOption(_1b["title"]||_1b,_1a);
_1c.className="dijitReset dijitMenuItem";
_1c.setAttribute("item",i);
_1c.item=""+i;
dojo.attr(_1c,"id",this.id+i);
this.domNode.insertBefore(_1c,this.nextButton);
},this);
dojo.attr(this.nextButton,"id",this.id+"_next");
var el=this.resultsNode;
if(_18.length==0&&this.NoResultsMessage){
while(el.firstChild){
el.removeChild(el.firstChild);
}
el.appendChild(document.createTextNode(this.NoResultsMessage));
el.item=this.NoResultsMessage;
this.domNode.insertBefore(el,this.nextButton);
}
if(_19.queryOptions.searchDirectory){
this.domNode.insertBefore(this.searchButton,this.nextButton);
}
return this.domNode.childNodes;
},clearResultList:function(){
var _1d=this.previousButton;
var _1e=this.nextButton;
while(_1d.nextSibling&&_1d.nextSibling!=_1e){
this.domNode.removeChild(_1d.nextSibling);
}
},setValue:function(_1f){
if(_1f.target.item){
this.value=_1f;
this.onChange(_1f);
}
},_onMouseUp:function(evt){
if(evt.target==this.searchButton){
this.searchDirectory();
}else{
if(evt.target!=this.resultsNode){
this.inherited("_onMouseUp",arguments);
}
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!tgt){
return;
}
if(!(tgt==this.previousButton||tgt==this.nextButton||tgt==this.searchButton||tgt==this.resultsNode)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_focusOptionNode:function(_20){
if(this._highlighted_option!=_20){
this._blurOptionNode();
this._highlighted_option=_20;
dojo.addClass(this._highlighted_option,"dijitMenuItemHover");
dojo.addClass(this._highlighted_option,"dijitMenuItemSelected");
}
},_blurOptionNode:function(){
if(this._highlighted_option){
dojo.removeClass(this._highlighted_option,"dijitMenuItemHover");
dojo.removeClass(this._highlighted_option,"dijitMenuItemSelected");
this._highlighted_option=null;
}
}});
}


;if(!dojo._hasResource["lconn.blogs.duplicateIdea.IdeasDataStore"]){
dojo._hasResource["lconn.blogs.duplicateIdea.IdeasDataStore"]=true;
dojo.provide("lconn.blogs.duplicateIdea.IdeasDataStore");
dojo.declare("lconn.blogs.duplicateIdea.IdeasDataStore",null,{constructor:function(_1,_2){
this.queryParam=(_1.queryParam?_1.queryParam:_2.getAttribute("queryParam"));
this.url=(_1.url?_1.url:_2.getAttribute("url"));
this.cache=[];
this.dirCache=[];
},queryParam:"",searchDirectory:false,cache:null,dirCache:null,fetch:function(_3){
var _4={};
var _5;
this.searchDirectory=(_3.queryOptions.searchDirectory?true:false);
if(this.searchDirectory){
_5=this.dirCache;
}else{
_5=this.cache;
}
if(typeof _5[_3.query.toLowerCase()]=="object"){
_3.count=_5.length;
_3.onComplete(_5[_3.query.toLowerCase()],_3);
return _3;
}
if(this.queryParam){
_4[this.queryParam]=_3.query;
}
if(this.searchDirectory){
_4.searchall="yes";
}
dojo.xhrGet({url:this.url,content:_4,handleAs:"json",timeout:5000,load:dojo.hitch(this,function(_6){
var _7;
if(this.searchDirectory){
_7=this.dirCache;
}else{
_7=this.cache;
}
_3.count=_6.length;
_7[_3.query.toLowerCase()]=_6;
if(_3.onComplete){
_3.onComplete(_6,_3);
}
}),error:function(){
console.log("There was an error");
}});
return _3;
},getValue:function(_8,_9,_a){
if(_8[_9]){
return _8[_9];
}else{
return _a;
}
}});
}


;if(!dojo._hasResource["lconn.blogs.comment.AddCommentForm"]){
dojo._hasResource["lconn.blogs.comment.AddCommentForm"]=true;
dojo.provide("lconn.blogs.comment.AddCommentForm");


















dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.comment.AddCommentForm",[dijit._Widget,dijit._Templated],{templatePath:document.body.className.indexOf("minimal")>=0?dojo.moduleUrl("lconn.blogs","comment/templates/AddCommentFormMinimal.html"):dojo.moduleUrl("lconn.blogs","comment/templates/AddCommentForm.html"),modeMinimal:document.body.className.indexOf("minimal")>=0,nls:null,entryId:"",commentid:"",level:0,maxLevel:-1,indentValue:20,indentLimit:5,panel:null,replyToCommentWidget:null,lastReplyItem:null,textBoxControl:null,mentionsDataFormatter:null,isHidden:true,mentionsEnabled:false,autoMention:false,mode:"new",returnFocus:null,trackbackEnabled:true,blankGif:"",userBlogListLoaded:false,isIdeaBlog:false,communityId:"",isPublicBlog:true,organization:" ",blogId:"",postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.blogs","strings");
dojo.mixin(this,this.nls.COMMENT);
this.blankGif=dijit._Widget.prototype._blankGif;
},useRTE:lconn.core.config.features("ckeditor-lite-mentions"),postCreate:function(){
this.inherited(arguments);
if(!this.useRTE){
this.createCommentbox();
}
},createCommentbox:function(){
this.panel=dijit.byId("blogCommentPanel")||null;
if(this.useRTE){
dojo.destroy(dojo.query(this.commentFormContentAP.parentNode).query("textarea + div")[0]);
var _1=dojo.create("div",{"name":"description","class":"events bidiAware"},this.commentFormContentAP.parentNode);
dojo.style(this.commentFormContentAP,{display:"none"});
}
var _2={maxLength:10000000,maxByteLength:40000000,shadowText:" ",mentionsEnabled:this.mentionsEnabled,height:"8em",width:"95%",title:this.RS_Content_Title,disableURLPreview:true};
this.textBoxControl=new lconn.core.lcTextArea.widgets.BasicTextBox(_2,this.useRTE?_1:this.commentFormContentAP);
if(!this.useRTE){
dojo.removeClass(this.textBoxControl.domNode,"lotusFieldEmphasis");
dojo.style(this.textBoxControl.textAreaNode,{height:"8em",width:"95%",padding:"5px;"});
dojo.attr(this.textBoxControl.textAreaNode,{title:this.RS_Content_Title,"aria-label":this.RS_Content_Title});
this.textBoxControl._mentionsHelper.disableURLPreview=true;
}
this.textBoxControl.expandTextBox();
this.mentionsDataFormatter=new lconn.core.widget.mentions.MentionsDataFormatter();
this.render();
},render:function(){
if(!currentLogin.auth){
dojo.destroy(this.commentFormAP);
return;
}
this.authorPhotoAP.src=lconn.blogs.utils.getUserPhotoUrl(currentLogin.extid);
},fetchUserBlogList:function(){
var _3={url:BlogsBaseUrl+"/roller-services/json/user_weblogs",handleAs:"json",content:{maxnamelen:40,type:"json"},handle:dojo.hitch(this,this.updateUserBlogList)};
return dojo.xhrGet(_3);
},updateUserBlogList:function(_4){
console.debug(_4);
this.userBlogListLoadingAP.style.display="none";
if(typeof _4.weblogs!="undefined"&&_4.weblogs.length!=0&&this.trackbackEnabled){
dojo.forEach(_4.weblogs,dojo.hitch(this,function(_5,_6){
var _7=_5.name;
if(_5.isIdeationBlog){
_7=dojo.string.substitute(this.RS_Ideation_Blog_Meta,[_5.name],lconn.blogs.utils.escapeHTML);
}
if(_5.isCommunityBlog){
_7=dojo.string.substitute(this.RS_Community_Blog_Meta,[_5.name],lconn.blogs.utils.escapeHTML);
}
var _8=_5.fullname;
if(_5.isIdeationBlog){
_8=dojo.string.substitute(this.RS_Ideation_Blog_Meta,[_5.fullname]);
}
if(_5.isCommunityBlog){
_8=dojo.string.substitute(this.RS_Community_Blog_Meta,[_5.fullname]);
}
dojo.create("option",{"value":_5.handle,"innerHTML":_7,"title":_8},this.weblogSelectAP);
}));
lconn.core.globalization.bidiUtil.enforceTextDirectionForSelect(this.weblogSelectAP);
this.postTrackbackCheckAP.removeAttribute("disabled");
}else{
dojo.destroy(this.postAsTrackbackAP);
}
this.userBlogListLoaded=true;
},prepareForm:function(_9){
if(this.useRTE){
this.createCommentbox();
}
this.mode=_9.mode||"new";
this.level=_9.level||0;
if(this.panel.currentMode!=this.panel.modeSupported["byDate"]){
var _a=(this.maxLevel!=-1)&&(this.level>this.maxLevel-1)?this.maxLevel-1:this.level;
if(_a>this.indentLimit){
_a=this.indentLimit+(_a-this.indentLimit)/3;
}
this.commentFormAP.style.marginLeft=this.indentValue*_a+"px";
}
if(this.mode=="new"){
if(this.level==0){
this.formTitleAP.innerHTML=this.isIdeaBlog?this.RS_Post_IdeaComment_Title:this.RS_Post_Comment_Title;
}else{
var _b="";
if(_9.authorName!=null){
_b=lconn.blogs.utils.escapeHTML(_9.authorName);
}
this.formTitleAP.innerHTML=dojo.string.substitute(this.RS_Reply_Coment_Title,[lconn.core.globalization.bidiUtil.enforceTextDirection(_b)]);
}
this.postAsTrackbackAP.style.display="";
}else{
if(this.mode=="edit"){
if(this.level==0){
this.formTitleAP.innerHTML=this.RS_Edit_Comment_Title;
}else{
this.formTitleAP.innerHTML=this.RS_Edit_Reply_Title;
}
this.postAsTrackbackAP.style.display="none";
}
}
dojo.attr(this.formElementAP,"aria-label",lconn.blogs.utils.escapeHTML(this.formTitleAP.innerHTML));
this.commentid=_9.commentid||"";
this.entryid=_9.entryid||"";
this.replyToCommentWidget=_9.replyToCommentWidget||null;
this.returnFocus=_9.returnFocus||null;
this.reset();
if(this.mentionsEnabled){
if(this.textBoxControl._mentionsHelper&&this.textBoxControl._mentionsHelper._registeredTypes){
for(var i=0;i<this.textBoxControl._mentionsHelper._registeredTypes.length;i++){
if(this.textBoxControl._mentionsHelper._registeredTypes[i].declaredClass=="lconn.core.widget.mentions.PersonMentionsType"){
this.textBoxControl._mentionsHelper._activeType=this.textBoxControl._mentionsHelper._registeredTypes[i];
}
}
}
}
if(typeof _9.commentid!="undefined"&&typeof _9.editContent=="undefined"){
if(this.mentionsEnabled&&this.autoMention){
if(!lconn.core.auth.getUser().isExternal){
setTimeout(dojo.hitch({textBoxControl:this.textBoxControl,replyToAuthor:_9},function(){
this.textBoxControl.setFocus();
this.textBoxControl.setText("<span class=\"vcard\"><span class=\"fn\">"+"@"+this.replyToAuthor.authorName+"</span><span class=\"x-lconn-userid\">"+this.replyToAuthor.authorId+"</span></span> - ");
}),10);
}
}
}
if(typeof _9.editContent!="undefined"){
setTimeout(dojo.hitch({textBoxControl:this.textBoxControl,replyToAuthor:_9},function(){
this.textBoxControl.setText(_9.editContent);
}),10);
}
},reset:function(){
this.commentFormContainerAP.style.display="";
dojo.empty(this.commentFormMsgAP);
this.commentFormMsgAP.style.display="none";
this.textBoxControl.resetBox();
this.postTrackbackCheckAP.checked=false;
this.selectBlogAP.style.display="none";
this.weblogSelectAP.disabled=true;
},cancel:function(){
if(this.replyToCommentWidget!=null){
this.replyToCommentWidget.expandHiddenComments();
if(this.mode=="edit"){
this.replyToCommentWidget.domNode.style.display="";
}
}
this.reset();
this.hide();
if(this.returnFocus!=null){
dojo.byId(this.returnFocus).focus();
}
},checkClicked:function(){
if(this.postTrackbackCheckAP.checked){
this.selectBlogAP.style.display="";
this.weblogSelectAP.disabled=false;
}else{
this.selectBlogAP.style.display="none";
this.weblogSelectAP.disabled=true;
}
},submit:function(){
var _c=null;
if(this.mentionsEnabled){
_c=this.mentionsDataFormatter.formatData(this.textBoxControl.getTrackedMentions());
}else{
_c=this.textBoxControl.getText();
}
if(dojo.trim(_c).length==0){
lconn.blogs.utils.alert(this.RS_Content_Empty_Alert,this.textBoxControl.textAreaNode);
return;
}
if(this.mode=="new"){
var _d={url:BlogsBaseUrl+"/roller-services/json/comment",handleAs:"json",content:{content:_c}};
if(this.level==0){
dojo.mixin(_d.content,{entryid:this.entryId});
}else{
dojo.mixin(_d.content,{commentid:this.commentid});
}
if(this.postTrackbackCheckAP.checked&&this.weblogSelectAP.value&&dojo.trim(this.weblogSelectAP.value).length!=0){
dojo.mixin(_d.content,{targethandle:this.weblogSelectAP.value});
}
var d=dojo.xhrPost(_d);
this.showProcessIndicator();
d.addCallback(dojo.hitch(this,function(_e){
if(_e.message=="SUCCEED"){
dojo.publish("/blogs/comment/update",[{action:"add",commentObj:_e.comment,level:this.level,lastReplyItem:this.lastReplyItem,replyToCommentWidget:this.replyToCommentWidget,returnFocus:this.returnFocus}]);
this.hide();
}else{
if(_e.message=="redirect"){
this.hide();
window.location.href=_e.location;
}else{
this.showError(_e.message);
}
}
if(this.level==1){
if(this.replyToCommentWidget.mode=="singleThread"||this.replyToCommentWidget.mode=="threaded"){
dojo.byId("link-"+this.replyToCommentWidget.commentObj.id+"-threaded").innerHTML=this.RS_Link_Thread;
dojo.byId("link-"+this.replyToCommentWidget.commentObj.id+"-singleThread").innerHTML=this.RS_Link_Thread;
}else{
dojo.byId("link-"+this.replyToCommentWidget.commentObj.id+"-"+this.replyToCommentWidget.mode).innerHTML=this.RS_Link_Thread;
}
}
}));
}else{
if(this.mode=="edit"){
var _d={url:BlogsBaseUrl+"/roller-services/json/comment?commentid="+this.commentid,handleAs:"json",postData:_c};
var d=dojo.xhrPut(_d);
this.showProcessIndicator();
d.addCallback(dojo.hitch(this,function(_f){
if(_f.message=="SUCCEED"){
dojo.publish("/blogs/comment/update",[{action:"edit",commentObj:_f.comment,level:this.level,replyToCommentWidget:this.replyToCommentWidget,returnFocus:this.returnFocus}]);
this.hide();
}else{
this.showError(_f.message);
}
}));
}
}
},showProcessIndicator:function(){
this.commentFormContainerAP.style.display="none";
this.commentFormMsgAP.innerHTML="<div role=\"alert\" class=\"lotusMessage lotusInfo\"><img title=\""+this.nls.rs_loadingIcon+"\" alt=\""+this.nls.rs_loadingIcon+"\" class=\"lotusLoading\" src=\""+dijit._Widget.prototype._blankGif+"\"><span class=\"lotusAltText\">"+this.nls.rs_loadingIcon+"</span><span>"+this.RS_Post_in_Progress+"</span></div>";
this.commentFormMsgAP.style.display="";
},showError:function(msg){
this.commentFormMsgAP.innerHTML="";
this.commentFormContainerAP.style.display="none";
var _10=this.nls.COMMENT["RS_MSG_"+msg];
if(msg=="USER_LOGIN_NEEDED"||msg=="FORBIDDEN"){
if(!!window.lotuslive){
_10=dojo.string.substitute(this.nls.COMMENT["RS_MSG_USER_LOGIN_NEEDED2"],[window.location.href]);
}else{
_10=dojo.string.substitute(this.nls.COMMENT["RS_MSG_USER_LOGIN_NEEDED2"],["javascript:lconn.blogs.utils.loginAction()"]);
}
this.commentFormContainerAP.style.display="";
}
if(typeof _10!="undefined"){
if(msg!="COMMENT_SUBMITTED_FOR_REVIEW"){
lconn.blogs.utils.showMessage(this.commentFormMsgAP,_10,"error",true);
}else{
lconn.blogs.utils.showMessage(this.commentFormMsgAP,_10,"warning",true);
}
}
this.commentFormMsgAP.style.display="";
},showSucceed:function(){
this.commentFormContainerAP.style.display="none";
lconn.blogs.utils.showMessage(this.commentFormMsgAP,this.RS_Succeed,"success",true);
this.commentFormMsgAP.style.display="";
},show:function(){
if(currentLogin.auth){
this.commentFormAP.style.display="";
this.textBoxControl.setFocus();
if(!this.userBlogListLoaded){
this.fetchUserBlogList();
}
}
this.isHidden=false;
this.monitorPermissionOfMentions();
},hide:function(){
this.commentFormAP.style.display="none";
this.isHidden=true;
dojo.place(this.domNode,dojo.byId("addCommentFormContainer"),"first");
},_permissionOfMentionsCache:{},_lastWarningIds:{"items":[]},monitorPermissionOfMentions:function(){
if(!this.mentionsEnabled){
return;
}
if(this.isPublicBlog&&(typeof this.organization=="undefined"||dojo.trim(this.organization).length==0)){
return;
}
this.checkPermissionOfMentions();
var _11=false;
var _12={items:[]};
var _13=[];
var _14=this.useRTE?this.textBoxControl.getMentions():this.textBoxControl._mentionsHelper.getMentions();
for(var i=0;i<_14.length;i++){
var _15=this.useRTE?_14[i].getUserId():_14[i].data;
if(!!this._permissionOfMentionsCache[_15]){
if(this._permissionOfMentionsCache[_15]=="false"){
_14[i].removeSymbol();
if(!_12[_15]){
_13.push(_14[i].value);
_12[_15]=true;
_12.items.push(_15);
if(!this._lastWarningIds[_15]){
_11=true;
}
}
}
}
}
if(!_11){
if(this._lastWarningIds.items.length!=_12.items.length){
_11=true;
}
}
this._lastWarningIds=_12;
if(_11){
if(_13.length<=0){
this.permissionWarningSummary.style.display="none";
}else{
this.permissionWarningSummary.style.display="";
var msg="<span>";
if(this.isPublicBlog){
msg=msg+this.nls.MENTION["NOT_SAME_ORGANIZATION_WARNING"];
}else{
msg=msg+this.nls.MENTION["NOT_MEMBER_WARNING"];
}
msg=msg+"</span>";
msg=msg+"<ul>";
for(var i=0;i<_13.length;i++){
msg=msg+"<li>";
msg=msg+lconn.blogs.utils.escapeHTML(_13[i]);
msg=msg+"</li>";
}
msg=msg+"</ul>";
this.permissionWarningMessage.innerHTML=msg;
}
}
var _16=this;
if(!this.isHidden){
setTimeout(function(){
_16.monitorPermissionOfMentions();
},1000);
}
},checkPermissionOfMentions:function(){
if(this.mentionsEnabled){
var _17=this.useRTE?this.textBoxControl.getMentions():this.textBoxControl._mentionsHelper.getMentions();
for(var i=0;i<_17.length;i++){
var _18=this.useRTE?_17[i].getUserId():_17[i].data;
if(!_18||dojo.trim(_18).length==0){
continue;
}
if(!this._permissionOfMentionsCache[_18]){
var _19=this;
this._permissionOfMentionsCache[_18]="true";
if(!this.isPublicBlog&&typeof this.communityId!="undefined"&&dojo.trim(this.communityId).length!=0){
var _1a={url:lconn.core.url.getServiceUrl(lconn.core.config.services.communities).uri+"/service/json/community/canviewcommunity?communityUuid="+_19.communityId+"&directoryUuid="+_18,handleAs:"json",load:function(_1b){
_19._permissionOfMentionsCache[_18]=_1b.canViewCommunity?"true":"false";
},error:function(_1c,_1d){
_19._permissionOfMentionsCache[_18]="false";
}};
dojo.xhrGet(_1a);
}
if(this.isPublicBlog&&typeof this.organization!="undefined"&&dojo.trim(this.organization).length>0){
var _1a={url:lconn.core.url.getServiceUrl(lconn.core.config.services.blogs).uri+"/roller-services/json/permission",handleAs:"json",content:{"userExternalId":_18,"websiteId":this.blogId},load:function(_1e){
_19._permissionOfMentionsCache[_18]=(_1e.hasAccess?"true":"false");
},error:function(_1f,_20){
_19._permissionOfMentionsCache[_18]="false";
}};
dojo.xhrGet(_1a);
}
}
}
}
}});
}


;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;
(function(){
dojo.provide("lconn.core.FilteringCheckbox");












var _1=lconn.core.globalization.bidiUtil;
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;
this.reset();
if(!this.isSingleSelect){
this.connect(this.notifyList_AP,"onkeydown",this,"onKeyDown");
}
this.connect(this.filterTextbox_AP,"onkeyup",function(){
_1.inputRTLProcessing(this.filterTextbox_AP);
});
};
w.onKeyDown=function onKeyDown(_2){
var dk=dojo.keys;
var _3=dojo._isBodyLtr()?dk.RIGHT_ARROW:dk.LEFT_ARROW;
var _4=dojo._isBodyLtr()?dk.LEFT_ARROW:dk.RIGHT_ARROW;
switch(_2.keyCode){
case this.scrollHorizontal?_3:-1:
case this.scrollVertical?dk.DOWN_ARROW:-1:
dojo.stopEvent(_2);
this.focusNextItem();
break;
case this.scrollHorizontal?_4:-1:
case this.scrollVertical?dk.UP_ARROW:-1:
dojo.stopEvent(_2);
this.focusPrevItem();
break;
}
};
w.focusPrevItem=function focusPrevItem(){
if(this.index==0){
}else{
var _5=dojo.byId(this.indexingList[this.index]);
this.index--;
var _6=dojo.byId(this.indexingList[this.index]);
_6.setAttribute("tabindex","0");
_5.setAttribute("tabindex","-1");
_6.focus();
}
};
w.focusNextItem=function focusNextItem(){
if(this.index==this.indexingList.length-1){
}else{
var _7=dojo.byId(this.indexingList[this.index]);
this.index++;
var _8=dojo.byId(this.indexingList[this.index]);
_8.setAttribute("tabindex","0");
_7.setAttribute("tabindex","-1");
_8.focus();
}
};
w.getCurrentSelected=function getCurrentSelected(){
var _9=dojo.query("input[type='checkbox']",this.notifyList_AP);
for(var i=0;i<_9.length;i++){
if(_9[i].getAttribute("tabindex")==0){
this.currentFocusItem=_9[i];
this.index=i;
return _9[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(_a){
var _b=document.getElementsByName(this.id+"notifyPerson");
var _c=document.getElementById(this.id+"pagingButtons");
if(_a){
dojo.addClass(this.notifyList_AP,"disabled");
if(_c){
dojo.addClass(_c,"lotusHidden");
}
}else{
dojo.removeClass(this.notifyList_AP,"disabled");
if(_c){
dojo.removeClass(_c,"lotusHidden");
}
}
this.filterTextbox_AP[(_a?"setAttribute":"removeAttribute")]("disabled",true);
this.groupSelect_AP[(_a?"setAttribute":"removeAttribute")]("disabled",true);
for(var i=0;i<_b.length;i++){
if(!dojo.hasAttr(_b[i],"alwaysDisable")){
_b[i][(_a?"setAttribute":"removeAttribute")]("disabled",true);
var _d=document.getElementById(_b[i].id+"Label");
if(_d){
_d[(_a?"setAttribute":"removeAttribute")]("disabled",true);
}
if(_a){
_b[i].checked=false;
}else{
_b[i].checked=!!this.peopleSelected[_b[i].value];
}
}
}
};
w.reset=function reset(){
this.currPage=1;
this.gotList=false;
this.peopleList=null;
this.peopleSelected={};
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(_e,_f){
var _10=dojo.byId(this.id+"notifyCheckbox"+_e.uuid);
if(_10){
_10.checked=_f;
}
this._setItemSelected(_e,_f);
};
w.groupChanged=function groupChanged(_11){
};
w.personSelected=function personSelected(_12,_13){
};
w._optionChanged=function _optionChanged(_14){
var _15=this.groupSelect_AP.options[this.groupSelect_AP.selectedIndex];
this.currPage=1;
this.groupChanged({name:_15.text,value:_15.value});
};
w.readySearch=function readySearch(_16){
if(dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
window.setTimeout(dojo.hitch(this,function(){
this.filterTextbox_AP.select();
}),0);
}
};
w.timedFilter=function timedFilter(_17){
dojo.removeClass(this.filterTextbox_AP,"lotusInactive");
dojo.removeClass(this.notifyList_AP,"lconnReady");
if(this.filterTimer){
window.clearTimeout(this.filterTimer);
this.filterTimer=null;
}
this.filterTimer=window.setTimeout(dojo.hitch(this,"filterNames"),this.autoFiltertime);
};
w._onBlur=function _onBlur(_18){
if(this.filterTextbox_AP.value==this.rs_filterListPrompt){
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
}
};
w.filterNames=function filterNames(_19){
if(this.peopleList&&this.filterTextbox_AP&&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(_1a){
this.peopleList=_1a;
this.showList(_1a);
};
w.showList=function showList(_1b){
this.notifyList_AP.innerHTML="";
if(_1b){
var _1c,_1d,opt,_1e,_1f,_20;
if(!dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
_20=this.filterTextbox_AP.value;
}
if(_20){
_20=dojo.regexp.escapeString(_20);
var _21=_20.replace(/\s+/g," ").split(" ");
_20="(?=.*"+_21.join(")(?=.*")+")";
_1f=new RegExp(_20,"i");
}
var _22=_1b.totalResults||_1b.names.length;
var _23=_1b.names.length;
this._currPeople={};
if(this.isSingleSelect&&this.showDefaultOption){
++_22;
if(this.currPage==1&&!_1f){
var _24=this._getDefaultPerson();
this.createOption(_24);
++_23;
}
}
for(var i=0;i<_1b.names.length;i++){
if(_1f){
var eml=_1b.names[i].email;
if(eml){
eml=eml.substring(0,eml.indexOf("@"));
}
if(!_1f.test(_1b.names[i].name)&&!_1f.test(eml)){
--_23;
continue;
}
}
if(i==0){
this.firstIndex=this.id+"notifyCheckbox"+_1b.names[i].userid;
}
this.indexingList[i]=this.id+"notifyCheckbox"+_1b.names[i].userid;
this.createOption(_1b.names[i]);
}
if(_23==0){
this.notifyList_AP.innerHTML=this.resBundle.rs_noResults;
}
dojo.addClass(this.notifyList_AP,"lconnReady");
if(_1b.hasNext||_1b.hasPrev){
this.notifyPaging_AP.innerHTML="";
var _25="";
if(_1b.startIndex&&_1b.totalResults){
var _26=_1b.startIndex;
var _27=_26+_1b.names.length-1;
_25=dojo.string.substitute(this.rs_pagepos,[_26,_27,_1b.totalResults]);
}
var _28=document.createTextNode(_25);
var _29=document.createElement("ul");
_29.id=this.id+"pagingButtons";
_29.className="lotusRight lotusInlinelist";
var _2a=document.createElement("a");
_2a.innerHTML=this.rs_navNextLabel;
_2a.href="javascript:void(0)";
_2a.onclick=dojo.hitch(this,"notifyNext");
_2a.setAttribute("role","button");
var _2b=document.createElement("li");
_2b.appendChild(_2a);
_2a=document.createElement("a");
_2a.innerHTML=this.rs_navPrevLabel;
_2a.href="javascript:void(0)";
_2a.onclick=dojo.hitch(this,"notifyPrev");
_2a.setAttribute("role","button");
var _2c=document.createElement("li");
_2c.appendChild(_2a);
if(_1b.hasPrev){
_29.appendChild(_2c);
dojo.addClass(_2c,"lotusFirst");
}
if(_1b.hasNext){
_29.appendChild(_2b);
if(!_1b.hasPrev){
dojo.addClass(_2b,"lotusFirst");
}
}
this.notifyPaging_AP.appendChild(_29);
this.notifyPaging_AP.appendChild(_28);
dojo.removeClass(this.notifyPaging_AP,"lotusHidden");
}else{
dojo.addClass(this.notifyPaging_AP,"lotusHidden");
}
this.access_AP.innerHTML=dojo.string.substitute(this.resBundle.rs_numResults,[_23,_22]);
}
if(this.isSingleSelect){
this.getCurrentSelected();
}
};
w.createOption=function createOption(_2d){
var _2e=_2d.name;
var _2f=_2d.userid;
var _30,opt,_31;
var id=_2f;
_2d.uuid=_2f;
this._currPeople[_2f]=_2d;
_30=document.createElement("div");
_30.className="lotusLeft";
if(this.isSingleSelect){
if(dojo.isIE<9){
opt=document.createElement("<input type=\"radio\" name=\"assignToGroup\" />");
}else{
opt=document.createElement("input");
}
opt.type="radio";
opt.name="assignToGroup";
}else{
_30.className="lconnNotify lotusLeft";
if(dojo.isIE<9){
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=_2f;
this.connect(opt,"onclick","setValue");
this.connect(opt,"onclick","setDirty");
_31=document.createElement("label");
_31.innerHTML=_1.enforceTextDirection(lconn.core.HTMLUtil.escapeText(_2e));
_31.htmlFor=opt.id;
_31.id=opt.id+"Label";
_31.className="lotusCheckbox";
dojo.style(_31,"position","static");
_31.title=_1.enforceTextDirection(_2e);
if(!this.isSingleSelect){
dojo.addClass(_31,"lotusLeft");
}
if(_2d.disabled){
opt.setAttribute("disabled",true);
_31.setAttribute("disabled",true);
opt.setAttribute("alwaysDisable",true);
_31.setAttribute("alwaysDisable",true);
}
_30.appendChild(opt);
_30.appendChild(_31);
this.notifyList_AP.appendChild(_30);
if(this.isSingleSelect){
dojo.create("div",{"class":"lotusClear"},this.notifyList_AP);
}
if(this.peopleSelected[_2f]){
if(_2d.disabled){
if(this.isSingleSelect){
if(this.showDefaultOption){
var _32=this._getDefaultPerson();
this.selectItem(_32,true);
this.personSelected(_32,true);
}else{
console.warn("selected item is disabled and no default selection. select state inavlid.");
}
}else{
this._doSelectPerson(_2d,false);
}
}else{
opt.checked=true;
}
}
};
w.setDirty=function setDirty(){
this.dirty=true;
};
w.setValue=function setValue(_33){
var _34;
if(this._currPeople[_33.target.value]){
_34=this._currPeople[_33.target.value];
}else{
_34={uuid:_33.target.value,name:document.getElementById(_33.target.id+"Label").innerHTML};
}
this._doSelectPerson(_34,_33.target.checked);
};
w._doSelectPerson=function _doSelectPerson(_35,_36){
this._setItemSelected(_35,_36);
this.personSelected(_35,_36);
};
w._setItemSelected=function _setItemSelected(_37,_38){
if(this.isSingleSelect){
if(this.lastPersonSelected&&this.lastPersonSelected.uuid){
delete this.peopleSelected[this.lastPersonSelected.uuid];
}
this.lastPersonSelected=_37;
this.peopleSelected[_37.uuid]=_37.name;
}else{
if(_38){
this.peopleSelected[_37.uuid]=_37.name;
}else{
delete this.peopleSelected[_37.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.cache("lconn.blogs", "templates/notification.html", "<div> <div class='lotusMessage' role='alert' id='notifyErrors' style='display:none;'></div> <form id=\"${id}_notificationForm\" name=\"${id}_notificationForm\" dojoAttachPoint=\"form\" action=\"#\" class=\"lotusForm\" role=\"application\" style=\"width:450px;\"> <input type=\"hidden\" name=\"objectid\" value=\"${objectId}\"/> <input type=\"hidden\" name=\"objecttype\" value=\"${objectType}\"/> <table width=\"100%\" class=\"lotusFormTable\" role=\"presentation\"> <tbody> <tr class=\"lotusFormFieldRow\" dojoAttachPoint=\"peoplePickerLabelTR\"> <td class=\"lotusFormField\" style=\"padding-bottom:0px;\"> <label for=\"${id}_notificationForm_typeaheadPeople\">${_lang.LABEL_TYPE_IN_A_NAME}</label> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td dojoAttachPoint=\"peoplePickerTD\" class=\"lotusFormField\"> </td> </tr> <tr class=\"lotusFormFieldRow\" name=\"notifyLabelTR\" style=\"display:none\"> <td nowrap style=\"padding-bottom:0px;\"><div><label class=\"\" for=\"${id}_notify\">${_lang.LABEL_NOTIFY}</label></div></td> </tr> <tr class=\"lotusFormFieldRow\" name=\"notifyFieldTR\" style=\"display:none\"> <td class=\"lotusFormField\"> <div data-dojo-attach-point=\"receiversWidget\" dojoType=\"lconn.blogs.notification.receivers\"></div> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td class=\"lotusFormField\" style=\"padding-bottom:0px;\"> <label for=\"${id}_notificationForm_message\">${_lang.LABEL_MESSAGE}</label> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td class=\"lotusFormField\"> <textarea id=\"${id}_notificationForm_message\" dojoAttachPoint=\"descriptionNode\" name=\"description\" rows=\"5\" style=\"width:99%\" title=\"${_lang.LABEL_MESSAGE}\" class=\"bidiAware\"></textarea> </td> </tr> </tbody> </table> </form></div>");

;if(!dojo._hasResource["lconn.blogs.notification.notificationDlg"]){
dojo._hasResource["lconn.blogs.notification.notificationDlg"]=true;
dojo.provide("lconn.blogs.notification.notificationDlg");
dojo.provide("lconn.blogs.notification.FilteringCheckbox");








dojo.requireLocalization("lconn.blogs","strings");


dojo.declare("lconn.blogs.notification.FilteringCheckbox",[lconn.core.FilteringCheckbox],{feedFunctionForFilterName:null,filterNames:function(_1){
if(this.filterTextbox_AP&&this.filterTextbox_AP.value!=this.oldTextValue&&this.filterTextbox_AP.value!=this.rs_filterListPrompt){
this.oldTextValue=this.filterTextbox_AP.value;
if(this.filterTextbox_AP.value.trim().length==0){
this.feedFunction(this.currPage,dojo.hitch(this,"parsePeople"));
}else{
this.feedFunctionForFilterName(this.currPage,this.filterTextbox_AP.value,dojo.hitch(this,"parsePeople"));
}
}
}});
dojo.declare("lconn.blogs.notification.notificationDlg",[dijit._Widget,dijit._Templated],{templateString:null,templatePath:dojo.moduleUrl("lconn.blogs","templates/notification.html"),widgetsInTemplate:true,objectId:null,objectType:null,peopleDataStore:null,isCommunity:false,isPublic:true,blogId:null,post:function(_2){
if(this.objectType=="comment"){
dojo.xhrPost({url:BlogsBaseUrl+"/roller-services/json/notifycomment",handleAs:"json",content:{"comment":this.objectId,"receivers":this.form.receivers.value,"description":this.form.description.value},load:dojo.hitch(this,function(_3){
if(_3.success){
lconn.blogs.utils.clearMessage("messageContainer");
lconn.blogs.utils.showMessage("messageContainer",this._lang.SUCC_CONFIRM_MESSAGE,"success",true);
_2();
}else{
this.showError(_3.error);
}
}),error:dojo.hitch(this,function(_4){
this.showError(_4);
})});
}
},showError:function(_5){
var _6=dojo.byId("notifyErrors");
_6.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>"+_5;
_6.style.display="";
},clearError:function(){
var _7=dojo.byId("notifyErrors");
_7.innerHTML="";
_7.style.display="none";
},dialog:null,show:function(_8){
this.dialog=lconn.core.DialogUtil.popupForm(this._lang.TITLE,this.domNode,this._lang.BUTTON_SEND,this._lang.BUTTON_CANCEL,dojo.hitch(this,function(){
this.post(dojo.hitch(this,function(){
this.close();
if(_8){
_8();
}
}));
}),dojo.hitch(this,function(){
this.close();
if(_8){
_8();
}
}));
var d=this.dialog._dialog.domNode;
dojo.query(".lotusDialogContent",d)[0].style.maxHeight="500px";
this.sendBtn=dojo.query(".submit",dojo.query(".lotusDialogFooter",d)[0])[0];
this.sendBtn.disabled=true;
dojo.addClass(this.sendBtn,"lotusBtnDisabled");
if(typeof this.peopleFilteringBoxWidget!="undefined"){
if(!this.peopleFilteringBoxWidget.gotList){
this.peopleFilteringBoxWidget.getList();
}
this.peopleFilteringBoxWidget.setDisabled(false);
}
},close:function(){
this.dialog.hide();
this.destroyRecursive();
},postMixInProperties:function(){
this._lang=dojo.i18n.getLocalization("lconn.blogs","strings").NOTIFICATION;
this._messages=dojo.i18n.getLocalization("lconn.blogs","strings");
},postCreate:function(){
var _9=new lconn.core.PeopleDataStore({queryParam:"name",url:this.peopleDataStore});
if(!this.isCommunity){
this.peopleTypeAheadWidget=new lconn.core.PeopleTypeAhead({id:this.id+"_notificationForm_typeaheadPeople",minChars:2,searchDelay:400,disableSearchDirectory:lconn.core.config.properties.LotusLive==="true",multipleValues:false,store:_9,"class":"typeAheadPeople"},dojo.create("div",{},this.peoplePickerTD));
this.peopleTypeAheadWidget.textbox.title=this._lang.LABEL_TYPE_IN_A_NAME;
this.peopleTypeAheadWidget.textbox.setAttribute("aria-label",this._lang.LABEL_TYPE_IN_A_NAME);
this.peopleTypeAheadWidget.textbox.style.width="99%";
}else{
this.peoplePickerLabelTR.style.display="none";
var _a=new lconn.blogs.TabContainer({id:this.id+"_tabContainer"});
if(this.isPublic){
var t=new lconn.blogs.TabContent({name:"Type_in_a_Name",title:this._lang.PEOPLEPICKER_TAB_TYPEINNAME});
var fb=dojo.create("div",{"class":"fieldborder"},t.containerNode);
var fc=dojo.create("div",{"class":"fieldcontent"},fb);
this.peopleTypeAheadWidget=new lconn.core.PeopleTypeAhead({id:this.id+"_notificationForm_typeaheadPeople",minChars:2,searchDelay:400,disableSearchDirectory:lconn.core.config.properties.LotusLive==="true",multipleValues:false,store:_9,"class":"typeAheadPeople"},dojo.create("div",{},fc));
this.peopleTypeAheadWidget.textbox.title=this._lang.LABEL_TYPE_IN_A_NAME;
this.peopleTypeAheadWidget.textbox.setAttribute("aria-label",this._lang.LABEL_TYPE_IN_A_NAME);
this.peopleTypeAheadWidget.textbox.style.width="50%";
_a.addTab(t);
_a.containerNode.appendChild(t.domNode);
}
var t=new lconn.blogs.TabContent({name:"Pick_from_Community",title:this._lang.PEOPLEPICKER_TAB_PICKFROMCOMMUNITY});
this.peopleFilteringBoxWidget=new lconn.blogs.notification.FilteringCheckbox();
t.containerNode.appendChild(this.peopleFilteringBoxWidget.domNode);
dojo.query("input",this.peopleFilteringBoxWidget.filterRow_AP)[0].style.width="100%";
_a.addTab(t);
_a.containerNode.appendChild(t.domNode);
_a.selectTab(this.isPublic?"Type_in_a_Name":"Pick_from_Community",true);
this.peoplePickerTD.appendChild(_a.domNode);
this.peoplePickerTD.setAttribute("id","NotificationFormEx");
}
if(typeof this.peopleFilteringBoxWidget!="undefined"){
this.peopleFilteringBoxWidget.feedFunction=dojo.hitch(this,function(_b,_c){
var _d=this.peopleFilteringBoxWidget.notifyList_AP;
dojo.xhrGet({url:BlogsBaseUrl+"/roller-services/json/container_members?blogUuid="+this.blogId+"&ps=500&offset="+(_b-1)*500,handleAs:"json",load:function(_e){
if(_e.success){
_c(_e);
}else{
_d.innerHTML="<span>"+this._lang.HINT_ERROR+" "+_e.error+"</span>";
}
},error:function(_f){
_d.innerHTML="<span>"+this._lang.HINT_ERROR+" "+this._lang.HINT_FAIL_TO_GET_MEMBERLIST+"</span>";
}});
});
this.peopleFilteringBoxWidget.feedFunctionForFilterName=dojo.hitch(this,function(_10,_11,_12){
var _13=this.peopleFilteringBoxWidget.notifyList_AP;
dojo.xhrGet({url:BlogsBaseUrl+"/roller-services/json/container_members?blogUuid="+this.blogId+"&ps=500&userName="+_11+"&offset=0&useNewAPI=1",handleAs:"json",load:function(_14){
if(_14.success){
_12(_14);
}else{
_13.innerHTML="<span>"+this._lang.HINT_ERROR+" "+_14.error+"</span>";
}
},error:function(err){
_13.innerHTML="<span>"+this._lang.HINT_ERROR+" "+this._lang.HINT_FAIL_TO_GET_MEMBERLIST+"</span>";
}});
});
this.peopleFilteringBoxWidget.filterTextbox_AP.onkeydown=function(evt){
if(!evt){
evt=window.event;
}
if(evt.keyCode==dojo.keys.ENTER){
return false;
}
};
this.peopleFilteringBoxWidget.filterTextbox_AP.onkeyup=dojo.hitch(this.peopleFilteringBoxWidget,function(evt){
this.filterNames();
});
}
this.receiversWidget.receiversContainer.setAttribute("aria-label",this._lang.LABEL_NOTIFY);
if(!this.isCommunity){
this.receiversWidget.inputBox=this.peopleTypeAheadWidget;
}else{
this.receiversWidget.inputBox=dojo.query("a",dijit.byId(this.id+"_tabContainer").domNode)[0];
}
this.receiversWidget.onChange=dojo.hitch(this,function(_15,op){
if(this.receiversWidget.receivers.length==0){
if(typeof this.sendBtn!="undefined"){
this.sendBtn.disabled=true;
dojo.addClass(this.sendBtn,"lotusBtnDisabled");
}
dojo.query("[name=\"notifyLabelTR\"]",this.domNode)[0].style.display="none";
dojo.query("[name=\"notifyFieldTR\"]",this.domNode)[0].style.display="none";
}else{
if(typeof this.sendBtn!="undefined"){
this.sendBtn.disabled=false;
dojo.removeClass(this.sendBtn,"lotusBtnDisabled");
}
dojo.query("[name=\"notifyLabelTR\"]",this.domNode)[0].style.display="";
dojo.query("[name=\"notifyFieldTR\"]",this.domNode)[0].style.display="";
}
if(typeof this.peopleFilteringBoxWidget!="undefined"){
if(_15){
if(op=="add"){
this.peopleFilteringBoxWidget.peopleSelected[_15.extid]=_15.fullname;
}else{
if(op=="remove"){
delete this.peopleFilteringBoxWidget.peopleSelected[_15.extid];
}
}
this.peopleFilteringBoxWidget.setDisabled(false);
}
}
});
if(typeof this.peopleTypeAheadWidget!="undefined"){
dojo.connect(this.peopleTypeAheadWidget,"onChange",this,function(){
var obj=this.peopleTypeAheadWidget.getItem();
if(obj){
if(obj.type!="-1"){
this.receiversWidget.add(obj.name,obj.userid);
this.peopleTypeAheadWidget.reset();
}
}
});
}
if(typeof this.peopleFilteringBoxWidget!="undefined"){
dojo.connect(this.peopleFilteringBoxWidget,"personSelected",this,function(_16,_17){
if(_16){
if(_17){
this.receiversWidget.add(_16.name,_16.uuid);
}else{
this.receiversWidget.remove(_16.uuid);
}
}
});
}
if(this.objectType=="entry"){
this.descriptionNode.value=this._lang.DEFAULT_MESSAGE1;
}else{
if(this.objectType=="idea"){
this.descriptionNode.value=this._lang.DEFAULT_MESSAGE2;
}else{
if(this.objectType=="comment"){
this.descriptionNode.value=this._lang.DEFAULT_MESSAGE3;
}
}
}
}});
}


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


;if(!dojo._hasResource["com.ibm.oneui._base"]){
dojo._hasResource["com.ibm.oneui._base"]=true;
dojo.provide("com.ibm.oneui._base");


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){


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);
}});
}


;if(!dojo._hasResource["lconn.share.widget.AbstractLikeDataStore"]){
dojo._hasResource["lconn.share.widget.AbstractLikeDataStore"]=true;
dojo.provide("lconn.share.widget.AbstractLikeDataStore");




dojo.declare("lconn.share.widget.AbstractLikeDataStore",[dojo.data.ItemFileWriteStore,com.ibm.oneui._base],{newItem:function(_1){
if(!_1["name"]){
_1["name"]=this.currentLogin.name;
}
this.recommendAction(true);
this.hasRecommended=true;
return this.inherited(arguments);
},deleteItem:function(_2,_3){
this.recommendAction(false);
this.hasRecommended=false;
return this.inherited(arguments);
},_getItemByIdentity:function(_4){
var _5=this.inherited(arguments);
if(this.hasRecommended){
return _5||this.currentLogin;
}
this.hasRecommended=!!_5;
return _5;
},_getItemsFromLoadedData:function(_6){
this.recommendationsCount=_6.totalRecommendations||_6.totalSize||0;
if(typeof _6.recommended!="undefined"){
this.hasRecommended=_6.recommended;
}
this.inherited(arguments);
},handleRecommend:function(_7,_8,_9){
if(this._request){
this._request=null;
}
if(_8 instanceof Error){
this.hasRecommended=!_7;
this._updateCount(!_7);
this.onError(_8.code);
}else{
this.hasRecommended=_7;
}
},_updateCount:function(_a){
var _b=this.recommendationsCount;
if(_a){
_b++;
}else{
_b--;
}
this.recommendationsCount=_b;
},onError:function(_c){
throw new Error("AbstractLikeDataStore: method 'onError'. Must use a subclass to override this method");
},recommendAction:function(_d){
throw new Error("AbstractLikeDataStore: method 'recommendAction'. Must use a subclass to override this method");
},loadItem:function(_e){
this.logEnter(arguments);
this.inherited(arguments);
var _f=_e.scope?_e.scope:dojo.global;
try{
if(_e.onItem&&_e.item){
_e.onItem.call(_f,_e.item);
}
}
catch(error){
if(_e.onError){
_e.onError.call(_f,error);
}
}
this.logExit(arguments);
}});
}


;if(!dojo._hasResource["lconn.blogs.recommend.CommentRecommendDataStore"]){
dojo._hasResource["lconn.blogs.recommend.CommentRecommendDataStore"]=true;
dojo.provide("lconn.blogs.recommend.CommentRecommendDataStore");


dojo.declare("lconn.blogs.recommend.CommentRecommendDataStore",[lconn.share.widget.AbstractLikeDataStore],{itemId:null,dirty:false,fetch:function(_1){
var _2=(_1.scope)?_1.scope:dojo.global;
_1.onBegin.call(_2,this.recommendationsCount,_1);
_1.onComplete.call(_2,null,_1);
},newItem:function(_3){
if(!_3["name"]){
_3["name"]=this.currentLogin.name;
}
this.dirty=true;
this.recommendAction(true);
this.hasRecommended=true;
return this.popupDataStore.newItem(_3);
},deleteItem:function(_4,_5){
this.dirty=true;
this.recommendAction(false);
this.hasRecommended=false;
this.popupDataStore.fetchItemByIdentity({identity:_4.id,onItem:dojo.hitch(this.popupDataStore,"deleteItem")});
return true;
},save:function(_6){
this.popupDataStore.save(_6);
this.dirty=false;
},isDirty:function(){
return this.dirty;
},recommendAction:function(_7){
this._updateCount(_7);
},fetchItemByIdentity:function(_8){
var _9=[];
if(this.hasRecommended){
_9=[{id:currentLogin.extid,name:currentLogin.name}];
}
window.setTimeout(function(){
_8.onItem.apply(_8.scope||dojo.global,_9);
},10);
},_getIdentifierAttribute:function(){
return "id";
}});
}


;if(!dojo._hasResource["lconn.blogs.recommend.CommentRecommendPopupDataStore"]){
dojo._hasResource["lconn.blogs.recommend.CommentRecommendPopupDataStore"]=true;
dojo.provide("lconn.blogs.recommend.CommentRecommendPopupDataStore");


dojo.declare("lconn.blogs.recommend.CommentRecommendPopupDataStore",[lconn.share.widget.AbstractLikeDataStore],{itemId:null,recommendAction:function(_1){
if(this._request){
return;
}
this._updateCount(_1);
var d=new dojo.Deferred();
if(!_1){
if(!currentLogin.auth){
return;
}
var _2={action:"remove",commentid:this.itemId,version:400,rating:5,dangerousurlnonce:window.__security_nonce};
var _3={url:BlogsBaseUrl+"/roller-services/json/rating",handleAs:"json",content:_2,handle:dojo.hitch(this,this.handleRecommend,_1,d)};
dojo.xhrPost(_3).addCallback(dojo.hitch(this,function callBack(){
console.log("Unrecommend");
}));
}else{
if(!currentLogin.auth){
return;
}
var _2={action:"add",commentid:this.itemId,version:400,rating:5,dangerousurlnonce:window.__security_nonce};
var _3={url:BlogsBaseUrl+"/roller-services/json/rating",handleAs:"json",content:_2,handle:dojo.hitch(this,this.handleRecommend,_1,d)};
dojo.xhrPost(_3).addCallback(dojo.hitch(this,function callBack(){
console.log("recommend");
}));
}
return d;
}});
}

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

;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 dojoAttachPoint=\"documentWrapper\"> <a dojoAttachPoint=\"closeNode\" class=\"lotusPopupClose\" href=\"#\" dojoAttachEvent=\"click:clickClose\" role=\"button\" title=\"${messages.close}\" role=\"button\" aria-label=\"Close\"><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");




(function(){


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){
if(dojo._isBodyLtr()){
dojo.addClass(_2c,_41?"lotusPopupRight":"lotusPopupLeft");
}else{
dojo.addClass(_2c,_41?"lotusPopupLeft":"lotusPopupRight");
}
}
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=_3f.overflow;
if(_38){
_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;
var _5a=this.documentWrapper;
_59.id=_57.id+"_popup";
if(!this._showing.dialogLabelledBy){
dijit.setWaiState(_59,"label",_57.dialogTitle!==null?_57.dialogTitle:_57.title||"");
if(_5a){
dijit.setWaiState(_5a,"label",_57.dialogTitle!==null?_57.dialogTitle:_57.title||"");
}
}
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(dojo.config.isDebug){
console.error(e);
}
}
},hide:function(){
for(var i=0;i<_53.length;i++){
if(_53[i]==this){
var _5b=_53[i+1];
if(_5b&&_5b._showing){
_5b._showing.close();
}
_53.pop();
}
}
var _5c=this.domNode.style;
_5c.cssText="";
_5c.display="none";
this.arrow.style.cssText="";
this.contentWrapper.style.cssText="";
var _5d=this.wrapper;
dijit.setWaiState(_5d,"hidden","true");
if(!this._showing.dialogLabelledBy){
dijit.setWaiState(_5d,"label","");
}
dojo.removeClass(_5d,["lotusPopupLeft","lotusPopupRight","lotusPopupBottom"]);
if(this._showing&&this._showing.customClass){
dojo.removeClass(_5d,this._showing.customClass);
}
this._showing=null;
},setContent:function(_5e){
if(this.content.firstChild){
this.content.replaceChild(_5e,this.content.firstChild);
}else{
this.content.appendChild(_5e);
}
},clickClose:function(_5f){
if(this._showing){
this._showing.clickClose(_5f);
}
}});
com.ibm.oneui.controls.internal._getPopupForNode=function(_60){
for(var i=0,l=_53.length;i<l;i++){
var _61=_53[i];
if(dojo.isDescendant(_60,_61.domNode)){
return _61._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.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");




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;
}});
})();
}

dojo.provide("com.ibm.oneui.recommend.nls.Recommender")._built=true;
dojo.provide("com.ibm.oneui.recommend.nls.Recommender.en");
com.ibm.oneui.recommend.nls.Recommender.en={"POPUP":{"RECOMMENDED_HEADER_SHOWING_ALL":"People who like this...","RECOMMENDED_ME_ONE":{"TOOLTIP":"Unlike","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","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"},"RECOMMENDED_ME_ONLY":{"TOOLTIP":"Unlike","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","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"},"RECOMMENDED_NOTME_ONE":{"TOOLTIP":"Like this","READONLYTEXT":"","TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e"},"RECOMMENDED_ME_MANY":{"TOOLTIP":"Unlike","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","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"},"RECOMMENDED_CLOSE_TITLE":"Close list of people who like this.","RECOMMENDED_NOTME_MANY":{"TOOLTIP":"Like this","READONLYTEXT":"","TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e"},"RECOMMENDED_HEADER_SHOWING_SOME":"People who like this... (sorted by name)"},"LOADING":"Loading...","INLINE":{"RECOMMENDED_BYNONE":{"TOOLTIP":"0 people like this","READONLYTEXT":"${recommendCount}","TEXT":"${recommendCount}"},"RECOMMENDED_BYMANY":{"TOOLTIP":"${recommendCount} people like this","READONLYTEXT":"${recommendCount}","TEXT":"${recommendCount}"},"RECOMMENDED_BYONE":{"TOOLTIP":"1 person likes this","READONLYTEXT":"${recommendCount}","TEXT":"${recommendCount}"},"UNRECOMMENDED":{"TOOLTIP":"Like this","READONLYTEXT":"","TEXT":"\x3ca class=\'lotusLikeAction\' role=\'button\' href=\'javascript:;\' id=\'TOGGLE_${id}\'\x3eLike\x3c/a\x3e"},"RECOMMENDED":{"TOOLTIP":"Unlike","READONLYTEXT":"\x3cspan class=\'lotusLikeDescription\'\x3eYou like this\x3c/span\x3e","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"}},"ERROR":{"RECOMMEND_LOAD_FAILED":"This item has been deleted or is no longer visible.","TITLE":"Alert"},"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.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){


}




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\"> <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");










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],{orient:{"TR":"TL","TL":"TR","BR":"BL","BL":"BR"},orientRTL:{"TL":"TR","TR":"TL","BL":"BR","BR":"BL"},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;
},onError:function(){
lconn.core.DialogUtil.alert(this._getStringResource("ERROR.TITLE"),this._getStringResource("ERROR.RECOMMEND_LOAD_FAILED"));
},_clickAround:function(e){
var _2=this;
setTimeout(function(){
_2.containerNode=_2._getDomNode();
_2.openWithFocus(_2._determineTarget(e.target));
},100);
},openWithFocus:function(_3){
var _4=new dojo.Deferred();
var _5=arguments;
var _6=this;
var _7=this._getMasterPopup();
var _8=_7.domNode;
var _9=dojo.create("a",{role:"button",className:"backTopHidden",href:"javascript:;","aria-hidden":"true"},_8);
dojo.style(_9,{top:"-9999px",position:"absolute"});
dojo.connect(_9,"onfocus",this,"backToTop");
_4.addCallback(function(){
_6.inherited(_5);
});
dojo.publish("com/ibm/oneui/recommend/popup/onOpen",[_6]);
this.populateRecommend(_4);
this.focusFirstLink(this.content);
},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});
}
this.logExit(arguments);
},postCreate:function(){
this.logEnter(arguments);
this.inherited(arguments);
var _a=this._getMasterPopup();
if(_a){
dojo.requireLocalization("lconn.core","strings");
this.commonStrings=dojo.i18n.getLocalization("lconn.core","strings");
dojo.attr(_a.closeNode,{"title":this._getStringResource("rs_close","",this.commonStrings),"aria-label":this._getStringResource("rs_close","",this.commonStrings)});
}
this.logExit(arguments);
},backToTop:function(e){
this.focusFirstLink();
return;
},focusFirstLink:function(el){
var _b=dojo.query("a",el?el:this.domNode);
var _c=[];
dojo.forEach(_b,function(_d,i){
if(dojo.style(_d,"display")!=="none"&&!dojo.hasClass(_d,"lotusAltText")&&!dojo.hasClass(_d,"backTopHidden")&&dojo.hasClass(_d,"fn")&&dojo.hasClass(_d,"url")){
_c.push(_d);
}
});
var _e=null;
if(_c.length>0){
_e=_c[0];
dijit.focus(_e);
}else{
var _f=this._getMasterPopup();
_e=_f.closeNode;
dijit.focus(_e);
}
this._firstFocusItem=_e;
},position:function(){
this.inherited(arguments);
var _10=this._getMasterPopup();
if(_10){
var _11=_10.domNode;
var _12=this.id+"__popupHeaderCountMessage";
_11.children[0].setAttribute("aria-labelledby",_12);
var pos=dojo.position(_11,true);
var _13=pos.x-5;
if(_13<0){
_13=0;
}
dojo.style(_11,"left",_13+"px");
}
},_isPopulateLoaded:false,_editableLink:null,populateRecommend:function(dfd){
this.logEnter(arguments);
if(!this._isPopulateLoaded){
var _14=this;
var ds=this._getStateObject().store.data;
var _15=function(nam){
return dojo.byId(_14.id+"__"+nam);
};
var _16=function(_17){
if(_14._getRecommend()){
try{
var _18=ds._getIdentifierAttribute();
var _19=ds.getValue(_17,_18,null);
}
catch(ee){
}
}
if(_17._node_&&_17._node_[0]){
var _1a=_17._node_[0];
dojo.place(_14.createPersonNode(_17),_1a,"last");
}
};
var _1b=function(_1c){
ds.revert();
_14._onError({code:_14.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom},_1c);
};
var _1d=function(_1e,_1f){
for(var i=0;i<_1e.length;i++){
if(_1e[i].userId==_1f){
var cu=_1e.splice(i,1);
_1e.unshift(cu[0]);
break;
}
}
return (_1e);
};
var _20=function(_21){
if(dfd){
dfd.callback();
}
_21=_1d(_21,_14.currentUserId);
var _22=_15("recommendMessage");
var _23=_15("recommendNames");
var _24=_15("popupLikeCount");
var _25=_15("popupSmiley");
var _26=_15("inlineSmiley");
if(_14.showActions==false){
if(_22!=null){
dojo.destroy(_22);
}
_22=null;
if(_25!=null){
dojo.destroy(_25);
}
_25=null;
}
var _27=_15("popupHeaderCountMessage");
dojo.publish("p_likeSizeUpdate",[_14]);
var _28=_14.size;
if(_28<0){
_28=_21.length;
}
if(_28==0&&_25!=null){
var _29=dojo.attr(_25,"class");
dojo.attr(_25,"class",_29+" lotusNoLikes");
}else{
if(_25!=null){
var _29=dojo.attr(_25,"class");
dojo.attr(_25,"class",_29.replace("lotusNoLikes",""));
}
}
var _2a=lconn.core.config.features("ui-heart-like-hikari");
if(_2a&&lconn.core.theme.isHikariTheme()){
var _29=dojo.attr(_26,"class");
dojo.attr(_26,"class",_29+" ui-heart-like-hikari");
if(_14._getRecommend()){
dojo.style(_26,"background-position","-1454px -8px");
}else{
dojo.style(_26,"background-position","-1437px -8px");
}
}
var str="POPUP.";
if(_28<=0){
str+="RECOMMENDED_NOTME_MANY";
}else{
if(_14._getRecommend()){
if(_28==1){
str+="RECOMMENDED_ME_ONLY";
}else{
if(_28==2){
str+="RECOMMENDED_ME_ONE";
}else{
str+="RECOMMENDED_ME_MANY";
}
}
}else{
if(_28==1){
str+="RECOMMENDED_NOTME_ONE";
}else{
str+="RECOMMENDED_NOTME_MANY";
}
}
}
var _2b={recommendCount:_28,numshown:_14.count,total:_28,id:_14.id};
var _2c="";
if(_14.showActions){
_2c=_14._getStringResource(str+".TOOLTIP");
_2c=dojo.string.substitute(_2c,_2b);
}
var _2d=_14._getStringResource(str+".TEXT");
_2d=dojo.string.substitute(_2d,_2b);
if(_22!=null&&_14.showActions!==false){
dojo.html.set(_22,_2d);
_14.containerNode.children[0].setAttribute("aria-labelledby",_22.id);
}
var _2e=(_28==0)?"&nbsp;":_28.toString();
if(_24!=null){
dojo.html.set(_24,_2e);
}
var _2f="INLINE.RECOMMENDED_";
if(_28==0){
_2f+="BYNONE";
}else{
if(_28==1){
_2f+="BYONE";
}else{
_2f+="BYMANY";
}
}
_2f+=".TOOLTIP";
var _30=dojo.string.substitute(_14._getStringResource(_2f),_2b);
var _31=dojo.byId("TOGGLE_"+_14.id);
if(_31!=null){
dojo.attr(_31,{"title":_30,"aria-label":_30});
}
if(_25!=null){
dojo.attr(_25,{title:_30,alt:_30});
}
if(_14.showActions==false){
if(_22!=null){
dojo.destroy(_22);
}
_22=null;
}
var _32="";
if(_28>_14.count){
}else{
_32=_14._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_ALL");
}
if(_14.showActions==true){
_32="";
}
_32=dojo.string.substitute(_32,_2b);
dojo.html.set(_27,_32);
dojo.attr(_27,"role","presentation");
var _31=dojo.byId("TOGGLE_"+_14.id);
if(_31==null){
_31=dojo.byId("TOGGLE_["+_14.id+"]");
}
if(_31){
dojo.attr(_31,"title",_2c);
_14._connect(_31,"onclick",_14,"_toggleRecommend");
}
dojo.empty(_23);
for(var ii=0;ii<_21.length;ii++){
if(_14.count==ii){
break;
}
_21[ii].id=_21[ii].id||ds.getValue(_21[ii],ds._getIdentifierAttribute(),null);
if(ds._getNameAttribute){
_21[ii].name=_21[ii].name||ds.getValue(_21[ii],ds._getNameAttribute(),null);
}
if(ds._getUserStateAttribute){
_21[ii].userState=_21[ii].userState||ds.getValue(_21[ii],ds._getUserStateAttribute(),null);
}
_21[ii]._node_=[dojo.create("li",{id:_23.id+"__"+ii})];
dojo.place(_21[ii]._node_[0],_23,"last");
}
if(_21.length==0){
var _33=dojo.create("li",{id:_23.id+"__"+"0"});
dojo.html.set(_33,_14._getStringResource("INLINE.RECOMMENDED_BYNONE.TOOLTIP"));
dojo.place(_33,_23,"last");
}
dojo.forEach(_21,function(_34,idx){
if(ds.isItem(_34)){
if(ds.isItemLoaded(_34)){
_16(_34);
}else{
ds.loadItem({item:_34,onItem:function(_35){
_16(_35);
}});
}
}else{
_14._onError({code:_14.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom});
}
});
var _36=_14._getMasterPopup();
if(_36){
var _37=_36.domNode;
dojo.style(_37,"zIndex",800);
dijit.byId(_36.closeNode).focus();
}
_31=dojo.byId("TOGGLE_"+_14.id);
if(_31!=null&&_14.toggleFocus){
_31.focus();
}
};
var el=_15("recommendMessage");
if(el!=null&&_14.showActions!==false){
dojo.html.set(el,_14._getStringResource("LOADING"));
}
var _38=function(_39,req){
_14.size=_39;
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_3a){
_14._currentUserItem=_3a;
_14._setRecommend((_3a!=null),function(){
ds.fetch({onBegin:_38,onComplete:_20,onError:_1b,count:_14.count});
});
},onError:function(){
if(_14.onError&&dojo.isFunction(_14.onError)){
_14.onError.apply(_14,arguments);
}
}});
}else{
}
}
this.logExit(arguments);
},createPersonNode:function(_3b){
this.logEnter(arguments);
var _3c=dijit.byId(_3b.id);
if(_3c!=null){
_3c.destroy();
}
_3c=new com.ibm.oneui.recommend.internal.PersonNode(_3b);
this._getStateObject().widgets.push(_3c);
this.logExit(arguments);
return _3c.domNode;
},createContents:function(tip){
this.logEnter(arguments);
var _3d=this;
var _3e=new com.ibm.oneui.recommend.internal.PopupContents({currentUserId:this.currentUserId,width:this.popupWidth});
this.popupLikeNamesNode=_3e.recommendNames;
var _3f="dojoattachpoint";
dojo.query("*["+_3f+"!='']",_3e.domNode).forEach(function(_40,idx,arr){
if((!_40.id||_40.id.length==0)&&dojo.hasAttr(_40,_3f)){
dojo.attr(_40,"id",_3d.id+"__"+dojo.attr(_40,_3f));
dojo.removeAttr(_40,_3f);
}
});
this._getStateObject().widgets.push(_3e);
this.logExit(arguments);
return _3e.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(){
this.inherited(arguments);
dojo.requireLocalization("com.ibm.oneui.recommend","Recommender");
this.strings=dojo.i18n.getLocalization("com.ibm.oneui.recommend","Recommender");
}});
})();
}


;dojo.cache("com.ibm.oneui", "recommend/templates/Inline.html", "<div class=\"lotusLike\" role=\"presentation\"> <a class=\"lotusLikeCount\" dojoAttachPoint=\"inlineLaunchPopup\" href=\"javascript:;\" role=\"button\" aria-haspopup=\"true\"> <img dojoAttachPoint=\"inlineSmiley\" class=\"lotusIconLike\" src=\"${_blankGif}\" alt=\"\" title=\"\"/> <span class=\"lotusAltText\" dojoAttachPoint=\"likeAltAP\"></span> <div dojoAttachPoint=\"inlineLikeCount\" class=\"lotusLikeText\" role=\"presentation\">&nbsp;</div> <div class=\"lotusLikeConnector lotusHidden\"></div> </a> <span role=\"presentation\" 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.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,likeSizeSubHandle:null,disableBackground:false,disablePopup:false,destroy:function(){
this.logEnter(arguments);
this.inherited(arguments);
if(this.likeSizeSubHandle){
dojo.unsubscribe(this.likeSizeSubHandle);
}
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.likeSizeSubHandle=dojo.subscribe("p_likeSizeUpdate",this,"updateSizeInline");
this.populateRecommend();
this.logExit(arguments);
},_isPopupDirty:false,updateSizeInline:function(_2){
if(this._popup&&_2&&_2.id==this._popup.id){
var _3=_2.size;
var _4=_2.dataStore.id;
if(typeof (_4)!="undefined"&&_4!=this.dataStore.id){
return;
}
if(this.inlineLikeCount!=null){
dojo.empty(this.inlineLikeCount);
}
var _5={recommendCount:_3,id:this.id};
var _6="INLINE.";
var _7=".TEXT";
if(!this.editable){
_7=".READONLYTEXT";
}
var _6="INLINE.";
if(_3==0){
_6+="RECOMMENDED_BYNONE";
}else{
if(_3==1){
_6+="RECOMMENDED_BYONE";
}else{
_6+="RECOMMENDED_BYMANY";
}
}
var _8=dojo.string.substitute(this._getStringResource(_6+_7),_5);
var _9=dojo.body();
if(!this.disablePopup){
dojo.attr(this.inlineLaunchPopup,"href","javascript:;");
dojo.attr(this.inlineLaunchPopup,"role","button");
dojo.attr(this.inlineLaunchPopup,"aria-haspopup","true");
}
if(_3>0){
if(this.inlineLikeCount!=null){
dojo.html.set(this.inlineLikeCount,_8);
if(!this.disablePopup){
dojo.attr(this.inlineLaunchPopup,"class","lotusLikeCount");
}else{
dojo.attr(this.inlineLaunchPopup,"class","lotusLikeCount lotusDisabled");
}
}
}else{
if(dojo.hasClass(_9,"dijit_a11y")){
dojo.html.set(this.inlineLikeCount,_8);
}else{
dojo.html.set(this.inlineLikeCount,"&nbsp;");
}
}
if(dojo.hasClass(_9,"dijit_a11y")){
this.inlineLikeCount.innerHTML="";
}
}
},populateRecommend:function(){
var _a=this;
dojo.addClass(_a.domNode,"inlineLoading");
var ds=this._getStateObject().store.data;
var _b=function(_c,_d){
_a.size=_c;
};
var _e=function(){
dojo.removeClass(_a.domNode,"inlineLoading");
if(_a.inlineLikeActions!=null){
dojo.empty(_a.inlineLikeActions);
}
if(_a.inlineLikeCount!=null){
dojo.empty(_a.inlineLikeCount);
}
var _f="INLINE.";
var _10=".TEXT";
if(!_a.editable){
_10=".READONLYTEXT";
}
if(_a._getRecommend()){
_f+="RECOMMENDED";
}else{
_f+="UNRECOMMENDED";
}
var _11=_a.size;
if(_a.prev_iNumNames==undefined){
_a.prev_iNumNames=0;
}else{
_a.prev_iNumNames=_11;
}
if(_11==0||_a.disablePopup){
dojo.removeAttr(_a.inlineLaunchPopup,"href");
dojo.removeAttr(_a.inlineLaunchPopup,"role");
dojo.removeAttr(_a.inlineLaunchPopup,"title");
dojo.removeAttr(_a.inlineLaunchPopup,"aria-haspopup");
dojo.removeAttr(_a.inlineLaunchPopup,"aria-label");
var _12="";
if(_a.disableBackground){
_12="lconnLikeCountNoBackground lotusDisabled";
}else{
_12="lotusLikeCount lotusDisabled";
}
dojo.attr(_a.inlineLaunchPopup,"class",_12);
}else{
if(_a.prev_iNumNames==0){
dojo.attr(_a.inlineLaunchPopup,"aria-haspopup",true);
}
}
var _13={recommendCount:_11,id:_a.id};
var _14=dojo.string.substitute(_a._getStringResource(_f+_10),_13);
if(_a.inlineLikeActions!=null&&_a.currentUserId!=null){
dojo.html.set(_a.inlineLikeActions,_14);
}
var _15=dojo.string.substitute(_a._getStringResource(_f+".TOOLTIP"),_13);
var _16=dojo.byId("TOGGLE_"+_a.id);
if(_16!=null){
dojo.attr(_16,{"aria-label":_15});
}
_f="INLINE.";
if(_11==0){
_f+="RECOMMENDED_BYNONE";
}else{
if(_11==1){
_f+="RECOMMENDED_BYONE";
}else{
_f+="RECOMMENDED_BYMANY";
}
}
var _15=dojo.string.substitute(_a._getStringResource(_f+".TOOLTIP"),_13);
dojo.attr(_a.inlineLaunchPopup,{"title":_15});
dojo.attr(_a.inlineSmiley,"alt","");
dojo.attr(_a.inlineSmiley,"title",_15);
var _17=lconn.core.config.features("ui-heart-like-hikari");
if(_17&&lconn.core.theme.isHikariTheme()){
if(_a._getRecommend()){
dojo.style(_a.inlineSmiley,"background-position","-1418px -8px");
}else{
dojo.style(_a.inlineSmiley,"background-position","-1395px -8px");
}
}
_14=dojo.string.substitute(_a._getStringResource(_f+_10),_13);
var _18=dojo.body();
if(!_a.disablePopup){
dojo.attr(_a.inlineLaunchPopup,"href","javascript:;");
dojo.attr(_a.inlineLaunchPopup,"role","button");
dojo.attr(_a.inlineLaunchPopup,"aria-haspopup","true");
}
if(_11>0){
if(_a.inlineLikeCount!=null){
dojo.html.set(_a.inlineLikeCount,_14);
if(!this._disablePopup){
dojo.attr(_a.inlineLaunchPopup,"class","lotusLikeCount");
}else{
dojo.attr(_a.inlineLaunchPopup,"class","lotusLikeCount lotusDisabled");
}
}
}else{
if(dojo.hasClass(_18,"dijit_a11y")){
dojo.html.set(_a.inlineLikeCount,_14);
}else{
dojo.html.set(_a.inlineLikeCount,"&nbsp;");
}
}
if(dojo.hasClass(_18,"dijit_a11y")){
_a.inlineLikeCount.innerHTML="";
}
_a.likeAltAP.innerHTML=_15;
var _16=dojo.byId("TOGGLE_"+_a.id);
if(_16==null){
_16=dojo.byId("TOGGLE_["+_a.id+"]");
}
if(_16){
_a._connect(_16,"onclick",_a,"_toggleRecommend");
}
_16=_a.inlineLaunchPopup;
if(_16&&!_a.disablePopup){


var _19=_a._getStateObject();
var _1a=_a._getPopup(_16,_19,_13);
_a.connect(_1a,"onError",_a,"onError");
_a.connect(_1a,"_toggleRecommend",function(){
_a._isPopupDirty=_a._getRecommend()!=_1a._getRecommend();
});
_a.connect(_1a,"onClose",function(){
if(_a._isPopupDirty){
setTimeout(function(){
_a.populateRecommend();
_a._isPopupDirty=false;
},100);
}
});
_19.widgets.push(_1a);
}
_16=dojo.byId("TOGGLE_"+_a.id);
if(_16!=null&&_a.toggleFocus){
_16.focus();
}
if(_a.disablePopup){
dojo.attr(_a.inlineLaunchPopup,"class","lotusLikeCount lotusDisabled");
}
dojo.publish("com/ibm/oneui/recommend/inline/likeActionComplete",{recommendationsNode:_a.domNode});
};
var _1b=function(){
ds.revert();
this._onError(arguments[0]);
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_1c){
_a._currentUserItem=_1c;
_a._setRecommend((_1c!=null),function(){
ds.fetch({onBegin:_b,onComplete:_e,onError:_1b,count:_a.count});
});
}});
}else{
}
this.logExit(arguments);
},_getPopup:function(_1d,_1e,_1f){
return this.getPopup({debug:this.debug,editable:this.editable,around:_1d,currentUserId:this.currentUserId,dataStore:_1e.store.data,showActions:false});
},getPopup:function(_20){
if(this._popup==null){
this._popup=new com.ibm.oneui.recommend.Popup(_20);
}
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.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==""){
_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);
}
}});
})();
}


;if(!dojo._hasResource["lconn.blogs.comment.Comment"]){
dojo._hasResource["lconn.blogs.comment.Comment"]=true;
dojo.provide("lconn.blogs.comment.Comment");






















dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.comment.Comment",[dijit._Widget,dijit._Templated],{templatePath:document.body.className.indexOf("minimal")>=0?dojo.moduleUrl("lconn.blogs","comment/templates/CommentMinimal.html"):dojo.moduleUrl("lconn.blogs","comment/templates/Comment.html"),modeMinimal:document.body.className.indexOf("minimal")>=0,nls:null,index:0,commentObj:{},mode:"threaded",isFirst:false,panel:null,maxLevel:-1,indentValue:20,indentLimit:5,maxReplyCount:3,blankGif:"",moreActoinsMenu:null,showMoreAction:null,postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.blogs","strings");
dojo.mixin(this,this.nls.COMMENT);
if(!!this.commentObj.thread){
dojo.publish("lconn.blogs.comment.event.thread.replycount.updated",[this.commentObj.thread.id,this.commentObj.thread.replycount]);
}
if(this.mode=="byDate"&&typeof this.commentObj.thread!="undefined"){
if(this.commentObj.thread.replycount!=1){
this.RS_View_Full_Thread=dojo.string.substitute(this.RS_View_Full_Thread,[this.commentObj.thread.replycount]);
}else{
this.RS_View_Full_Thread=this.RS_View_Full_Thread_Single;
}
this.subscribe("lconn.blogs.comment.event.thread.replycount.updated",dojo.hitch(this,"onReplyCountUpdatedOnThread"));
}
if(this.commentObj.replycount!=0||this.commentObj.level>0){
this.RS_Link_Comment=this.RS_Link_Thread;
this.RS_Link_Comment_Title=this.RS_Link_Thread_Title;
}
this.blankGif=dijit._Widget.prototype._blankGif;
},postCreate:function(){
this.inherited(arguments);
this.render();
this.parseVcard();
this.subscribe("lconn.blogs.comment.event.delete",dojo.hitch(this,"reIndexOnDeletion"));
},parseVcard:function(){
try{
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.commentAP);
}
}
catch(err){
}
},render:function(){
if(this.isFirst){
this.commentAP.style.borderTop="none";
}
var _1=(this.maxLevel!=-1)&&(this.commentObj.level>this.maxLevel-1)?this.maxLevel-1:this.commentObj.level;
if(this.mode=="threaded"||this.mode=="singleThread"){
if(_1>this.indentLimit){
_1=this.indentLimit+(_1-this.indentLimit)/3;
}
this.commentAP.style.marginLeft=this.indentValue*_1+"px";
}
this.authorPhotoAP.src=lconn.blogs.utils.getUserPhotoUrl(this.commentObj.user.extid);
this.renderCommentIndex();
this.commentInfoAP.innerHTML=this.getCommentMetaString(this.commentObj);
if(dojo.trim(this.commentObj.url).length!=0){
this.commentTrackbackAP.appendChild(dojo.create("a",{"title":this.RS_Trackback_Title,"href":this.commentObj.url,"innerHTML":this.RS_Trackback}));
}else{
dojo.destroy(this.commentTrackbackAP);
}
if(typeof this.commentObj.timestamp!="undefined"){
dojo.attr(this.domNode,{id:"comment-"+this.commentObj.timestamp+"-"+this.mode,_commentid:this.commentObj.id});
}
if(!this.modeMinimal){
this.createLikeControl();
}
if((this.mode=="threaded"||this.mode=="singleThread")&&this.commentObj.level>0){
dojo.attr(this.commentAP,{"threadid":this.commentObj.threadid});
}
if(this.commentObj.status==1&&!this.commentObj.quarantined){
var _2=document.createElement("span");
if(lconn.core.globalization.api.isBidiEnabled()){
_2.innerHTML=lconn.core.globalization.bidiUtil.enforceTextDirectionMultiLine(this.commentObj.content,"AT_USER");
}else{
_2.innerHTML=this.commentObj.content;
}
this.commentContentAP.innerHTML="";
this.commentContentAP.appendChild(_2);
}else{
if(this.commentObj.status!=1){
this.commentAP.innerHTML=this.getDeletedContent();
return;
}else{
if(this.commentObj.quarantined){
this.commentAP.innerHTML=this.getQuarantinedContent();
return;
}
}
}
if(this.mode=="byDate"){
if(typeof this.commentObj.replyto!="undefined"){
this.replyInfoAP.innerHTML=this.getCommentMetaString(this.commentObj.replyto);
if(dojo.trim(this.commentObj.replyto.url).length!=0){
this.replyTrackbackAP.appendChild(dojo.create("a",{"title":this.RS_Trackback_Title,"href":this.commentObj.replyto.url,"innerHTML":this.RS_Trackback}));
}else{
dojo.destroy(this.replyTrackbackAP);
}
if(this.commentObj.replyto.status==1&&!this.commentObj.replyto.quarantined){
this.replyCotentAP.innerHTML=this.commentObj.replyto.content;
this.replyCotentSummaryAP.innerHTML=this.commentObj.replyto.summary;
if(this.replyCotentAP.innerHTML.length==this.replyCotentSummaryAP.innerHTML.length){
dojo.destroy(this.showMoreActionAP);
}
}else{
if(this.commentObj.replyto.status!=1){
this.replyCotentSummaryAP.innerHTML=this.getDeletedContent();
dojo.destroy(this.commentReplyActionsAP);
dojo.destroy(this.showMoreActionAP);
}else{
if(this.commentObj.replyto.quarantined){
this.replyCotentSummaryAP.innerHTML=this.getQuarantinedContent();
dojo.destroy(this.commentReplyActionsAP);
dojo.destroy(this.showMoreActionAP);
}
}
}
this.commentReplyAP.style.display="";
}else{
dojo.destroy(this.commentReplyAP);
}
}
if(!this.modeMinimal){
var _3={actions:[],showMenu:false};
var _4=false;
_3.actions.push({action:"link",inMenu:false});
if(this.panel.allowComment&&currentLogin.auth){
_3.actions.push({action:"reply",inMenu:false});
}
if(currentLogin.auth){
_3.actions.push({action:"notify",inMenu:true});
_4=true;
}
if(this.commentObj.permission.canEdit){
_3.actions.push({action:"edit",inMenu:true});
_4=true;
}
if(this.commentObj.permission.canDelete){
_3.actions.push({action:"delete",inMenu:true});
_4=true;
}
if(this.panel.commentFlagEnabled&&currentLogin.auth){
_3.actions.push({action:"flag",inMenu:true});
_4=true;
}
_3.showMenu=_4;
this.renderActionList(_3,this.commentActionsAP);
}
var _5="";
if(this.commentObj.level>0){
_5=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.threadid;
}else{
_5=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.id;
}
dojo.attr(this.toThreadActionAP,{"href":_5});
if(this.modeMinimal){
this.applyMinimalChanges();
}
},applyMinimalChanges:function(){
var _6="";
if(this.commentObj.level>0){
_6=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.threadid;
}else{
_6=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.id;
}
a=dojo.create("a",{"href":_6,"class":"lotusAction","role":"button","title":this.RS_Link_Comment_Title,"aria-label":this.RS_Link_Comment_Title,"innerHTML":this.RS_Link_Comment,"id":"link-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"toThread"));
this.permalinkAP.appendChild(a);
},createLikeControl:function(){
var _7=this.getRecommendationsDataStore(this.commentObj);
var _8=this.getPopupDataStore(this.commentObj);
_7.popupDataStore=_8;
this.likeControl=new com.ibm.oneui.controls.Like({editable:(currentLogin.auth&&this.commentObj.permission.canLike)?true:false,loadIndividualStyles:false,currentUserId:currentLogin.auth?currentLogin.extid:null,dataStore:_7,popupDataStore:_8,getUserPhotoUrl:dojo.hitch(lconn.blogs.utils,"getUserPhotoUrl"),getUserProfileUrl:dojo.hitch(lconn.blogs.utils,"getUserProfileUrl")},this.commentLikeAP);
},getRecommendationsDataStore:function(_9){
var _a=currentLogin.auth?currentLogin.extid:null;
var _b={id:_a,identifier:"id"};
var _c=new lconn.blogs.recommend.CommentRecommendDataStore({currentLogin:currentLogin,data:_b,itemId:_9.id,recommendationsCount:_9.ratingcount,hasRecommended:_9.currentUserLiking});
_c.nls=_c._strings=this.nls.RECOMMEND_COMMENT;
_c.url=BlogsBaseUrl+"/roller-services/json/rating?version=400&commentid="+_9.id;
return _c;
},getPopupDataStore:function(_d){
var _e=currentLogin.auth?currentLogin.extid:null;
var _f={id:_e,identifier:"id"};
var _10=new lconn.blogs.recommend.CommentRecommendPopupDataStore({currentLogin:currentLogin,data:_f,itemId:_d.id,recommendationsCount:_d.ratingcount,hasRecommended:_d.currentUserLiking});
_10.nls=_10._strings=this.nls.RECOMMEND_COMMENT;
_10.url=BlogsBaseUrl+"/roller-services/json/rating?version=400&commentid="+_d.id;
return _10;
},getCommentMetaString:function(_11){
var _12=dojo.create("div");
var _13=lconn.blogs.utils.getVcard(_11.user);
_12.appendChild(_13);
var _14=_12.innerHTML;
var _15=blogsDate.date.localize(_11.posttime);
dojo.destroy(_12);
return dojo.string.substitute(this.RS_Comment_Info,[_14,_15]);
},getQuarantinedContent:function(){
return "<div role=\"alert\" class=\"lotusMessage lotusWarning\"><img title=\""+this.nls.rs_warningIcon+"\" alt=\""+this.nls.rs_warningIcon+"\" class=\"lconnSprite lconnSprite-iconWarning16\" src=\""+this.blankGif+"\"><span class=\"lotusAltText\">"+this.nls.rs_warningIcon+"</span><span>"+this.RS_Content_Quarantined+"</span></div>";
},getDeletedContent:function(){
return "<div role=\"alert\" class=\"lotusMessage lotusWarning\"><img title=\""+this.nls.rs_warningIcon+"\" alt=\""+this.nls.rs_warningIcon+"\" class=\"lconnSprite lconnSprite-iconWarning16\" src=\""+this.blankGif+"\"><span class=\"lotusAltText\">"+this.nls.rs_warningIcon+"</span><span>"+this.RS_Content_Deleted+"</span></div>";
},reply:function(_16){
if(!currentLogin.auth){
lconn.blogs.utils.loginAction();
}
var _17=dijit.byId("blogAddCommentForm");
if(typeof _17=="undefined"){
return;
}
var _18={level:this.commentObj.level+1,commentid:this.commentObj.id,authorName:this.commentObj.user.fullName,authorId:this.commentObj.user.extid,replyToCommentWidget:this,mode:"new",returnFocus:_16};
_17.prepareForm(_18);
if(this.panel.currentMode==this.panel.modeSupported["byDate"]){
var _19=this.panel.commentData.items[this.panel.commentData.items.length-1];
dojo.place(_17.domNode,_19.node,"after");
}else{
var _1a;
if(this.panel.currentMode==this.panel.modeSupported["singleThread"]){
_1a=this.panel.threadData;
}else{
_1a=this.panel.commentData;
}
var _19;
var _1b=false;
var _1c=false;
dojo.forEach(_1a.items,dojo.hitch(this,function(_1d){
if(_1d.id==this.commentObj.id){
_1b=true;
_19=_1d;
return;
}
if(_1b&&_1d.level<=this.commentObj.level){
_1c=true;
return;
}
if(!_1c){
_19=_1d;
}
}));
dojo.place(_17.domNode,_19.node,"after");
_17.lastReplyItem=_19;
var _1a;
if(this.panel.currentMode==this.panel.modeSupported["singleThread"]){
_1a=this.panel.threadData;
}else{
_1a=this.panel.commentData;
}
var _1e=this.panel.getItem(this.commentObj.threadid,_1a);
var _1f=false;
if(typeof this.commentObj.hasMore!="undefined"){
_1f=this.commentObj.hasMore;
}
if(_1e!=null){
_1f=_1e.hasMore;
}
if(this.commentObj.replycount>this.maxReplyCount&&!_1f){
for(var i=0;i<_1a.items.length;i++){
var _20=_1a.items[i];
if(_20.id==this.commentObj.threadid||_20.threadid==this.commentObj.threadid){
_20.widget.expandHiddenComments();
}
}
console.debug("Blogs Comments: Collapse comments");
var _21=false;
var _22=0;
for(pos=0;pos<_1a.items.length;pos++){
var _20=_1a.items[pos];
if(_21&&_20.level<=this.commentObj.level){
break;
}
if(_20.id==this.commentObj.id){
_21=true;
}
if(_21){
_22++;
}
if(_21&&_22>this.maxReplyCount){
_20.node.style.display="none";
dojo.mixin(_20,{hidden:true});
}
}
var _23=(this.maxLevel!=-1)&&(this.commentObj.level>this.maxLevel-1)?this.maxLevel-1:this.commentObj.level;
if(_23>this.indentLimit){
_23=this.indentLimit+(_23-this.indentLimit)/3;
}
var _24=dojo.create("div",{"class":"lotusPost","style":"margin-left:"+this.indentValue*_23+"px;"});
var _25=dojo.string.substitute(this.RS_See_All_Reply,[this.commentObj.replycount]);
var _26=dojo.string.substitute(this.RS_See_All_Reply_Title,[this.commentObj.replycount]);
var _27=dojo.create("a",{"class":"lotusAction","href":"javascript:;","aria-label":_26,"title":_26});
_27.innerHTML=_25;
dojo.connect(_27,"onclick",dojo.hitch(this,function(){
this.expandHiddenComments();
if(!_17.isHidden){
_17.show();
}
}));
_24.appendChild(_27);
dojo.place(_24,_17.domNode,"before");
this.showMoreAction=_24;
}
}
_17.show();
},expandHiddenComments:function(){
console.debug("Blogs Comments: Display hidden comments for "+this.commentObj.id);
var _28;
if(this.panel.currentMode==this.panel.modeSupported["singleThread"]){
_28=this.panel.threadData;
}else{
_28=this.panel.commentData;
}
if(this.showMoreAction!=null){
dojo.destroy(this.showMoreAction);
this.showMoreAction=null;
}else{
return;
}
var _29=false;
for(pos=0;pos<_28.items.length;pos++){
var _2a=_28.items[pos];
if(_29&&_2a.level<=this.commentObj.level){
break;
}
if(_2a.id==this.commentObj.id){
_29=true;
}
if(_29&&_2a.hidden){
_2a.node.style.display="";
_2a.hidden=false;
}
}
},notify:function(){
var _2b=new lconn.blogs.notification.notificationDlg({objectId:this.commentObj.id,objectType:"comment",isPublic:this.panel.isPublicBlog,isCommunity:this.panel.isCommunity,blogId:this.panel.blogId,peopleDataStore:BlogsBaseUrl+"/roller-services/json/typeaheadpeople?website="+this.panel.blogId});
_2b.receiversWidget.startup();
_2b.show(dojo.hitch(this,function(){
try{
this.moreActionsAP.focus();
}
catch(e){
}
dojo.destroy(_2b);
}));
},edit:function(_2c){
console.debug("Do update comment:"+this.commentObj.id);
if(!currentLogin.auth){
lconn.blogs.utils.loginAction();
}
var _2d=dijit.byId("blogAddCommentForm");
if(typeof _2d=="undefined"){
return;
}
var _2e={level:this.commentObj.level,commentid:this.commentObj.id,authorName:this.commentObj.user.fullName,authorId:this.commentObj.user.extid,replyToCommentWidget:this,mode:"edit",editContent:this.commentObj.edit,returnFocus:_2c};
_2d.prepareForm(_2e);
dojo.place(_2d.domNode,this.domNode,"after");
this.domNode.style.display="none";
_2d.show();
},deleteComment:function(_2f){
lconn.blogs.utils.confirm(this.RS_Delete_Confirm,dojo.hitch(this,"doDelete"),null,_2f);
},doDelete:function(){
console.debug("Do delete comment:"+this.commentObj.id);
var _30={url:BlogsBaseUrl+"/roller-services/json/comment?commentid="+this.commentObj.id,handleAs:"json"};
var d=dojo.xhrDelete(_30);
d.addCallback(dojo.hitch(this,function(_31){
if(_31.message=="SUCCEED"){
dojo.publish("lconn.blogs.comment.event.delete",[this.index]);
var id=this.commentObj.id;
this.panel.removeItem(id,this.panel.commentData);
this.panel.removeItem(id,this.panel.threadData);
this.panel.commentCount--;
if(this.commentObj.level==0&&(this.commentObj.replycount==0||this.panel.currentMode==this.panel.modeSupported["byDate"])){
this.panel.totalCount--;
}
dojo.forEach(this.commentObj.upstream,dojo.hitch(this,function(id){
var _32=this.panel.getItem(id,this.panel.threadData);
if(_32!=null){
_32.replycount--;
}
var _33=this.panel.getItem(id,this.panel.commentData);
if(_33!=null){
_33.replycount--;
}
}));
this.panel.updatePagingbar();
if(this.commentObj.level==0&&(this.commentObj.replycount==0||this.panel.currentMode==this.panel.modeSupported["byDate"])){
this.panel.render();
}
var _34=dijit.byId(dojo.query("[_commentid="+this.commentObj.replyto.id+"]")[0].getAttribute("widgetid"));
if(this.commentObj.level==1&&_34.commentObj.replycount==0){
if(_34.commentObj.level==0&&this.commentObj.replycount==0){
if(this.mode=="singleThread"||this.mode=="threaded"){
dojo.byId("link-"+_34.commentObj.id+"-threaded").innerHTML=this.panel.RS_Link_Comment;
dojo.byId("link-"+_34.commentObj.id+"-singleThread").innerHTML=this.panel.RS_Link_Comment;
}else{
dojo.byId("link-"+_34.commentObj.id+"-"+this.mode).innerHTML=this.panel.RS_Link_Comment;
}
}
}
if(this.panel.currentMode=="singleThreadView"&&this.panel.threadData.count==0){
this.panel.backToAll();
}
if(this.panel.commentCount==0){
this.panel.showEmpty();
}
if(this.commentObj.threadid!=""){
dojo.publish("lconn.blogs.comment.event.thread.replycount.updated",[this.commentObj.threadid,this.commentObj.thread.replycount-1]);
}
}else{
}
}));
},flagAsInappropriate:function(_35){
if(!currentLogin.auth){
lconn.blogs.utils.loginAction();
}
this.panel.getFlagInappropriateForm().flagComment(this.commentObj,_35);
},showMoreActions:function(_36){
if(!_36){
_36=window.event;
}
com.ibm.oneui.util.openAround(this.moreActoinsMenu,this.moreActionsAP,null,_36);
},toThread:function(arg){
if(this.commentObj.level>0){
this.panel.viewSingleThread(this.commentObj.threadid,arg.target);
}else{
this.panel.viewSingleThread(this.commentObj.id,arg.target);
}
},showMore:function(){
this.replyCotentSummaryAP.style.display="none";
this.replyCotentAP.style.display="";
this.showMoreActionAP.style.display="none";
},destroy:function(){
if(this.moreActoinsMenu!=null){
this.moreActoinsMenu.destroyRecursive();
}
if(this.likeControl!=null){
this.likeControl.destroyRecursive();
}
this.inherited(arguments);
},renderActionList:function(_37,_38){
var ul=dojo.create("ul",{"class":"lotusInlinelist","role":"toolbar","aria-label":this.RS_Comment_Toolbar_Label});
if(_37.showMenu){
this.moreActionsLinkLi=dojo.create("li");
this.moreActionsAP=dojo.create("a",{"href":"javascript:;","class":"lotusAction","aria-haspopup":"true","role":"button","innerHTML":this.RS_More_Actions+"<img alt=\"\" src=\""+this.blankGif+"\" class=\"lconnSprite lconnSprite-iconDropDown5x3\" role=\"presentation\"><span class=\"lotusAltText\">v</span>","id":"moreActions-"+this.commentObj.id+"-"+this.mode});
dojo.connect(this.moreActionsAP,"onclick",dojo.hitch(this,"showMoreActions"));
this.moreActionsLinkLi.appendChild(this.moreActionsAP);
this.moreActionsMenuAP=dojo.create("div",{});
this.moreActoinsMenu=new dijit.Menu({style:"display:none"});
}
for(var i=0;i<_37.actions.length;i++){
var li=dojo.create("li");
if(i==0){
dojo.addClass(li,"lotusFirst");
}
var a;
var _39;
if(_37.actions[i].action=="link"){
var _3a="";
if(this.commentObj.level>0){
_3a=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.threadid;
}else{
_3a=window.location.href.substr(0,window.location.href.indexOf("#"))+"#threadid="+this.commentObj.id;
}
a=dojo.create("a",{"href":_3a,"class":"lotusAction","role":"button","title":this.RS_Link_Comment_Title,"aria-label":this.RS_Link_Comment_Title,"innerHTML":this.RS_Link_Comment,"id":"link-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"toThread"));
li.appendChild(a);
ul.appendChild(li);
}else{
if(_37.actions[i].action=="reply"){
a=dojo.create("a",{"href":"javascript:;","class":"lotusAction","role":"button","title":this.RS_Reply_Title,"aria-label":this.RS_Reply_Title,"innerHTML":this.RS_Reply,"id":"reply-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"reply",a));
li.appendChild(a);
ul.appendChild(li);
}else{
if(_37.actions[i].action=="notify"){
if(_37.actions[i].inMenu){
var _39=new dijit.MenuItem({id:"notify-"+this.commentObj.id+"-"+this.mode,label:this.RS_Notify,onClick:dojo.hitch(this,"notify",this.moreActionsAP)});
this.moreActoinsMenu.addChild(_39);
}else{
a=dojo.create("a",{"href":"javascript:;","class":"lotusAction","role":"button","title":this.RS_Notify_Title,"aria-label":this.RS_Notify_Title,"innerHTML":this.RS_Notify,"id":"notify-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"notify",a));
li.appendChild(a);
ul.appendChild(li);
}
}else{
if(_37.actions[i].action=="edit"){
if(_37.actions[i].inMenu){
var _39=new dijit.MenuItem({id:"edit-"+this.commentObj.id+"-"+this.mode,label:this.RS_Edit,onClick:dojo.hitch(this,"edit",this.moreActionsAP.id)});
this.moreActoinsMenu.addChild(_39);
}else{
a=dojo.create("a",{"href":"javascript:;","class":"lotusAction","role":"button","title":this.RS_Edit_Title,"aria-label":this.RS_Edit_Title,"innerHTML":this.RS_Edit,"id":"edit-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"edit"));
li.appendChild(a);
ul.appendChild(li);
}
}else{
if(_37.actions[i].action=="delete"){
if(_37.actions[i].inMenu){
var _39=new dijit.MenuItem({id:"delete-"+this.commentObj.id+"-"+this.mode,label:this.RS_Delete,onClick:dojo.hitch(this,"deleteComment",this.moreActionsAP)});
this.moreActoinsMenu.addChild(_39);
}else{
a=dojo.create("a",{"href":"javascript:;","class":"lotusAction","role":"button","title":this.RS_Delete_Title,"aria-label":this.RS_Delete_Title,"innerHTML":this.RS_Delete,"id":"delete-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"54",a));
li.appendChild(a);
ul.appendChild(li);
}
}else{
if(_37.actions[i].action=="flag"){
if(_37.actions[i].inMenu){
var _39=new dijit.MenuItem({id:"flag-"+this.commentObj.id+"-"+this.mode,label:this.RS_Flag,onClick:dojo.hitch(this,"flagAsInappropriate",this.moreActionsAP)});
this.moreActoinsMenu.addChild(_39);
}else{
a=dojo.create("a",{"href":"javascript:;","class":"lotusAction","role":"button","title":this.RS_Flag_Title,"aria-label":this.RS_Flag_Title,"innerHTML":this.RS_Flag,"id":"flag-"+this.commentObj.id+"-"+this.mode});
dojo.connect(a,"onclick",dojo.hitch(this,"flagAsInappropriate",a));
li.appendChild(a);
ul.appendChild(li);
}
}
}
}
}
}
}
}
_38.appendChild(ul);
if(_37.showMenu){
ul.appendChild(this.moreActionsLinkLi);
this.moreActionsMenuAP.appendChild(this.moreActoinsMenu.domNode);
_38.appendChild(this.moreActionsMenuAP);
}
new lconn.core.aria.Toolbar(ul);
},renderCommentIndex:function(){
if(this.index!=0){
this.commentIndexAP.innerHTML="<strong>"+this.index+"</strong>";
var _3b="";
if(this.commentObj.user.extid==this.commentObj.entry.creator.extid){
_3b=dojo.string.substitute(this.RS_Comment_Author_Number_Label,[this.index]);
dojo.addClass(this.commentIndexAP,"comment-count-author");
}else{
_3b=dojo.string.substitute(this.RS_Comment_Number_Label,[this.index,this.commentObj.user.fullName]);
dojo.addClass(this.commentIndexAP,"comment-count");
}
dojo.attr(this.commentIndexAP,{"aria-label":_3b});
}else{
dojo.destroy(this.commentIndexAP);
}
},reIndexOnDeletion:function(_3c){
if(this.index>_3c){
this.index=this.index-1;
this.renderCommentIndex();
}
},onReplyCountUpdatedOnThread:function(_3d,_3e){
if(this.commentObj.thread.id!=_3d){
return;
}
this.commentObj.thread.replycount=_3e;
if(this.commentObj.thread.replycount!=1){
this.RS_View_Full_Thread=dojo.string.substitute(this.nls.COMMENT.RS_View_Full_Thread,[this.commentObj.thread.replycount]);
}else{
this.RS_View_Full_Thread=this.RS_View_Full_Thread_Single;
}
this.toThreadActionAP.setAttribute("title",this.RS_View_Full_Thread);
this.toThreadActionAP.setAttribute("aria-label",this.RS_View_Full_Thread);
this.toThreadActionAP.innerHTML=this.RS_View_Full_Thread;
}});
}


;dojo.cache("lconn.blogs", "comment/templates/FlagInappropriateForm.html", "<div><form class=\"lotusForm2\" action=\"\" name=\"flagCommentForm\" dojoAttachPoint=\"flagCommentFormAP\" role=\"application\" style=\"background-color: transparent;\"> <input type=\"hidden\" name=\"dangerousurlnonce\" value=\"\"/> <input type=\"hidden\" name=\"version\" value=\"250\" /> <input type=\"hidden\" name=\"objectType\" value=\"comment\" /> <input type=\"hidden\" name=\"objectId\" value=\"\"/> <div class=\"lotusFormBody\"> <div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"issueCategoryAP\"> <label for=\"issue\">${strings.RS_Issue}</label> <div><select id=\"issue\" name=\"issue\" style=\"width:300px;\" title=\"${strings.RS_Issue}\" dojoAttachPoint=\"issueAP\"></select></div> </div> <div class=\"lotusFormField\"> <label for=\"flag_comment\">${strings.RS_Reason}</label> <div><textarea id=\"flag_comment\" title=\"${strings.RS_Reason}\" name=\"comment\" rows=\"10\" style=\"width:300px;\"></textarea></div> </div> </div></form>");

;if(!dojo._hasResource["lconn.blogs.comment.FlagInappropriateForm"]){
dojo._hasResource["lconn.blogs.comment.FlagInappropriateForm"]=true;
dojo.provide("lconn.blogs.comment.FlagInappropriateForm");








dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.comment.FlagInappropriateForm",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.blogs","comment/templates/FlagInappropriateForm.html"),nls:null,panel:null,strings:{},commentObj:{},postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.blogs","strings");
dojo.mixin(this.strings,this.nls.COMMENT);
},postCreate:function(){
this.inherited(arguments);
this.render();
},render:function(){
if(window.__flagAsInappropriateCategories!=undefined){
var _1=this.issueAP;
dojo.forEach(window.__flagAsInappropriateCategories,function(_2){
_1.options[_1.options.length]=new Option(_2.name,_2.id);
});
dojo.removeClass(this.issueCategoryAP,"lotusHidden");
}
},flagComment:function(_3,_4){
this.commentObj=_3;
var _5=this.commentObj.id;
this.reset();
this.flagCommentFormAP.objectId.value=_5;
lconn.blogs.utils.popupForm(this.strings.RS_Flag_Inappropriate_Dialog_Title,this.domNode,dojo.hitch(this,"submit"),_4);
},reset:function(){
dojo.removeClass(this.flagCommentFormAP,"lotusHidden");
this.flagCommentFormAP.objectId.value="";
this.flagCommentFormAP.comment.value="";
},submit:function(){
var _6={url:BlogsBaseUrl+"/roller-services/json/flag_as_inappropriate",handleAs:"json-comment-optional",form:this.flagCommentFormAP,sync:true};
var d=dojo.xhrPost(_6);
this.showProcessIndicator();
d.addCallback(dojo.hitch(this,function(_7){
if(_7.success){
if(_7.quarantined){
this.showFlagged();
var id=this.commentObj.id;
this.panel.removeItem(id,this.panel.commentData);
this.panel.removeItem(id,this.panel.threadData);
this.panel.commentCount--;
if(this.commentObj.level==0&&(this.commentObj.replycount==0||this.panel.currentMode==this.panel.modeSupported["byDate"])){
this.panel.totalCount--;
}
dojo.forEach(this.commentObj.upstream,dojo.hitch(this,function(id){
var _8=this.panel.getItem(id,this.panel.threadData);
if(_8!=null){
_8.replycount--;
}
var _9=this.panel.getItem(id,this.panel.commentData);
if(_9!=null){
_9.replycount--;
}
}));
this.panel.updatePagingbar();
if(this.commentObj.level==0&&(this.commentObj.replycount==0||this.panel.currentMode==this.panel.modeSupported["byDate"])){
this.panel.render();
}
if(this.panel.currentMode=="singleThreadView"&&this.panel.threadData.count==0){
this.panel.backToAll();
}
if(this.panel.commentCount==0){
this.panel.showEmpty();
}
if(this.commentObj.level==1){
var _a=dijit.byId(dojo.query("[_commentid="+this.commentObj.replyto.id+"]")[0].getAttribute("widgetid"));
if(_a.commentObj.replycount==0){
if(_a.commentObj.level==0&&this.commentObj.replycount==0){
if(_a.mode=="singleThread"||_a.mode=="threaded"){
dojo.byId("link-"+_a.commentObj.id+"-threaded").innerHTML=this.panel.RS_Link_Comment;
dojo.byId("link-"+_a.commentObj.id+"-singleThread").innerHTML=this.panel.RS_Link_Comment;
}else{
dojo.byId("link-"+_a.commentObj.id+"-"+this.mode).innerHTML=this.panel.RS_Link_Comment;
}
}
}
}
if(this.commentObj.threadid!=""){
dojo.publish("lconn.blogs.comment.event.thread.replycount.updated",[this.commentObj.threadid,this.commentObj.thread.replycount-1]);
}
}else{
this.showSucceed();
}
}else{
if(_7.error){
if("session timeout"==_7.error){
window.__security_nonce=_7.nonce;
this.showError(this.nls.rs_sessionTimeout);
}else{
this.showError(_7.error);
}
}else{
this.showError(this.nls.rs_loginNeeded);
}
}
}));
d.addErrback(dojo.hitch(this,function(_b){
this.showError(this.strings.RS_Flag_Inappropriate_Submit_Fail);
}));
return true;
},showProcessIndicator:function(){
lconn.blogs.utils.clearMessage("messageContainer");
lconn.blogs.utils.showMessage("messageContainer",this.strings.RS_Flag_Inappropriate_Submitting,"info",true);
},showError:function(_c){
lconn.blogs.utils.clearMessage("messageContainer");
lconn.blogs.utils.showMessage("messageContainer",_c,"error",true);
},showSucceed:function(){
lconn.blogs.utils.clearMessage("messageContainer");
lconn.blogs.utils.showMessage("messageContainer",this.strings.RS_Flag_Inappropriate_Submit_Success,"success",true);
},showFlagged:function(){
lconn.blogs.utils.clearMessage("messageContainer");
lconn.blogs.utils.showMessage("messageContainer",this.strings.RS_Flag_Inappropriate_Flag_Success,"success",true);
}});
}


;dojo.cache("lconn.blogs", "templates/paging.html", "<div class=\"lotusPaging\" style=\"display:none; background: none repeat scroll 0 0 transparent; padding-left: 0; padding-right: 0;\"> <div dojoAttachPoint=\"pageInfoAP\" class=\"lotusLeft\" style=\"display:none\"></div> <ul dojoAttachPoint=\"pagePSAP\" class=\"lotusLeft lotusInlinelist\" role=\"toolbar\" aria-label=\"${_lang.PAGING_SHOW}\" style=\"display:none\"> <li class=\"lotusFirst\">${_lang.PAGING_SHOW}</li> <li class=\"lotusFirst\" dojoAttachPoint=\"ps10AP\"></li> <li dojoAttachPoint=\"ps20AP\"></li> <li dojoAttachPoint=\"ps50AP\"></li> <li class=\"lotusLast\" >${_lang.PAGING_ITEMS}</li> </ul> <ul dojoAttachPoint=\"pageNavAP\" class=\"lotusRight lotusInlinelist\" style=\"display:none\"> <li class=\"lotusFirst\" dojoAttachPoint=\"previousLinkAP\" style=\"display:none;\"> <a title=\"${_lang.PAGING_PREVIOUS_TITLE}\" aria-label=\"${_lang.PAGING_PREVIOUS_TITLE}\" dojoAttachEvent=\"onclick:_previous\" href=\"javascript:;\">${_lang.PAGING_PREVIOUS}</a> </li> <li class=\"lotusFirst\" dojoAttachPoint=\"previousTextAP\">${_lang.PAGING_PREVIOUS}</li> <li dojoAttachPoint=\"nextLinkAP\" style=\"display:none;\"> <a title=\"${_lang.PAGING_NEXT_TITLE}\" aria-label=\"${_lang.PAGING_NEXT_TITLE}\" dojoAttachEvent=\"onclick:_next\" href=\"javascript:;\">${_lang.PAGING_NEXT}</a> </li> <li dojoAttachPoint=\"nextTextAP\">${_lang.PAGING_NEXT}</li> </ul> <div dojoAttachPoint=\"pageListAP\" style=\"display:none\"><ul></ul></div> <div dojoAttachPoint=\"pageJumpAP\" style=\"display:none\"> <form dojoAttachPoint=\"pageJumpFormAP\" dojoAttachEvent=\"onsubmit:_jump\" method=\"get\" action=\"javascript:;\" role=\"application\" aria-label=\"${_lang.PAGING_JUMP_LABEL}\"> </form> </div></div>");

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


dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.Paging",[dijit._Widget,dijit._Templated],{templateString:null,templatePath:dojo.moduleUrl("lconn.blogs","templates/paging.html"),pageSize:10,psList:[10,20,50],pagingLabel:"",_currentPage:1,_dirty:false,_itemCount:null,supportedFeatures:{info:"pageInfoAP",list:"pageListAP",nav:"pageNavAP",ps:"pagePSAP",jump:"pageJumpAP"},features:null,postMixInProperties:function(){
this._lang=dojo.i18n.getLocalization("lconn.blogs","strings").PAGING;
},postCreate:function(){
dojo.attr(this.domNode,"aria-label",this.pagingLabel);
dojo.attr(this.domNode,"role","navigation");
},hide:function(){
this.domNode.style.display="none";
},show:function(){
for(var i=0,l=this.features.length;i<l;i++){
var ap=this.supportedFeatures[this.features[i]];
if(ap){
this[ap].style.display="";
}
}
this.domNode.style.display="";
},update:function(_1,ps){
this._itemCount=this.total();
if(ps){
this.pageSize=ps;
}
if(this._itemCount!=0){
this._currentPage=_1;
for(var i=0,l=this.features.length;i<l;i++){
if(this.features[i]=="info"){
this._setPageInfo();
}
if(this.features[i]=="nav"){
this._setPageNav();
}
if(this.features[i]=="list"){
this._setPageList();
}
if(this.features[i]=="ps"){
this._setPagePS();
}
if(this.features[i]=="jump"){
this._setPageJumpTo();
}
}
this.show();
}else{
this.hide();
}
this.cleanDirty();
},total:function(){
return 0;
},onPage:function(_2){
},onPageSizeChange:function(ps){
},cleanDirty:function(){
this._dirty=false;
},_psChange:function(ps){
this.pageSize=ps;
this._currentPage=1;
this.onPageSizeChange(ps);
},getCurrentPage:function(){
return this._currentPage;
},_total:function(){
if(this._itemCount==null){
this._itemCount=this.total();
}
return this._itemCount;
},_setPageInfo:function(){
var _3=this._total();
var _4=this.pageSize*(this._currentPage-1)+1;
var to=this.pageSize*this._currentPage;
if(to>_3){
to=_3;
}
var _5=dojo.string.substitute(this._lang.PAGING_INFO,[_4,to,_3]);
var _6=dojo.string.substitute(this._lang.PAGING_INFO_TITLE,[_4,to,_3]);
dojo.html.set(this.pageInfoAP,_5);
dojo.attr(this.pageInfoAP,"title",_6);
dojo.attr(this.pageInfoAP,"aria-label",_6);
},_setMode:function(){
if(this.currentMode=="byDateView"){
this.modeThreadAP.style.display="";
this.modeThreadTextAP.style.display="none";
this.modeByDateAP.style.display="none";
this.modeByDateTextAP.style.display="";
}else{
this.modeThreadAP.style.display="none";
this.modeThreadTextAP.style.display="";
this.modeByDateAP.style.display="";
this.modeByDateTextAP.style.display="none";
}
},_setPageNav:function(){
if(this._hasPrevious()){
this.previousLinkAP.style.display="";
this.previousTextAP.style.display="none";
}else{
this.previousLinkAP.style.display="none";
this.previousTextAP.style.display="";
}
if(this._hasNext()){
this.nextLinkAP.style.display="";
this.nextTextAP.style.display="none";
}else{
this.nextLinkAP.style.display="none";
this.nextTextAP.style.display="";
}
},_setPageJumpTo:function(){
var x=dojo.query("[name=\"jumpToPage_text\"]",this.domNode);
if(!x||x.length==0){
this.pageJumpFormAP.innerHTML="";
var _7="<input type=\"text\" value=\""+this._currentPage+"\" title=\""+this._lang.PAGEING_PAGE_NUM_TITLE+"\" name=\"jumpToPage_text\">";
this.pageJumpFormAP.innerHTML=dojo.string.substitute(this._lang.PAGING_JUMPTO,[_7,"<span name=\"jumpToPage_total\">"+this._pageCount()+"</span>"]);
}else{
x[0].value=this._currentPage;
dojo.query("[name=\"jumpToPage_total\"]",this.domNode)[0].innerHTML=this._pageCount();
}
if(this._focusJumpBox){
this._focusJumpBox=false;
try{
x[0].focus();
}
catch(err){
}
}
},_setPagePS:function(){
for(var i=0,l=this.psList.length;i<l;i++){
var ps=this.psList[i];
var ap=this["ps"+ps+"AP"];
dojo.empty(ap);
var _8=dojo.string.substitute(this._lang.PAGING_PAGE_TITLE3,[ps]);
var _9=dojo.string.substitute(this._lang.PAGING_PAGE_TITLE,[ps]);
if(ps==this.pageSize){
ap.innerHTML=ps;
dojo.attr(ap,"title",_8);
dojo.attr(ap,"aria-label",_9);
dojo.attr(ap,"aria-disabled","true");
dojo.attr(ap,"aria-pressed","true");
dojo.attr(ap,"role","button");
}else{
dojo.removeAttr(ap,"title");
dojo.removeAttr(ap,"aria-label");
dojo.removeAttr(ap,"aria-disabled");
dojo.removeAttr(ap,"aria-pressed");
dojo.removeAttr(ap,"role");
var f=dojo.hitch(this,function(_a){
var ps=parseInt(_a.currentTarget.innerHTML);
this._psChange(ps);
});
dojo.create("a",{href:"javascript:;",role:"button",title:_8,"aria-label":_9,"aria-pressed":"false",innerHTML:ps,onclick:f},ap);
}
}
},_setPageList:function(){
var ul=document.createElement("ul");
dojo.addClass(ul,"lotusInlinelist");
if(this._pageCount()<=9){
for(var i=1,pc=this._pageCount();i<=pc;i++){
var li=dojo.create("li");
if(i==1){
dojo.addClass(li,"lotusFirst");
}
if(i==this._currentPage){
this._setNonSelectableLi(li,i);
}else{
this._setSelectableLi(li,i);
}
ul.appendChild(li);
}
}else{
if(this._currentPage<=3){
var pc=this._pageCount();
for(var i=1;i<=5;i++){
var li=dojo.create("li");
if(i==1){
dojo.addClass(li,"lotusFirst");
}
if(i==this._currentPage){
this._setNonSelectableLi(li,i);
}else{
this._setSelectableLi(li,i);
}
ul.appendChild(li);
}
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
li.innerHTML="<nobr>...</nobr>";
ul.appendChild(li);
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
this._setSelectableLi(li,pc);
ul.appendChild(li);
}else{
if(this._currentPage>=this._pageCount()-2){
var pc=this._pageCount();
var li=dojo.create("li");
dojo.addClass(li,"lotusFirst");
this._setSelectableLi(li,1);
ul.appendChild(li);
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
li.innerHTML="<nobr>...</nobr>";
ul.appendChild(li);
for(var i=pc-4;i<=pc;i++){
var li=dojo.create("li");
if(i==pc-4){
dojo.addClass(li,"lotusLast");
}
if(i==this._currentPage){
this._setNonSelectableLi(li,i);
}else{
this._setSelectableLi(li,i);
}
ul.appendChild(li);
}
}else{
var pc=this._pageCount();
var li=dojo.create("li");
dojo.addClass(li,"lotusFirst");
this._setSelectableLi(li,1);
ul.appendChild(li);
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
li.innerHTML="<nobr>...</nobr>";
ul.appendChild(li);
for(var i=this._currentPage-1;i<=this._currentPage+1;i++){
var li=dojo.create("li");
if(i==this._currentPage-1){
dojo.addClass(li,"lotusLast");
}
if(i==this._currentPage){
this._setNonSelectableLi(li,i);
}else{
this._setSelectableLi(li,i);
}
ul.appendChild(li);
}
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
li.innerHTML="<nobr>...</nobr>";
ul.appendChild(li);
var li=dojo.create("li");
dojo.addClass(li,"lotusLast");
this._setSelectableLi(li,pc);
ul.appendChild(li);
}
}
}
var x=dojo.query("ul",this.pageListAP)[0];
this.pageListAP.replaceChild(ul,x);
delete x;
},_hasNext:function(){
if(this._currentPage*this.pageSize>=this._total()){
return false;
}else{
return true;
}
},_hasPrevious:function(){
if(this._currentPage==1){
return false;
}else{
return true;
}
},_pageCount:function(){
return Math.ceil(this._total()/this.pageSize);
},_selectPage:function(_b){
if(_b<1||_b>this._pageCount()||this._dirty){
return;
}
this._dirty=true;
this._currentPage=_b;
this.onPage(_b);
},_setNonSelectableLi:function(li,i){
var _c=dojo.string.substitute(this._lang.PAGING_PAGE_TITLE2,[i]);
dojo.create("span",{innerHTML:i,title:_c,"aria-label":_c},li);
},_setSelectableLi:function(li,i){
var f=dojo.hitch(this,function(){
this._selectPage(i);
});
var _d=dojo.string.substitute(this._lang.PAGING_PAGE_TITLE2,[i]);
dojo.create("a",{href:"javascript:;",innerHTML:i,title:_d,"aria-label":_d,onclick:f},li);
},_next:function(){
this._selectPage(this._currentPage+1);
},_previous:function(){
this._selectPage(this._currentPage-1);
},_jump:function(){
this._focusJumpBox=true;
var t=dojo.query("[name=\"jumpToPage_text\"]",this.domNode);
var p=dojo.number.parse(t[0].value);
if(isNaN(p)){
return;
}
this._selectPage(p);
},toThreaded:function(){
},toByDate:function(){
}});
}


;dojo.cache("lconn.blogs", "comment/templates/CommentPanel.html", "<div class=\"lotusBoard\" dojoAttachPoint=\"boardAP\" aria-live=\"assertive\"> <div style=\"border-top: 2px solid black;height:45px;\"> <h4 style=\"margin-top:8px;\" dojoAttachPoint=\"commentCountAP\" class=\"lotusLeft\">${RS_Comment_0}</h4> <ul style=\"margin-top:8px;\" dojoAttachPoint=\"pageModeAP\" class=\"lotusRight lotusInlinelist lotusActions\" role=\"toolbar\" aria-label=\"${RS_MODE}\"> <li class=\"lotusFirst\" dojoAttachPoint=\"modeThreadAP\" style=\"display:none;\"> <a title=\"${RS_MODE_THREADED_TITLE}\" aria-label=\"${RS_MODE_THREADED_TITLE}\" dojoAttachEvent=\"onclick:toThreaded\" href=\"javascript:;\">${RS_MODE_THREADED}</a> </li> <li class=\"lotusFirst\" dojoAttachPoint=\"modeThreadTextAP\">${RS_MODE_THREADED}</li> <li dojoAttachPoint=\"modeByDateAP\" style=\"display:none;\"> <a title=\"${RS_MODE_BYDATE_TITLE}\" aria-label=\"${RS_MODE_BYDATE_TITLE}\" dojoAttachEvent=\"onclick:toByDate\" href=\"javascript:;\">${RS_MODE_BYDATE}</a> </li> <li dojoAttachPoint=\"modeByDateTextAP\">${RS_MODE_BYDATE}</li> </ul></div><div class=\"lotusPaing\" dojoAttachPoint=\"topPagingAP\"></div><div id=\"sortByToolbar\" class=\"lotusSort\" style=\"display:none\"> <ul class=\"lotusInlinelist aria_toolbar\" role=\"toolbar\"> <li class=\"lotusFirst\"> <span id=\"sortbyToolbarLabel\">${RS_COMMENT_SORTBY}</span> </li> <li class=\"lotusFirst\"> <a id=\"sortByButtonASC\" style=\"display:none\" role=\"button\" aria-pressed=\"true\" aria-label=\"${RS_COMMENT_SORT_INFO_DESC}\" class=\"lotusActiveSort lotusAscending\" dojoAttachEvent=\"onclick:sortByDate\" title=\"${RS_COMMENT_SORT_INFO_DESC}\" href=\"javascript:;\"> ${RS_COMMENT_SORT_DATE}<span class=\"lotusAltText\">&#x25b2</span> </a> <a id=\"sortByButtonDESC\" style=\"display:none\" role=\"button\" aria-pressed=\"true\" aria-label=\"${RS_COMMENT_SORT_INFO_ASC}\" class=\"lotusActiveSort lotusDescending\" dojoAttachEvent=\"onclick:sortByDate\" title=\"${RS_COMMENT_SORT_INFO_ASC}\" href=\"javascript:;\"> ${RS_COMMENT_SORT_DATE}<span class=\"lotusAltText\">&#x25bc</span> </a> </li> </ul></div><div class=\"lotusLoading\" dojoAttachPoint=\"commentLoadingAP\"></div><div dojoAttachPoint=\"commentsAP\" style=\"display:none;\"></div><div dojoAttachPoint=\"threadContainerAP\" style=\"display:none;\"> <div class=\"lotusPost\"><a class=\"lotusAction\" dojoAttachPoint=\"backToAllLinkAP\" dojoAttachEvent=\"onclick:backToAll\" href=\"javascript:;\" aria-label=\"${RS_Back_To_All_Title}\" title=\"${RS_Back_To_All_Title}\">${RS_Back_To_All}</a></div> <div dojoAttachPoint=\"threadAP\"></div></div><div class=\"lotusPaing\" dojoAttachPoint=\"bottomPagingAP\"></div> <div dojoAttachPoint=\"addCommentAP\" style=\"border-top:0 none;\" class=\"lotusPost\"> <a dojoAttachPoint=\"addCommentLinkAP\" role=\"button\" class=\"lotusAction\" dojoAttachEvent=\"onclick:replyToEntry\" href=\"javascript:;\" aria-label=\"${RS_Add_Comment_Title}\" title=\"${RS_Add_Comment_Title}\">${RS_Add_Comment}</a> </div></div>");

;if(!dojo._hasResource["lconn.blogs.comment.CommentPanel"]){
dojo._hasResource["lconn.blogs.comment.CommentPanel"]=true;
dojo.provide("lconn.blogs.comment.CommentPanel");
















dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.comment.CommentPanel",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.blogs","comment/templates/CommentPanel.html"),templatePath:document.body.className.indexOf("minimal")>=0?dojo.moduleUrl("lconn.blogs","comment/templates/CommentPanelMinimal.html"):dojo.moduleUrl("lconn.blogs","comment/templates/CommentPanel.html"),modeMinimal:document.body.className.indexOf("minimal")>=0,nls:null,modeSupported:{thread:"threadView",byDate:"byDateView",singleThread:"singleThreadView"},currentMode:null,previousMode:null,totalCount:0,commentCount:0,pageSize:10,currentPage:1,singleThreadId:null,commentFlagEnabled:false,entryId:"",blogId:"",sortby:"date",order:"desc",isPublicBlog:false,isIdeaBlog:false,isCommunity:false,threadCountLimit:5,showMoreAPs:[],returnFocus:null,flagInappropriateForm:null,displayByDayPanel:false,displayThreadPanel:true,allowComment:false,commentData:{count:0,version:0,items:[]},threadData:{count:0,version:0,items:[]},firstload:true,postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.blogs","strings");
dojo.mixin(this,this.nls.COMMENT);
this.blankGif=dijit._Widget.prototype._blankGif;
},postCreate:function(){
this.inherited(arguments);
this.currentMode=this.modeSupported["thread"];
if(dojo.hash()=="view=byDateView"&&this.displayByDayPanel){
this.currentMode=this.modeSupported["byDate"];
}
if(dojo.hash()=="view=threadView"&&this.displayThreadPanel){
this.currentMode=this.modeSupported["thread"];
}
this.preparePaging();
this.render().addCallback(dojo.hitch(this,function(){
if(window.location.hash!=null&&window.location.hash.indexOf("#threadid")!=-1){
var id=window.location.hash.substr(10);
this.viewSingleThread(id,null).addCallback(dojo.hitch(this,function(){
this.firstload=false;
}));
}else{
this.firstload=false;
if(window.location.hash!=null&&window.location.hash.indexOf("#comment")!=-1){
var _1=window.location.hash.substr(1);
this.scollToComment(_1);
}
if(this.allowComment&&(window.location.hash=="#action=addcomment"&&currentLogin.auth)){
var _2=dojo.hitch(this,function(){
if(dijit.byId("blogAddCommentForm")){
this.replyToEntry();
}else{
setTimeout(_2,1);
}
});
_2();
}
}
}));
if(!this.displayByDayPanel||!this.displayThreadPanel){
this.pageModeAP.style.display="none";
}
if(!this.allowComment||!currentLogin.auth||this.modeMinimal){
this.addCommentAP.style.display="none";
}
if(this.isIdeaBlog){
this.addCommentLinkAP.setAttribute("aria-label",this.RS_Add_IdeaComment_Title);
this.addCommentLinkAP.setAttribute("title",this.RS_Add_IdeaComment_Title);
}
dojo.subscribe("/blogs/comment/update",this,"handleUpdate");
},render:function(){
this.updateMode();
this.showLoading();
if(!this.allowComment||!currentLogin.auth||this.modeMinimal){
this.addCommentAP.style.display="none";
}else{
this.addCommentAP.style.display="";
}
if(this.currentMode!=this.modeSupported["singleThread"]){
dojo.query("div[class=\"lotusPost\"]",this.commentsAP).forEach(dojo.hitch(this,function(_3){
var _4=dojo.attr(_3,"widgetid");
if(_4!=null&&_4!="blogAddCommentForm"){
dijit.byId(_4).destroy();
}else{
if(_4=="blogAddCommentForm"){
dijit.byId("blogAddCommentForm").hide();
}else{
dojo.destroy(_3);
}
}
}));
this.commentData={count:0,items:[]};
}else{
dojo.query("div[class=\"lotusPost\"]",this.threadAP).forEach(dojo.hitch(this,function(_5){
var _6=dojo.attr(_5,"widgetid");
if(_6!=null&&_6!="blogAddCommentForm"){
dijit.byId(_6).destroy();
}else{
if(_6=="blogAddCommentForm"){
dijit.byId("blogAddCommentForm").hide();
}else{
dojo.destroy(_5);
}
}
}));
this.threadData={count:0,items:[]};
}
return this.fetch().addCallback(dojo.hitch(this,function(){
this.hideLoading();
}));
},sortByDate:function(){
if(this.order=="desc"){
this.order="asc";
}else{
this.order="desc";
}
this.switchMode(this.modeSupported["byDate"]);
},fetch:function(_7){
if(typeof _7=="undefined"){
console.debug("query for comment data: mode:"+this.currentMode+" ps:"+this.pageSize+" page:"+this.currentPage);
var _8={url:BlogsBaseUrl+"/roller-services/json/comment",handleAs:"json",content:{entryid:this.entryId,sortby:this.sortby,order:this.order,page:this.currentPage,ps:this.pageSize,lang:lconn.blogs.utils.getLCLocale()}};
if(this.currentMode==this.modeSupported["thread"]){
document.getElementById("sortByToolbar").style.display="none";
if(this.commentCount==0){
this.renderCommentsThreaded({"message":"SUCCEED","commentcount":0,"total":0,"page":1,"ps":this.pageSize,"items":[]});
return {addCallback:function(_9){
_9();
return this;
}};
}else{
_8.handle=dojo.hitch(this,this.renderCommentsThreaded);
dojo.mixin(_8.content,{level:0});
return dojo.xhrGet(_8);
}
}else{
if(this.currentMode==this.modeSupported["byDate"]){
document.getElementById("sortByToolbar").style.display="";
if(this.order=="asc"){
dojo.byId("sortByButtonASC").style.display="";
dojo.byId("sortByButtonDESC").style.display="none";
}else{
dojo.byId("sortByButtonASC").style.display="none";
dojo.byId("sortByButtonDESC").style.display="";
}
if(this.commentCount==0){
this.renderCommentsByDate({"message":"SUCCEED","commentcount":0,"total":0,"page":1,"ps":this.pageSize,"items":[]});
return {addCallback:function(_a){
_a();
return this;
}};
}else{
_8.handle=dojo.hitch(this,this.renderCommentsByDate);
return dojo.xhrGet(_8);
}
}else{
if(this.currentMode==this.modeSupported["singleThread"]){
document.getElementById("sortByToolbar").style.display="none";
_8.handle=dojo.hitch(this,this.renderCommentsSingle);
_8.content={threadid:this.singleThreadId,ps:-1};
return dojo.xhrGet(_8);
}
}
}
}else{
console.debug("query replies for thread:"+_7);
var _8={url:BlogsBaseUrl+"/roller-services/json/comment",handleAs:"json",content:{threadid:_7,ps:-1}};
_8.handle=dojo.hitch(this,this.renderMore);
return dojo.xhrGet(_8);
}
},updatePagingbar:function(){
this.topPagingWidget.update(this.currentPage,this.pageSize);
this.bottomPagingWidget.update(this.currentPage,this.pageSize);
if(this.topPagingWidget._pageCount()<=1||this.currentMode==this.modeSupported["singleThread"]){
this.topPagingWidget.hide();
this.bottomPagingWidget.hide();
}
this.commentCountAP.innerHTML=dojo.string.substitute(this.RS_Comment,[this.commentCount]);
if(this.modeMinimal){
dojo.query(".min-allposts")[0].innerHTML=dojo.query(".min-allposts")[0].innerHTML.replace(/[0-9]+/g,""+this.commentCount);
}
},renderCommentsThreaded:function(_b){
console.debug(_b);
if(_b.message=="SUCCEED"){
this.totalCount=_b.total;
this.commentCount=_b.commentcount;
this.currentPage=_b.page;
var _c=false;
var _d=null;
var _e=0;
_b.items.push({id:"end-flag",level:0});
dojo.forEach(_b.items,dojo.hitch(this,function(_f,_10){
if(_c&&_f.level==0){
var _11=dojo.create("div",{"class":"lotusPost","style":"margin-left:40px;"});
var _12=dojo.string.substitute(this.RS_See_All_Reply,[_e]);
var _13=dojo.string.substitute(this.RS_See_All_Reply_Title,[_e]);
var _14=dojo.create("a",{"class":"lotusAction","href":"javascript:;","aria-label":_13,"title":_13});
_14.innerHTML=_12;
dojo.connect(_14,"onclick",dojo.hitch(this,"fetch",_d));
_11.appendChild(_14);
this.showMoreAPs[_d]=_11;
this.commentsAP.appendChild(_11);
_c=false;
}
if(_f.id!="end-flag"){
var _15={panel:this,commentObj:_f,mode:"threaded"};
if(_10==0){
dojo.mixin(_15,{isFirst:true});
}
var _16=new lconn.blogs.comment.Comment(_15);
var _17=this.commentsAP.appendChild(_16.domNode);
if(_f.level==0){
_d=_f.id;
_e=_f.replycount;
if(_e>this.threadCountLimit){
_c=true;
dojo.mixin(_f,{hasMore:true});
}else{
dojo.mixin(_f,{hasMore:false});
}
}
dojo.mixin(_f,{node:_17,widget:_16,hidden:false,version:0});
this.commentData.items.push(_f);
this.commentData.count++;
}
}));
if(_b.items.length==1){
this.showEmpty();
}
this.updatePagingbar();
}else{
this.showError(_b.message);
}
},renderCommentsByDate:function(_18){
console.debug(_18);
if(_18.message=="SUCCEED"){
this.totalCount=_18.total;
this.commentCount=_18.commentcount;
this.currentPage=_18.page;
dojo.forEach(_18.items,dojo.hitch(this,function(_19,_1a){
var _1b={panel:this,index:(this.currentPage-1)*this.pageSize+_1a+1,commentObj:_19,mode:"byDate"};
if(_1a==0){
dojo.mixin(_1b,{isFirst:true});
}
var _1c=new lconn.blogs.comment.Comment(_1b);
var _1d=this.commentsAP.appendChild(_1c.domNode);
dojo.mixin(_19,{node:_1d,widget:_1c,hidden:false,version:0});
this.commentData.items.push(_19);
this.commentData.count++;
}));
if(_18.items.length==0){
this.showEmpty();
}
this.updatePagingbar();
}else{
this.showError(_18.message);
}
},renderCommentsSingle:function(_1e){
console.debug(_1e);
if(_1e.message=="SUCCEED"){
dojo.forEach(_1e.items,dojo.hitch(this,function(_1f,_20){
var _21={panel:this,commentObj:_1f,mode:"singleThread"};
if(_20==0){
dojo.mixin(_21,{isFirst:true});
}
var _22=new lconn.blogs.comment.Comment(_21);
var _23=this.threadAP.appendChild(_22.domNode);
dojo.mixin(_1f,{node:_23,widget:_22,hidden:false,version:0});
this.threadData.items.push(_1f);
this.threadData.count++;
}));
if(_1e.items.length==0){
this.showEmptyThread();
}
this.commentsAP.style.display="none";
this.threadContainerAP.style.display="";
}else{
this.showError(_1e.message);
}
},renderMore:function(_24,_25){
console.debug(_24);
if(_24.message=="SUCCEED"){
dojo.query("div[threadid="+_25.args.content.threadid+"]",this.commentsAP).forEach(dojo.hitch(this,function(_26){
var _27=dojo.attr(_26,"widgetid");
if(_27!=null){
dijit.byId(_27).destroy();
}
}));
var _28=[].concat(this.commentData.items);
for(var i=0;i<_28.length;i++){
var _29=_28[i];
if((typeof _29.replyto!="undefined")&&_29.threadid==_25.args.content.threadid){
this.commentData.items.splice(dojo.indexOf(this.commentData.items,_29),1);
this.commentData.count--;
}
}
dijit.byId("blogAddCommentForm").hide();
var _2a;
for(_2a=0;_2a<this.commentData.items.length;_2a++){
if(this.commentData.items[_2a].id==_25.args.content.threadid){
break;
}
}
dojo.forEach(_24.items,dojo.hitch(this,function(_2b,_2c){
if(_2b.level>0){
var _2d={panel:this,commentObj:_2b};
if(this.currentMode==this.modeSupported["thread"]){
dojo.mixin(_2d,{mode:"threaded"});
}else{
dojo.mixin(_2d,{mode:"singleThread"});
}
var _2e=this.commentsAP.insertBefore(new lconn.blogs.comment.Comment(_2d).domNode,this.showMoreAPs[_2b.threadid]);
this.commentData.items.splice(_2a+1,0,dojo.mixin(_2b,{node:_2e}));
_2a++;
this.commentData.count++;
}
}));
dojo.destroy(this.showMoreAPs[_25.args.content.threadid]);
for(var i=0;i<this.commentData.items.length;i++){
var _29=this.commentData.items[i];
if(_29.id==_25.args.content.threadid){
_29.hasMore=false;
}
}
}else{
this.showError(_24.message);
}
},handleUpdate:function(_2f){
console.dir(_2f);
if(_2f.action=="add"){
this.commentCount++;
var _30={panel:this,commentObj:_2f.commentObj};
if(this.currentMode==this.modeSupported["thread"]){
if(_2f.level==0){
if(this.totalCount==0){
this.hideEmpty();
}
if(this.totalCount-(this.currentPage-1)*this.pageSize+1<=this.pageSize){
dojo.mixin(_30,{mode:"threaded"});
var _31=new lconn.blogs.comment.Comment(_30);
this.commentsAP.appendChild(_31.domNode);
this.commentData.items.push(dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0}));
this.commentData.count++;
this.totalCount++;
dojo.byId("link-"+_2f.commentObj.id+"-threaded").focus();
this.updatePagingbar();
}else{
this.currentPage=Math.ceil((this.totalCount+1)/this.pageSize);
this.render();
}
}else{
dojo.mixin(_30,{mode:"threaded"});
var _31=new lconn.blogs.comment.Comment(_30);
dojo.place(_31.domNode,_2f.lastReplyItem.node,"after");
var _32=dojo.indexOf(this.commentData.items,_2f.lastReplyItem);
this.commentData.items.splice(_32+1,0,dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0}));
this.commentData.count++;
dojo.forEach(_2f.commentObj.upstream,dojo.hitch(this,function(id){
var _33=this.getItem(id,this.commentData);
if(_33!=null){
_33.replycount++;
}
}));
if(_2f.replyToCommentWidget!=null){
_2f.replyToCommentWidget.expandHiddenComments();
}
dojo.byId("link-"+_2f.commentObj.id+"-threaded").focus();
this.updatePagingbar();
}
}else{
if(this.currentMode==this.modeSupported["byDate"]){
if(this.totalCount-(this.currentPage-1)*this.pageSize+1<=this.pageSize){
dojo.mixin(_30,{mode:"byDate",index:(this.currentPage-1)*this.pageSize+this.totalCount+1});
if(this.totalCount==0){
dojo.mixin(param,{isFirst:true});
}
var _31=new lconn.blogs.comment.Comment(_30);
this.commentsAP.appendChild(_31.domNode);
this.commentData.items.push(dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0}));
this.commentData.count++;
this.totalCount++;
dojo.byId("link-"+_2f.commentObj.id+"-byDate").focus();
this.updatePagingbar();
}else{
this.currentPage=Math.ceil((this.totalCount+1)/this.pageSize);
this.render();
}
}else{
if(this.currentMode==this.modeSupported["singleThread"]){
var _34=dojo.clone(_2f.commentObj);
dojo.mixin(_30,{mode:"singleThread"});
var _31=new lconn.blogs.comment.Comment(_30);
dojo.place(_31.domNode,_2f.lastReplyItem.node,"after");
var _32=dojo.indexOf(this.threadData.items,_2f.lastReplyItem);
this.threadData.items.splice(_32+1,0,dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0}));
this.threadData.count++;
this.updatePagingbar();
dojo.forEach(_2f.commentObj.upstream,dojo.hitch(this,function(id){
var _35=this.getItem(id,this.threadData);
if(_35!=null){
_35.replycount++;
}
var _36=this.getItem(id,this.commentData);
if(_36!=null){
_36.replycount++;
}
}));
if(_2f.replyToCommentWidget!=null){
_2f.replyToCommentWidget.expandHiddenComments();
}
dojo.byId("link-"+_2f.commentObj.id+"-singleThread").focus();
var _37=this.getItem(_2f.lastReplyItem.id,this.commentData);
if(_37==null||_37.node==null){
return;
}
if(this.previousMode==this.modeSupported["thread"]){
dojo.mixin(_30,{mode:"threaded"});
}else{
if(this.previousMode==this.modeSupported["byDate"]){
dojo.mixin(_30,{mode:"byDate"});
return;
}
}
var _38=new lconn.blogs.comment.Comment(_30);
dojo.place(_38.domNode,_37.node,"after");
var _39=dojo.indexOf(this.commentData.items,_37);
this.commentData.items.splice(_39+1,0,dojo.mixin(_34,{node:_38.domNode,widget:_38,hidden:false,version:0}));
this.commentData.count++;
}
}
}
}else{
if(_2f.action=="edit"){
var _3a=document.createElement("div");
dojo.place(_3a,_2f.replyToCommentWidget.domNode,"replace");
var _3b={commentObj:_2f.replyToCommentWidget.commentObj,isFirst:_2f.replyToCommentWidget.isFirst,index:_2f.replyToCommentWidget.index};
_2f.replyToCommentWidget.destroy();
var _30={panel:this,commentObj:_2f.commentObj};
if(this.currentMode==this.modeSupported["thread"]){
dojo.mixin(_30,{mode:"threaded"});
var _31=new lconn.blogs.comment.Comment(_30);
dojo.place(_31.domNode,_3a,"replace");
var _3c=dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0});
this.replaceItem(_2f.commentObj.id,_3c,this.commentData);
}else{
if(this.currentMode==this.modeSupported["byDate"]){
dojo.mixin(_30,{isFirst:_3b.isFirst,index:_3b.index,mode:"byDate"});
var _31=new lconn.blogs.comment.Comment(_30);
dojo.place(_31.domNode,_3a,"replace");
var _3c=dojo.mixin(_2f.commentObj,{node:_31.domNode,widget:_31,hidden:false,version:0});
this.replaceItem(_2f.commentObj.id,_3c,this.commentData);
}else{
if(this.currentMode==this.modeSupported["singleThread"]){
dojo.mixin(_30,{mode:"singleThread"});
var _31=new lconn.blogs.comment.Comment(_30);
dojo.place(_31.domNode,_3a,"replace");
var _3c=dojo.mixin(dojo.clone(_2f.commentObj),{node:_31.domNode,widget:_31,hidden:false,version:0});
this.replaceItem(_2f.commentObj.id,_3c,this.threadData);
var _3d=this.getItem(_2f.commentObj.id,this.commentData);
if(_3d==null||_3d.node==null){
return;
}
var _3e=document.createElement("div");
dojo.place(_3e,_3d.node,"replace");
var _3b={commentObj:_3d.widget.commentObj,isFirst:_3d.widget.isFirst,index:_3d.widget.index};
_3d.widget.destroy();
if(this.previousMode==this.modeSupported["thread"]){
dojo.mixin(_30,{isFirst:_3b.isFirst,index:_3b.index,mode:"threaded"});
}else{
if(this.previousMode==this.modeSupported["byDate"]){
var _3f=dojo.mixin(_3b.commentObj,{content:_2f.commentObj.content,edit:_2f.commentObj.edit});
dojo.mixin(_30,{isFirst:_3b.isFirst,index:_3b.index,commentObj:_3f,mode:"byDate"});
}
}
var _38=new lconn.blogs.comment.Comment(_30);
dojo.place(_38.domNode,_3e,"replace");
var _40=dojo.mixin(dojo.clone(_2f.commentObj),{node:_38.domNode,widget:_38,hidden:false,version:0});
this.replaceItem(_2f.commentObj.id,_40,this.commentData);
}
}
}
}
}
if(!!_2f.returnFocus){
dojo.byId(_2f.returnFocus).focus();
}
},replyToEntry:function(){
if(!currentLogin.auth){
lconn.blogs.utils.loginAction();
}
if(this.currentMode==this.modeSupported["singleThread"]){
this.backToAll();
}
var _41=dijit.byId("blogAddCommentForm");
if(typeof _41=="undefined"){
return;
}
var _42={level:0,entryid:this.entryid};
_41.prepareForm(_42);
dojo.place(_41.domNode,this.commentsAP,"last");
_41.show();
window.scrollTo(0,document.documentElement.scrollTop+dojo.position(dojo.byId("blogAddCommentForm")).y);
},switchMode:function(_43){
console.debug("Swich to mode: "+_43);
if(this.currentMode==this.modeSupported["singleThread"]){
this.commentsAP.style.display="";
this.threadContainerAP.style.display="none";
}
this.previousMode=this.currentMode;
this.currentMode=_43;
this.currentPage=1;
window.location.href=window.location.href.substr(0,window.location.href.indexOf("#"))+"#view="+this.currentMode;
this.render();
},updateMode:function(){
if(this.currentMode==this.modeSupported["byDate"]){
this.modeThreadAP.style.display="";
this.modeThreadTextAP.style.display="none";
this.modeByDateAP.style.display="none";
this.modeByDateTextAP.style.display="";
}else{
if(this.currentMode==this.modeSupported["thread"]){
this.modeThreadAP.style.display="none";
this.modeThreadTextAP.style.display="";
this.modeByDateAP.style.display="";
this.modeByDateTextAP.style.display="none";
}
}
},viewSingleThread:function(id,_44){
if(this.currentMode==this.modeSupported["singleThread"]){
return;
}
this.singleThreadId=id;
this.returnFocus=_44;
this.previousMode=this.currentMode;
this.currentMode=this.modeSupported["singleThread"];
var _45=this.render();
this.topPagingWidget.hide();
this.bottomPagingWidget.hide();
this.addCommentAP.style.display="none";
return _45;
},backToAll:function(){
this.currentMode=this.previousMode;
this.previousMode=this.modeSupported["singleThread"];
if(this.currentMode==this.modeSupported["thread"]){
document.getElementById("sortByToolbar").style.display="none";
}else{
if(this.currentMode==this.modeSupported["byDate"]){
document.getElementById("sortByToolbar").style.display="";
}
}
window.location.href=window.location.href.substr(0,window.location.href.indexOf("#"))+"#view="+this.currentMode;
this.commentsAP.style.display="";
this.threadContainerAP.style.display="none";
if(this.topPagingWidget._pageCount()>1){
this.topPagingWidget.show();
this.bottomPagingWidget.show();
}
if(!this.allowComment||!currentLogin.auth||this.modeMinimal){
this.addCommentAP.style.display="none";
}else{
this.addCommentAP.style.display="";
}
if(this.returnFocus!=null){
try{
this.returnFocus.focus();
}
catch(err){
}
}
},showEmpty:function(){
this.commentsAP.innerHTML="<div id=\"emptyDiv\" style=\"border-top:0 none;\" class=\"lotusPost\"><span class=\"lconnEmpty\">"+this.RS_No_Comment+"</span></div>";
},hideEmpty:function(){
dojo.destroy(dojo.byId("emptyDiv"));
},showEmptyThread:function(){
this.threadAP.innerHTML="<div id=\"emptyThreadDiv\" style=\"border-top:0 none;\" class=\"lotusPost\"><span class=\"lconnEmpty\">"+this.RS_No_Comment+"</span></div>";
},hideEmptyThread:function(){
dojo.destroy(dojo.byId("emptyThreadDiv"));
},showError:function(msg){
var _46=this.nls.COMMENT["RS_MSG_"+msg];
if(typeof _46!="undefined"){
lconn.blogs.utils.showMessage(this.boardAP,_46,"warning",true);
}
},parseVcard:function(){
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.commentsAP);
}
},preparePaging:function(){
var _47={pageSize:this.pageSize,currentMode:this.currentMode,total:dojo.hitch(this,function(){
return this.totalCount;
}),onPage:dojo.hitch(this,function(p){
this.currentPage=p;
console.debug("Jump to page: "+p);
this.render();
}),onPageSizeChange:dojo.hitch(this,function(ps){
this.pageSize=ps;
this.currentPage=1;
console.debug("Change page size: "+ps);
this.render();
})};
if(!this.topPagingWidget){
var _48;
if(!this.displayThreadPanel){
_48=dojo.mixin({features:["info","list","nav"]},_47);
}else{
_48=dojo.mixin({features:["list","nav"]},_47);
}
_48=dojo.mixin({pagingLabel:this.nls.PAGING.PRIMARY_PAGING_LABEL},_48);
this.topPagingWidget=new lconn.blogs.Paging(_48,this.topPagingAP);
}
if(!this.bottomPagingWidget){
var _48=dojo.mixin({features:["nav","ps","jump"],pagingLabel:this.nls.PAGING.SECONDARY_PAGING_LABEL},_47);
this.bottomPagingWidget=new lconn.blogs.Paging(_48,this.bottomPagingAP);
}
},toThreaded:function(){
this.switchMode(this.modeSupported["thread"]);
},toByDate:function(){
this.switchMode(this.modeSupported["byDate"]);
},getFlagInappropriateForm:function(){
this.flagInappropriateForm=new lconn.blogs.comment.FlagInappropriateForm({panel:this});
return this.flagInappropriateForm;
},removeItem:function(id,_49){
var _4a=[].concat(_49.items);
for(var i=0;i<_4a.length;i++){
var _4b=_4a[i];
if(_4b.id==id){
var _4c=_49.items[dojo.indexOf(_49.items,_4b)+1];
if(typeof _4c!="undefined"&&_4c.level>_4b.level){
_4b.node.innerHTML=this.getDeletedContent();
}else{
dojo.destroy(_4b.node);
}
_49.items.splice(dojo.indexOf(_49.items,_4b),1);
_49.count--;
}
}
},replaceItem:function(id,_4d,_4e){
for(var i=0;i<_4e.items.length;i++){
var _4f=_4e.items[i];
if(_4f.id==id){
_4e.items.splice(dojo.indexOf(_4e.items,_4f),1,_4d);
}
}
},getItem:function(id,_50){
var rt=null;
for(var i=0;i<_50.items.length;i++){
var _51=_50.items[i];
if(_51.id==id){
rt=_51;
}
}
return rt;
},getDeletedContent:function(){
return "<div role=\"alert\" class=\"lotusMessage lotusWarning\"><img title=\""+this.nls.rs_warningIcon+"\" alt=\""+this.nls.rs_warningIcon+"\" class=\"lconnSprite lconnSprite-iconWarning16\" src=\""+this.blankGif+"\"><span class=\"lotusAltText\">"+this.nls.rs_warningIcon+"</span><span>"+this.RS_Content_Deleted+"</span></div>";
},scollToComment:function(id){
var _52=dojo.byId(id);
if(_52){
var pos=dojo.position(_52);
scrollTo(pos.x,pos.y);
}
},showLoading:function(){
this.commentLoadingAP.style.display="";
if(this.currentMode==this.modeSupported["singleThread"]){
this.threadContainerAP.style.display="none";
}else{
this.commentsAP.style.display="none";
}
},hideLoading:function(){
this.commentLoadingAP.style.display="none";
if(this.currentMode==this.modeSupported["singleThread"]){
this.threadContainerAP.style.display="";
if(!this.firstload){
this.backToAllLinkAP.focus();
}
}else{
this.commentsAP.style.display="";
}
}});
}


;if(!dojo._hasResource["lconn.blogs.smiley.Smiley"]){
dojo._hasResource["lconn.blogs.smiley.Smiley"]=true;
dojo.provide("lconn.blogs.smiley.Smiley");
dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.smiley.Smiley",null,{tempArray:[],smileyPatterns:null,refSmileysProperty:[],smileysSigns:[],baseURL:lconn.core.url.getServiceUrl(lconn.core.config.services.blogs).uri,regexRef:["-","(",")","\\","|",":","^","$","*","+","?","{","}","!","=","<",">","&","[","]"],smileysProperty:[{sign:":-)",filename:"smile.gif"},{sign:":)",filename:"smile.gif"},{sign:";-)",filename:"wink.gif"},{sign:";)",filename:"wink.gif"},{sign:":-(",filename:"sad.gif"},{sign:":(",filename:"sad.gif"},{sign:":-0",filename:"surprised.gif"},{sign:"8-)",filename:"sunglasses.gif"},{sign:":-D",filename:"grin.gif"},{sign:"\\-o",filename:"bored.gif"},{sign:":-P",filename:"tongue.gif"},{sign:"O:-)",filename:"angelic.gif"},{sign:":-||",filename:"angry.gif"},{sign:"%-)",filename:"drunk.gif"},{sign:"/:)",filename:"20.gif"},{sign:":-S",filename:"15.gif"},{sign:":|",filename:"19.gif"},{sign:";;)",filename:"smirk.gif"},{sign:":-B",filename:"bucktooth.gif"},{sign:"=;",filename:"hand.gif"},{sign:"[-(",filename:"28.gif"},{sign:"(:|",filename:"depressed.gif"},{sign:"=P~",filename:"drool.gif"},{sign:":-?",filename:"thinker.gif"},{sign:"=D>",filename:"whisper.gif"},{sign:":\">",filename:"blush.gif"},{sign:":o)",filename:"clown.gif"},{sign:":-/",filename:"confused.gif"},{sign:":((",filename:"cry.gif"},{sign:">:)",filename:"devil.gif"},{sign:"#-o",filename:"doh.gif"},{sign:":-*",filename:"kiss.gif"},{sign:":))",filename:"laugh.gif"},{sign:":x",filename:"love.gif"},{sign:"8-|",filename:"rolleyes.gif"},{sign:":(:-$",filename:"shush.gif"},{sign:":-&",filename:"sick.gif"},{sign:"8-}",filename:"silly.gif"},{sign:"I-)",filename:"sleep.gif"},{sign:":->",filename:"smug.gif"}],init:function(){
if(this.smileysSigns.length==0){
for(var i=0;i<this.smileysProperty.length;i++){
for(var j=i;j<this.smileysProperty.length;j++){
if(this.smileysProperty[i].sign.length<this.smileysProperty[j].sign.length){
var _1=this.smileysProperty[i];
this.smileysProperty[i]=this.smileysProperty[j];
this.smileysProperty[j]=_1;
}
}
this.smileysSigns.push(this.smileysProperty[i].sign);
this.refSmileysProperty.push(this.smileysProperty[i]);
}
}
var _2=new Array();
for(var i=0;i<this.smileysSigns.length;i++){
var _3=this.refSmileysProperty[i].filename.split(".")[0];
var _4=this.regexEscape(this.escapeHTML(this.smileysSigns[i]));
_2.push("("+_4+")");
this.tempArray.push("<img src=\""+this.baseURL+"/images/smileys/"+this.refSmileysProperty[i].filename+"\" class=\"smiley\""+" alt=\""+_3+"\""+" title=\""+_3+"\" />");
}
this.smileyPatterns=_2;
},render:function(_5){
this.init();
var _6=_5;
if(dojo.byId("Emoticons").checked){
for(var i=0;i<this.refSmileysProperty.length;i++){
var _7=_6.match(new RegExp("<[^>]+>|&#\\d*;|"+this.smileyPatterns[i],"g"));
var j=0;
var _8=_6;
while(_7!=null){
_7=_7.reverse();
var _9=_7.pop();
var _a=_8.indexOf(_9);
if(!this.isTag(_9)){
_6=_6.substring(0,_a)+_9.replace(new RegExp(this.smileyPatterns[i],"g"),this.tempArray[i])+_6.substring(_a+_9.length,_6.length);
_8=_8.replace(_9,this.replaceSpace(this.tempArray[i].length));
}else{
_8=_8.replace(_9,this.replaceSpace(_9.length));
_7=_8.match(new RegExp("<[^>]+>|&#\\d*;|"+this.smileyPatterns[i],"g"));
}
}
}
}
return _6;
},replaceSpace:function(_b){
var _c="";
for(var i=0;i<_b;i++){
_c+=" ";
}
return _c;
},isTag:function(_d){
ref_length=_d.replace(new RegExp("<[^>]+>|&#\\d*;","g"),"").length;
if(ref_length==0){
return true;
}else{
return false;
}
},htmlEscape:function(_e){
if(_e==null){
return _e;
}
_e=_e.replace("&amp;","&");
_e=_e.replace(" ","&nbsp;");
_e=_e.replace("&quot;","\"");
_e=_e.replace("&lt;","<");
_e=_e.replace("&gt;",">");
return _e;
},regexEscape:function(_f){
var _10="";
for(var i=0;i<_f.length;i++){
for(var j=0;j<this.regexRef.length;j++){
if(this.regexRef[j]==_f[i]){
_10+="\\";
break;
}
}
_10+=_f[i];
}
return _10;
},escapeHTML:function(str){
if(str==null){
return str;
}
str=str.replace("&","&amp;");
str=str.replace("&nbsp;"," ");
str=str.replace("\"","&quot;");
str=str.replace("<","&lt;");
str=str.replace(">","&gt;");
return str;
}});
}


;if(!dojo._hasResource["lconn.blogs.ckeditor"]){
dojo._hasResource["lconn.blogs.ckeditor"]=true;
(function(){
dojo.provide("lconn.blogs.ckeditor");


lconn.core.ckeditor.addCustomConfig(function(_1){
dojo.mixin(_1,{toolbar:[{name:"tools",items:["Undo","Redo","MenuPaste","Find","LotusSpellChecker","ShowBlocks","IbmPermanentPen"]},{name:"styles",items:["Format","Font","FontSize","Bold","Italic","Underline","Strike","TextColor","BGColor","CopyFormatting","Subscript","Superscript","RemoveFormat"]},{name:"paragraph",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","NumberedList","BulletedList","Indent","Outdent","Blockquote","BidiLtr","BidiRtl","Language"]},{name:"insert",items:["Table","InsertImage","Embed","MenuLink","Anchor","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});
lconn.core.ckeditor.addExtraPlugin("autogrow",_1);
if(_1.menus){
_1.menus.link={buttonClass:"cke_button_link",commands:["link","linkToFiles","bookmark"]};
}
});
})();
}


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










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.menu.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(_9){
dojo.forEach(this._subscriptions,dojo.hitch(dojo,dojo.unsubscribe));
this._subscriptions=[];
if(this.menu){
this.menu.destroyRecursive(_9);
}
this.menu=null;
this.inherited(arguments);
},_handleFollowCommunityTopic:function(_a){
this._handleCommunityTopic(false);
},_handleUnfollowCommunityTopic:function(_b){
this._handleCommunityTopic(true);
},_handleCommunityTopic:function(_c){
dojo.forEach(this._menuItems,dojo.partial(function(_d,_e){
_e._item.setEnabled(_d);
},_c));
},_toggleMenuItems:function(_f,n){
dojo.forEach(this._menuItems,function(_10,i){
if(i>=n){
return;
}
_10._item.setEnabled(_f);
});
},_validateItems:function(){
var _11=false;
for(var i=this.items.length-1;i>=0;i--){
if(!_11&&this.items[i].on){
_11=true;
continue;
}
if(_11&&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(_12){
dojo.safeMixin(this,_12||{});
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 _13=new dojo.Deferred();
setTimeout(function(){
_13.callback();
},100);
return _13;
},deactivate:function(){
console.warn("Implementors must override deactivate()");
var _14=new dojo.Deferred();
setTimeout(function(){
_14.callback();
},100);
return _14;
},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(_15){
this.enabled=_15;
this._updateLabel();
},setMenuItem:function(_16){
this.menuItem=_16;
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", "widget/templates/AttachedFile.html", "<li> <a title=\"${strings.title}\" class=\"lotusFilter\" role=\"button\" href=\"javascript:;\"> <img alt=\"\" aria-invisible=\"true\" class=\"lconn-ftype16 lconn-ftype16-${extension}\" src=\"${_blankGif}\">${filename} (${size}) <img alt=\"${strings.remove_alt}\" class=\"lotusDelete\" src=\"${_blankGif}\"><span class=\"lotusAltText\">X</span> </a></li>");

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






(function(){
var _1={KB:"${0} KB",MB:"${0} MB",GB:"${0} GB"};
dojo.declare("lconn.core.widget.AttachedFile",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.core","widget/templates/AttachedFile.html"),strings:{},filename:"",extension:"",size:0,postMixInProperties:function(_2){
if(!this.extension){
this.extension=lconn.core.util.text.getExtension(this.filename);
}
this.size=lconn.core.util.text.formatSize(_1,this.size);
},postCreate:function(){
this.connect(this.domNode,"onclick","notifyAndDestroy");
},notifyAndDestroy:function(){
this.onClose();
this.destroy();
},onClose:function(){
}});
})();
}


;dojo.cache("lconn.core", "widget/templates/AttachedFileList.html", "<div class=\"lotusFilters2\"> <ul class=\"lotusInlinelist FileListFilters\" dojoAttachPoint=\"containerNode\"></ul></div>");

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
















dojo.requireLocalization("lconn.core","strings");
(function(){
var _1=dojo.i18n.getLocalization("lconn.core","strings");
var _2=0;
dojo.declare("lconn.core.widget.AttachedFileList",[dijit._Widget,dijit._Templated,dijit._Container],{_strings:{remove_alt:_1.rs_attachedfile_remove_alt},templatePath:dojo.moduleUrl("lconn.core","widget/templates/AttachedFileList.html"),fileProvider:null,storageManager:null,progressBar:{},postCreate:function(){
this.inherited(arguments);
this.subscribe(lconn.core.ckplugins.icpublishBinaryData.TOPIC,dojo.hitch(this,this.handleDataUri));
this.subscribe(lconn.core.ckplugins.icpublishBinaryData.LOADING.DATA_AVAILABLE,dojo.hitch(this,this.updateProgressBar));
this.subscribe(lconn.core.ckplugins.icpublishBinaryData.LOADING.UPLOAD_COMPLETE,dojo.hitch(this,this.hideProgressBar));
},handleDataUri:function(_3){
if(_3&&_3.filesArr){
dojo.forEach(_3.filesArr,dojo.hitch(this,function(_4){
var _5=_4.name||dojo.string.substitute(_1.rs_attachedfile_filename,[++_2]);
if(_4.type==="html"||!_4.type){
var m=_4.data[0].match(/^src="data:image\/(.*);base64,(.*)"$/);
_4.type=m[1];
}
var _6=_4.size||(_4.data[0].length)/1.37;
this.addChild(new lconn.core.widget.AttachedFile({strings:{title:_5,remove_alt:this._strings.remove_alt},filename:_5,size:_6,extension:_4.type,id:"element"+_4.id,onClose:function(){
_3.deleteImagecb(_4.id);
}}));
}));
}
},updateProgressBar:function(_7){
console.log(dojo.getObject(_7.id,false,this.progressBar));
if(!dojo.getObject(_7.id,false,this.progressBar)){
var p=new dijit.ProgressBar({style:"width: 140px",id:_7.id}).placeAt(this.domNode);
dojo.setObject(_7.id,p,this.progressBar);
}
var _8=dojo.getObject(_7.id,false,this.progressBar);
_8.set({value:_7.status});
},hideProgressBar:function(_9){
var _a=dojo.getObject(_9.id,false,this.progressBar);
if(_a){
_a.destroy();
}
}});
})();
}


;if(!dojo._hasResource["lconn.blogs.recommend.Inline"]){
dojo._hasResource["lconn.blogs.recommend.Inline"]=true;
dojo.provide("lconn.blogs.recommend.Inline");




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{
if(lconn.core.config.multiTenantEnabled){
return dojo.getObject("gllConnectionsData.srvUrls.profiles")+"/photo/"+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;
}
}
}
}});
}


;if(!dojo._hasResource["lconn.blogs.recommend.RecommendDataStore"]){
dojo._hasResource["lconn.blogs.recommend.RecommendDataStore"]=true;
dojo.provide("lconn.blogs.recommend.RecommendDataStore");




dojo.requireLocalization("lconn.blogs","strings");
dojo.declare("lconn.blogs.recommend.RecommendDataStore",[dojo.data.ItemFileWriteStore,com.ibm.oneui._base],{type:null,itemId:null,_strings:{},postMixInProperties:function(){
this.inherited(arguments);
var _1=dojo.i18n.getLocalization("lconn.blogs","strings");
this._strings.SAVE_ERROR_NOT_FOUND=_1.rs_entryNotFound;
this._strings.SAVE_ERROR_TIMEOUT=_1.rs_sessionTimeout;
},newItem:function(_2){
if(!_2["name"]){
_2["name"]=currentLogin.name;
}
console.debug(_2.userid);
this.hasRecommended=true;
this.inherited(arguments);
return this.recommendAction(true);
},deleteItem:function(_3,_4){
console.debug(_3);
this.hasRecommended=false;
this.inherited(arguments);
return this.recommendAction(false);
},handleRecommend:function(_5,_6,_7,_8){
if(this._request){
this._request=null;
}
if(!_7.success){
this.onError(_7);
this.revert();
this.hasRecommended=!_5;
_6.errback();
}else{
this.hasRecommended=_5;
_6.callback();
}
},onError:function(_9){
if(_9.error=="session timeout"){
lconn.blogs.utils.alert(this._strings.SAVE_ERROR_TIMEOUT);
lconn.blogs.utils.refreshSecurityNonce(_9.nonce);
}else{
if(_9.error=="ItemNotFound"){
lconn.blogs.utils.alert(this._strings.SAVE_ERROR_NOT_FOUND);
}
}
},recommendAction:function(_a){
var d=new dojo.Deferred();
if(!_a){
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _b={action:"remove",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _b={action:"remove",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _c={url:BlogsBaseUrl+"/roller-services/json/rating",handleAs:"json",content:_b,handle:dojo.hitch(this,this.handleRecommend,_a,d)};
dojo.xhrPost(_c).addCallback(dojo.hitch(this,function callBack(){
console.log("Unrecommend");
}));
}else{
if(!currentLogin.auth){
return;
}
if(this.type=="entry"){
var _b={action:"add",entryid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}else{
var _b={action:"add",commentid:this.itemId,version:250,rating:5,dangerousurlnonce:window.__security_nonce};
}
var _c={url:BlogsBaseUrl+"/roller-services/json/rating",handleAs:"json",content:_b,handle:dojo.hitch(this,this.handleRecommend,_a,d)};
dojo.xhrPost(_c).addCallback(dojo.hitch(this,function callBack(){
console.log("recommend");
}));
}
return d;
},loadItem:function(_d){
this.logEnter(arguments);
this.inherited(arguments);
var _e=_d.scope?_d.scope:dojo.global;
try{
if(_d.onItem&&_d.item){
_d.onItem.call(_e,_d.item);
}
}
catch(error){
if(_d.onError){
_d.onError.call(_e,error);
}
}
this.logExit(arguments);
}});
}


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














































































































if(window.Start===undefined){
window.Start=function(){
};
}
}


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