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


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


lconn.core.TagSlider.showTagVis=function(_1,_2){
if(!dojo.byId(_2)){
return;
}
var _3=dojo.byId(_2).getElementsByTagName("li");
for(var i=0;i<_3.length;i++){
var _4=_3[i];
var _5=_4.className.match(/^f\d+-(\d+)/);
if(_5){
var _6=_5[1];
_4.style.display=(_6>=_1)?"inline":"none";
}
}
};
lconn.core.TagSlider.updateTagVis=function(_7,_8){
dojo.cookie("sliderVis_lconnTagSliderHandle",_7);
lconn.core.TagSlider.showTagVis(_7,_8);
};
lconn.core.TagSlider.sliderUtilGetPosition=function(_9){
var _a=dojo.cookie(_9);
if(_a==null||_a<0){
_a=0;
}else{
if(_a>100){
_a=100;
}
}
return _a;
};
}


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

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

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


lconn.forums.ckeditor={doInitCKEditorConfig:function(){
dojo.mixin(CKEDITOR.config,{extraPlugins:"dwpbckcode",toolbar_ForumToolbar:[{name:"tools",items:["Undo","Redo","MenuPaste","Find","LotusSpellChecker","ShowBlocks","DWpbckcode"]},{name:"styles",items:["Format","Font","FontSize","Bold","Italic","Underline","Strike","TextColor","BGColor","Subscript","Superscript","RemoveFormat"]},{name:"paragraph",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","NumberedList","BulletedList","Indent","Outdent","Blockquote","BidiLtr","BidiRtl","Language"]},{name:"insert",items:["Table","Image","MenuLink","Iframe","Flash","PageBreak","HorizontalRule","SpecialChar","Smiley"]}],language:djConfig.locale,toolbar:"ForumToolbar",resize_maxWidth:850,ibmFilterPastedDataUriImage:false,ibmMentionShouldNotifyCallback:true});
},initCKEditorConfig:function(){
lconn.core.config.properties["com.ibm.lconn.core.web.ckeditor.pasteImages.enabled"]="true";
lconn.core.config.properties["com.ibm.lconn.core.web.ckeditor.pasteImages.demo.enabled"]="true";
if(typeof CKEDITOR!="undefined"&&typeof CKEDITOR.config!="undefined"){
this.doInitCKEditorConfig();
}else{
lconn.core.ckeditor.addCustomConfig(dojo.hitch(this,function(){
this.doInitCKEditorConfig();
}));
}
}};
})();
}


;define("dojo/text!dijit/templates/ProgressBar.html", '<div class="dijitProgressBar dijitProgressBarEmpty" role="progressbar"\n	><div  data-dojo-attach-point="internalProgress" class="dijitProgressBarFull"\n		><div class="dijitProgressBarTile" role="presentation"></div\n		><span style="visibility:hidden">&#160;</span\n	></div\n	><div data-dojo-attach-point="labelNode" class="dijitProgressBarLabel" id="${id}_label"></div\n	><span data-dojo-attach-point="indeterminateHighContrastImage"\n		   class="dijitInline dijitProgressBarIndeterminateHighContrastImage"></span\n></div>\n');

;define("dijit/ProgressBar",["require","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/number","./_Widget","./_TemplatedMixin","dojo/text!./templates/ProgressBar.html"],function(_1,_2,_3,_4,_5,_6,_7,_8){
return _2("dijit.ProgressBar",[_6,_7],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,label:"",name:"",templateString:_8,_indeterminateHighContrastImagePath:_1.toUrl("dijit/themes/a11y/indeterminate_progress.gif?etag=Zq7dRMc"),postMixInProperties:function(){
this.inherited(arguments);
if(!(this.params&&"value" in this.params)){
this.value=this.indeterminate?Infinity:this.progress;
}
},buildRendering:function(){
this.inherited(arguments);
this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
this.update();
},_setDirAttr:function(_9){
_3.toggle(this.domNode,"dijitProgressBarRtl",_9=="rtl");
this.inherited(arguments);
},update:function(_a){
_4.mixin(this,_a||{});
var _b=this.internalProgress,ap=this.domNode;
var _c=1;
if(this.indeterminate){
ap.removeAttribute("aria-valuenow");
}else{
if(String(this.progress).indexOf("%")!=-1){
_c=Math.min(parseFloat(this.progress)/100,1);
this.progress=_c*this.maximum;
}else{
this.progress=Math.min(this.progress,this.maximum);
_c=this.maximum?this.progress/this.maximum:0;
}
ap.setAttribute("aria-valuenow",this.progress);
}
ap.setAttribute("aria-labelledby",this.labelNode.id);
ap.setAttribute("aria-valuemin",0);
ap.setAttribute("aria-valuemax",this.maximum);
this.labelNode.innerHTML=this.report(_c);
_3.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);
_b.style.width=(_c*100)+"%";
this.onChange();
},_setValueAttr:function(v){
this._set("value",v);
if(v==Infinity){
this.update({indeterminate:true});
}else{
this.update({indeterminate:false,progress:v});
}
},_setLabelAttr:function(_d){
this._set("label",_d);
this.update();
},_setIndeterminateAttr:function(_e){
this._set("indeterminate",_e);
this.update();
},report:function(_f){
return this.label?this.label:(this.indeterminate?"&#160;":_5.format(_f,{type:"percent",places:this.places,locale:this.lang}));
},onChange:function(){
}});
});


;if(!dojo._hasResource["lconn.forums.Constants"]){
dojo._hasResource["lconn.forums.Constants"]=true;
dojo.provide("lconn.forums.Constants");
lconn.forums.Constants.CONTEXT_PATH="";
lconn.forums.Constants.AJAX_TIMEOUT=30000;
lconn.forums.Constants.MIME_ICON_CLASS="dfMimeIcon";
lconn.forums.Constants.FILE_NAME_ATTRIBUTE="fileName";
lconn.forums.Constants.DATE_CLASS="formatDate";
lconn.forums.Constants.LIKE_CLASS="forumLike";
lconn.forums.Constants.PERSON_CLASS="vcardParent";
lconn.forums.Constants.REDIRECT_COOKIE="ForumReqURL";
lconn.forums.Constants.CONFIRM_MESSAGE_COOKIE="forumConfirmMessage";
lconn.forums.Constants.NONCE_HEADER={"X-Update-Nonce":"true"};
lconn.forums.Constants.ERROR_CODES=[401,403,500];
lconn.forums.Constants.REPLYTO_COOKIE_NAME="replyTo";
lconn.forums.Constants.MEMBER_FLUSH_COOKIE_NAME="flushMember";
lconn.forums.Constants.MEMBER_FLUSH_COOKIE_VALUE="true";
lconn.forums.Constants.MIMETYPES={"application/excel":"spreadsheet","application/msword":"document","application/pdf":"pdf","application/postscript":"document","application/powerpoint":"presentation","application/rtf":"document","application/vnd.ms-excel":"spreadsheet","application/vnd.ms-outlook":"document","application/vnd.ms-powerpoint":"presentation","application/vnd.ms-project":"document","application/vnd.ms-works":"document","application/vnd.oasis.opendocument.presentation":"presentation","application/vnd.oasis.opendocument.spreadsheet":"spreadsheet","application/vnd.oasis.opendocument.text":"document","application/vnd.sun.xml.calc":"spreadsheet","application/vnd.sun.xml.impress":"presentation","application/vnd.sun.xml.writer":"document","application/x-compress":"archive","application/x-compressed":"archive","application/x-gtar":"archive","application/x-gzip":"archive","application/x-msaccess":"spreadsheet","application/x-mswrite":"document","application/zip":"archive","audio/basic":"audio","audio/mid":"audio","audio/mpeg":"audio","audio/x-aiff":"audio","audio/x-mpegurl":"audio","audio/x-pn-realaudio":"audio","audio/x-wav":"audio","image/bmp":"image","image/gif":"image","image/jpeg":"image","image/png":"image","image/tiff":"image","image/vnd.adobe.photoshop":"image","image/x-icon":"image","text/html":"html","text/plain":"txt","text/richtext":"document","video/mpeg":"video","video/quicktime":"video","video/x-la-asf":"video","video/x-ms-asf":"video","video/x-msvideo":"video","video/x-sgi-movie":"video","vnd.microsoft.icon":"image","getClass":function(_1){
var r=lconn.forums.Constants.MIMETYPES[_1];
if(r!=undefined){
return r;
}else{
return "generic";
}
}};
lconn.forums.Constants.FILE_ICON_MAP={archive:"lconn-ftype16 lconn-ftype16-zip",audio:"lconn-ftype16 lconn-ftype16-au",txt:"lconn-ftype16 lconn-ftype16-txt",html:"lconn-ftype16 lconn-ftype16-html",document:"lconn-ftype16 lconn-ftype16-doc",image:"lconn-ftype16 iconsFileTypes16-ftGraphic16",presentation:"lconn-ftype16 lconn-ftype16-ppt",spreadsheet:"lconn-ftype16 lconn-ftype16-xls",video:"lconn-ftype16 lconn-ftype16-mpeg",pdf:"lconn-ftype16 lconn-ftype16-pdf",_prefix:"lconn-ftype16-",_default:"lconn-ftype16"};
lconn.forums.Constants.AUTH_REDIRECT_PATH="/auth/redirect";
lconn.forums.Constants.CREATE_CATEGORY_PATH="/ajax/createCategory";
lconn.forums.Constants.CREATE_FORUM_PATH="/ajax/createForum";
lconn.forums.Constants.CREATE_TOPIC_PATH="/ajax/createTopic";
lconn.forums.Constants.CREATE_REPLY_PATH="/ajax/createReply";
lconn.forums.Constants.DELETE_PATH="/ajax/delete";
lconn.forums.Constants.DELETE_REPLY_PATH="/ajax/deleteReply";
lconn.forums.Constants.DELETE_TOPIC_PATH="/ajax/deleteTopic";
lconn.forums.Constants.DEMO_URL="http://ibmtvdemo.edgesuite.net/software/lotus/uxid/connections/forums45/forums_demo.html";
lconn.forums.Constants.FLAG_INAPPROPRIATE_PATH="/ajax/flag";
lconn.forums.Constants.CAN_FLAG_PATH="/ajax/canFlag";
lconn.forums.Constants.GET_FLAGCATEGORIES_PATH="/ajax/getFlagCategories";
lconn.forums.Constants.GET_NONCE_PATH="/ajax/nonce";
lconn.forums.Constants.GET_CATEGORIES_PATH="/ajax/categories";
lconn.forums.Constants.GET_FORUMS_PATH="/ajax/forums";
lconn.forums.Constants.GET_MYFORUMS_PATH="/ajax/myforums";
lconn.forums.Constants.GET_TOPICS_PATH="/ajax/topics";
lconn.forums.Constants.GET_REPLIES_PATH="/ajax/pagedTopic";
lconn.forums.Constants.ACCEPT_ANSWER_PATH="/ajax/acceptAnswer";
lconn.forums.Constants.REJECT_ANSWER_PATH="/ajax/rejectAnswer";
lconn.forums.Constants.LOCK_PATH="/ajax/lock";
lconn.forums.Constants.UNLOCK_PATH="/ajax/unlock";
lconn.forums.Constants.REOPEN_QUESTION_PATH="/ajax/reopenQuestion";
lconn.forums.Constants.GET_QUESTIONSTATUS_PATH="/ajax/questionStatus";
lconn.forums.Constants.GET_TAG_PATH="/ajax/tags/get";
lconn.forums.Constants.ADD_TAG_PATH="/ajax/tags/add";
lconn.forums.Constants.REMOVE_TAG_PATH="/ajax/tags/remove";
lconn.forums.Constants.REDIRECT_CATEGORY_PATH="/html/category";
lconn.forums.Constants.REDIRECT_ONLYFORUM_PATH="/html/forums";
lconn.forums.Constants.REDIRECT_FORUM_PATH="/html/forum";
lconn.forums.Constants.REDIRECT_TOPIC_PATH="/html/topic";
lconn.forums.Constants.REDIRECT_MYFORUMS_PATH="/html/myforums";
lconn.forums.Constants.PIN_TOPIC_PATH="/ajax/pinTopic";
lconn.forums.Constants.SUBSCRIBE_TOPIC_PATH="/ajax/subscribeTopic";
lconn.forums.Constants.SUBSCRIBE_FORUM_PATH="/ajax/subscribeForum";
lconn.forums.Constants.UPDATE_CATEGORY_PATH="/ajax/updateCategory";
lconn.forums.Constants.UPDATE_FORUM_PATH="/ajax/updateForum";
lconn.forums.Constants.UPDATE_TOPIC_PATH="/ajax/updateTopic";
lconn.forums.Constants.UPDATE_REPLY_PATH="/ajax/updateReply";
lconn.forums.Constants.RECOMMEND_LIKE_PATH="/ajax/like";
lconn.forums.Constants.RECOMMEND_UNLIKE_PATH="/ajax/unlike";
lconn.forums.Constants.RECOMMEND_RECOMMENDERS_PATH="/ajax/wholikes";
lconn.forums.Constants.ATTACH_ADDIMAGE="/ajax/insertImage";
lconn.forums.Constants.ATTACH_DOWNLOADIMAGE="/ajax/download";
lconn.forums.Constants.INSERTED_IMAGES="/ajax/loadImages/get";
lconn.forums.Constants.DELETE_IMAGE="/ajax/deleteImage";
lconn.forums.Constants.GET_ATOM_CATEGORIES_PATH="/atom/forum-categories";
lconn.forums.Constants.MOVE_PATH="/ajax/move";
lconn.forums.Constants.MOVE_TOPIC_PATH="/ajax/moveTopic";
lconn.forums.Constants.REQUEST_FORUMS_PATH="/ajax/requestForums";
lconn.forums.Constants.MEMBER_AUTH_CHECK_PATH="/ajax/checkMemberAuth";
lconn.forums.Constants.COMM_PUBLIC_JOIN_PATH="/service/atom/community/members";
lconn.forums.Constants.COMM_MOD_JOIN_REQUEST_PATH="/service/atom/community/requestsToJoin";
lconn.forums.Constants.ListTypes={};
lconn.forums.Constants.ListTypes.FORUMS="forums";
lconn.forums.Constants.ListTypes.CATEGORIES="categories";
lconn.forums.Constants.ListTypes.TOPICS="topics";
lconn.forums.Constants.ListTypes.OPENQUESTIONS="openQuestions";
lconn.forums.Constants.ListTypes.ANSWEREDQUESTIONS="answeredQuestions";
lconn.forums.Constants.ListTypes.MYFORUMS="myforums";
lconn.forums.Constants.ListTypes.REPLIES="replies";
lconn.forums.Constants.messageTypes={ERROR:0,WARNING:1,INFO:2,CONFIRM:3};
}


;if(!dojo._hasResource["lconn.core.MimeClass"]){
dojo._hasResource["lconn.core.MimeClass"]=true;
dojo.provide("lconn.core.MimeClass");
lconn.core.MimeClass={getClass:function(_1){
var _2=lconn.core.MimeClass.mimetypes[_1];
if(_2!=undefined){
return _2;
}else{
return "generic";
}
},mimetypes:{"image/bmp":"image","image/gif":"image","image/jpeg":"image","image/tiff":"image","image/x-icon":"image","image/png":"image","image/vnd.adobe.photoshop":"image","vnd.microsoft.icon":"image","application/msword":"document","application/pdf":"document","application/rtf":"document","application/vnd.ms-outlook":"document","application/vnd.ms-project":"document","application/vnd.ms-works":"document","application/x-mswrite":"document","application/postscript":"document","text/html":"document","text/plain":"document","text/richtext":"document","application/vnd.sun.xml.writer":"document","application/vnd.oasis.opendocument.text":"document","application/vnd.ms-powerpoint":"presentation","application/powerpoint":"presentation","application/vnd.oasis.opendocument.presentation":"presentation","application/vnd.sun.xml.impress":"presentation","application/excel":"spreadsheet","application/vnd.ms-excel":"spreadsheet","application/x-msaccess":"spreadsheet","application/vnd.oasis.opendocument.spreadsheet":"spreadsheet","application/vnd.sun.xml.calc":"spreadsheet","application/x-compress":"archive","application/x-compressed":"archive","application/x-gtar":"archive","application/x-gzip":"archive","application/zip":"archive","audio/basic":"audio","audio/mid":"audio","audio/mpeg":"audio","audio/x-aiff":"audio","audio/x-mpegurl":"audio","audio/x-pn-realaudio":"audio","audio/x-wav":"audio","video/mpeg":"video","video/quicktime":"video","video/x-la-asf":"video","video/x-ms-asf":"video","video/x-msvideo":"video","video/x-sgi-movie":"video"}};
}

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","close":"Close","popup":"Popup","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\" role=\"document\"> <a dojoAttachPoint=\"closeNode\" class=\"lotusPopupClose\" href=\"#\" dojoAttachEvent=\"click:clickClose\" role=\"button\" title=\"${messages.close}\" role=\"button\" aria-describedby=\"${id}_content\"><img src=\"${_blankGif}\" alt=\"${messages.close}\"><span class=\"lotusAltText\">X</span></a> <div dojoAttachPoint=\"contentWrapper\" role=\"presentation\"> <div dojoAttachPoint=\"content\" class=\"lotusPopupContent\" id=\"${id}_content\"> </div> </div> </div> <div dojoAttachPoint=\"arrow\" class=\"lotusPopupConnector\" role=\"presentation\"></div> </div></div>");

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




(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||"");
}
}else{
dijit.setWaiRole(_59,"presentation");
}
if(_57.customClass){
dojo.addClass(_59,_57.customClass);
}
_58.style.visibility="hidden";
_58.style.display="block";
if(this.zIndex&&!_58.style.zIndex){
_58.style.zIndex=this.zIndex;
}
try{
_57.position(_56);
_58.style.visibility="";
if(dojo.isFunction(_57.onVisible)){
_57.onVisible(_57);
}
dijit.setWaiState(_59,"hidden","false");
_53.push(this);
}
catch(e){
_57.close();
if(djConfig.isDebug){
console.error(e);
}
}
},hide:function(){
for(var i=0;i<_53.length;i++){
if(_53[i]==this){
var _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","");
}else{
dijit.setWaiRole(_5d,"presentation");
}
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;
}});
})();
}


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


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


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

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

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


dojo.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;
_4.addCallback(function(){
_6.inherited(_5);
});
dojo.publish("com/ibm/oneui/recommend/popup/onOpen",[_6]);
this.populateRecommend(_4);
},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 _7=this._getMasterPopup();
if(_7){
dojo.requireLocalization("lconn.core","strings");
this.commonStrings=dojo.i18n.getLocalization("lconn.core","strings");
dojo.attr(_7.closeNode,{"title":this._getStringResource("rs_close","",this.commonStrings),"aria-label":this._getStringResource("rs_close","",this.commonStrings)});
}
this.logExit(arguments);
},position:function(){
this.inherited(arguments);
var _8=this._getMasterPopup();
if(_8){
var _9=_8.domNode;
_9.setAttribute("role","dialog");
_9.setAttribute("aria-label",this._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_ALL"));
var _a=dojo.position(_9,true);
var _b=_a.x-5;
if(_b<0){
_b=0;
}
dojo.style(_9,"left",_b+"px");
}
},_isPopulateLoaded:false,_editableLink:null,populateRecommend:function(_c){
this.logEnter(arguments);
if(!this._isPopulateLoaded){
var _d=this;
var ds=this._getStateObject().store.data;
var _e=function(_f){
return dojo.byId(_d.id+"__"+_f);
};
var _10=function(_11){
if(_d._getRecommend()){
try{
var _12=ds._getIdentifierAttribute();
var _13=ds.getValue(_11,_12,null);
}
catch(ee){
}
}
if(_11._node_&&_11._node_[0]){
var _14=_11._node_[0];
dojo.place(_d.createPersonNode(_11),_14,"last");
}
};
var _15=function(_16){
ds.revert();
_d._onError({code:_d.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom},_16);
};
var _17=function(_18,_19){
for(var i=0;i<_18.length;i++){
if(_18[i].userId==_19){
var cu=_18.splice(i,1);
_18.unshift(cu[0]);
break;
}
}
return (_18);
};
var _1a=function(_1b){
if(_c){
_c.callback();
}
_1b=_17(_1b,_d.currentUserId);
var _1c=_e("recommendMessage");
var _1d=_e("recommendNames");
var _1e=_e("popupLikeCount");
var _1f=_e("popupSmiley");
if(_d.showActions==false){
if(_1c!=null){
dojo.destroy(_1c);
}
_1c=null;
if(_1f!=null){
dojo.destroy(_1f);
}
_1f=null;
}
var _20=_e("popupHeaderCountMessage");
dojo.publish("p_likeSizeUpdate",[_d]);
var _21=_d.size;
if(_21<0){
_21=_1b.length;
}
if(_21==0&&_1f!=null){
var _22=dojo.attr(_1f,"class");
dojo.attr(_1f,"class",_22+" lotusNoLikes");
}else{
if(_1f!=null){
var _22=dojo.attr(_1f,"class");
dojo.attr(_1f,"class",_22.replace("lotusNoLikes",""));
}
}
var str="POPUP.";
if(_21<=0){
str+="RECOMMENDED_NOTME_MANY";
}else{
if(_d._getRecommend()){
if(_21==1){
str+="RECOMMENDED_ME_ONLY";
}else{
if(_21==2){
str+="RECOMMENDED_ME_ONE";
}else{
str+="RECOMMENDED_ME_MANY";
}
}
}else{
if(_21==1){
str+="RECOMMENDED_NOTME_ONE";
}else{
str+="RECOMMENDED_NOTME_MANY";
}
}
}
var _23={recommendCount:_21,numshown:_d.count,total:_21,id:_d.id};
var _24="";
if(_d.showActions){
_24=_d._getStringResource(str+".TOOLTIP");
_24=dojo.string.substitute(_24,_23);
}
var _25=_d._getStringResource(str+".TEXT");
_25=dojo.string.substitute(_25,_23);
if(_1c!=null&&_d.showActions!==false){
dojo.html.set(_1c,_25);
}
var _26=(_21==0)?"&nbsp;":_21.toString();
if(_1e!=null){
dojo.html.set(_1e,_26);
}
var _27="INLINE.RECOMMENDED_";
if(_21==0){
_27+="BYNONE";
}else{
if(_21==1){
_27+="BYONE";
}else{
_27+="BYMANY";
}
}
_27+=".TOOLTIP";
var _28=dojo.string.substitute(_d._getStringResource(_27),_23);
var _29=dojo.byId("TOGGLE_"+_d.id);
if(_29!=null){
dojo.attr(_29,{"title":_28,"aria-label":_28});
}
if(_1f!=null){
dojo.attr(_1f,{title:_28,alt:_28});
}
if(_d.showActions==false){
if(_1c!=null){
dojo.destroy(_1c);
}
_1c=null;
}
var _2a="";
if(_21>_d.count){
}else{
_2a=_d._getStringResource("POPUP.RECOMMENDED_HEADER_SHOWING_ALL");
}
if(_d.showActions==true){
_2a="";
}
_2a=dojo.string.substitute(_2a,_23);
dojo.html.set(_20,_2a);
var _29=dojo.byId("TOGGLE_"+_d.id);
if(_29==null){
_29=dojo.byId("TOGGLE_["+_d.id+"]");
}
if(_29){
dojo.attr(_29,"title",_24);
_d._connect(_29,"onclick",_d,"_toggleRecommend");
}
dojo.empty(_1d);
for(var ii=0;ii<_1b.length;ii++){
if(_d.count==ii){
break;
}
_1b[ii].id=_1b[ii].id||ds.getValue(_1b[ii],ds._getIdentifierAttribute(),null);
if(ds._getNameAttribute){
_1b[ii].name=_1b[ii].name||ds.getValue(_1b[ii],ds._getNameAttribute(),null);
}
if(ds._getUserStateAttribute){
_1b[ii].userState=_1b[ii].userState||ds.getValue(_1b[ii],ds._getUserStateAttribute(),null);
}
_1b[ii]._node_=[dojo.create("li",{id:_1d.id+"__"+ii})];
dojo.place(_1b[ii]._node_[0],_1d,"last");
}
if(_1b.length==0){
var _2b=dojo.create("li",{id:_1d.id+"__"+"0"});
dojo.html.set(_2b,_d._getStringResource("INLINE.RECOMMENDED_BYNONE.TOOLTIP"));
dojo.place(_2b,_1d,"last");
}
dojo.forEach(_1b,function(_2c,idx){
if(ds.isItem(_2c)){
if(ds.isItemLoaded(_2c)){
_10(_2c);
}else{
ds.loadItem({item:_2c,onItem:function(_2d){
_10(_2d);
}});
}
}else{
_d._onError({code:_d.ERROR.ITEM_LOAD_FAILURE,message:"Error loading item: "+arguments[0],callee:arguments.callee.nom});
}
});
var _2e=_d._getMasterPopup();
if(_2e){
var _2f=_2e.domNode;
dojo.style(_2f,"zIndex",800);
}
_29=dojo.byId("TOGGLE_"+_d.id);
if(_29!=null&&_d.toggleFocus){
_29.focus();
}
};
var el=_e("recommendMessage");
if(el!=null&&_d.showActions!==false){
dojo.html.set(el,_d._getStringResource("LOADING"));
}
var _30=function(_31,req){
_d.size=_31;
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_32){
_d._currentUserItem=_32;
_d._setRecommend((_32!=null),function(){
ds.fetch({onBegin:_30,onComplete:_1a,onError:_15,count:_d.count});
});
},onError:function(){
if(_d.onError&&dojo.isFunction(_d.onError)){
_d.onError.apply(_d,arguments);
}
}});
}else{
}
}
this.logExit(arguments);
},createPersonNode:function(_33){
this.logEnter(arguments);
var _34=dijit.byId(_33.id);
if(_34!=null){
_34.destroy();
}
_34=new com.ibm.oneui.recommend.internal.PersonNode(_33);
this._getStateObject().widgets.push(_34);
this.logExit(arguments);
return _34.domNode;
},createContents:function(tip){
this.logEnter(arguments);
var _35=this;
var _36=new com.ibm.oneui.recommend.internal.PopupContents({currentUserId:this.currentUserId,width:this.popupWidth});
this.popupLikeNamesNode=_36.recommendNames;
var _37="dojoattachpoint";
dojo.query("*["+_37+"!='']",_36.domNode).forEach(function(_38,idx,arr){
if((!_38.id||_38.id.length==0)&&dojo.hasAttr(_38,_37)){
dojo.attr(_38,"id",_35.id+"__"+dojo.attr(_38,_37));
dojo.removeAttr(_38,_37);
}
});
this._getStateObject().widgets.push(_36);
this.logExit(arguments);
return _36.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\" title=\"\"> <img dojoAttachPoint=\"inlineSmiley\" class=\"lotusIconLike\" src=\"${_blankGif}\" alt=\"\"/> <span class=\"lotusAltText\" dojoAttachPoint=\"likeAltAP\"></span> <div dojoAttachPoint=\"inlineLikeCount\" class=\"lotusLikeText\" role=\"presentation\">&nbsp;</div> <div class=\"lotusLikeConnector lotusHidden\"></div> </a> <span 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,{"title":_15,"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",_15);
_14=dojo.string.substitute(_a._getStringResource(_f+_10),_13);
var _17=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(_17,"dijit_a11y")){
dojo.html.set(_a.inlineLikeCount,_14);
}else{
dojo.html.set(_a.inlineLikeCount,"&nbsp;");
}
}
if(dojo.hasClass(_17,"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 _18=_a._getStateObject();
var _19=_a._getPopup(_16,_18,_13);
_a.connect(_19,"onError",_a,"onError");
_a.connect(_19,"_toggleRecommend",function(){
_a._isPopupDirty=_a._getRecommend()!=_19._getRecommend();
});
_a.connect(_19,"onClose",function(){
if(_a._isPopupDirty){
setTimeout(function(){
_a.populateRecommend();
_a._isPopupDirty=false;
},100);
}
});
_18.widgets.push(_19);
}
_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 _1a=function(){
ds.revert();
this._onError(arguments[0]);
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_1b){
_a._currentUserItem=_1b;
_a._setRecommend((_1b!=null),function(){
ds.fetch({onBegin:_b,onComplete:_e,onError:_1a,count:_a.count});
});
}});
}else{
}
this.logExit(arguments);
},_getPopup:function(_1c,_1d,_1e){
return this.getPopup({debug:this.debug,editable:this.editable,around:_1c,currentUserId:this.currentUserId,dataStore:_1d.store.data,showActions:false});
},getPopup:function(_1f){
if(this._popup==null){
this._popup=new com.ibm.oneui.recommend.Popup(_1f);
}
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);
}
}});
})();
}


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


;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["lconn.forums.like.DataStore"]){
dojo._hasResource["lconn.forums.like.DataStore"]=true;
dojo.provide("lconn.forums.like.DataStore");






dojo.declare("lconn.forums.like.DataStore",[dojo.data.ItemFileWriteStore,com.ibm.oneui._base],{dataLoaded:false,initialData:{},itemId:null,contextPath:"",likeUrl:lconn.forums.Constants.RECOMMEND_LIKE_PATH,unlikeUrl:lconn.forums.Constants.RECOMMEND_UNLIKE_PATH,recommendersUrl:lconn.forums.Constants.RECOMMEND_RECOMMENDERS_PATH,constructor:function(_1){
this.initialData=_1;
},reLoadData:function(_2){
if(this.dataLoaded==false){
this._getItemsFromLoadedData(_2);
}
this.dataLoaded=true;
},newItem:function(_3){
if(!_3["name"]){
_3["name"]=this.initialData.currentUser.name;
}
this.hasRecommended=true;
this.inherited(arguments);
return this.recommendAction(true);
},deleteItem:function(_4,_5){
this.hasRecommended=false;
this.inherited(arguments);
return this.recommendAction(false);
},handleRecommend:function(_6,_7,_8,_9){
if(this._request){
this._request=null;
}
if(_8&&_8 instanceof Error){
this.onError(_8.code);
this.revert();
this.hasRecommended=!_6;
_7.errback();
}else{
if(_8&&(_8.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_8.status)>-1)){
this.onError(_8.errorReport);
this.revert();
this.hasRecommended=!_6;
_7.callback(_8);
}else{
this.hasRecommended=_6;
this.reLoadData(_8);
_7.callback();
}
}
},onError:function(_a){
},recommendAction:function(_b){
var d=new dojo.Deferred();
if(!_b){
var _c={entryId:this.itemId};
var _d={headers:lconn.forums.Constants.NONCE_HEADER,url:this.contextPath+this.unlikeUrl,handleAs:"json",content:_c,handle:dojo.hitch(this,this.handleRecommend,_b,d)};
dojo.xhrPost(_d).addCallback(dojo.hitch(this,function callBack(){
}));
}else{
var _c={entryId:this.itemId};
var _d={headers:lconn.forums.Constants.NONCE_HEADER,url:this.contextPath+this.likeUrl,handleAs:"json",content:_c,handle:dojo.hitch(this,this.handleRecommend,_b,d)};
dojo.xhrPost(_d).addCallback(dojo.hitch(this,function callBack(){
}));
}
return d;
},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);
},refreshFromServer:function(cb){
var d=new dojo.Deferred();
var _10={entryId:this.itemId,userId:this.initialData.currentUser.exid};
var _11={headers:lconn.forums.Constants.NONCE_HEADER,url:this.contextPath+this.recommendersUrl,handleAs:"json",content:_10,handle:dojo.hitch(this,this.handleRecommend,false,d)};
dojo.xhrPost(_11).addCallback(dojo.hitch(this,function callBack(){
this.refreshInline();
if(arguments[0].items.length>0){
cb();
}
}));
return d;
},refreshInline:function(){
}});
}

if(typeof define!=="undefined"&&typeof define._packages!=="undefined")define._packages["com.ibm.social.incontext"]=true;

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


;if(!dojo._hasResource["com.ibm.social.incontext.util.url"]){
dojo._hasResource["com.ibm.social.incontext.util.url"]=true;
dojo.provide("com.ibm.social.incontext.util.url");
dojo.provide("com.ibm.social.incontext.util.url.ProxyUrlHelper");


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


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








dojo.declare("lconn.forums.like.Inline",[com.ibm.oneui.controls.Like],{updatingSize:false,isSimple:false,messageTypes:lconn.forums.Constants.messageTypes,messageNode:null,blankGif:dojo.config.blankGif||dijit._Widget.prototype._blankGif,postCreate:function(){
this.inherited(arguments);
this._connect(this._getStateObject().store.data,"refreshInline",this,"populateRecommend");
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},getPopup:function(_1){
if(!this.disablePopup&&!this._popup){
_1.dataStore=this.popupDataStore||this.dataStore;
_1.getUserProfileUrl=this.getUserProfileUrl;
_1.getUserPhotoUrl=this.getUserPhotoUrl;
this._popup=new lconn.forums.like.LikePopup(_1);
this._popup.inline=this;
}
return this._popup;
},getUserProfileUrl:function(id){
var _2=(window.location.protocol||"http").replace(":","");
var _3=com.ibm.social.incontext.util.url;
if(dojo.getObject("lconn.core.config.services")){
var _4=lconn.core.config.services.profiles;
if(typeof (_4)!="undefined"){
this.profilesPath=(_2==="https"?_4.secureUrl:_4.url);
return _3.rewrite(this.profilesPath+"/html/profileView.do",{userid:id});
}else{
var _5=_2==="https"?lconn.core.config.services.forums.secureUrl:lconn.core.config.services.forums.url;
return _5+"/html/search?userid="+encodeURIComponent(id);
}
}
},getUserPhotoUrl:function(id){
var _6=(window.location.protocol||"http").replace(":","");
var _7=com.ibm.social.incontext.util.url;
if(dojo.getObject("lconn.core.config.services")){
var _8=lconn.core.config.services.profiles;
if(typeof (_8)!="undefined"){
this.profilesPath=(_6==="https"?_8.secureUrl:_8.url);
return _7.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;
}
}
}
},_getMessageNode:function(){
if(this.messageNode){
return messageNode;
}
var _9=dojo.query(".lotusMessage2",this.domNode);
if(_9&&_9.length>0){
return _9[0];
}else{
var _a=this._getPostNodeByUuid(this.dataStore.itemId);
if(_a){
this.messageNode=dojo.create("div");
dojo.place(this.messageNode,_a,"before");
return this.messageNode;
}else{
return null;
}
}
},_getPostNodeByUuid:function(_b){
if(!_b||typeof _b!="string"){
throw new Error("lconn.forums.like.Inline._getDomNodeByUuid(string uuid) was not initialized with the correct parameter.");
}
var _c=dojo.query("[uuid="+_b+"] > .lotusPost");
if(_c&&_c.length>0){
return _c[0];
}else{
return null;
}
},setMessage:function(_d,_e){
var _f;
var _10=this.messageNode;
if(!_10){
var _11=dojo.query(".lotusMessage2",this.domNode);
if(_11&&_11.length>0){
_10=_11[0];
}
}
if(!_10){
var _12=this._getPostNodeByUuid(this.dataStore.itemId);
if(_12){
this.messageNode=dojo.create("div",{"class":"lotusMessage2 lotusHidden","role":"alert"});
dojo.place(this.messageNode,_12,"before");
_10=this.messageNode;
}
}
if(_10){
_f=_10.parentNode;
}
lconn.forums.Util.setMessage(_d,_e,_f);
},success:true,_setRecommend:function(yn,_13){
var _14=this._isUserRecommended;
this._isUserRecommended=!!yn;
var _15=this;
var ds=this._getStateObject().store.data;
if(!ds){
this.onError({code:this.ERROR.DATASTORE_NOT_FOUND,message:"Data store not found.",callee:arguments.callee.nom});
return;
}
var cb=function(_16){
if(_16&&_16.status==401){
var _17=document.createElement("span");
_17.innerHTML=_15.rs_loggedOut2;
var _18=document.createElement("a");
_18.href=_16.loginUrl;
_18.innerHTML=" "+_15.rs_logInTryAgain;
_17.appendChild(_18);
_15.setMessage(_15.messageTypes.ERROR,_17);
_15.setRedirectCookie();
}else{
if(_16&&_16.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_16.status)>-1){
_15.setMessage(_15.messageTypes.ERROR,_16.message);
}else{
if(ds.isDirty()){
ds.save({onComplete:function(){
if(dojo.isFunction(_13)){
_13();
}
},onError:function(_19){
ds.revert();
_15._isUserRecommended=_14;
_15._onError({code:_15.ERROR.ITEM_LOAD_FAILURE},_19);
}});
}else{
if(dojo.isFunction(_13)){
_13();
}
}
}
}
};
var eb=function(_1a){
_15._isUserRecommended=_14;
var _1b=document.createElement("span");
_1b.innerHTML=_15.rs_loggedOut2;
var _1c=document.createElement("a");
_1c.href=_1a.loginUrl;
_1c.innerHTML=" "+_15.rs_logInTryAgain;
_1b.appendChild(_1c);
_15.setMessage(_15.messageTypes.ERROR,_1b);
_15.setRedirectCookie();
};
if(this._currentUserItem==null&&this._isUserRecommended){
var _1d={};
this.success=false;
_1d[ds._getIdentifierAttribute()]=this.currentUserId;
ds.newItem(_1d).addCallback(cb).addErrback(eb);
}else{
if(this._currentUserItem!=null&&!this._isUserRecommended){
this._currentUserItem._node_=null;
this.success=false;
ds.deleteItem(this._currentUserItem).addCallback(cb).addErrback(eb);
}
}
if(dojo.isFunction(_13)&&this.success){
_13();
}
this.success=true;
this.logExit(arguments);
},updateSizeInline:function(){
if(this.updatingSize){
this.updatingSize=false;
this.inherited(arguments);
}
},setRedirectCookie:function(){
dojo.cookie(lconn.forums.Constants.REDIRECT_COOKIE,"",{expires:-1,path:this.contextPath});
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+this.contextPath+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
},populateRecommend:function(){
var _1e=this;
dojo.addClass(_1e.domNode,"inlineLoading");
var ds=this._getStateObject().store.data;
var _1f=function(_20,req){
if(ds.dataLoaded==true){
_1e.size=_20;
}else{
_1e.size=ds.initialData.count;
}
};
var _21=function(){
dojo.removeClass(_1e.domNode,"inlineLoading");
if(_1e.inlineLikeActions!=null){
dojo.empty(_1e.inlineLikeActions);
}
if(_1e.inlineLikeCount!=null){
dojo.empty(_1e.inlineLikeCount);
}
if(_1e.isSimple){
_1e.disableBackground=true;
}
var str="INLINE.";
var _22=".TEXT";
if(!_1e.editable){
_22=".READONLYTEXT";
}
if(_1e._getRecommend()){
str+="RECOMMENDED";
}else{
str+="UNRECOMMENDED";
}
var _23=_1e.size;
if(_1e.disableBackground){
dojo.attr(_1e.inlineLaunchPopup,"class","lconnLikeCountNoBackground");
}
if(_23==0||_1e.disablePopup){
dojo.removeAttr(_1e.inlineLaunchPopup,"href");
dojo.removeAttr(_1e.inlineLaunchPopup,"role");
dojo.removeAttr(_1e.inlineLaunchPopup,"title");
dojo.removeAttr(_1e.inlineLaunchPopup,"aria-haspopup");
dojo.removeAttr(_1e.inlineLaunchPopup,"aria-label");
dojo.addClass(_1e.inlineLaunchPopup,"lotusDisabled");
}else{
if(!_1e.prev_iNumNames&&_23&&!_1e.disablePopup){
dojo.attr(_1e.inlineLaunchPopup,"aria-haspopup",true);
dojo.attr(_1e.inlineLaunchPopup,"href","javascript:;");
dojo.removeClass(_1e.inlineLaunchPopup,"lotusDisabled");
}
}
if(_1e.prev_iNumNames==undefined){
_1e.prev_iNumNames=0;
}else{
_1e.prev_iNumNames=_23;
}
var _24={recommendCount:_23,id:_1e.id};
var _25=dojo.string.substitute(_1e._getStringResource(str+_22),_24);
if(_1e.inlineLikeActions!=null&&_1e.currentUserId!=null){
dojo.html.set(_1e.inlineLikeActions,_25);
}
var _26=dojo.string.substitute(_1e._getStringResource(str+".TOOLTIP"),_24);
var _27=dojo.byId("TOGGLE_"+_1e.id);
if(_27!=null){
dojo.attr(_27,{"title":_26,"aria-label":_26});
}
str="INLINE.";
if(_23==0){
str+="RECOMMENDED_BYNONE";
}else{
if(_23==1){
str+="RECOMMENDED_BYONE";
}else{
str+="RECOMMENDED_BYMANY";
}
}
var _26=dojo.string.substitute(_1e._getStringResource(str+".TOOLTIP"),_24);
dojo.attr(_1e.inlineLaunchPopup,{"title":_26,"aria-label":_26});
dojo.attr(_1e.inlineSmiley,{title:"",alt:""});
_25=dojo.string.substitute(_1e._getStringResource(str+_22),_24);
var _28=dojo.body();
if(_23>0||(_1e.isSimple&&_23==0)){
if(_1e.inlineLikeCount!=null){
dojo.html.set(_1e.inlineLikeCount,_25);
}
}else{
if(dojo.hasClass(_28,"dijit_a11y")){
dojo.html.set(_1e.inlineLikeCount,_25);
}else{
dojo.html.set(_1e.inlineLikeCount,"&nbsp;");
}
}
if(dojo.hasClass(_28,"dijit_a11y")){
_1e.inlineLikeCount.innerHTML="";
}
_1e.likeAltAP.innerHTML=_26;
var _27=dojo.byId("TOGGLE_"+_1e.id);
if(_27==null){
_27=dojo.byId("TOGGLE_["+_1e.id+"]");
}
if(_27){
_1e._connect(_27,"onclick",_1e,"_toggleRecommend");
}
_27=_1e.inlineLaunchPopup;
if(ds.dataLoaded==true&&(_23==0||_1e.disablePopup)){
}else{
if(_27){


var _29=_1e._getStateObject();
var _2a=_1e._getPopup(_27,_29,_24);
_1e.connect(_2a,"onError",_1e,"onError");
_1e.connect(_2a,"_toggleRecommend",function(){
_1e._isPopupDirty=_1e._getRecommend()!=_2a._getRecommend();
});
_1e.connect(_2a,"onClose",function(){
if(_1e._isPopupDirty){
setTimeout(function(){
_1e.populateRecommend();
_1e._isPopupDirty=false;
},100);
}
});
_29.widgets.push(_2a);
}
}
_27=dojo.byId("TOGGLE_"+_1e.id);
if(_27!=null&&_1e.toggleFocus){
_27.focus();
}
};
var _2b=function(){
ds.revert();
this._onError(arguments[0]);
};
if(ds&&ds!=null){
ds.fetchItemByIdentity({identity:this.currentUserId,onItem:function(_2c){
_1e._currentUserItem=_2c;
_1e._setRecommend((_2c!=null),function(){
ds.fetch({onBegin:_1f,onComplete:_21,onError:_2b,count:_1e.count});
});
}});
}else{
}
this.logExit(arguments);
}});
dojo.declare("lconn.forums.like.LikePopup",[com.ibm.oneui.controls.LikePopup],{_clickAround:function(e){
var _2d=this;
var ds=this._getStateObject().store.data;
if(ds.dataLoaded){
setTimeout(function(){
if(_2d.inline.size>0){
_2d.containerNode=_2d._getDomNode();
_2d.openWithFocus(_2d._determineTarget(e.target));
}
},100);
}else{
ds.refreshFromServer(function(){
_2d.containerNode=_2d._getDomNode();
_2d.openWithFocus(_2d._determineTarget(e.target));
});
}
},openWithFocus:function(){
this.inline.updatingSize=true;
this.inherited(arguments);
}});
}


;define("dojox/fx/_base",["dojo/_base/array","dojo/_base/lang","dojo/_base/fx","dojo/fx","dojo/dom","dojo/dom-style","dojo/dom-geometry","dojo/_base/connect","dojo/_base/html"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9){
var _a=_2.getObject("dojox.fx",true);
_2.mixin(_a,{anim:_3.anim,animateProperty:_3.animateProperty,fadeTo:_3._fade,fadeIn:_3.fadeIn,fadeOut:_3.fadeOut,combine:_4.combine,chain:_4.chain,slideTo:_4.slideTo,wipeIn:_4.wipeIn,wipeOut:_4.wipeOut});
_a.sizeTo=function(_b){
var _c=_b.node=_5.byId(_b.node),_d="absolute";
var _e=_b.method||"chain";
if(!_b.duration){
_b.duration=500;
}
if(_e=="chain"){
_b.duration=Math.floor(_b.duration/2);
}
var _f,_10,_11,_12,_13,_14=null;
var _15=(function(n){
return function(){
var cs=_6.getComputedStyle(n),pos=cs.position,w=cs.width,h=cs.height;
_f=(pos==_d?n.offsetTop:parseInt(cs.top)||0);
_11=(pos==_d?n.offsetLeft:parseInt(cs.left)||0);
_13=(w=="auto"?0:parseInt(w));
_14=(h=="auto"?0:parseInt(h));
_12=_11-Math.floor((_b.width-_13)/2);
_10=_f-Math.floor((_b.height-_14)/2);
if(pos!=_d&&pos!="relative"){
var ret=_6.coords(n,true);
_f=ret.y;
_11=ret.x;
n.style.position=_d;
n.style.top=_f+"px";
n.style.left=_11+"px";
}
};
})(_c);
var _16=_3.animateProperty(_2.mixin({properties:{height:function(){
_15();
return {end:_b.height||0,start:_14};
},top:function(){
return {start:_f,end:_10};
}}},_b));
var _17=_3.animateProperty(_2.mixin({properties:{width:function(){
return {start:_13,end:_b.width||0};
},left:function(){
return {start:_11,end:_12};
}}},_b));
var _18=_4[(_b.method=="combine"?"combine":"chain")]([_16,_17]);
return _18;
};
_a.slideBy=function(_19){
var _1a=_19.node=_5.byId(_19.node),top,_1b;
var _1c=(function(n){
return function(){
var cs=_6.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
_1b=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=_7.coords(n,true);
top=ret.y;
_1b=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=_1b+"px";
}
};
})(_1a);
_1c();
var _1d=_3.animateProperty(_2.mixin({properties:{top:top+(_19.top||0),left:_1b+(_19.left||0)}},_19));
_8.connect(_1d,"beforeBegin",_1d,_1c);
return _1d;
};
_a.crossFade=function(_1e){
var _1f=_1e.nodes[0]=_5.byId(_1e.nodes[0]),op1=_9.style(_1f,"opacity"),_20=_1e.nodes[1]=_5.byId(_1e.nodes[1]),op2=_9.style(_20,"opacity");
var _21=_4.combine([_3[(op1==0?"fadeIn":"fadeOut")](_2.mixin({node:_1f},_1e)),_3[(op1==0?"fadeOut":"fadeIn")](_2.mixin({node:_20},_1e))]);
return _21;
};
_a.highlight=function(_22){
var _23=_22.node=_5.byId(_22.node);
_22.duration=_22.duration||400;
var _24=_22.color||"#ffff99",_25=_9.style(_23,"backgroundColor");
if(_25=="rgba(0, 0, 0, 0)"){
_25="transparent";
}
var _26=_3.animateProperty(_2.mixin({properties:{backgroundColor:{start:_24,end:_25}}},_22));
if(_25=="transparent"){
_8.connect(_26,"onEnd",_26,function(){
_23.style.backgroundColor=_25;
});
}
return _26;
};
_a.wipeTo=function(_27){
_27.node=_5.byId(_27.node);
var _28=_27.node,s=_28.style;
var dir=(_27.width?"width":"height"),_29=_27[dir],_2a={};
_2a[dir]={start:function(){
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s[dir]="1px";
s.display="";
s.visibility="";
return 1;
}else{
var now=_9.style(_28,dir);
return Math.max(now,1);
}
},end:_29};
var _2b=_3.animateProperty(_2.mixin({properties:_2a},_27));
return _2b;
};
return _a;
});


;define("dojox/fx/_core",["dojo/_base/lang","dojo/_base/array","./_base"],function(_1,_2,_3){
var _4=function(_5,_6){
this.start=_5;
this.end=_6;
var _7=_1.isArray(_5),d=(_7?[]:_6-_5);
if(_7){
_2.forEach(this.start,function(s,i){
d[i]=this.end[i]-s;
},this);
this.getValue=function(n){
var _8=[];
_2.forEach(this.start,function(s,i){
_8[i]=(d[i]*n)+s;
},this);
return _8;
};
}else{
this.getValue=function(n){
return (d*n)+this.start;
};
}
};
_3._Line=_4;
return _4;
});


;define("dojox/fx/scroll",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/fx","dojox/fx/_base","dojox/fx/_core","dojo/dom-geometry","dojo/_base/sniff"],function(_1,_2,_3,_4,_5,_6,_7){
_1.experimental("dojox.fx.scroll");
var fx=_2.getObject("dojox.fx",true);
_4.smoothScroll=function(_8){
if(!_8.target){
_8.target=_6.position(_8.node);
}
var _9=_2[(_7("ie")?"isObject":"isFunction")](_8["win"].scrollTo),_a={x:_8.target.x,y:_8.target.y};
if(!_9){
var _b=_6.position(_8.win);
_a.x-=_b.x;
_a.y-=_b.y;
}
var _c=(_9)?(function(_d){
_8.win.scrollTo(_d[0],_d[1]);
}):(function(_e){
_8.win.scrollLeft=_e[0];
_8.win.scrollTop=_e[1];
});
var _f=new _3.Animation(_2.mixin({beforeBegin:function(){
if(this.curve){
delete this.curve;
}
var _10=_9?dojo._docScroll():{x:_8.win.scrollLeft,y:_8.win.scrollTop};
_f.curve=new _5([_10.x,_10.y],[_10.x+_a.x,_10.y+_a.y]);
},onAnimate:_c},_8));
return _f;
};
fx.smoothScroll=_4.smoothScroll;
return _4.smoothScroll;
});


;define("dojo/fx/easing",["../_base/lang"],function(_1){
var _2={linear:function(n){
return n;
},quadIn:function(n){
return Math.pow(n,2);
},quadOut:function(n){
return n*(n-2)*-1;
},quadInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,2)/2;
}
return -1*((--n)*(n-2)-1)/2;
},cubicIn:function(n){
return Math.pow(n,3);
},cubicOut:function(n){
return Math.pow(n-1,3)+1;
},cubicInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,3)/2;
}
n-=2;
return (Math.pow(n,3)+2)/2;
},quartIn:function(n){
return Math.pow(n,4);
},quartOut:function(n){
return -1*(Math.pow(n-1,4)-1);
},quartInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,4)/2;
}
n-=2;
return -1/2*(Math.pow(n,4)-2);
},quintIn:function(n){
return Math.pow(n,5);
},quintOut:function(n){
return Math.pow(n-1,5)+1;
},quintInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,5)/2;
}
n-=2;
return (Math.pow(n,5)+2)/2;
},sineIn:function(n){
return -1*Math.cos(n*(Math.PI/2))+1;
},sineOut:function(n){
return Math.sin(n*(Math.PI/2));
},sineInOut:function(n){
return -1*(Math.cos(Math.PI*n)-1)/2;
},expoIn:function(n){
return (n==0)?0:Math.pow(2,10*(n-1));
},expoOut:function(n){
return (n==1)?1:(-1*Math.pow(2,-10*n)+1);
},expoInOut:function(n){
if(n==0){
return 0;
}
if(n==1){
return 1;
}
n=n*2;
if(n<1){
return Math.pow(2,10*(n-1))/2;
}
--n;
return (-1*Math.pow(2,-10*n)+2)/2;
},circIn:function(n){
return -1*(Math.sqrt(1-Math.pow(n,2))-1);
},circOut:function(n){
n=n-1;
return Math.sqrt(1-Math.pow(n,2));
},circInOut:function(n){
n=n*2;
if(n<1){
return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);
}
n-=2;
return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);
},backIn:function(n){
var s=1.70158;
return Math.pow(n,2)*((s+1)*n-s);
},backOut:function(n){
n=n-1;
var s=1.70158;
return Math.pow(n,2)*((s+1)*n+s)+1;
},backInOut:function(n){
var s=1.70158*1.525;
n=n*2;
if(n<1){
return (Math.pow(n,2)*((s+1)*n-s))/2;
}
n-=2;
return (Math.pow(n,2)*((s+1)*n+s)+2)/2;
},elasticIn:function(n){
if(n==0||n==1){
return n;
}
var p=0.3;
var s=p/4;
n=n-1;
return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);
},elasticOut:function(n){
if(n==0||n==1){
return n;
}
var p=0.3;
var s=p/4;
return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;
},elasticInOut:function(n){
if(n==0){
return 0;
}
n=n*2;
if(n==2){
return 1;
}
var p=0.3*1.5;
var s=p/4;
if(n<1){
n-=1;
return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));
}
n-=1;
return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;
},bounceIn:function(n){
return (1-_2.bounceOut(1-n));
},bounceOut:function(n){
var s=7.5625;
var p=2.75;
var l;
if(n<(1/p)){
l=s*Math.pow(n,2);
}else{
if(n<(2/p)){
n-=(1.5/p);
l=s*Math.pow(n,2)+0.75;
}else{
if(n<(2.5/p)){
n-=(2.25/p);
l=s*Math.pow(n,2)+0.9375;
}else{
n-=(2.625/p);
l=s*Math.pow(n,2)+0.984375;
}
}
}
return l;
},bounceInOut:function(n){
if(n<0.5){
return _2.bounceIn(n*2)/2;
}
return (_2.bounceOut(n*2-1)/2)+0.5;
}};
_1.setObject("dojo.fx.easing",_2);
return _2;
});


;define("dojox/fx/easing",["dojo/_base/lang","dojo/_base/kernel","dojo/fx/easing"],function(_1,_2,_3){
_2.deprecated("dojox.fx.easing","Upgraded to Core, use dojo.fx.easing instead","2.0");
var _4=_1.getObject("dojox.fx",true);
_4.easing=_3;
return _3;
});


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


































lconn.forums.Util.setupAuth=function(){
var _1=com.ibm.ajax.auth;
_1.checkByXLConnAuth=false;
_1.setAuthenticationHandler(lconn.forums.Util.authHandler);
_1.interceptDojoXhr(lconn.forums.Util.isSecureUrl);
};
dojo.addOnLoad(lconn.forums.Util.setupAuth);
lconn.forums.Util.nonSecuredUrls=[];
lconn.forums.Util.needProventDataLoss=true;
lconn.forums.Util.isSecureUrl=function(s){
var _2=lconn.core.url.parse(s);
return !dojo.some(lconn.forums.Util.nonSecuredUrls,function(_3){
return (_2.path.indexOf(_3.path)==0);
});
};
lconn.forums.Util.authHandler=function(_4,_5){
if(_5.args&&_5.args.error){
_5.args.error({status:401,loginUrl:lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH},_5);
}
};
lconn.forums.Util.ajaxErrorHandler=function ajaxErrorHandler(_6,_7,_8,_9){
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
if(_6&&(_6.status==401||_6.name=="TypeError")){
if(_6.noTextInput&&"true"==_6.noTextInput){
_8.innerHTML=rs.rs_loggedOut2;
}else{
_8.innerHTML=rs.rs_loggedOut;
}
var _a=document.createElement("a");
if(_6.loginUrl){
_a.href=_6.loginUrl;
}else{
_a.href=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
_a.innerHTML=" "+rs.rs_logIn;
_8.appendChild(_a);
var _b=_6.contextPath?_6.contextPath:lconn.forums.Constants.CONTEXT_PATH;
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+_b+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
return;
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_6,_7)){
var _c;
if(_9){
_c=document.createElement("a");
_c.onclick=function(_d){
dojo.stopEvent(_d);
_9();
};
_c.href="javascript:;";
_c.innerHTML=rs.rs_tryAgain;
}
var _e=document.createElement("span");
var _f=(typeof _e.innerText=="undefined"?"textContent":"innerText");
if(_6.errorReport&&_6.errorReport.length>0){
_e=dojo.create("a",{"href":"javascript:;","innerHTML":rs.rs_viewStackTrace});
dojo.connect(_e,"onclick",dojo.partial(function(_10){
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
if(window.event){
dojo.stopEvent(event);
}
if(dojo.isIE){
lconn.forums.Util.needProventDataLoss=false;
}
var str=_10.errorReport;
str=lconn.forums.Util.escapeJsToHtml(str);
str=str.replace("'","\\'");
str=str.replace(new RegExp("\"","gm"),"\\'");
str=str.replace(/\n/g,"<br/>");
lconn.forums.Util.alert(rs.rs_stackTrace.replace("'","\\'"),str);
},_6));
}
if(_6.dojoType&&_6.dojoType=="timeout"){
_8.innerHTML=rs.rs_timeoutMsg;
}else{
if(_6.message){
_8[_f]=_6.message;
}else{
_8.innerHTML=rs.rs_unknownError;
}
}
var _11=document.createElement("span");
var _12=document.createElement("span");
_11.innerHTML=_12.innerHTML="&nbsp;&nbsp;&nbsp;";
_8.appendChild(_11);
if(_9){
_8.appendChild(_c);
_7.args._tryAgainLink=_c;
}
_8.appendChild(_12);
_8.appendChild(_e);
}
}
};
lconn.forums.Util.parse=function parse(_13){
lconn.forums.Util.parseDates(_13);
lconn.forums.Util.parseProfileCards(_13);
lconn.forums.Util.parseAttachments(_13);
};
lconn.forums.Util.getImageAsBinaryDatacb=function(_14,_15,_16,_17){
var _18=lconn.forums.Constants;
var _19=_18.CONTEXT_PATH||(lconn.forums.Util.isSecureUrl(location.href)?lconn.core.config.services.forums.secureUrl:lconn.core.config.services.forums.url);
var _1a=_19+_18.ATTACH_ADDIMAGE;
var _1b=dojo.cookie("X-Update-Nonce");
var _1c=lconn.core.url.getServiceUrl(lconn.core.config.services.forums);
if(!_1b||_1a.indexOf(_1c.toString())==0){
_1b=dojox.uuid.generateTimeBasedUuid();
dojo.cookie("X-Update-Nonce",_1b,{expires:1,path:_1c.path});
}
var _1d=new FormData();
_15.name=_15.fileName=_17;
_15.fileType="image/octet-stream";
_1d.append("images",_15);
var _1e={url:com.ibm.oneui.util.proxy(_1a),handleAs:"text",method:"POST",content:{"X-Update-Nonce":_1b},headers:{"X-Update-Nonce":_1b,"content-type":false}};
_1e.rawBody=_1d;
var dfd=dojo.xhrPost(_1e);
var _1f=dfd.ioArgs||_1e;
var _20=function(_21){
try{
if(window[_21]){
delete window[_21];
}else{
if(window.frames[_21]){
delete window.frames[_21];
}
}
}
catch(e){
}
};
dfd.addBoth(dojo.hitch(this,function(_22){
if(_22 instanceof Error){
return _22;
}
_20("html5Frame");
var dii=dojo.io.iframe;
var _23=dii.create("html5Frame");
var _24=dii.doc(_23);
_24.close();
_24.open();
_24.write(_22);
_24.close();
return _24;
}));
dfd.addCallback(function(_25){
_14.call(_1e,_25,_1f,_16,_17);
});
};
lconn.forums.Util.parseLikes=function parseLikes(_26,_27,_28,_29){
if(!_29){
_29=lconn.forums.Constants.LIKE_CLASS;
}
if(!_27){
_27=lconn.forums.Constants.CONTEXT_PATH;
}
var _2a=null;
var _2b=null;
if(_28){
_2a=_28.exid;
_2b=_28.displayName;
}
dojo.query("."+_29,_26).forEach(function(_2c){
var _2d=dojo.hasClass(_2c,"forumSimpleLike");
var _2e=dojo.attr(_2c,"liked");
var _2f=[];
if(_2e=="true"){
_2f.push({userId:_2a,name:_2b});
}
var _30={id:_2a,identifier:"userId",items:_2f};
var _31=new lconn.forums.like.DataStore({contextPath:_27,count:parseInt(dojo.attr(_2c,"count")),currentUser:{exid:_2a,name:_2b},data:_30,itemId:dojo.attr(_2c,"entryId")});
new lconn.forums.like.Inline({contextPath:_27,debug:false,editable:true,loadIndividualStyles:false,currentUserId:_2a,isSimple:_2d,disablePopup:_2d,dataStore:_31},_2c);
});
};
lconn.forums.Util.parseDates=function parseDates(_32,_33){
if(!_33){
_33=lconn.forums.Constants.DATE_CLASS;
}
dojo.query("."+_33,_32).forEach(function(_34){
var _35=false;
if(dojo.hasClass(_34,"formatDateTitle")){
try{
var _36=lconn.core.DateUtil.atomDateToJsDate(dojo.trim(_34.innerHTML));
var _37=lconn.core.DateUtil.getLocalizedTime(_36);
var _38=lconn.core.DateUtil.AtomDateToString(_36,_35);
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
_34.title=dojo.string.substitute(rs.rs_topicCreateTime,[_38,_37]);
}
catch(e){
}
}
if(dojo.hasClass(_34,"formatDateOnly")){
try{
_35=true;
var _36=lconn.core.DateUtil.AtomDateToString(dojo.trim(_34.innerHTML),_35);
_34.innerHTML=_36;
}
catch(e){
}
}else{
if(dojo.hasClass(_34,"formatTimeOnly")){
try{
var _36=lconn.core.DateUtil.atomDateToJsDate(dojo.trim(_34.innerHTML));
var _37=lconn.core.DateUtil.getLocalizedTime(_36);
_34.innerHTML=_37;
}
catch(e){
}
}else{
var _39=lconn.core.DateUtil.AtomDateToString(dojo.trim(_34.innerHTML),_35);
if(_39){
_34.innerHTML=_39;
}
}
}
dojo.removeClass(_34,"lotusHidden");
dojo.removeClass(_34,_33);
});
};
lconn.forums.Util.createPostActionsToolbar=function(_3a){
var _3b;
if(_3a){
_3b=dojo.query(".forumPostActionToolBarIndicator",_3a);
}else{
_3b=dojo.query(".forumPostActionToolBarIndicator");
}
if(_3b){
_3b.forEach(function(_3c){
new lconn.core.aria.Toolbar(_3c.parentNode);
});
}
};
lconn.forums.Util.getLocalizedDate=function(_3d){
var _3e="medium";
if(djConfig.locale=="sv"||djConfig.locale=="sv-se"){
_3e="short";
}
return dojo.date.locale.format(_3d,{selector:"date",formatLength:_3e,locale:djConfig.locale});
};
lconn.forums.Util.parseProfileCards=function parsePersonCard(_3f,_40){
dojo.query("span.inRepsonseToVcard",_3f).forEach(function(_41,_42,_43){
var _44=dojo.query("a.lotusPerson",_41)[0];
if(_44){
_44.href=dojo.attr(_41,"href");
dojo.attr(_44,"role","button");
dojo.attr(_44,"onclick",dojo.attr(_41,"onclickAttribute"));
}
});
if(!_40){
_40=lconn.forums.Constants.PERSON_CLASS;
}
if(window.SemTagSvc){
dojo.query("."+_40,_3f).forEach(function(_45){
SemTagSvc.parseDom(0,_45);
});
}
};
lconn.forums.Util.parseAttachmentsWithMimeType=function parseAttachments(_46,_47){
if(!_47){
_47=lconn.forums.Constants.MIME_ICON_CLASS;
}
dojo.query("."+_47,_46).forEach(function(_48){
var _49=dojo.attr(_48,"mimeType");
var _4a,_4b;
if(_49){
_4a=lconn.forums.Constants.MIMETYPES.getClass(_49).toLowerCase();
if(!_4a||!(_4b=lconn.forums.Constants.FILE_ICON_MAP[_4a])){
_4b=lconn.forums.Constants.FILE_ICON_MAP._default;
}
dojo.addClass(_48,_4b);
}
});
};
lconn.forums.Util.parseAttachments=function parseAttachments(_4c,_4d,_4e){
if(!_4d){
_4d=lconn.forums.Constants.MIME_ICON_CLASS;
}
if(!_4e){
_4e=lconn.forums.Constants.FILE_NAME_ATTRIBUTE;
}
dojo.query("["+_4e+"]",_4c).forEach(function(_4f){
var _50=dojo.query("."+_4d,_4f)[0];
if(_50){
var _51=lconn.forums.Constants.FILE_ICON_MAP._default;
dojo.addClass(_50,_51);
var _52=dojo.trim(dojo.attr(_4f,_4e));
var _53,_54;
var _55;
if(_52&&_52.lastIndexOf(".")!=-1){
_55=_52.substring(_52.lastIndexOf(".")+1);
}
if(_55){
_54=lconn.forums.Constants.FILE_ICON_MAP._prefix+_55.toLowerCase();
dojo.addClass(_50,_54);
}
}
});
};
lconn.forums.Util.openHelpWindow=function(){
lconn.core.help.launchHelp();
};
lconn.forums.Util.openHelpTopicWindow=function(_56){
lconn.core.help.launchHelp(_56);
};
lconn.forums.Util.openDemoWindow=function openDemoWindow(){
lconn.core.help.launchDemo(lconn.forums.Constants.DEMO_URL);
};
lconn.forums.Util.alert=lconn.core.DialogUtil.alert;
lconn.forums.Util.prompt=lconn.core.DialogUtil.prompt;
lconn.forums.Util.popupForm=lconn.core.DialogUtil.popupForm;
lconn.forums.Util.lengthUtf8=function lengthUtf8(_57){
var _58=0;
var _59=encodeURIComponent(_57);
var _5a=_59.length;
for(var i=0;i<_5a;i++){
_58++;
if(_59.charAt(i)=="%"){
i+=2;
}
}
return _58;
};
lconn.forums.Util.decodeHTML=function decodeHTML(_5b){
_5b=_5b.replace(/&amp;/g,"&");
_5b=_5b.replace(/&quot;/g,"\"");
_5b=_5b.replace(/&lt;/g,"<");
_5b=_5b.replace(/&gt;/g,">");
_5b=_5b.replace(/&nbsp;/g,"\xa0");
return _5b;
};
lconn.forums.Util.focusPost=function focusPost(_5c){
if(!_5c){
return;
}
var _5d;
if(typeof _5c=="string"){
_5d=this._getPostNodeByUuid(_5c);
}else{
_5d=_5c;
}
if(_5d){
var _5e=dojo.query("a[href]",_5d);
setTimeout(function(){
if(_5e.length>0){
dijit.focus(_5e[0]);
}
},0);
}
};
lconn.forums.Util._getPostNodeByUuid=function _getPostNodeByUuid(_5f){
if(!_5f||typeof _5f!="string"){
throw new Error("lconn.forums.TopicThread._getDomNodeByUuid(string uuid) was not initialized with the correct parameter.");
}
var _60=dojo.query("[uuid="+_5f+"] .lotusPost",this.domNode);
if(_60&&_60.length>0){
return _60[0];
}else{
return null;
}
};
lconn.forums.Util.setMessage=function setMessage(_61,_62,_63){
var _64;
var _65=_63;
var _66,_67,_68;
var _69=dojo.config.blankGif||dijit._Widget.prototype._blankGif;
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
var _6a=dojo.query(".lotusMessage2",_65);
if(_6a&&_6a.length>0||dojo.hasClass(_65,"lotusMessage2")){
_64=(_6a&&_6a.length>0)?_6a[0]:_65;
_64.innerHTML="";
switch(_61){
case lconn.forums.Constants.messageTypes.ERROR:
_64.className="lotusMessage2";
_66="lotusIcon lotusIconMsgError";
_67=rs.rs_error;
_68=rs.rs_errorColon;
break;
case lconn.forums.Constants.messageTypes.WARNING:
_64.className="lotusMessage2 lotusWarning";
_66="lotusIcon lotusIconMsgWarning";
_67=rs.rs_warning;
_68=rs.rs_warningColon;
break;
case lconn.forums.Constants.messageTypes.INFO:
_64.className="lotusMessage2 lotusInfo";
_66="lotusIcon lotusIconMsgInfo";
_67=rs.rs_information;
_68=rs.rs_informationColon;
break;
default:
_64.className="lotusMessage2 lotusSuccess";
_66="lotusIcon lotusIconMsgSuccess";
_67=rs.rs_success;
_68=rs.rs_successColon;
}
var _6b=dojo.create("img",{"src":_69,"class":_66,"alt":_67});
var _6c=dojo.create("span",{"class":"lotusAltText","innerHTML":_68});
var _6d=dojo.create("div",{"class":"lotusMessageBody"});
if(_62&&typeof _62=="string"){
_6d.appendChild(document.createTextNode(_62));
}else{
_6d.appendChild(_62);
}
_64.appendChild(_6b);
_64.appendChild(_6c);
_64.appendChild(_6d);
if(lconn.forums.Constants.messageTypes.ERROR!=_61){
var _6e=dojo.create("a",{"href":"javascript:void(0);","role":"button","title":rs.rs_close,"class":"lotusDelete"});
dojo.connect(_6e,"onclick",function(evt){
_64.className="lotusMessage2 lotusHidden";
_64.innerHTML="";
});
var _6f=dojo.create("img",{"src":_69,"alt":rs.rs_close});
var _70=dojo.create("span",{"class":"lotusAltText","innerHTML":"X"});
_6e.appendChild(_6f);
_6e.appendChild(_70);
_64.appendChild(_6e);
}
}
};
lconn.forums.Util.escapeJsToHtml=function escapeJsToHtml(_71){
return _71.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\'/g,"&#39;").replace(/\"/g,"&quot;");
};
}

dojo.provide("lconn.forums.nls.strings")._built=true;
dojo.provide("lconn.forums.nls.strings.en");
lconn.forums.nls.strings.en={"rs_rejectReason":"Reason for rejecting:","rs_unpinConfirm":"This topic has been successfully unpinned. It will no longer stay at the top of this forum\'s topic list.","rs_acceptedAnswer":"Accepted answer","rs_replyQuotes":"Quotes","rs_loggedOut2":"You have been automatically logged out of the server due to inactivity. ","rs_unsubscribeTopicConfirm":"You stopped following this topic and will no longer receive updates about it.","rs_deleteForumsConfirm":"Are you sure you want to delete the following forums:","rs_success":"Success","rs_moveTopicCantBeEmpty":"Select one forum.","rs_forumSettingCancel":"Cancel","rs_message":"Message","rs_forumPostPeopleLike":"${0} people like this","rs_logIn":"Log in","rs_pageList":"Page ${0} of ${1}","rs_thisIsAcceptedAnswer":"This is the accepted answer.","rs_forumMessages":"${0} messages","rs_inactiveUser":"${0} (inactive)","rs_moveCategoryCantBeEmpty":"Select one node.","rs_root":"Root","rs_acceptAnswer":"The reply from ${0} has been accepted as an answer.","rs_back":"Back","rs_pinConfirm":"This topic has been successfully pinned.  It will stay at the top of this forum\'s topic list.","rs_topicColon":"Topic: ","rs_information":"Information","rs_tagEditorEditDec":"Add or remove tags on this item","rs_showMore":"View More","rs_unmarkQuestionConfirm2":"This topic is no longer a question.","rs_likes":"Likes","rs_remove":"Remove","rs_sortByReplyNumAsc":" Sort replies in ascending order","rs_addToForum":"Add this topic to a forum","rs_memberNotFromDirectory":"Select a member from the directory.","rs_chooseForum":"Add this topic to a forum.","rs_titleCantBeEmpty":"Enter a title before posting.","rs_errorDeleting":"There was a problem deleting ${0}.","rs_posts":"Posts","rs_stackTrace":"Stack Trace","rs_oneReply":"1 reply","rs_startFirstTopic":"Start the First Topic","rs_htmlSource":"HTML Source","rs_insertImagesLabel":"${0} image associated with this post","rs_richText":"Rich Text","rs_personLikes":"${0} person likes this","rs_leaveTopicConfirm":"You have an existing form open. Continuing will discard your changes.","rs_cantFlag":"You cannot flag the same post more than once.","rs_checkForumToUnlock":"Select a forum to unlock.","rs_sendEmail":"Send me email when anyone responds to this topic","rs_content":"Content","rs_checkOne":"Check a forum or category first.","rs_hide":"Hide","rs_replyParam":"${0} reply","rs_pageJumpToTitle":"Jump to page between ${0} and ${1}","rs_checkCommunitDelete":"Unable to delete the \"${0}\".","rs_selectForum":"Select a Forum","rs_nameRequired":"Enter a name","rs_lastPost":"Last Post","rs_insImgUpload":"Upload to:","rs_conversationsView":"Conversations","rs_forumPostLikes":"Likes","rs_clickToSortInDesc":"Click to sort in descending order","rs_ok":"OK","rs_deleteTopicConfirmation":"This topic has been deleted.","rs_categoryPickerItSelf":"Choose a category which isn\'t inside the current category.","rs_forumTopics":"${0} topics","rs_submitReply":"The reply has been submitted for review.","rs_flagConfirm":"The post by ${0} has been flagged and submitted for review.","rs_editForum":"Edit Forum","rs_save":"Save","rs_latestPostBy":"Latest post - ${0} by ${1}","rs_viewAll":"View All","rs_forumSettingNote":"Note: Topics display by default if there is only one forum.","rs_selectImage":"Click to select this image","rs_replyAction":"Reply action","rs_memberIsEmpty":"Select the people or groups you want to add.","rs_acceptedAnswers":"Accepted answers","rs_viewImagesLink":"View Images","rs_messageColon":"Message: ","rs_approveReply":"The reply has been approved for the topic.","rs_atuoFollow":"I want to know when new topics and comments are made in this forum","rs_unpin":"Unpin this Topic","rs_clickToViewMore":"Click to view more content","rs_topics":"topics","rs_emptyPostConfirmation":"You have not entered any content in the forum post. Do you want to continue?","rs_sortByLastModDesc":"Sort by date modified in descending order","rs_hasBeenUnlocked":"${0} has been unlocked","rs_sequentialViewOldFirst":"Oldest first","rs_errorLocking":"There was a problem locking ${0}.","rs_linkLess":"Less","rs_re":"Re: ${0}","rs_editReplyTitle":"Edit Title","rs_insImgEmptyFile":"Select one or more image files to insert.","rs_sortByLastModAsc":"Sort by date modified in ascending order","rs_tagDialogPageInfo":"${0} - ${1} of ${2}","rs_forumSettingCommunityOverviewPage":"Community overview page:","rs_tagEditorAddRemoveDec":"Add or Remove Tags","rs_replies":"replies","rs_deleteReason":"You may enter a reason for the deletion (optional):","rs_notifyTopicPromptEmail":"Notify me by email when anyone replies to this topic","rs_clickToSortInAscLatestPost":"Click to sort in ascending order by date modified","rs_createAnswer":"Your reply has been posted as the answer.","rs_moderationWarning":"Warning: This reply may be unavailable until the changes are approved by a moderator.","rs_unknownError":"An unknown server error has occurred.","rs_pageJumpToLabel":"Paging Control","rs_insImgLossFileTab":"Inserting an image from your computer will remove the URL you specified.","rs_joinCommConfirm1":"You have joined the community and can now post content.","rs_joinCommConfirm2":"You have joined the community and can now post content. Follow the community to get updates about community content.","rs_forumSettingApplicationView":"Forum application default view:","rs_moveCategoryTitle":"Move forums/categories to another category:","rs_checkCommunitMove":"Unable to move the \"${0}\".","rs_acceptAnswerLabel":"Accept this Answer","rs_alternativeViewsLabel":"Display:","rs_deleteForum":"Delete Forum","rs_category":"Category","rs_loading":"Loading...","rs_forumOpenQuestions":"Open Questions","rs_deleteTopic":"Delete Topic","rs_edit":"Edit","rs_subscribeForumConfirm":"You are following this forum and will receive updates about it.","rs_clickToViewOldFirst":"Click to sort replies from old to new","rs_issue":"Issue:","rs_clickToSortInAscReplies":"Click to sort in ascending order by number of replies","rs_insImgTitle":"Insert Image","rs_updateQuestionStatusError":"There was a problem with updating the question. Refresh the page and try again.","rs_fileUploadSizeError":"Unable to upload file.  The file size exceeds the limit of ${0}.","rs_formOpen":"You are in the middle of adding or editing another post, would you like to discard it?","rs_newestFirst":"Replies are sorted from new to old","rs_confirmation":"Confirmation","rs_rejectAnswer":"The answer from ${0} has been declined.","rs_subscribeTopicConfirm":"You are following this topic and will receive updates about it.","rs_insImgFiles":"Files:","rs_check":"Check all","rs_rejectReply":"The reply has been rejected and sent back to the author.","rs_memberDelete_alt":"Remove this member","rs_addMemberDescription":"Make these users an owner of ${0}:","rs_forum":"Forum","rs_repliesParam":"${0} replies","rs_removeMemberConfirm":"Are you sure you want to remove this member from this forum?","rs_forumSettingSubmit":"Submit","rs_messageTooLong":"Unable to post to discussion forum. The message exceeds the size limit of ${0} characters. Reduce the length of this posting and try again. ","rs_clickToShowOldFirst":"Click to show old replies first","rs_forumSortByTopicsAndReplies":"Topics and Replies","rs_pinError":"There was a problem attempting to pin the topic.","rs_topic":"Topic","rs_tagTooLong":"\"${0}\" is too long. Tag name must be under ${1} bytes.","rs_deleteAttachmentConfirm":"Are you sure you want to delete this file?","rs_tagEditorRemoveDec":"Remove tag ${0}","rs_titleTooLong":"Titles must be under ${0} characters","rs_insImgLayoutDes1":"Images inserted left aligned and original size","rs_insImgLossURLTab":"Inserting an image with a URL will remove the image uploaded from your computer.","rs_oldestShownFirst":"Old replies are shown first","rs_insImgLayout":"Layout:","rs_newCategory":"New Category","rs_insImgLabelMyComputer":"My Computer","rs_page":"Page","rs_clickToShowNewFirst":"Click to show new replies first","rs_fileUploadTypeError":"Unable to upload file.  This file type is not supported.","rs_clickToSortInAscLikes":"Click to sort in ascending order by number of likes","rs_markAnswerError":"There was a problem with accepting the reply as an answer.","rs_viewStackTrace":"View error details","rs_deleteForumsCategoriesTitle":"Delete Forums/Categories","rs_forumSortByDate":"Date","rs_topicMoveDialogForumTableAriaSingle":"You can move this topic to the following ${0} forum","rs_noTopicsLoggedIn":"Ask a question, brainstorm, or simply share your ideas.","rs_notifyTopicPrompt":"Follow this topic","rs_loggedOut":"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. ","rs_moveSuccess":"The move was completed successfully.","rs_forumSortByTopic":"Topics","rs_errorOperation":"Unable to finish this operation, the topic ${0} may be deleted or locked. ","rs_messageDelete_alt":"Hide this message","rs_memberAlreadyAdded":"That user has already been added as a member.","rs_sequentialView":"By Date","rs_questionNotAnswered":"The question is no longer answered.","rs_saveError":"Unable to save the message. ","rs_uncheck":"Uncheck all","rs_rejectAnswer2":"The answer from ${0} has been declined.  The question is no longer answered.","rs_forumSortBy":"Sort by:","rs_tagEditorDec":"Tags:","rs_attachFile":"Attach a File","rs_topicMoveDialogForumTableAriaMul":"You can move this topic to the following ${0} forums","rs_moveForumTitle":"Move forum to another category:","rs_joinCommunityError":"There was a problem with joining the community. Refresh the page and try again.","rs_viewInContext":"View in context","rs_tagEditorAddDec":"Add Tags","rs_clickToSortInDescReplies":"Click to sort in descending order  by number of replies","rs_next":"Next","rs_postedBy":"Last post by","rs_sortByLikeNumAsc":" Sort likes in ascending order","rs_cancel":"Cancel","rs_lockForum":"Lock Forum","rs_rejectAnswerLabel":"Decline this Answer","rs_show":"Show:","rs_flagConfirm2":"The post has been flagged and submitted for review.","rs_removeMemberTitle":"Remove Owner","rs_clickToSortInDescLatestPost":"Click to sort in descending order by date modified","rs_forumSettingSave":"Save","rs_insImgLabelURLwithColon":"URL:","rs_chooseAnotherForum":"Choose another forum","rs_deleteSuccess":"The delete was completed successfully.","rs_successColon":"Success:","rs_defaultForumList":"Show forum list by default","rs_warningColon":"Warning:","rs_editCategory":"Edit Category","rs_deleteForumConfirm":"Are you sure you want to delete the forum \"${0}\"?","rs_tagEditorContentNone":"none","rs_replyToTopic":"Reply to Topic","rs_flagLabel":"Provide a reason for flagging this post (optional):","rs_imageUploadError":"Image file ${0} could not be uploaded. The file may be infected by a virus or damaged. Please check this file, and then try again.","rs_startANewTopic":"Start a New Topic","rs_markQuestionConfirm":"The topic has been marked as a question.","rs_replyQuote":"Quote","rs_close":"Close","rs_topicCreateTime":"${0} at ${1}","rs_addAsOwner":"${0} has been added as an owner of ${1}.","rs_requestJoinCommunityToReply":"Request to Join this Community to Reply","rs_noTopics":"There are no topics yet for this community.","rs_error":"Error","rs_removeMemberAlt":"Remove ${0}","rs_pin":"Pin this Topic","rs_deleteTopicConfirm":"Are you sure you want to delete this topic?","rs_deleteCategoriesConfirm":"Are you sure you want to delete the following categories:","rs_sortByLikeNum":"Sort by number of likes","rs_startForum":"Start a Forum","rs_tryAgain":"Try Again","rs_clickToSortInDescLikes":"Click to sort in descending order by number of likes","rs_feedOpenQuestions":"Feed for these open questions","rs_nonEmptyCategoryDelete":"Cannot delete the category \"${0}\" because it is not empty.","rs_conversationsViewNewFirst":"Newest first","rs_requestJoinInfo1":"All membership requests for this community require approval from a community owner.\nPlease tell the community owner why you would like to join this community. Click the \"Send\" button and your request will be sent.","rs_flag":"Flag","rs_lockForumSuccess":"You have successfully locked this forum.","rs_startTopic":"Start a Topic","rs_linkMore":"More","rs_fileUploadReplaceError":"To replace your file, first delete the existing one and upload a new one.","rs_insImgImageWithColon":"Images:","rs_manageForumSetting":"Manage Forum Settings","rs_errorUnlocking":"There was a problem unlocking ${0}.","rs_insImgEmptyURL":"Enter the URL for this image.","rs_unmarkQuestionConfirm":"This question has been marked as a regular topic.","rs_replace":"Replace","rs_deleteForumsCategories":"Are you sure you want to delete the following forums and categories:","rs_approveReplies":"The replies have been approved for the topic.","rs_postedByParam":"Last post by ${0}","rs_sortByLastMod":"Sort by date modified","rs_changesSaved":"Changes to ${0} have been saved.","rs_sequentialViewMode":"By Date View","rs_send":"Send","rs_reopenQuestionError":"There was a problem reopening the answered question.","rs_locked":"[Locked]","rs_forumSettingSaveAndClose":"Save and Close","rs_requestJoinCommunity":"Request to Join this Community","rs_addOwner":"Add Owners","rs_forumSettingConfirm":"Your changes for Forums have been saved.","rs_categoryMoved":"${0} has been moved to ${1}","rs_moveTopicTitle":"Move topic \"${0}\" to another forum:","rs_title":"Title:","rs_conversationsViewMode":"Conversations View","rs_forumSettingError":"An error occurred. Contact your administrator.","rs_checkForumToLock":"Select a forum to lock.","rs_lockTopicSuccess":"You have successfully locked this topic.","rs_inResponseTo":"In response to ${0}","rs_sortByReplyNumDesc":"Sort replies in descending order","rs_newestShownFirst":"New replies are shown first","rs_requestJoinConfirm":"Your membership request has been sent.","rs_forumLastAddedPost":"Latest post by ${0}","rs_insImgLabelMyFiles":"My Files","rs_rejectReplies":"The replies have been rejected and sent back to the author.","rs_views":"Views","rs_followForum":"Follow this Forum","rs_oldestFirst":"Replies are sorted from old to new","rs_errorColon":"Error:","rs_moderationWarningTopic":"Warning: This entire topic may be unavailable until the changes are approved by a moderator.","rs_insertImagesLabel_X":"${0} images associated with this post","rs_deleteReply":"Delete Reply","rs_descriptionColon":"Description:","rs_removeOwners":"${0} are no longer owners of ${1}.","rs_tagInputLabel":"Input tags:","rs_forumAnswerQuestions":"Answered Questions","rs_insImgSelectImage":"Select images to insert","rs_move":"Move","rs_mentionAuthForumWarning":"The following people mentioned will not be able to view the message because they cannot access this forum.","rs_markQuestion":"Mark this topic as a question","rs_hasBeenLocked":"${0} has been locked","rs_by":"By","rs_nameColon":"Name:","rs_timeoutMsg":"It took too long to complete your request.","rs_deleteSelected":"Delete","rs_insImgNoneImageFile":"Please select an image file.","rs_previous":"Previous","rs_sortByReplies":"Sort by Replies","rs_deleteCategoryConfirm":"Are you sure you want to delete the category \"${0}\"?","rs_unlockForum":"Unlock Forum","rs_removeAnswerError":"There was a problem rejecting the reply as an answer.","rs_mentionAuthWarning":"The following people mentioned will not be able to view the message because they are not members of the community.","rs_sortByLikeNumDesc":"Sort likes in descending order","rs_moveForum":"Move Forum","rs_tags":"Tags","rs_flagInappropriate":"Flag as Inappropriate","rs_moveTopicForumSelected":"Forum ${0} is selected","rs_deleteReplies":"Are you sure you want to delete the selected replies?","rs_moveTopic":"Move Topic","rs_checkCommunitEdit":"Unable to edit the \"${0}\".","rs_clickToSortInAsc":"Click to sort in ascending order","rs_defaultTopicList":"Show topic list by default","rs_deleteAttachment":"Delete","rs_reply":"reply","rs_fileUploadError":"Unable to upload file.  Try again, or contact your system administrator if the problem persists.","rs_insImgTitle2":"Insert Image From...","rs_forumPostOnePersonLike":"1 person likes this","rs_feedAnsweredQuestions":"Feed for these answered questions","rs_pageJumpTo":"Jump to page ${0} of ${1}","rs_errorMoving":"There was a problem moving ${0} to ${1}","rs_forumColon":"Forum:","rs_noReplies":"No replies","rs_insertedImagesTitle":"Associated Images","rs_logInTryAgain":"Log in and try again.","rs_removeOwner":"${0} is no longer an owner of ${1}.","rs_formSettingHideMessage":"Hide this message","rs_warning":"Warning","rs_newForum":"New Forum","rs_forumUnAnsweredQuestion":"Unanswered question","rs_addOwners":"${0} have been added as owners of ${1}.","rs_forumAnsweredQuestion":"Answered question","rs_newTopic":"Start a Topic","rs_errorEditing":"There was a problem saving changes to ${0}.","rs_insImgLabelURL":"URL","rs_sortByReplyNum":"Sort by number of replies","rs_asterisk":"*","rs_noTopicsShort":"No topics","rs_requestJoinTitle":"Request Membership: ${0}","rs_clickToVieNewFirst":"Click to sort replies from new to old","rs_reopenQuestion":"This question has been reopened.","rs_postToJoin":"By posting to this forum, you become a member of this community. If you do not want to join this community, click cancel.","rs_unlockForumSuccess":"You have successfully unlocked this forum.","rs_topicUpdateTime":"Updated on ${0} at ${1} by ${2}","rs_sortbyTopicsAndReplies":"Sort by Topics and Replies","rs_attachmentsColon":"Attachments:","rs_forumSortByReplies":"Replies","rs_toggleSort":"Click to toggle sort order, current order is \'${0}\'","rs_informationColon":"Information:","rs_unsubscribeForumConfirm":"You stopped following this forum and will no longer receive updates about it.","rs_noImages":"No Associated Images","rs_selectCategory":"Select a category : ","rs_requestJoinModInfo1":"All membership requests for this community require approval from a community owner.","rs_checkWarningEdit":"You can only edit one forum or category at a time.  Make sure only one box is checked.","rs_requestJoinModInfo2":"Please tell the community owner why you would like to join this community. Click the \"Send\" button and your request will be sent.","rs_required":"* Required","rs_acceptedAnswerCapital":"ACCEPTED ANSWER","rs_selectPeople":"Select one or more people to add.","rs_unlockTopicSuccess":"You have successfully unlocked this topic.","rs_tagEditorCancelDec":"Cancel tag editing"};

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














dojo.requireLocalization("lconn.forums","strings");
dojo.declare("lconn.forums.ForumsImageField",[dijit._Widget,dijit._Templated],{blankGif:dojo.config.blankGif||dijit._Widget.prototype._blankGif,imageWidth:600,editor:null,postForm:null,contextPath:"",imageName:null,imageSize:null,imageDescription:"",imageAlt:"",imageUuid:null,imageSizeStr:null,progressBar:null,imgElement:null,templateString:["<div class='forumImage' style='float:left; '>","<div dojoAttachPoint='progressBarNode' class='forumImageField'></div>","<div class='lotusHidden forumImageField' dojoAttachPoint='completeImgNode' >","<img class='forumPreIconImage' dojoAttachPoint='imgIconNode' src='${blankGif}' alt=${imageName} >","<span dojoAttachPoint='imgNameNode'>${imageName}</span>","<span dojoAttachPoint='imgSizeNode' class='forumImgSizeFont'>${imageSizeStr}</span>","<a href='javascript:;' dojoAttachPoint='imgDelBtn' role='button'>X<img src='${blankGif}' alt=${rs_remove}></a>","</div>","</div>"].join(""),postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
if(this.imageSize){
var _1=Math.round((this.imageSize/1048576)*100)/100;
if(_1<1){
_1=Math.round((this.imageSize/1024)*100)/100;
this.imageSizeStr="("+_1+"KB)";
}else{
this.imageSizeStr="("+_1+"MB)";
}
}
},postCreate:function(){
this.progressBar=new dijit.ProgressBar({annotate:false,places:100,progress:0,report:function(){
return "";
}});
this.progressBar.placeAt(this.progressBarNode);
if(this.imageName){
this.progressBar.label.innerHTML=this.imageName+this.imageSizeStr;
}
},updateProgress:function(i){
if(i>0){
this.progressBar.update({progress:i});
}
if(this.imageName){
this.progressBar.label.innerHTML=this.imageName+this.imageSizeStr;
}
},completeUpload:function(_2){
var _3=this;
dojo.addClass(this.progressBarNode,"lotusHidden");
dojo.removeClass(this.completeImgNode,"lotusHidden");
this.imageUuid=_2;
var i=this.postForm.insertImages.length;
var _4=lconn.core.url.getServiceUrl(lconn.core.config.services.forums);
var _5=_4.uri+lconn.forums.Constants.ATTACH_DOWNLOADIMAGE;
var _6=_5+"?nodeId="+_2;
var _7=this.editor.document.createElement("img",{attributes:{src:_6,alt:this.imageAlt,title:this.imageDescription}});
this.imgIconNode.src=_6;
this.showImageOnEditor(_7);
this.postForm.insertImages.push({"name":this.imageName,"uuid":this.imageUuid,"size":this.imageSize,"element":_7,"widget":this});
dojo.connect(this.imgDelBtn,"onclick",dojo.hitch(this,"removeImage",i));
},showImageOnEditor:function(_8){
if(this.timeCounter){
this.timeCounter++;
}else{
this.timeCounter=1;
}
if(_8.$.complete||this.timeCounter>50){
if(_8.$.width>this.imageWidth){
var _9=Math.round(this.imageWidth*_8.$.height/_8.$.width);
_8.setAttribute("width",this.imageWidth);
_8.setAttribute("height",_9);
}
this.editor.insertElement(_8);
this.timeCounter=0;
}else{
setTimeout(dojo.hitch(this,"showImageOnEditor",_8),100);
}
},removeImage:function(i){
if(dojo.isIE){
lconn.forums.Util.needProventDataLoss=false;
}
this.postForm.insertImages[i].element.remove();
this.postForm.insertImages[i]=null;
this.destroy();
}});
}


;define("dojo/text!dijit/layout/templates/TabContainer.html", '<div class="dijitTabContainer">\n	<div class="dijitTabListWrapper" data-dojo-attach-point="tablistNode"></div>\n	<div data-dojo-attach-point="tablistSpacer" class="dijitTabSpacer ${baseClass}-spacer"></div>\n	<div class="dijitTabPaneWrapper ${baseClass}-container" data-dojo-attach-point="containerNode"></div>\n</div>\n');

;define("dijit/layout/StackController",["dojo/_base/array","dojo/_base/declare","dojo/dom-class","dojo/dom-construct","dojo/keys","dojo/_base/lang","dojo/on","dojo/topic","../focus","../registry","../_Widget","../_TemplatedMixin","../_Container","../form/ToggleButton","dojo/touch","dojo/i18n!../nls/common"],function(_1,_2,_3,_4,_5,_6,on,_7,_8,_9,_a,_b,_c,_d){
var _e=_2("dijit.layout._StackButton",_d,{tabIndex:"-1",closeButton:false,_aria_attr:"aria-selected",buildRendering:function(_f){
this.inherited(arguments);
(this.focusNode||this.domNode).setAttribute("role","tab");
}});
var _10=_2("dijit.layout.StackController",[_a,_b,_c],{baseClass:"dijitStackController",templateString:"<span role='tablist' data-dojo-attach-event='onkeydown'></span>",containerId:"",buttonWidget:_e,buttonWidgetCloseClass:"dijitStackCloseButton",pane2button:function(id){
return _9.byId(this.id+"_"+id);
},postCreate:function(){
this.inherited(arguments);
this.own(_7.subscribe(this.containerId+"-startup",_6.hitch(this,"onStartup")),_7.subscribe(this.containerId+"-addChild",_6.hitch(this,"onAddChild")),_7.subscribe(this.containerId+"-removeChild",_6.hitch(this,"onRemoveChild")),_7.subscribe(this.containerId+"-selectChild",_6.hitch(this,"onSelectChild")),_7.subscribe(this.containerId+"-containerKeyDown",_6.hitch(this,"onContainerKeyDown")));
this.containerNode.dojoClick=true;
this.own(on(this.containerNode,"click",_6.hitch(this,function(evt){
var _11=_9.getEnclosingWidget(evt.target);
if(_11!=this.containerNode&&!_11.disabled&&_11.page){
for(var _12=evt.target;_12!==this.containerNode;_12=_12.parentNode){
if(_3.contains(_12,this.buttonWidgetCloseClass)){
this.onCloseButtonClick(_11.page);
break;
}else{
if(_12==_11.domNode){
this.onButtonClick(_11.page);
break;
}
}
}
}
})));
},onStartup:function(_13){
this.textDir=_13.textDir;
_1.forEach(_13.children,this.onAddChild,this);
if(_13.selected){
this.onSelectChild(_13.selected);
}
var _14=_9.byId(this.containerId).containerNode,_15=_6.hitch(this,"pane2button"),_16={"title":"label","showtitle":"showLabel","iconclass":"iconClass","closable":"closeButton","tooltip":"title","disabled":"disabled","textdir":"textdir"},_17=function(_18,_19){
return on(_14,"attrmodified-"+_18,function(evt){
var _1a=_15(evt.detail&&evt.detail.widget&&evt.detail.widget.id);
if(_1a){
_1a.set(_19,evt.detail.newValue);
}
});
};
for(var _1b in _16){
this.own(_17(_1b,_16[_1b]));
}
},destroy:function(_1c){
this.destroyDescendants(_1c);
this.inherited(arguments);
},onAddChild:function(_1d,_1e){
var Cls=_6.isString(this.buttonWidget)?_6.getObject(this.buttonWidget):this.buttonWidget;
var _1f=new Cls({id:this.id+"_"+_1d.id,name:this.id+"_"+_1d.id,label:_1d.title,disabled:_1d.disabled,ownerDocument:this.ownerDocument,dir:_1d.dir,lang:_1d.lang,textDir:_1d.textDir||this.textDir,showLabel:_1d.showTitle,iconClass:_1d.iconClass,closeButton:_1d.closable,title:_1d.tooltip,page:_1d});
this.addChild(_1f,_1e);
_1d.controlButton=_1f;
if(!this._currentChild){
this.onSelectChild(_1d);
}
var _20=_1d._wrapper.getAttribute("aria-labelledby")?_1d._wrapper.getAttribute("aria-labelledby")+" "+_1f.id:_1f.id;
_1d._wrapper.removeAttribute("aria-label");
_1d._wrapper.setAttribute("aria-labelledby",_20);
},onRemoveChild:function(_21){
if(this._currentChild===_21){
this._currentChild=null;
}
var _22=this.pane2button(_21.id);
if(_22){
this.removeChild(_22);
_22.destroy();
}
delete _21.controlButton;
},onSelectChild:function(_23){
if(!_23){
return;
}
if(this._currentChild){
var _24=this.pane2button(this._currentChild.id);
_24.set("checked",false);
_24.focusNode.setAttribute("tabIndex","-1");
}
var _25=this.pane2button(_23.id);
_25.set("checked",true);
this._currentChild=_23;
_25.focusNode.setAttribute("tabIndex","0");
var _26=_9.byId(this.containerId);
},onButtonClick:function(_27){
var _28=this.pane2button(_27.id);
_8.focus(_28.focusNode);
if(this._currentChild&&this._currentChild.id===_27.id){
_28.set("checked",true);
}
var _29=_9.byId(this.containerId);
_29.selectChild(_27);
},onCloseButtonClick:function(_2a){
var _2b=_9.byId(this.containerId);
_2b.closeChild(_2a);
if(this._currentChild){
var b=this.pane2button(this._currentChild.id);
if(b){
_8.focus(b.focusNode||b.domNode);
}
}
},adjacent:function(_2c){
if(!this.isLeftToRight()&&(!this.tabPosition||/top|bottom/.test(this.tabPosition))){
_2c=!_2c;
}
var _2d=this.getChildren();
var idx=_1.indexOf(_2d,this.pane2button(this._currentChild.id)),_2e=_2d[idx];
var _2f;
do{
idx=(idx+(_2c?1:_2d.length-1))%_2d.length;
_2f=_2d[idx];
}while(_2f.disabled&&_2f!=_2e);
return _2f;
},onkeydown:function(e,_30){
if(this.disabled||e.altKey){
return;
}
var _31=null;
if(e.ctrlKey||!e._djpage){
switch(e.keyCode){
case _5.LEFT_ARROW:
case _5.UP_ARROW:
if(!e._djpage){
_31=false;
}
break;
case _5.PAGE_UP:
if(e.ctrlKey){
_31=false;
}
break;
case _5.RIGHT_ARROW:
case _5.DOWN_ARROW:
if(!e._djpage){
_31=true;
}
break;
case _5.PAGE_DOWN:
if(e.ctrlKey){
_31=true;
}
break;
case _5.HOME:
var _32=this.getChildren();
for(var idx=0;idx<_32.length;idx++){
var _33=_32[idx];
if(!_33.disabled){
this.onButtonClick(_33.page);
break;
}
}
e.stopPropagation();
e.preventDefault();
break;
case _5.END:
var _32=this.getChildren();
for(var idx=_32.length-1;idx>=0;idx--){
var _33=_32[idx];
if(!_33.disabled){
this.onButtonClick(_33.page);
break;
}
}
e.stopPropagation();
e.preventDefault();
break;
case _5.DELETE:
case "W".charCodeAt(0):
if(this._currentChild.closable&&(e.keyCode==_5.DELETE||e.ctrlKey)){
this.onCloseButtonClick(this._currentChild);
e.stopPropagation();
e.preventDefault();
}
break;
case _5.TAB:
if(e.ctrlKey){
this.onButtonClick(this.adjacent(!e.shiftKey).page);
e.stopPropagation();
e.preventDefault();
}
break;
}
if(_31!==null){
this.onButtonClick(this.adjacent(_31).page);
e.stopPropagation();
e.preventDefault();
}
}
},onContainerKeyDown:function(_34){
_34.e._djpage=_34.page;
this.onkeydown(_34.e);
}});
_10.StackButton=_e;
return _10;
});


;define("dijit/layout/StackContainer",["dojo/_base/array","dojo/cookie","dojo/_base/declare","dojo/dom-class","dojo/dom-construct","dojo/has","dojo/_base/lang","dojo/on","dojo/ready","dojo/topic","dojo/when","../registry","../_WidgetBase","./_LayoutWidget","dojo/i18n!../nls/common","./StackController"],function(_1,_2,_3,_4,_5,_6,_7,on,_8,_9,_a,_b,_c,_d){
var _e=_3("dijit.layout.StackContainer",_d,{doLayout:true,persist:false,baseClass:"dijitStackContainer",buildRendering:function(){
this.inherited(arguments);
_4.add(this.domNode,"dijitLayoutContainer");
},postCreate:function(){
this.inherited(arguments);
this.own(on(this.domNode,"keydown",_7.hitch(this,"_onKeyDown")));
},startup:function(){
if(this._started){
return;
}
var _f=this.getChildren();
_1.forEach(_f,this._setupChild,this);
if(this.persist){
this.selectedChildWidget=_b.byId(_2(this.id+"_selectedChild"));
}else{
_1.some(_f,function(_10){
if(_10.selected){
this.selectedChildWidget=_10;
}
return _10.selected;
},this);
}
var _11=this.selectedChildWidget;
if(!_11&&_f[0]){
_11=this.selectedChildWidget=_f[0];
_11.selected=true;
}
_9.publish(this.id+"-startup",{children:_f,selected:_11,textDir:this.textDir});
this.inherited(arguments);
},resize:function(){
if(!this._hasBeenShown){
this._hasBeenShown=true;
var _12=this.selectedChildWidget;
if(_12){
this._showChild(_12);
}
}
this.inherited(arguments);
},_setupChild:function(_13){
var _14=_13.domNode,_15=_5.place("<div role='tabpanel' class='"+this.baseClass+"ChildWrapper dijitHidden'>",_13.domNode,"replace"),_16=_13["aria-label"]||_13.title||_13.label;
if(_16){
_15.setAttribute("aria-label",_16);
}
_5.place(_14,_15);
_13._wrapper=_15;
this.inherited(arguments);
if(_14.style.display=="none"){
_14.style.display="block";
}
_13.domNode.title="";
},addChild:function(_17,_18){
this.inherited(arguments);
if(this._started){
_9.publish(this.id+"-addChild",_17,_18);
this.layout();
if(!this.selectedChildWidget){
this.selectChild(_17);
}
}
},removeChild:function(_19){
var idx=_1.indexOf(this.getChildren(),_19);
this.inherited(arguments);
_5.destroy(_19._wrapper);
delete _19._wrapper;
if(this._started){
_9.publish(this.id+"-removeChild",_19);
}
if(this._descendantsBeingDestroyed){
return;
}
if(this.selectedChildWidget===_19){
this.selectedChildWidget=undefined;
if(this._started){
var _1a=this.getChildren();
if(_1a.length){
this.selectChild(_1a[Math.max(idx-1,0)]);
}
}
}
if(this._started){
this.layout();
}
},selectChild:function(_1b,_1c){
var d;
_1b=_b.byId(_1b);
if(this.selectedChildWidget!=_1b){
d=this._transition(_1b,this.selectedChildWidget,_1c);
this._set("selectedChildWidget",_1b);
_9.publish(this.id+"-selectChild",_1b);
if(this.persist){
_2(this.id+"_selectedChild",this.selectedChildWidget.id);
}
}
return _a(d||true);
},_transition:function(_1d,_1e){
if(_1e){
this._hideChild(_1e);
}
var d=this._showChild(_1d);
if(_1d.resize){
if(this.doLayout){
_1d.resize(this._containerContentBox||this._contentBox);
}else{
_1d.resize();
}
}
return d;
},_adjacent:function(_1f){
var _20=this.getChildren();
var _21=_1.indexOf(_20,this.selectedChildWidget);
_21+=_1f?1:_20.length-1;
return _20[_21%_20.length];
},forward:function(){
return this.selectChild(this._adjacent(true),true);
},back:function(){
return this.selectChild(this._adjacent(false),true);
},_onKeyDown:function(e){
_9.publish(this.id+"-containerKeyDown",{e:e,page:this});
},layout:function(){
var _22=this.selectedChildWidget;
if(_22&&_22.resize){
if(this.doLayout){
_22.resize(this._containerContentBox||this._contentBox);
}else{
_22.resize();
}
}
},_showChild:function(_23){
var _24=this.getChildren();
_23.isFirstChild=(_23==_24[0]);
_23.isLastChild=(_23==_24[_24.length-1]);
_23._set("selected",true);
if(_23._wrapper){
_4.replace(_23._wrapper,"dijitVisible","dijitHidden");
}
return (_23._onShow&&_23._onShow())||true;
},_hideChild:function(_25){
_25._set("selected",false);
if(_25._wrapper){
_4.replace(_25._wrapper,"dijitHidden","dijitVisible");
}
_25.onHide&&_25.onHide();
},closeChild:function(_26){
var _27=_26.onClose&&_26.onClose(this,_26);
if(_27){
this.removeChild(_26);
_26.destroyRecursive();
}
},destroyDescendants:function(_28){
this._descendantsBeingDestroyed=true;
this.selectedChildWidget=undefined;
_1.forEach(this.getChildren(),function(_29){
if(!_28){
this.removeChild(_29);
}
_29.destroyRecursive(_28);
},this);
this._descendantsBeingDestroyed=false;
}});
_e.ChildWidgetProperties={selected:false,disabled:false,closable:false,iconClass:"dijitNoIcon",showTitle:true};
_7.extend(_c,_e.ChildWidgetProperties);
return _e;
});


;define("dijit/layout/_TabContainerBase",["dojo/text!./templates/TabContainer.html","./StackContainer","./utils","../_TemplatedMixin","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style"],function(_1,_2,_3,_4,_5,_6,_7,_8){
return _5("dijit.layout._TabContainerBase",[_2,_4],{tabPosition:"top",baseClass:"dijitTabContainer",tabStrip:false,nested:false,templateString:_1,postMixInProperties:function(){
this.baseClass+=this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/,"");
this.srcNodeRef&&_8.set(this.srcNodeRef,"visibility","hidden");
this.inherited(arguments);
},buildRendering:function(){
this.inherited(arguments);
this.tablist=this._makeController(this.tablistNode);
if(!this.doLayout){
_6.add(this.domNode,"dijitTabContainerNoLayout");
}
if(this.nested){
_6.add(this.domNode,"dijitTabContainerNested");
_6.add(this.tablist.containerNode,"dijitTabContainerTabListNested");
_6.add(this.tablistSpacer,"dijitTabContainerSpacerNested");
_6.add(this.containerNode,"dijitTabPaneWrapperNested");
}else{
_6.add(this.domNode,"tabStrip-"+(this.tabStrip?"enabled":"disabled"));
}
},_setupChild:function(_9){
_6.add(_9.domNode,"dijitTabPane");
this.inherited(arguments);
},startup:function(){
if(this._started){
return;
}
this.tablist.startup();
this.inherited(arguments);
},layout:function(){
if(!this._contentBox||typeof (this._contentBox.l)=="undefined"){
return;
}
var sc=this.selectedChildWidget;
if(this.doLayout){
var _a=this.tabPosition.replace(/-h/,"");
this.tablist.region=_a;
var _b=[this.tablist,{domNode:this.tablistSpacer,region:_a},{domNode:this.containerNode,region:"center"}];
_3.layoutChildren(this.domNode,this._contentBox,_b);
this._containerContentBox=_3.marginBox2contentBox(this.containerNode,_b[2]);
if(sc&&sc.resize){
sc.resize(this._containerContentBox);
}
}else{
if(this.tablist.resize){
var s=this.tablist.domNode.style;
s.width="0";
var _c=_7.getContentBox(this.domNode).w;
s.width="";
this.tablist.resize({w:_c});
}
if(sc&&sc.resize){
sc.resize();
}
}
},destroy:function(_d){
if(this.tablist){
this.tablist.destroy(_d);
}
this.inherited(arguments);
}});
});


;define("dojo/text!dijit/layout/templates/_TabButton.html", '<div role="presentation" data-dojo-attach-point="titleNode,innerDiv,tabContent" class="dijitTabInner dijitTabContent">\n	<span role="presentation" class="dijitInline dijitIcon dijitTabButtonIcon" data-dojo-attach-point="iconNode"></span>\n	<span data-dojo-attach-point=\'containerNode,focusNode\' class=\'tabLabel\'></span>\n	<span class="dijitInline dijitTabCloseButton dijitTabCloseIcon" data-dojo-attach-point=\'closeNode\'\n		  role="presentation">\n		<span data-dojo-attach-point=\'closeText\' class=\'dijitTabCloseText\'>[x]</span\n				></span>\n</div>\n');

;define("dijit/layout/TabController",["dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/has","dojo/i18n","dojo/_base/lang","./StackController","../registry","../Menu","../MenuItem","dojo/text!./templates/_TabButton.html","dojo/i18n!../nls/common"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){
var _d=_1("dijit.layout._TabButton"+(_5("dojo-bidi")?"_NoBidi":""),_8.StackButton,{baseClass:"dijitTab",cssStateNodes:{closeNode:"dijitTabCloseButton"},templateString:_c,_setNameAttr:"focusNode",scrollOnFocus:false,buildRendering:function(){
this.inherited(arguments);
_2.setSelectable(this.containerNode,false);
},startup:function(){
this.inherited(arguments);
var n=this.domNode;
this.defer(function(){
n.className=n.className;
},1);
},_setCloseButtonAttr:function(_e){
this._set("closeButton",_e);
_4.toggle(this.domNode,"dijitClosable",_e);
this.closeNode.style.display=_e?"":"none";
if(_e){
var _f=_6.getLocalization("dijit","common");
if(this.closeNode){
_3.set(this.closeNode,"title",_f.itemClose);
}
}
},_setDisabledAttr:function(_10){
this.inherited(arguments);
if(this.closeNode){
if(_10){
_3.remove(this.closeNode,"title");
}else{
var _11=_6.getLocalization("dijit","common");
_3.set(this.closeNode,"title",_11.itemClose);
}
}
},_setLabelAttr:function(_12){
this.inherited(arguments);
if(!this.showLabel&&!this.params.title){
this.iconNode.alt=_7.trim(this.containerNode.innerText||this.containerNode.textContent||"");
}
}});
if(_5("dojo-bidi")){
_d=_1("dijit.layout._TabButton",_d,{_setLabelAttr:function(_13){
this.inherited(arguments);
this.applyTextDir(this.iconNode,this.iconNode.alt);
}});
}
var _14=_1("dijit.layout.TabController",_8,{baseClass:"dijitTabController",templateString:"<div role='tablist' data-dojo-attach-event='onkeydown:onkeydown'></div>",tabPosition:"top",buttonWidget:_d,buttonWidgetCloseClass:"dijitTabCloseButton",postCreate:function(){
this.inherited(arguments);
var _15=new _a({id:this.id+"_Menu",ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir,targetNodeIds:[this.domNode],selector:function(_16){
return _4.contains(_16,"dijitClosable")&&!_4.contains(_16,"dijitTabDisabled");
}});
this.own(_15);
var _17=_6.getLocalization("dijit","common"),_18=this;
_15.addChild(new _b({label:_17.itemClose,ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir,onClick:function(evt){
var _19=_9.byNode(this.getParent().currentTarget);
_18.onCloseButtonClick(_19.page);
}}));
}});
_14.TabButton=_d;
return _14;
});


;define("dojo/text!dijit/layout/templates/ScrollingTabController.html", '<div class="dijitTabListContainer-${tabPosition}" style="visibility:hidden">\n	<div data-dojo-type="dijit.layout._ScrollingTabControllerMenuButton"\n		 class="tabStripButton-${tabPosition}"\n		 id="${id}_menuBtn"\n		 data-dojo-props="containerId: \'${containerId}\', iconClass: \'dijitTabStripMenuIcon\',\n					dropDownPosition: [\'below-alt\', \'above-alt\']"\n		 data-dojo-attach-point="_menuBtn" showLabel="false" title="">&#9660;</div>\n	<div data-dojo-type="dijit.layout._ScrollingTabControllerButton"\n		 class="tabStripButton-${tabPosition}"\n		 id="${id}_leftBtn"\n		 data-dojo-props="iconClass:\'dijitTabStripSlideLeftIcon\', showLabel:false, title:\'\'"\n		 data-dojo-attach-point="_leftBtn" data-dojo-attach-event="onClick: doSlideLeft">&#9664;</div>\n	<div data-dojo-type="dijit.layout._ScrollingTabControllerButton"\n		 class="tabStripButton-${tabPosition}"\n		 id="${id}_rightBtn"\n		 data-dojo-props="iconClass:\'dijitTabStripSlideRightIcon\', showLabel:false, title:\'\'"\n		 data-dojo-attach-point="_rightBtn" data-dojo-attach-event="onClick: doSlideRight">&#9654;</div>\n	<div class=\'dijitTabListWrapper\' data-dojo-attach-point=\'tablistWrapper\'>\n		<div role=\'tablist\' data-dojo-attach-event=\'onkeydown:onkeydown\'\n			 data-dojo-attach-point=\'containerNode\' class=\'nowrapTabStrip\'></div>\n	</div>\n</div>');

;define("dojo/text!dijit/layout/templates/_ScrollingTabControllerButton.html", '<div data-dojo-attach-event="ondijitclick:_onClick" class="dijitTabInnerDiv dijitTabContent dijitButtonContents"  data-dojo-attach-point="focusNode" role="button">\n	<span role="presentation" class="dijitInline dijitTabStripIcon" data-dojo-attach-point="iconNode"></span>\n	<span data-dojo-attach-point="containerNode,titleNode" class="dijitButtonText"></span>\n</div>');

;define("dijit/layout/ScrollingTabController",["dojo/_base/array","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/fx","dojo/_base/lang","dojo/on","dojo/query","dojo/sniff","../registry","dojo/text!./templates/ScrollingTabController.html","dojo/text!./templates/_ScrollingTabControllerButton.html","./TabController","./utils","../_WidgetsInTemplateMixin","../Menu","../MenuItem","../form/Button","../_HasDropDown","dojo/NodeList-dom","../a11yclick"],function(_1,_2,_3,_4,_5,fx,_6,on,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12){
var _13=_2("dijit.layout.ScrollingTabController",[_c,_e],{baseClass:"dijitTabController dijitScrollingTabController",templateString:_a,useMenu:true,useSlider:true,tabStripClass:"",_minScroll:5,_setClassAttr:{node:"containerNode",type:"class"},buildRendering:function(){
this.inherited(arguments);
var n=this.domNode;
this.scrollNode=this.tablistWrapper;
this._initButtons();
if(!this.tabStripClass){
this.tabStripClass="dijitTabContainer"+this.tabPosition.charAt(0).toUpperCase()+this.tabPosition.substr(1).replace(/-.*/,"")+"None";
_3.add(n,"tabStrip-disabled");
}
_3.add(this.tablistWrapper,this.tabStripClass);
},onStartup:function(){
this.inherited(arguments);
_5.set(this.domNode,"visibility","");
this._postStartup=true;
this.own(on(this.containerNode,"attrmodified-label, attrmodified-iconclass",_6.hitch(this,function(evt){
if(this._dim){
this.resize(this._dim);
}
})));
},onAddChild:function(_14,_15){
this.inherited(arguments);
_5.set(this.containerNode,"width",(_5.get(this.containerNode,"width")+200)+"px");
},onRemoveChild:function(_16,_17){
var _18=this.pane2button(_16.id);
if(this._selectedTab===_18.domNode){
this._selectedTab=null;
}
this.inherited(arguments);
},_initButtons:function(){
this._btnWidth=0;
this._buttons=_7("> .tabStripButton",this.domNode).filter(function(btn){
if((this.useMenu&&btn==this._menuBtn.domNode)||(this.useSlider&&(btn==this._rightBtn.domNode||btn==this._leftBtn.domNode))){
this._btnWidth+=_4.getMarginSize(btn).w;
return true;
}else{
_5.set(btn,"display","none");
return false;
}
},this);
},_getTabsWidth:function(){
var _19=this.getChildren();
if(_19.length){
var _1a=_19[this.isLeftToRight()?0:_19.length-1].domNode,_1b=_19[this.isLeftToRight()?_19.length-1:0].domNode;
return _1b.offsetLeft+_1b.offsetWidth-_1a.offsetLeft;
}else{
return 0;
}
},_enableBtn:function(_1c){
var _1d=this._getTabsWidth();
_1c=_1c||_5.get(this.scrollNode,"width");
return _1d>0&&_1c<_1d;
},resize:function(dim){
this._dim=dim;
this.scrollNode.style.height="auto";
var cb=this._contentBox=_d.marginBox2contentBox(this.domNode,{h:0,w:dim.w});
cb.h=this.scrollNode.offsetHeight;
_4.setContentSize(this.domNode,cb);
var _1e=this._enableBtn(this._contentBox.w);
this._buttons.style("display",_1e?"":"none");
this._leftBtn.region="left";
this._rightBtn.region="right";
this._menuBtn.region=this.isLeftToRight()?"right":"left";
_d.layoutChildren(this.domNode,this._contentBox,[this._menuBtn,this._leftBtn,this._rightBtn,{domNode:this.scrollNode,region:"center"}]);
if(this._selectedTab){
if(this._anim&&this._anim.status()=="playing"){
this._anim.stop();
}
this.scrollNode.scrollLeft=this._convertToScrollLeft(this._getScrollForSelectedTab());
}
this._setButtonClass(this._getScroll());
this._postResize=true;
return {h:this._contentBox.h,w:dim.w};
},_getScroll:function(){
return (this.isLeftToRight()||_8("ie")<8||(_8("ie")&&_8("quirks"))||_8("webkit"))?this.scrollNode.scrollLeft:_5.get(this.containerNode,"width")-_5.get(this.scrollNode,"width")+(_8("ie")>=8?-1:1)*this.scrollNode.scrollLeft;
},_convertToScrollLeft:function(val){
if(this.isLeftToRight()||_8("ie")<8||(_8("ie")&&_8("quirks"))||_8("webkit")){
return val;
}else{
var _1f=_5.get(this.containerNode,"width")-_5.get(this.scrollNode,"width");
return (_8("ie")>=8?-1:1)*(val-_1f);
}
},onSelectChild:function(_20){
var tab=this.pane2button(_20.id);
if(!tab){
return;
}
var _21=tab.domNode;
if(_21!=this._selectedTab){
this._selectedTab=_21;
if(this._postResize){
var sl=this._getScroll();
if(sl>_21.offsetLeft||sl+_5.get(this.scrollNode,"width")<_21.offsetLeft+_5.get(_21,"width")){
this.createSmoothScroll().play();
}
}
}
this.inherited(arguments);
},_getScrollBounds:function(){
var _22=this.getChildren(),_23=_5.get(this.scrollNode,"width"),_24=_5.get(this.containerNode,"width"),_25=_24-_23,_26=this._getTabsWidth();
if(_22.length&&_26>_23){
return {min:this.isLeftToRight()?0:_22[_22.length-1].domNode.offsetLeft,max:this.isLeftToRight()?(_22[_22.length-1].domNode.offsetLeft+_22[_22.length-1].domNode.offsetWidth)-_23:_25};
}else{
var _27=this.isLeftToRight()?0:_25;
return {min:_27,max:_27};
}
},_getScrollForSelectedTab:function(){
var w=this.scrollNode,n=this._selectedTab,_28=_5.get(this.scrollNode,"width"),_29=this._getScrollBounds();
var pos=(n.offsetLeft+_5.get(n,"width")/2)-_28/2;
pos=Math.min(Math.max(pos,_29.min),_29.max);
return pos;
},createSmoothScroll:function(x){
if(arguments.length>0){
var _2a=this._getScrollBounds();
x=Math.min(Math.max(x,_2a.min),_2a.max);
}else{
x=this._getScrollForSelectedTab();
}
if(this._anim&&this._anim.status()=="playing"){
this._anim.stop();
}
var _2b=this,w=this.scrollNode,_2c=new fx.Animation({beforeBegin:function(){
if(this.curve){
delete this.curve;
}
var _2d=w.scrollLeft,_2e=_2b._convertToScrollLeft(x);
_2c.curve=new fx._Line(_2d,_2e);
},onAnimate:function(val){
w.scrollLeft=val;
}});
this._anim=_2c;
this._setButtonClass(x);
return _2c;
},_getBtnNode:function(e){
var n=e.target;
while(n&&!_3.contains(n,"tabStripButton")){
n=n.parentNode;
}
return n;
},doSlideRight:function(e){
this.doSlide(1,this._getBtnNode(e));
},doSlideLeft:function(e){
this.doSlide(-1,this._getBtnNode(e));
},doSlide:function(_2f,_30){
if(_30&&_3.contains(_30,"dijitTabDisabled")){
return;
}
var _31=_5.get(this.scrollNode,"width");
var d=(_31*0.75)*_2f;
var to=this._getScroll()+d;
this._setButtonClass(to);
this.createSmoothScroll(to).play();
},_setButtonClass:function(_32){
var _33=this._getScrollBounds();
this._leftBtn.set("disabled",_32<=_33.min);
this._rightBtn.set("disabled",_32>=_33.max);
}});
var _34=_2("dijit.layout._ScrollingTabControllerButtonMixin",null,{baseClass:"dijitTab tabStripButton",templateString:_b,tabIndex:"",isFocusable:function(){
return false;
}});
_2("dijit.layout._ScrollingTabControllerButton",[_11,_34]);
_2("dijit.layout._ScrollingTabControllerMenuButton",[_11,_12,_34],{containerId:"",tabIndex:"-1",isLoaded:function(){
return false;
},loadDropDown:function(_35){
this.dropDown=new _f({id:this.containerId+"_menu",ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir});
var _36=_9.byId(this.containerId);
_1.forEach(_36.getChildren(),function(_37){
var _38=new _10({id:_37.id+"_stcMi",label:_37.title,iconClass:_37.iconClass,disabled:_37.disabled,ownerDocument:this.ownerDocument,dir:_37.dir,lang:_37.lang,textDir:_37.textDir||_36.textDir,onClick:function(){
_36.selectChild(_37);
}});
this.dropDown.addChild(_38);
},this);
_35();
},closeDropDown:function(_39){
this.inherited(arguments);
if(this.dropDown){
this._popupStateNode.removeAttribute("aria-owns");
this.dropDown.destroyRecursive();
delete this.dropDown;
}
}});
return _13;
});


;define("dijit/layout/TabContainer",["dojo/_base/lang","dojo/_base/declare","./_TabContainerBase","./TabController","./ScrollingTabController"],function(_1,_2,_3,_4,_5){
return _2("dijit.layout.TabContainer",_3,{useMenu:true,useSlider:true,controllerWidget:"",_makeController:function(_6){
var _7=this.baseClass+"-tabs"+(this.doLayout?"":" dijitTabNoLayout"),_4=typeof this.controllerWidget=="string"?_1.getObject(this.controllerWidget):this.controllerWidget;
return new _4({id:this.id+"_tablist",ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,textDir:this.textDir,tabPosition:this.tabPosition,doLayout:this.doLayout,containerId:this.id,"class":_7,nested:this.nested,useMenu:this.useMenu,useSlider:this.useSlider,tabStripClass:this.tabStrip?this.baseClass+(this.tabStrip?"":"No")+"Strip":null},_6);
},postMixInProperties:function(){
this.inherited(arguments);
if(!this.controllerWidget){
this.controllerWidget=(this.tabPosition=="top"||this.tabPosition=="bottom")&&!this.nested?_5:_4;
}
}});
});

dojo.provide("lconn.core.nls.insertimagedialog")._built=true;
dojo.provide("lconn.core.nls.insertimagedialog.en");
lconn.core.nls.insertimagedialog.en={"newUpload":"New Upload","preview":"Preview:","browse":"Browse...","URL":"URL","imagePickerTitle":"Insert Images from Files","OK":"OK","filesTab":"From Files","required":"Required field","imageLibrary":"Image Library","alt":"Alternate text:","componentImagePickerTitle":" ${0} uploaded images","dialogTitle":"Add Image","previewWarning":"The image seems to have failed to load, are you sure this is a valid image url?","imageFile":"Files:","images":"Images:","cancel":"Cancel","description":"Description:"};

;dojo.cache("lconn.core", "templates/TempTabbedDialog.html", "<div class=\"lotusTabDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\"> <div> <div class=\"dijitDialogPaneContent lotusDialogBorder\"> <div class=\"lotusDialog\"> <div data-dojo-attach-point=\"containerNode\"> <div data-dojo-attach-point=\"titleBar\" class=\"lotusDialogHeader\" title=\"${messages.dialogTitle}\" role=\"dialog\"> <h1 data-dojo-attach-point=\"titleNode\" id=\"${id}_title\" class=\"lotusHeading\"></h1> <a class=\"lotusDialogClose\" role=\"button\" href=\"javascript:;\" title=\"${rs.rs_close}\" data-dojo-attach-point=\"closeButtonNode\" data-dojo-attach-event=\"onclick: onCancel\"> <img src=\"${blankGif}\" alt=\"${rs.rs_close}\" aria-label=\"${rs.rs_close}\" /> <span class=\"lotusAltText\">X</span> </a> </div> <form class=\"lotusForm2 lotusLeftLabels\" data-dojo-attach-point=\"form\" data-dojo-attach-event=\"onsubmit: save\" method=\"post\" aria-live=\"assertive\"> <div data-dojo-type=\"dijit.layout.TabContainer\" data-dojo-attach-point=\"tabs\" tabStrip=\"true\" doLayout=\"false\"> </div> <div class=\"lotusFormFooter lotusDialogFooter\"> <input value=\"${rs.rs_ok}\" class=\"lotusFormButton\" type=\"submit\" value=\"OK\" title=\"${rs.rs_ok}\" /> <input value=\"${rs.rs_close}\" class=\"lotusFormButton\" type=\"button\" title=\"${rs.rs_close}\" data-dojo-attach-event=\"onclick: onCancel\" /> </div> </form> </div> </div> </div> </div></div>");

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






dojo.requireLocalization("lconn.core","strings");
dojo.requireLocalization("lconn.core","insertimagedialog");
dojo.declare("lconn.core.TempTabbedDialog",[dijit.Dialog],{templateString:null,widgetsInTemplate:true,parseOnLoad:true,templatePath:dojo.moduleUrl("lconn.core","templates/TempTabbedDialog.html"),blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif?etag=20171105.220517")),rs:dojo.i18n.getLocalization("lconn.core","strings"),messages:dojo.i18n.getLocalization("lconn.core","insertimagedialog"),createTabs:function(_1){
var _2=dojo.query("> [widgetid]",this.containerNode).map(function(el){
return dijit.byNode(el);
}).forEach(function(_3){
if(_3.declaredClass=="dijit.layout.ContentPane"){
_1.addChild(_3);
}
});
this.subscribe(_1.id+"-selectChild",this._changeTab);
_1.startup();
_1.resize();
setTimeout(function(){
var _4=_1.tablist;
if(_4){
_4.tablistWrapper.style.width=dojo.position(_4.domNode).w+"px";
}
},50);
},postCreate:function(){
this.inherited(arguments);
this.tabs=new dijit.layout.TabContainer({tabStrip:true,doLayout:false},this.tabs);
},_setup:function(){
this.inherited(arguments);
this.createTabs(this.tabs);
},_changeTab:function(_5){
this._position();
this.onTabChange(_5);
},onTabChange:function(_6){
},save:function(e){
dojo.stopEvent(e);
this.onSave();
},onSave:function(){
}});
})();
}

dojo.provide("lconn.core.upload.nls.upload")._built=true;
dojo.provide("lconn.core.upload.nls.upload.en");
lconn.core.upload.nls.upload.en={"ACTIONS_UNDO":"Undo","ACTIONS_REVERT":"Revert","ACTIONS_TRUNCATE":"Shorten name","UI_REMOVE":"Remove ${0}","A11Y_WARNING":"Warning:","MB":"${0} MB","BUTTON_TEXT":"Browse...","STATUS_REMOTE_DUPLICATE_RENAME":"A file with this name already exists. Continue to upload as a new version or rename the file. ${0}","LEVEL_WARNING":"Warning","ACTIONS_REMOVE":"Remove file","LEVEL_INFO":"Information","STATUS_LOCAL_DUPLICATE":"The file is already selected.","ACTIONS_REPLACE":"Replace","A11Y_INFO":"Info:","BUTTON_TEXT_WEBKIT_1":"Choose a File","A11Y_ERROR":"Error:","B":"${0} B","STATUS_REPLACE":"This file will replace an existing file","BUTTON_TEXT_WEBKIT":"Choose Files","STATUS_INVALID_CHARS":"This file name contains invalid characters","ACTIONS_REPLACE_INVALID":"Remove invalid characters","LEVEL_ERROR":"Error","STATUS_NAME_TOO_LONG":"This file name exceeds the maximum length of ${0} bytes","ERROR_BAD_EXT_BLACKLIST":"${0} is invalid because the file extension ${1} is in the list of prohibited file extensions","STATUS_TO_PREVIEW":"A thumbnail cannot be created for this video. Go to the file details page to add an image to display in previews.","STATE_UPLOADING":"${0} is currently being uploaded","UI_EDIT":"Rename ${0} (${1})","KB":"${0} KB","GB":"${0} GB","ERROR_IO":"${0} could not be selected by your browser.","STATUS_REMOTE_DUPLICATE":"A file with this name already exists","ACTIONS_RENAME":"Rename","STATUS_REMOTE_DUPLICATE_RENAME_COMMUNITY":"A file with this name already exists in this community. Continue to upload as a new version or rename the file. ${0}","SIZE_UNKNOWN":"Unknown","STATE_UPLOADED":"${0} was successfully uploaded","ERROR_BAD_EXT_WHITELIST":"${0} is invalid because the file extension ${1} is not in the list of allowed file extensions","STATUS_RENAMED":"The original file name was ${0}","UI_EDIT_TOOLTIP":"Press Enter to save the file name, or Esc to cancel","ACTIONS_RENAME_LONG":"Rename","ERROR_TOO_BIG":"${0} has a size of ${1}, which is bigger than the allowed maximum of ${2}"};

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










dojo.requireLocalization("lconn.core.upload","upload");
dojo.declare("lconn.core.upload.data.File",null,{UploadStates:{"READY":0,"QUEUED":1,"IN_PROGRESS":2,"UPLOADED":3},StatusKeys:{"IS_DUPLICATE":"IsDuplicate","INVALID_NAME_CHARS":"NameInvalidChars","INVALID_NAME_LENGTH":"NameInvalidLength","INVALID_FILE_SIZE":"InvalidSize","RENAMED":"FileRenamed","IS_VIDEO":"IsVideo"},StatusLevels:{"INFO":0,"WARNING":1,"ERROR":2},Actions:{RENAME:{setFocus:false,execute:function(_1){
if(_1.getOwningList().isRenameAllowed()){
_1.getOwningList().startRename(_1);
}
}},REPLACE_INVALID:{execute:function(_2){
if(_2.getOwningList().isRenameAllowed()){
var _3=_2.getOwningList().getInvalidCharacters();
if(_3){
var _4=_2.getName();
_4=_4.replace(_3,"_");
_2.setName(_4);
}
}
}},TRUNCATE:{execute:function(_5){
if(_5.getOwningList().isRenameAllowed()){
var _6=_5.getExtension();
var _7=lconn.core.util.text.trimExtension(_5.getName());
_7=_5.shortenFilename(_7,_6,_5.getOwningList().getMaxFilenameLength());
var _8=_7.name;
if(_6&&dojo.string.trim(_6).length>0){
_8+="."+_6;
}
_5.setName(_8);
}
}},REVERT:{execute:function(_9){
if(_9.getOwningList().isRenameAllowed()){
_9.setName(_9.getOriginalFileName());
}
}},REPLACE:{execute:function(_a){
if(_a.getOwningList().isReplaceAllowed()){
_a.setReplacing(true);
}
}},UNDO_REPLACE:{execute:function(_b){
if(_b.getOwningList().isReplaceAllowed()){
_b.setReplacing(false);
}
}},REMOVE:{setFocus:false,execute:function(_c){
_c.getOwningList().removeFileById(_c.getId());
}}},constructor:function(_d,_e,_f){
this._fileObject=_d;
this._id=this._fileObject.id||this._generateId();
if(_f){
this._fileList=_f;
}
this._state=this.UploadStates.READY;
this._statuses=[];
this._statusIndex={};
this._originalName=_e;
var _10=this.getExtension();
this._originalName=lconn.core.util.text.trimExtension(_e)+(_10?"."+_10:"");
this._canEditFullName=!_10||(_10.length+1>=_e.length);
this._isRemoteDuplicate=undefined;
this._isLocalDuplicate=false;
this._isEnabled=true;
this._isReplacing=false;
this._hasInvalidChars=false;
this._hasInvalidNameLength=false;
this._hasInvalidFileSize=false;
this._bytesComplete=-1;
this.invalidCount=0;
this.nls=dojo.i18n.getLocalization("lconn.core.upload","upload");
this._initActions();
},_initActions:function(){
this.Actions.RENAME.name=this.nls.ACTIONS_RENAME;
this.Actions.REPLACE_INVALID.name=this.nls.ACTIONS_REPLACE_INVALID;
this.Actions.TRUNCATE.name=this.nls.ACTIONS_TRUNCATE;
this.Actions.REVERT.name=this.nls.ACTIONS_REVERT;
this.Actions.UNDO_REPLACE.name=this.nls.ACTIONS_UNDO;
this.Actions.REPLACE.name=this.nls.ACTIONS_REPLACE;
this.Actions.REMOVE.name=this.nls.ACTIONS_REMOVE;
},getObject:function(){
return this._fileObject;
},getOwningList:function(){
return this._fileList;
},getId:function(){
return this._id;
},isSizeAvailable:function(){
return !isNaN(this._size)&&this._size>=0;
},setSize:function(_11){
var _12=this._size;
this._size=_11;
if(this._fileList&&(_12!=this._size)){
this._fileList.onPropertyChange(this,"size",_12,this._size);
var _13=this.validateSize();
if(_13){
var _14={id:this.StatusKeys.INVALID_FILE_SIZE,level:this.StatusLevels.ERROR,message:_13.message,preventUpload:true,actions:[this.Actions.REMOVE]};
this.setStatus(_14);
}
}
},getSize:function(){
if(!this.isSizeAvailable()){
return -1;
}
return this._size;
},getBytesComplete:function(){
return this._bytesComplete;
},setBytesComplete:function(bc){
var _15=this._bytesComplete;
this._bytesComplete=bc;
if(this._fileList&&(_15!=this._bytesComplete)){
this._fileList.onPropertyChange(this,"bytesComplete",_15,this._bytesComplete);
}
},isRemoteDuplicate:function(){
return this._isRemoteDuplicate;
},clearRemoteDuplicate:function(){
this.setRemoteDuplicate(undefined);
},setRemoteDuplicate:function(_16){
var _17=this._isRemoteDuplicate;
this._isRemoteDuplicate=_16;
if(this._fileList&&_17!=this._isRemoteDuplicate){
if(_17!=this._isRemoteDuplicate){
this._fileList.onPropertyChange(this,"isRemoteDuplicate",_17,this._isRemoteDuplicate);
}
this._updateDuplicateStatus();
}
},isLocalDuplicate:function(){
return this._isLocalDuplicate;
},setLocalDuplicate:function(_18){
var _19=!!this._isLocalDuplicate;
this._isLocalDuplicate=!!_18;
if(this._fileList&&(_19!=this._isLocalDuplicate)){
this._fileList.onPropertyChange(this,"isLocalDuplicate",_19,this._isLocalDuplicate);
this._updateDuplicateStatus();
}
},hasInvalidChars:function(){
return !!this._hasInvalidChars;
},setHasInvalidChars:function(_1a){
var _1b=!!this._hasInvalidChars;
this._hasInvalidChars=!!_1a;
if(this._fileList&&(_1b!=this._hasInvalidChars)){
this._fileList.onPropertyChange(this,"hasInvalidChars",_1b,this._hasInvalidChars);
if(this._hasInvalidChars){
var _1c={id:this.StatusKeys.INVALID_NAME_CHARS,level:this.StatusLevels.ERROR,message:this.nls.STATUS_INVALID_CHARS,preventUpload:true,actions:this._fileList.isRenameAllowed()?[this.Actions.RENAME,this.Actions.REPLACE_INVALID]:[]};
this.setStatus(_1c);
}else{
this.clearStatus(this.StatusKeys.INVALID_NAME_CHARS);
}
}
},isFilenameTooLong:function(){
return !!this._hasInvalidNameLength;
},setFilenameTooLong:function(_1d){
var _1e=!!this._hasInvalidNameLength;
this._hasInvalidNameLength=!!_1d;
if(this._fileList&&(_1e!=this._hasInvalidNameLength)){
this._fileList.onPropertyChange(this,"isFilenameTooLong",_1e,this._hasInvalidNameLength);
if(this._hasInvalidNameLength){
var _1f={id:this.StatusKeys.INVALID_NAME_LENGTH,level:this.StatusLevels.ERROR,message:dojo.string.substitute(this.nls.STATUS_NAME_TOO_LONG,[this._fileList.getMaxFilenameLength()]),preventUpload:true,actions:this._fileList.isRenameAllowed()?[this.Actions.RENAME,this.Actions.TRUNCATE]:[]};
this.setStatus(_1f);
}else{
this.clearStatus(this.StatusKeys.INVALID_NAME_LENGTH);
}
}
},setExtensionVideo:function(_20){
if(this._fileList){
this._fileList.onPropertyChange(this,"isExtensionVideo");
var _21={id:this.StatusKeys.IS_VIDEO,level:this.StatusLevels.WARNING,message:this.nls.STATUS_TO_PREVIEW,preventUpload:false};
this.setStatus(_21);
}
},canEditFullName:function(){
return this._canEditFullName;
},getOriginalFileName:function(){
return this._originalName;
},getName:function(){
return this._editedName||this.getOriginalFileName();
},setName:function(_22){
var _23=this.getName();
this._editedName=_22;
delete this._extension;
if(this._fileList&&(_23!=_22)){
this._fileList.onPropertyChange(this,"name",_23,_22);
if(_22!=this.getOriginalFileName()){
var _24={id:this.StatusKeys.RENAMED,level:this.StatusLevels.INFO,message:dojo.string.substitute(this.nls.STATUS_RENAMED,[lconn.core.util.html.formatFilename(this._shortenDisplayName(this.getOriginalFileName()))]),actions:[this.Actions.REVERT]};
this.setStatus(_24);
}else{
this.clearStatus(this.StatusKeys.RENAMED);
}
this._fileList.validateDuplicates(_23);
this.clearRemoteDuplicate();
this.validateName();
}
},isEnabled:function(){
return (this._isEnabled!==false);
},setEnabled:function(_25){
var _26=this._isEnabled;
this._isEnabled=!!_25;
if(this._fileList){
this._fileList.onPropertyChange(this,"enabled",_26,this._isEnabled);
}
},getExtension:function(){
if(typeof this._extension=="undefined"){
var _27=this.getName();
this._extension=lconn.core.util.text.getExtension(_27);
}
return this._extension.toLowerCase();
},isReplacing:function(){
return !!this._isReplacing;
},setReplacing:function(_28){
var _29=this._isReplacing;
this._isReplacing=_28;
if(this._fileList&&(_29!=this._isReplacing)){
this._fileList.onPropertyChange(this,"replacing",_29,this._isReplacing);
this._updateDuplicateStatus();
this._fileList.onListChanged(this._fileList);
}
},setStatus:function(_2a){
var _2b=this._statuses.length;
var idx=this._statusIndex[_2a.id];
if(idx||idx===0){
_2b=idx;
}
var _2c=this.invalidCount;
var _2d=(_2b==this._statuses.length);
if(!_2d){
var _2e=this._statuses[_2b];
}
this._statuses[_2b]=_2a;
this._statusIndex[_2a.id]=_2b;
var _2f=0;
if(_2d){
_2f=_2a.preventUpload?1:0;
}else{
if(_2e.preventUpload){
_2f=_2a.preventUpload?0:-1;
}else{
_2f=_2a.preventUpload?1:0;
}
}
this._changeInvalidCount(_2f);
if(this._fileList){
this._fileList.onSetStatus(this,_2a);
}
},clearStatus:function(id){
var _30=this._statusIndex[id];
if((typeof _30!="undefined")&&(_30>=0&&_30<this._statuses.length)){
var _31=this._statuses.splice(_30,1);
_31=_31[0];
delete this._statusIndex[id];
for(var i=_30;i<this._statuses.length;++i){
var s=this._statuses[i];
var id=s.id;
this._statusIndex[id]=i;
}
this._changeInvalidCount(_31.preventUpload?-1:0);
if(this._fileList){
this._fileList.onClearStatus(this,_31);
}
}
},_changeInvalidCount:function(_32){
if(_32!=0){
var _33=this.invalidCount;
this.invalidCount+=_32;
this.invalidCount=Math.max(0,this.invalidCount);
if(this._fileList&&!!_33!=!!this.invalidCount){
this._fileList.onPropertyChange(this,"valid",_33==0,this.invalidCount==0);
this._fileList.onListChanged(this._fileList);
}
}
},getStatuses:function(){
return this._statuses;
},getUploadState:function(){
return this._state||this.UploadStates.READY;
},setUploadState:function(_34){
var _35=this._state;
this._state=_34;
if(this._fileList&&(_35!=this._state)){
this._fileList.onPropertyChange(this,"uploadState",_35,this._state);
}
},canUpload:function(){
var _36=this.isEnabled()&&((this._state==this.UploadStates.READY)||(this._state==this.UploadStates.QUEUED));
if(_36){
_36=this.isValid();
}
return _36;
},isValid:function(){
var _37=dojo.every(this._statuses,function(_38){
return !_38.preventUpload;
});
return _37;
},_generateId:function(){
return dijit.getUniqueId("lconnUpload");
},validateSize:function(){
var _39=null;
if(!this._fileList){
return null;
}
var max=this._fileList.getMaxFileSize();
var _3a=this.getSize();
if(_3a>=0&&max>0){
if(_3a>max){
var _3b=lconn.core.util.text.formatSize(this.nls,_3a);
var _3c=lconn.core.util.text.formatSize(this.nls,max);
_39={message:dojo.string.substitute(this.nls.ERROR_TOO_BIG,[this.getName(),_3b,_3c])};
}
}
return _39;
},validateExtension:function(){
var _3d=null;
var _3e=this._fileList.getAllowedExtensions();
if(_3e){
var ext=this.getExtension().toLowerCase();
if(_3e.allowed){
if(dojo.indexOf(_3e.allowed,ext)==-1){
_3d={message:dojo.string.substitute(this.nls.ERROR_BAD_EXT_WHITELIST,[this.getName(),this.getExtension()])};
}
}else{
if(_3e.prohibited){
if(dojo.indexOf(_3e.prohibited,ext)!=-1){
_3d={message:dojo.string.substitute(this.nls.ERROR_BAD_EXT_BLACKLIST,[this.getName(),this.getExtension()])};
}
}
}
}
return _3d;
},validateName:function(){
var _3f=this.getName();
var ext=this.getExtension().toLowerCase();
var _40=true;
var _41=(this._fileList.previewEnabled)?this._fileList.previewEnabled:false;
var _42=this.getOwningList().getInvalidCharacters();
if(dojo.isFunction(_42.test)&&_42.test(_3f)){
this.setHasInvalidChars(true);
_40=false;
}else{
this.setHasInvalidChars(false);
}
var _43=this.getOwningList().getMaxFilenameLength();
var len=lconn.core.util.text.getByteLength(_3f);
if(_43>0&&len>_43){
this.setFilenameTooLong(true);
_40=false;
fileExtensionCheck=false;
}else{
this.setFilenameTooLong(false);
}
if(_41){
var _44=this._fileList.previewConfig;
if(_44!=null&&typeof _44!="undefined"){
var _45=_44.validVideoExts.split(",");
for(var i=0;i<_45.length;i++){
if(ext==_45[i]){
this.setExtensionVideo(true);
}
}
}
}
if(_40){
this._fileList.validateDuplicates(_3f);
}else{
this._updateDuplicateStatus();
}
},validateRemoteDuplicate:function(){
if(this.isLocalDuplicate()||this._isRemoteDuplicate!=undefined){
return;
}
if(dojo.isFunction(this.getOwningList().remoteFileExists)){
if(this._pendingRemoteCheck){
this._pendingRemoteCheck.cancel();
}
var _46=this.getName();
var _47=this._pendingRemoteCheck=this.getOwningList().remoteFileExists(_46);
var _48=this.getOwningList()._pendingRemoteChecks;
_48.push(_47);
_47.addBoth(dojo.hitch(this,function(){
var idx=dojo.indexOf(_48,_47);
if(idx!=-1){
_48.splice(idx,1);
}
this._pendingRemoteCheck=null;
}));
_47.addCallback(dojo.hitch(this,function(_49){
this.setRemoteDuplicate(_49);
}));
}
},_shortenDisplayName:function(_4a){
if(!dojo.isString(_4a)||_4a.length<=38){
return _4a;
}
return _4a.substring(0,20)+"..."+_4a.substring(_4a.length-15);
},_updateDuplicateStatus:function(){
if(this.isFilenameTooLong()||this.hasInvalidChars()){
this.clearStatus(this.StatusKeys.IS_DUPLICATE);
}else{
if(this.isLocalDuplicate()){
this._setLocalDuplicateStatus();
}else{
if(this.isRemoteDuplicate()){
this._setRemoteDuplicateStatus();
}else{
this.clearStatus(this.StatusKeys.IS_DUPLICATE);
}
}
}
},_setLocalDuplicateStatus:function(){
var _4b={id:this.StatusKeys.IS_DUPLICATE,level:this._fileList.areDuplicatesAllowed()?this.StatusLevels.WARNING:this.StatusLevels.ERROR,message:this.nls.STATUS_LOCAL_DUPLICATE,preventUpload:!this._fileList.areDuplicatesAllowed(),actions:this._fileList.isRenameAllowed()?[this.Actions.RENAME]:[]};
this.setStatus(_4b);
},_setReplacingStatus:function(){
var _4c={id:this.StatusKeys.IS_DUPLICATE,level:this.StatusLevels.INFO,message:this.nls.STATUS_REPLACE,preventUpload:false,actions:[this.Actions.UNDO_REPLACE]};
this.setStatus(_4c);
},_setRemoteDuplicateStatus:function(){
var msg=this._isRemoteDuplicate.community?this.nls.STATUS_REMOTE_DUPLICATE_RENAME_COMMUNITY:this.nls.STATUS_REMOTE_DUPLICATE_RENAME;
var _4d={id:this.StatusKeys.IS_DUPLICATE,level:this.StatusLevels.WARNING,message:msg,preventUpload:false,disableActionInline:true,actions:[]};
if(this._fileList.isRenameAllowed()){
this.Actions.RENAME.name=this.nls.ACTIONS_RENAME_LONG;
_4d.actions.push(this.Actions.RENAME);
}
this.setStatus(_4d);
if(this._fileList.isReplaceAllowed()){
this.Actions.REPLACE.execute(this);
}
},shortenFilename:function(_4e,ext,_4f){
_4e=_4e||"";
ext=ext||"";
var _50=lconn.core.util.text.getByteLength(_4e);
var _51=lconn.core.util.text.getByteLength(ext);
if(_4f<1||!_4f){
_4f=252;
}
var dot="";
var _52=0;
if(_51>0){
dot=".";
_52=1;
}
var _53=_4f-_51-_52;
if(_53<=0){
_4e="";
var _54=_4f-_52;
ext=lconn.core.util.text.trimToByteLength(ext,_54);
}else{
_4e=lconn.core.util.text.trimToByteLength(_4e,_53);
}
return {filename:_4e+dot+ext,name:_4e,ext:ext};
}});
}


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










dojo.requireLocalization("lconn.core.upload","upload");
(function(){
var _1=dojo.io.iframe,_2=!dojo.isFF;
var _3=dojo.i18n.getLocalization("lconn.core.upload","upload");
dojo.declare("lconn.core.upload.provider.HtmlFileProvider",null,{allowHTML5:(function(){
var _4=dojo.doc.createElement("input");
_4.type="file";
return ("files" in _4)&&window.FormData;
})(),_deleteIFrame:function(_5){
try{
if(window[_5]){
delete window[_5];
}else{
if(window.frames[_5]){
delete window.frames[_5];
}
}
}
catch(e){
}
},_getInputID:function(_6){
return _6.id+"_contents";
},_updateLabel:function(_7,_8){
if(_8&&_7&&_7.controller){
dojo.attr(_8,"for",this._getInputID(_7.controller));
}
},_buildFileInput:function(_9,_a,_b,_c){
var _d=this.browseInput=dojo.isIE<9?dojo.doc.createElement("<input type=\"file\">"):dojo.doc.createElement("input");
_d.type="file";
_d.id=this._getInputID(_9.controller);
_d.name=_9.controller.inputName||"file";
_d.style.display="block";
if(this.allowHTML5&&_9.isAllowMultipleFiles()){
_d.multiple="multiple";
}
_d.className=_c?"lotusOffScreen":"lotusText lotusLTR lotusAlignLeft qkrFile";
dijit.setWaiState(_d,"required",true);
if(dojo.isIE<8){
_b.push(dojo.connect(_d,"ondrop",dojo.stopEvent));
_b.push(dojo.connect(_d,"oncut",dojo.stopEvent));
_b.push(dojo.connect(_d,"onpaste",dojo.stopEvent));
_b.push(dojo.connect(_d,"onkeypress",function(_e){
if(_e.ctrlKey||_e.metaKey||_e.altKey){
return;
}
if(_e.keyChar||_e.keyCode==dojo.keys.DELETE||_e.keyCode==dojo.keys.BACKSPACE){
dojo.stopEvent(_e);
}
}));
}
_b.push(dojo.connect(_d,"onchange",dojo.hitch(this,function(){
this._beforeInputChanged();
this._handleInputChange(_d,_9);
})));
this._updateLabel(_9,_a);
if(this.allowHTML5&&dojo.isWebKit){
var _f=dojo.create("div");
_d.style.opacity="0";
_d.style.filter="alpha(opacity=0)";
_d.style.position="absolute";
_d.style.left="0";
_d.style.top="-9999px";
_d.setAttribute("tabindex","-1");
_f.appendChild(_d);
var _10=dojo.create("span",{className:"lotusBtn"});
var _11=this.browseInput=dojo.create("a",{href:"javascript:;",className:"lotusFormButton",role:"button"});
var _12;
if(this.allowHTML5){
_12=_9.isAllowMultipleFiles()?_3.BUTTON_TEXT_WEBKIT:_3.BUTTON_TEXT_WEBKIT_1;
}else{
_12=_3.BUTTON_TEXT;
}
_11.title=_12;
_11.appendChild(dojo.doc.createTextNode(_12));
_b.push(dojo.connect(_11,"onclick",_d,"click"));
_10.appendChild(_11);
_f.appendChild(_10);
return _f;
}
return _d;
},_handleFakeButtonClick:function(_13,_14,_15){
var _16=this._buildFileInput(_13,_14,_15,true);
dojo.body().appendChild(_16);
_16.click();
},buildInput:function(_17,_18){
var _19=[];
if(!this.allowHTML5||dojo.isWebKit){
var _1a=this.input=this._buildFileInput(_17,_18,_19,false);
}else{
if(_2){
var _1a=this.input=this.browseInput=dojo.doc.createElement("button");
_1a.appendChild(dojo.doc.createTextNode(_3.BUTTON_TEXT));
}else{
var _1a=this.input=this.browseInput=dojo.create("input");
_1a.type="button";
_1a.value=_3.BUTTON_TEXT;
}
_1a.className="lotusBtn";
_19.push(dojo.connect(_1a,"onclick",dojo.hitch(this,function(_1b){
dojo.stopEvent(_1b);
this._handleFakeButtonClick(_17,_18,_19);
})));
if(this.fileInputForTest){
var _1c=this.fileInputForTest=this._buildFileInput(_17,_18,_19,true);
dojo.body().appendChild(_1c);
}
}
return {domNode:_1a,destroy:dojo.partial(function(_1d){
dojo.forEach(_19,dojo.disconnect);
if(_1d.fileInputForTest){
dojo.body().removeChild(_1d.fileInputForTest);
_1d.fileInputForTest=null;
}
},this)};
},getFocusNode:function(){
return this.browseInput;
},uploadFile:function(_1e,_1f,_20){
var _21=null;
if(_20.osConfig){
var _22={getAuthenticatedUser:function(){
return {nonce:_20.nonce};
}};
dojo.mixin(_22,_20.osConfig);
_21=new lconn.files.util.os.NetworkOS(_22);
}
if(this.allowHTML5){
return this._uploadFileHTML5(_1e,_1f,_20,_21);
}else{
return this._uploadFileIFrame(_1e,_1f,_20,_21);
}
},_uploadFileIFrame:function(_23,_24,_25,_26){
var dfd=null;
if(!_25.form){
var _27=dojo.create("form",{"className":"lotusOffScreen","method":"post"});
dojo.body().appendChild(_27);
_25.form=_27;
}
var _28=_24.getObject();
dojo.addClass(_28,"lotusOffScreen");
_25.form.appendChild(_28);
dojo.attr(_25.form,"enctype","multipart/form-data");
dojo.attr(_25.form,"encoding","multipart/form-data");
if(!_25.method){
_25.method=dojo.attr(_25.form,"method")||"POST";
}
var _29=_25.content;
if(_29){
for(var key in _29){
if(_29[key]==undefined){
_29[key]="";
}
}
}
var _2a=this;
dfd=dojo.io.iframe.send(_25);
dfd.addBoth(function(_2b){
if(_28&&_28.parentNode){
_28.parentNode.removeChild(_28);
}
if(_2b&&_2b instanceof Error&&_2b.dojoType=="cancel"){
_2a._cancelIFrame();
}
});
this._queueProgressCheck(_23,_24);
return dfd;
},_uploadFileHTML5:function(_2c,_2d,_2e,_2f){
var dfd=null;
if(_2d.getSize()==0){
return this._sendZeroByteUpload(_2c,_2d,_2e);
}
var _30=false;
if(_2e.handleAs=="html"){
_2e.handleAs="text";
_30=true;
}
var _31=dojo.mixin({},_2e.content||{});
if(_2e.form){
dojo.mixin(_31,dojo.formToObject(_2e.form));
}
var _32=new FormData();
_32.append(_2c.controller.inputName||"file",_2d.getObject());
for(var k in _31){
if(_31.hasOwnProperty(k)&&_31[k]!=null){
var vs=_31[k];
if(!dojo.isArray(vs)){
vs=[vs];
}
dojo.forEach(vs,function(v){
if(v===true){
v="true";
}else{
if(v===false){
v="false";
}
}
_32.append(k,v);
});
}
}
var url=_2e.url;
if(!url&&_2e.form){
url=dojo.attr(_2e.form,"action");
}
if(!url){
throw new Error("null url");
}
_2e.rawBody=_32;
var _33=null;
var _34=null;
var err=null;
if(dojo.isFunction(_2e.handle)){
_33=_2e.handle;
delete _2e.handle;
}
if(dojo.isFunction(_2e.load)){
_34=_2e.load;
delete _2e.load;
}
if(dojo.isFunction(_2e.error)){
err=_2e.error;
delete _2e.error;
}
if(_2f){
dfd=_2f.postMultipart(_2e);
}else{
_2e.url=com.ibm.oneui.util.proxy(url);
var f=dojo._xhrObj;
dojo._xhrObj=function(){
var ret=f.apply(this,arguments);
dojo._xhrObj=f;
if(ret.upload){
ret.upload.addEventListener("progress",function(_35){
if(_35&&_35.lengthComputable){
if(_2d.getSize()>_35.loaded){
_2d.setBytesComplete(_35.loaded);
}
}
},false);
}
return ret;
};
dfd=dojo.xhrPost(_2e);
}
var _36=dfd.ioArgs||_2e;
if(_30){
dfd.addBoth(dojo.hitch(this,function(_37){
if(_37 instanceof Error){
return _37;
}
this._deleteIFrame("html5Frame");
var _38=_1.create("html5Frame");
var _39=_1.doc(_38);
_39.close();
_39.open();
_39.write(_37);
_39.close();
return _39;
}));
}
if(_34){
dfd.addCallback(function(_3a){
return _34.call(_2e,_3a,_36);
});
}
if(err){
dfd.addErrback(function(_3b){
return err.call(_2e,_3b,_36);
});
}
if(_33){
dfd.addBoth(function(_3c){
return _33.call(_2e,_3c,_36);
});
}
return dfd;
},_cancelIFrame:function(){
_1=dojo.io.iframe;
if(_1._frame){
try{
var doc=_1.doc(_1._frame);
if(doc){
var uri=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));
doc.location.replace(uri);
}
}
catch(e){
if(dojo.config.isDebug){
console.debug("dojo.io.iframe.cancel: ",e);
}
try{
var _3d=_1._frame;
if(_3d.parentNode){
_3d.parentNode.removeChild(_3d);
}
delete _1._frame;
delete window[_1._iframeName];
}
catch(e2){
if(dojo.config.isDebug){
console.debug("dojo.io.iframe.cancel2: ",e2);
}
}
}
}
},_sendZeroByteUpload:function(_3e,_3f,_40){
var _41=dojo.mixin({},_40.content||{});
if(_40.form){
dojo.mixin(_41,dojo.formToObject(_40.form));
}
var _42="--------"+(new Date()).getTime();
_40.url=com.ibm.oneui.util.proxy(_40.url);
_40.postData=this._buildMultipart(_3e.controller.inputName,_3f,_41,_42);
var _43=dojo.mixin({},_40.headers||{});
for(var k in _43){
if(_43.hasOwnProperty(k)&&_43[k]&&!dojo.isFunction(_43[k])){
_43[k]=lconn.core.util.text.encodeHeaderUtf8(_43[k]);
}
}
_43["Content-type"]="multipart/form-data;boundary="+_42;
_40.headers=_43;
var _44=false;
if(_40.handleAs=="html"){
_40.handleAs="text";
_44=true;
}
var _45=null;
var _46=null;
var err=null;
if(dojo.isFunction(_40.handle)){
_45=_40.handle;
delete _40.handle;
}
if(dojo.isFunction(_40.load)){
_46=_40.load;
delete _40.load;
}
if(dojo.isFunction(_40.error)){
err=_40.error;
delete _40.error;
}
dfd=dojo.xhrPost(_40);
var _47=dfd.ioArgs||_40;
if(_44){
dfd.addBoth(dojo.hitch(this,function(_48){
this._deleteIFrame("zbFrame");
var _49=_1.create("zbFrame");
var _4a=_1.doc(_49);
_4a.close();
_4a.open();
_4a.write(_48);
_4a.close();
return _4a;
}));
}
if(_46){
dfd.addCallback(function(_4b){
return _46.call(_40,_4b,_47);
});
}
if(err){
dfd.addErrback(function(_4c){
return err.call(_40,_4c,_47);
});
}
if(_45){
dfd.addBoth(function(_4d){
return _45.call(_40,_4d,_47);
});
}
return dfd;
},_queueProgressCheck:function(_4e,_4f){
if(_4e.checkProgress){
_4e.checkProgressInterval=_4e.checkProgressInterval||10000;
var _50=this;
_4e.checkProgressTimer=setTimeout(function(){
if(_4e.currentFile&&_4f==_4e.currentFile){
var _51=_4e.currentProgressCheck=_4e.checkProgress(_4e.currentFile);
_51.addBoth(_50,"_queueProgressCheck",_4e,_4f);
}
},_4e.checkProgressInterval);
}
},_beforeInputChanged:function(){
},_handleInputChange:function(_52,_53){
dojo.removeAttr(_52,"id");
if(this.allowHTML5){
if(_52.files){
this.addHTML5Files(_52.files,_53.controller.fileList);
_52.parentNode.removeChild(_52);
}else{
return;
}
}else{
var _54=lconn.core.util.text.getFilename(_52.value);
var _55=new lconn.core.upload.data.File(_52,_54);
_53.controller.fileList.addFiles([_55]);
}
_53._buildInput();
_53._focusFirstFileOfCurrentSelection();
},addHTML5Files:function(_56,_57){
if(!_56||!_56.length||!this.allowHTML5){
return;
}
var _58=[];
dojo.forEach(_56,function(_59){
var _5a=lconn.core.util.text.getFilename(_59.name);
var _5b=new lconn.core.upload.data.File(_59,_5a);
try{
_5b.setSize(_59.size);
_58.push(_5b);
}
catch(e){
var _5c=[{message:dojo.string.substitute(_3.ERROR_IO,[_5a])}];
_57.onAddFilesError(_5c);
}
},this);
_57.addFiles(_58);
},_buildMultipart:function(_5d,_5e,_5f,_60){
var _61="--"+_60;
var _62=[_61];
var _63=_5d||"file";
_62.push("Content-Disposition: form-data; name=\""+_63+"\"; filename=\""+_5e.getOriginalFileName()+"\"");
_62.push("Content-Type: application/octet-stream");
_62.push("");
_62.push("");
for(var key in _5f){
if(dojo.isString(key)){
var _64=_5f[key];
if(!dojo.isArray(_64)){
_64=[_64];
}
dojo.forEach(_64,function(_65){
_62.push(_61);
_62.push("Content-Disposition: form-data; name=\""+key+"\"");
_62.push("");
_62.push(_65);
},this);
}
}
_62.push(_61+"--");
return _62.join("\r\n");
}});
})();
}


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


var SWFUpload;
(function(){
if(SWFUpload==undefined){
SWFUpload=function(_1){
this.initSWFUpload(_1);
};
}
SWFUpload.prototype.initSWFUpload=function(_2){
try{
this.customSettings={};
this.settings=_2;
this.eventQueue=[];
this.movieName="SWFUpload_"+SWFUpload.movieCount++;
this.movieElement=null;
SWFUpload.instances[this.movieName]=this;
this.initSettings();
this.loadFlash();
this.displayDebugInfo();
}
catch(ex){
delete SWFUpload.instances[this.movieName];
throw ex;
}
};
SWFUpload.instances={};
SWFUpload.movieCount=0;
SWFUpload.version="2.2.0 2009-03-25";
SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};
SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};
SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};
SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};
SWFUpload.CURSOR={ARROW:-1,HAND:-2};
SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};
SWFUpload.completeURL=function(_3){
if(typeof (_3)!=="string"||_3.match(/^https?:\/\//i)||_3.match(/^\//)){
return _3;
}
var _4=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");
var _5=window.location.pathname.lastIndexOf("/");
if(_5<=0){
path="/";
}else{
path=window.location.pathname.substr(0,_5)+"/";
}
return path+_3;
};
SWFUpload.prototype.initSettings=function(){
this.ensureDefault=function(_6,_7){
this.settings[_6]=(this.settings[_6]==undefined)?_7:this.settings[_6];
};
this.ensureDefault("upload_url","");
this.ensureDefault("preserve_relative_urls",false);
this.ensureDefault("file_post_name","Filedata");
this.ensureDefault("post_params",{});
this.ensureDefault("use_query_string",false);
this.ensureDefault("requeue_on_error",false);
this.ensureDefault("http_success",[]);
this.ensureDefault("assume_success_timeout",0);
this.ensureDefault("file_types","*.*");
this.ensureDefault("file_types_description","All Files");
this.ensureDefault("file_size_limit",0);
this.ensureDefault("file_upload_limit",0);
this.ensureDefault("file_queue_limit",0);
if(lconn.core.config.properties["lconn.core.swfuploadUpgrade"]=="false"||lconn.core.config.properties["lconn.core.swfuploadUpgrade"]==undefined){
this.ensureDefault("flash_url",dojo.moduleUrl("lconn.core.swfupload","resources/swfupload_2.2.swf").toString());
}else{
this.ensureDefault("flash_url",dojo.moduleUrl("lconn.core.swfupload","resources/swfupload.swf").toString());
}
this.ensureDefault("prevent_swf_caching",true);
this.ensureDefault("button_image_url","");
this.ensureDefault("button_width",1);
this.ensureDefault("button_height",1);
this.ensureDefault("button_text","");
this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");
this.ensureDefault("button_text_top_padding",0);
this.ensureDefault("button_text_left_padding",0);
this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);
this.ensureDefault("button_disabled",false);
this.ensureDefault("button_placeholder_id","");
this.ensureDefault("button_placeholder",null);
this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);
this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);
this.ensureDefault("debug",false);
this.settings.debug_enabled=this.settings.debug;
this.settings.return_upload_start_handler=this.returnUploadStart;
this.ensureDefault("swfupload_loaded_handler",null);
this.ensureDefault("file_dialog_start_handler",null);
this.ensureDefault("file_queued_handler",null);
this.ensureDefault("file_queue_error_handler",null);
this.ensureDefault("file_dialog_complete_handler",null);
this.ensureDefault("upload_start_handler",null);
this.ensureDefault("upload_progress_handler",null);
this.ensureDefault("upload_error_handler",null);
this.ensureDefault("upload_success_handler",null);
this.ensureDefault("upload_complete_handler",null);
this.ensureDefault("debug_handler",this.debugMessage);
this.ensureDefault("custom_settings",{});
this.customSettings=this.settings.custom_settings;
if(!!this.settings.prevent_swf_caching){
this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime();
}
if(!this.settings.preserve_relative_urls){
this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);
this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url);
}
delete this.ensureDefault;
};
SWFUpload.prototype.loadFlash=function(){
var _8,_9;
if(document.getElementById(this.movieName)!==null){
throw "ID "+this.movieName+" is already in use. The Flash Object could not be added";
}
_8=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;
if(_8==undefined){
throw "Could not find the placeholder element: "+this.settings.button_placeholder_id;
}
_9=document.createElement("div");
_9.innerHTML=this.getFlashHTML();
this.movieElement=_9.firstChild;
_8.parentNode.replaceChild(_9.firstChild,_8);
if(window[this.movieName]==undefined){
window[this.movieName]=this.movieElement;
}
};
SWFUpload.prototype.getFlashHTML=function(){
return ["<object tabindex=\"0\" id=\"",this.movieName,"\" type=\"application/x-shockwave-flash\" data=\"",this.settings.flash_url,"\" width=\"",this.settings.button_width,"\" height=\"",this.settings.button_height,"\" class=\"swfupload\">","<param name=\"wmode\" value=\"",this.settings.button_window_mode,"\" />","<param name=\"movie\" value=\"",this.settings.flash_url,"\" />","<param name=\"quality\" value=\"high\" />","<param name=\"menu\" value=\"false\" />","<param name=\"allowScriptAccess\" value=\"always\" />","<param name=\"flashvars\" value=\""+this.getFlashVars()+"\" />","</object>"].join("");
};
SWFUpload.prototype.getFlashVars=function(){
var _a=this.buildParamString();
var _b=this.settings.http_success.join(",");
return ["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(_b),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(_a),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("");
};
SWFUpload.prototype.getMovieElement=function(){
if(this.movieElement==undefined){
this.movieElement=document.getElementById(this.movieName);
}
if(this.movieElement===null){
throw "Could not find Flash element";
}
return this.movieElement;
};
SWFUpload.prototype.buildParamString=function(){
var _c=this.settings.post_params;
var _d=[];
if(typeof (_c)==="object"){
for(var _e in _c){
if(_c.hasOwnProperty(_e)){
_d.push(encodeURIComponent(_e.toString())+"="+encodeURIComponent(_c[_e].toString()));
}
}
}
return _d.join("&amp;");
};
SWFUpload.prototype.destroy=function(){
try{
this.cancelUpload(null,false);
var _f=null;
_f=this.getMovieElement();
if(_f&&typeof (_f.CallFunction)==="unknown"){
for(var i in _f){
try{
if(typeof (_f[i])==="function"){
_f[i]=null;
}
}
catch(ex1){
}
}
try{
_f.parentNode.removeChild(_f);
}
catch(ex){
}
}
window[this.movieName]=null;
SWFUpload.instances[this.movieName]=null;
delete SWFUpload.instances[this.movieName];
this.movieElement=null;
this.settings=null;
this.customSettings=null;
this.eventQueue=null;
this.movieName=null;
return true;
}
catch(ex2){
return false;
}
};
SWFUpload.prototype.displayDebugInfo=function(){
this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url:               ",this.settings.upload_url,"\n","\t","flash_url:                ",this.settings.flash_url,"\n","\t","use_query_string:         ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","\t","http_success:             ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","\t","file_post_name:           ",this.settings.file_post_name,"\n","\t","post_params:              ",this.settings.post_params.toString(),"\n","\t","file_types:               ",this.settings.file_types,"\n","\t","file_types_description:   ",this.settings.file_types_description,"\n","\t","file_size_limit:          ",this.settings.file_size_limit,"\n","\t","file_upload_limit:        ",this.settings.file_upload_limit,"\n","\t","file_queue_limit:         ",this.settings.file_queue_limit,"\n","\t","debug:                    ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder:       ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url:         ",this.settings.button_image_url.toString(),"\n","\t","button_width:             ",this.settings.button_width.toString(),"\n","\t","button_height:            ",this.settings.button_height.toString(),"\n","\t","button_text:              ",this.settings.button_text.toString(),"\n","\t","button_text_style:        ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action:            ",this.settings.button_action.toString(),"\n","\t","button_disabled:          ",this.settings.button_disabled.toString(),"\n","\t","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned:  ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned:       ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned:  ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned:      ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned:   ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned:      ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned:    ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned:   ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned:             ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""));
};
SWFUpload.prototype.addSetting=function(_10,_11,_12){
if(_11==undefined){
return (this.settings[_10]=_12);
}else{
return (this.settings[_10]=_11);
}
};
SWFUpload.prototype.getSetting=function(_13){
if(this.settings[_13]!=undefined){
return this.settings[_13];
}
return "";
};
SWFUpload.prototype.callFlash=function(_14,_15){
_15=_15||[];
var _16=this.getMovieElement();
var _17,_18;
try{
_18=_16.CallFunction("<invoke name=\""+_14+"\" returntype=\"javascript\">"+__flash__argumentsToXML(_15,0)+"</invoke>");
_17=eval(_18);
}
catch(ex){
throw "Call to "+_14+" failed";
}
if(_17!=undefined&&typeof _17.post==="object"){
_17=this.unescapeFilePostParams(_17);
}
return _17;
};
SWFUpload.prototype.selectFile=function(){
this.callFlash("SelectFile");
};
SWFUpload.prototype.selectFiles=function(){
this.callFlash("SelectFiles");
};
SWFUpload.prototype.startUpload=function(_19){
this.callFlash("StartUpload",[_19]);
};
SWFUpload.prototype.cancelUpload=function(_1a,_1b){
if(_1b!==false){
_1b=true;
}
this.callFlash("CancelUpload",[_1a,_1b]);
};
SWFUpload.prototype.stopUpload=function(){
this.callFlash("StopUpload");
};
SWFUpload.prototype.requeueUpload=function(_1c){
return this.callFlash("RequeueUpload",[_1c]);
};
SWFUpload.prototype.getStats=function(){
return this.callFlash("GetStats");
};
SWFUpload.prototype.setStats=function(_1d){
this.callFlash("SetStats",[_1d]);
};
SWFUpload.prototype.getFile=function(_1e){
if(typeof (_1e)==="number"){
return this.callFlash("GetFileByIndex",[_1e]);
}else{
return this.callFlash("GetFile",[_1e]);
}
};
SWFUpload.prototype.addFileParam=function(_1f,_20,_21){
if(_21!=null){
return this.callFlash("AddFileParam",[_1f,_20,_21]);
}
};
SWFUpload.prototype.removeFileParam=function(_22,_23){
this.callFlash("RemoveFileParam",[_22,_23]);
};
SWFUpload.prototype.setUploadURL=function(url){
this.settings.upload_url=url.toString();
this.callFlash("SetUploadURL",[url]);
};
SWFUpload.prototype.setPostParams=function(_24){
this.settings.post_params=_24;
this.callFlash("SetPostParams",[_24]);
};
SWFUpload.prototype.addPostParam=function(_25,_26){
this.settings.post_params[_25]=_26;
this.callFlash("SetPostParams",[this.settings.post_params]);
};
SWFUpload.prototype.removePostParam=function(_27){
delete this.settings.post_params[_27];
this.callFlash("SetPostParams",[this.settings.post_params]);
};
SWFUpload.prototype.setFileTypes=function(_28,_29){
this.settings.file_types=_28;
this.settings.file_types_description=_29;
this.callFlash("SetFileTypes",[_28,_29]);
};
SWFUpload.prototype.setFileSizeLimit=function(_2a){
this.settings.file_size_limit=_2a;
this.callFlash("SetFileSizeLimit",[_2a]);
};
SWFUpload.prototype.setFileUploadLimit=function(_2b){
this.settings.file_upload_limit=_2b;
this.callFlash("SetFileUploadLimit",[_2b]);
};
SWFUpload.prototype.setFileQueueLimit=function(_2c){
this.settings.file_queue_limit=_2c;
this.callFlash("SetFileQueueLimit",[_2c]);
};
SWFUpload.prototype.setFilePostName=function(_2d){
this.settings.file_post_name=_2d;
this.callFlash("SetFilePostName",[_2d]);
};
SWFUpload.prototype.setUseQueryString=function(_2e){
this.settings.use_query_string=_2e;
this.callFlash("SetUseQueryString",[_2e]);
};
SWFUpload.prototype.setRequeueOnError=function(_2f){
this.settings.requeue_on_error=_2f;
this.callFlash("SetRequeueOnError",[_2f]);
};
SWFUpload.prototype.setHTTPSuccess=function(_30){
if(typeof _30==="string"){
_30=_30.replace(" ","").split(",");
}
this.settings.http_success=_30;
this.callFlash("SetHTTPSuccess",[_30]);
};
SWFUpload.prototype.setAssumeSuccessTimeout=function(_31){
this.settings.assume_success_timeout=_31;
this.callFlash("SetAssumeSuccessTimeout",[_31]);
};
SWFUpload.prototype.setDebugEnabled=function(_32){
this.settings.debug_enabled=_32;
this.callFlash("SetDebugEnabled",[_32]);
};
SWFUpload.prototype.setButtonImageURL=function(_33){
if(_33==undefined){
_33="";
}
this.settings.button_image_url=_33;
this.callFlash("SetButtonImageURL",[_33]);
};
SWFUpload.prototype.setButtonDimensions=function(_34,_35){
this.settings.button_width=_34;
this.settings.button_height=_35;
var _36=this.getMovieElement();
if(_36!=undefined){
_36.style.width=_34+"px";
_36.style.height=_35+"px";
}
this.callFlash("SetButtonDimensions",[_34,_35]);
};
SWFUpload.prototype.setButtonText=function(_37){
this.settings.button_text=_37;
this.callFlash("SetButtonText",[_37]);
};
SWFUpload.prototype.setButtonTextPadding=function(_38,top){
this.settings.button_text_top_padding=top;
this.settings.button_text_left_padding=_38;
this.callFlash("SetButtonTextPadding",[_38,top]);
};
SWFUpload.prototype.setButtonTextStyle=function(css){
this.settings.button_text_style=css;
this.callFlash("SetButtonTextStyle",[css]);
};
SWFUpload.prototype.setButtonDisabled=function(_39){
this.settings.button_disabled=_39;
this.callFlash("SetButtonDisabled",[_39]);
};
SWFUpload.prototype.setButtonAction=function(_3a){
this.settings.button_action=_3a;
this.callFlash("SetButtonAction",[_3a]);
};
SWFUpload.prototype.setButtonCursor=function(_3b){
this.settings.button_cursor=_3b;
this.callFlash("SetButtonCursor",[_3b]);
};
SWFUpload.prototype.queueEvent=function(_3c,_3d){
if(_3d==undefined){
_3d=[];
}else{
if(!(_3d instanceof Array)){
_3d=[_3d];
}
}
var _3e=this;
if(typeof this.settings[_3c]==="function"){
this.eventQueue.push(function(){
this.settings[_3c].apply(this,_3d);
});
setTimeout(function(){
_3e.executeNextEvent();
},0);
}else{
if(this.settings[_3c]!==null){
throw "Event handler "+_3c+" is unknown or is not a function";
}
}
};
SWFUpload.prototype.executeNextEvent=function(){
var f=this.eventQueue?this.eventQueue.shift():null;
if(typeof (f)==="function"){
f.apply(this);
}
};
SWFUpload.prototype.unescapeFilePostParams=function(_3f){
var reg=/[$]([0-9a-f]{4})/i;
var _40={};
var uk;
if(_3f!=undefined){
for(var k in _3f.post){
if(_3f.post.hasOwnProperty(k)){
uk=k;
var _41;
while((_41=reg.exec(uk))!==null){
uk=uk.replace(_41[0],String.fromCharCode(parseInt("0x"+_41[1],16)));
}
_40[uk]=_3f.post[k];
}
}
_3f.post=_40;
}
return _3f;
};
SWFUpload.prototype.testExternalInterface=function(){
try{
return this.callFlash("TestExternalInterface");
}
catch(ex){
return false;
}
};
SWFUpload.prototype.flashReady=function(){
var _42=this.getMovieElement();
if(!_42){
this.debug("Flash called back ready but the flash movie can't be found.");
return;
}
this.cleanUp(_42);
this.queueEvent("swfupload_loaded_handler");
};
SWFUpload.prototype.cleanUp=function(_43){
try{
if(this.movieElement&&typeof (_43.CallFunction)==="unknown"){
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
for(var key in _43){
try{
if(typeof (_43[key])==="function"){
_43[key]=null;
}
}
catch(ex){
}
}
}
}
catch(ex1){
}
window["__flash__removeCallback"]=function(_44,_45){
try{
if(_44){
_44[_45]=null;
}
}
catch(flashEx){
}
};
};
SWFUpload.prototype.fileDialogStart=function(){
this.queueEvent("file_dialog_start_handler");
};
SWFUpload.prototype.fileQueued=function(_46){
_46=this.unescapeFilePostParams(_46);
this.queueEvent("file_queued_handler",_46);
};
SWFUpload.prototype.keyPressed=function(_47){
this.queueEvent("key_pressed",_47);
};
SWFUpload.prototype.fileQueueError=function(_48,_49,_4a){
_48=this.unescapeFilePostParams(_48);
this.queueEvent("file_queue_error_handler",[_48,_49,_4a]);
};
SWFUpload.prototype.fileDialogComplete=function(_4b,_4c,_4d){
this.queueEvent("file_dialog_complete_handler",[_4b,_4c,_4d]);
};
SWFUpload.prototype.uploadStart=function(_4e){
_4e=this.unescapeFilePostParams(_4e);
this.queueEvent("return_upload_start_handler",_4e);
};
SWFUpload.prototype.returnUploadStart=function(_4f){
var _50;
if(typeof this.settings.upload_start_handler==="function"){
_4f=this.unescapeFilePostParams(_4f);
_50=this.settings.upload_start_handler.call(this,_4f);
}else{
if(this.settings.upload_start_handler!=undefined){
throw "upload_start_handler must be a function";
}
}
if(_50===undefined){
_50=true;
}
_50=!!_50;
this.callFlash("ReturnUploadStart",[_50]);
};
SWFUpload.prototype.uploadProgress=function(_51,_52,_53){
_51=this.unescapeFilePostParams(_51);
this.queueEvent("upload_progress_handler",[_51,_52,_53]);
};
SWFUpload.prototype.uploadError=function(_54,_55,_56){
_54=this.unescapeFilePostParams(_54);
this.queueEvent("upload_error_handler",[_54,_55,_56]);
};
SWFUpload.prototype.uploadSuccess=function(_57,_58,_59){
_57=this.unescapeFilePostParams(_57);
this.queueEvent("upload_success_handler",[_57,_58,_59]);
};
SWFUpload.prototype.uploadComplete=function(_5a){
_5a=this.unescapeFilePostParams(_5a);
this.queueEvent("upload_complete_handler",_5a);
};
SWFUpload.prototype.debug=function(_5b){
this.queueEvent("debug_handler",_5b);
};
SWFUpload.prototype.debugMessage=function(_5c){
if(this.settings.debug){
var _5d,_5e=[];
if(typeof _5c==="object"&&typeof _5c.name==="string"&&typeof _5c.message==="string"){
for(var key in _5c){
if(_5c.hasOwnProperty(key)){
_5e.push(key+": "+_5c[key]);
}
}
_5d=_5e.join("\n")||"";
_5e=_5d.split("\n");
_5d="EXCEPTION: "+_5e.join("\nEXCEPTION: ");
SWFUpload.Console.writeLine(_5d);
}else{
SWFUpload.Console.writeLine(_5c);
}
}
};
SWFUpload.Console={};
SWFUpload.Console.writeLine=function(_5f){
var _60,_61;
try{
_60=document.getElementById("SWFUpload_Console");
if(!_60){
_61=document.createElement("form");
document.getElementsByTagName("body")[0].appendChild(_61);
_60=document.createElement("textarea");
_60.id="SWFUpload_Console";
_60.style.fontFamily="monospace";
_60.setAttribute("wrap","off");
_60.wrap="off";
_60.style.overflow="auto";
_60.style.width="700px";
_60.style.height="350px";
_60.style.margin="5px";
_61.appendChild(_60);
}
_60.value+=_5f+"\n";
_60.scrollTop=_60.scrollHeight-_60.clientHeight;
}
catch(ex){
alert("Exception: "+ex.name+" Message: "+ex.message);
}
};
lconn.core.swfupload.SWFUpload=SWFUpload;
})();
}


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


(function(){
var _1=lconn.core.swfupload.SWFUpload;
if(typeof (_1)==="function"){
_1.speed={};
_1.prototype.initSettings=(function(_2){
return function(){
if(typeof (_2)==="function"){
_2.call(this);
}
this.ensureDefault=function(_3,_4){
this.settings[_3]=(this.settings[_3]==undefined)?_4:this.settings[_3];
};
this.fileSpeedStats={};
this.speedSettings={};
this.ensureDefault("moving_average_history_size","10");
this.speedSettings.user_file_queued_handler=this.settings.file_queued_handler;
this.speedSettings.user_file_queue_error_handler=this.settings.file_queue_error_handler;
this.speedSettings.user_upload_start_handler=this.settings.upload_start_handler;
this.speedSettings.user_upload_error_handler=this.settings.upload_error_handler;
this.speedSettings.user_upload_progress_handler=this.settings.upload_progress_handler;
this.speedSettings.user_upload_success_handler=this.settings.upload_success_handler;
this.speedSettings.user_upload_complete_handler=this.settings.upload_complete_handler;
this.settings.file_queued_handler=_1.speed.fileQueuedHandler;
this.settings.file_queue_error_handler=_1.speed.fileQueueErrorHandler;
this.settings.upload_start_handler=_1.speed.uploadStartHandler;
this.settings.upload_error_handler=_1.speed.uploadErrorHandler;
this.settings.upload_progress_handler=_1.speed.uploadProgressHandler;
this.settings.upload_success_handler=_1.speed.uploadSuccessHandler;
this.settings.upload_complete_handler=_1.speed.uploadCompleteHandler;
delete this.ensureDefault;
};
})(_1.prototype.initSettings);
_1.speed.fileQueuedHandler=function(_5){
if(typeof this.speedSettings.user_file_queued_handler==="function"){
_5=_1.speed.extendFile(_5);
return this.speedSettings.user_file_queued_handler.call(this,_5);
}
};
_1.speed.fileQueueErrorHandler=function(_6,_7,_8){
if(typeof this.speedSettings.user_file_queue_error_handler==="function"){
_6=_1.speed.extendFile(_6);
return this.speedSettings.user_file_queue_error_handler.call(this,_6,_7,_8);
}
};
_1.speed.uploadStartHandler=function(_9){
if(typeof this.speedSettings.user_upload_start_handler==="function"){
_9=_1.speed.extendFile(_9,this.fileSpeedStats);
return this.speedSettings.user_upload_start_handler.call(this,_9);
}
};
_1.speed.uploadErrorHandler=function(_a,_b,_c){
_a=_1.speed.extendFile(_a,this.fileSpeedStats);
_1.speed.removeTracking(_a,this.fileSpeedStats);
if(typeof this.speedSettings.user_upload_error_handler==="function"){
return this.speedSettings.user_upload_error_handler.call(this,_a,_b,_c);
}
};
_1.speed.uploadProgressHandler=function(_d,_e,_f){
this.updateTracking(_d,_e);
_d=_1.speed.extendFile(_d,this.fileSpeedStats);
if(typeof this.speedSettings.user_upload_progress_handler==="function"){
return this.speedSettings.user_upload_progress_handler.call(this,_d,_e,_f);
}
};
_1.speed.uploadSuccessHandler=function(_10,_11){
if(typeof this.speedSettings.user_upload_success_handler==="function"){
_10=_1.speed.extendFile(_10,this.fileSpeedStats);
return this.speedSettings.user_upload_success_handler.call(this,_10,_11);
}
};
_1.speed.uploadCompleteHandler=function(_12){
_12=_1.speed.extendFile(_12,this.fileSpeedStats);
_1.speed.removeTracking(_12,this.fileSpeedStats);
if(typeof this.speedSettings.user_upload_complete_handler==="function"){
return this.speedSettings.user_upload_complete_handler.call(this,_12);
}
};
_1.speed.extendFile=function(_13,_14){
var _15;
if(_14){
_15=_14[_13.id];
}
if(_15){
_13.currentSpeed=_15.currentSpeed;
_13.averageSpeed=_15.averageSpeed;
_13.movingAverageSpeed=_15.movingAverageSpeed;
_13.timeRemaining=_15.timeRemaining;
_13.timeElapsed=_15.timeElapsed;
_13.percentUploaded=_15.percentUploaded;
_13.sizeUploaded=_15.bytesUploaded;
}else{
_13.currentSpeed=0;
_13.averageSpeed=0;
_13.movingAverageSpeed=0;
_13.timeRemaining=0;
_13.timeElapsed=0;
_13.percentUploaded=0;
_13.sizeUploaded=0;
}
return _13;
};
_1.prototype.updateTracking=function(_16,_17){
var _18=this.fileSpeedStats[_16.id];
if(!_18){
this.fileSpeedStats[_16.id]=_18={};
}
_17=_17||_18.bytesUploaded||0;
if(_17<0){
_17=0;
}
if(_17>_16.size){
_17=_16.size;
}
var _19=(new Date()).getTime();
if(!_18.startTime){
_18.startTime=(new Date()).getTime();
_18.lastTime=_18.startTime;
_18.currentSpeed=0;
_18.averageSpeed=0;
_18.movingAverageSpeed=0;
_18.movingAverageHistory=[];
_18.timeRemaining=0;
_18.timeElapsed=0;
_18.percentUploaded=_17/_16.size;
_18.bytesUploaded=_17;
}else{
if(_18.startTime>_19){
this.debug("When backwards in time");
}else{
var now=(new Date()).getTime();
var _1a=_18.lastTime;
var _1b=now-_1a;
var _1c=_17-_18.bytesUploaded;
if(_1c===0||_1b===0){
return _18;
}
_18.lastTime=now;
_18.bytesUploaded=_17;
_18.currentSpeed=(_1c*8)/(_1b/1000);
_18.averageSpeed=(_18.bytesUploaded*8)/((now-_18.startTime)/1000);
_18.movingAverageHistory.push(_18.currentSpeed);
if(_18.movingAverageHistory.length>this.settings.moving_average_history_size){
_18.movingAverageHistory.shift();
}
_18.movingAverageSpeed=_1.speed.calculateMovingAverage(_18.movingAverageHistory);
_18.timeRemaining=(_16.size-_18.bytesUploaded)*8/_18.movingAverageSpeed;
_18.timeElapsed=(now-_18.startTime)/1000;
_18.percentUploaded=(_18.bytesUploaded/_16.size*100);
}
}
return _18;
};
_1.speed.removeTracking=function(_1d,_1e){
try{
_1e[_1d.id]=null;
delete _1e[_1d.id];
}
catch(ex){
}
};
_1.speed.formatUnits=function(_1f,_20,_21,_22){
var i,_23,_24,_25;
if(_1f===0){
return "0 "+_21[_21.length-1];
}
if(_22){
_23=_1f;
_25=_21.length>=_20.length?_21[_20.length-1]:"";
for(i=0;i<_20.length;i++){
if(_1f>=_20[i]){
_23=(_1f/_20[i]).toFixed(2);
_25=_21.length>=i?" "+_21[i]:"";
break;
}
}
return _23+_25;
}else{
var _26=[];
var _27=_1f;
for(i=0;i<_20.length;i++){
_24=_20[i];
_25=_21.length>i?" "+_21[i]:"";
_23=_27/_24;
if(i<_20.length-1){
_23=Math.floor(_23);
}else{
_23=_23.toFixed(2);
}
if(_23>0){
_27=_27%_24;
_26.push(_23+_25);
}
}
return _26.join(" ");
}
};
_1.speed.formatBPS=function(_28){
var _29=[1073741824,1048576,1024,1],_2a=["Gbps","Mbps","Kbps","bps"];
return _1.speed.formatUnits(_28,_29,_2a,true);
};
_1.speed.formatTime=function(_2b){
var _2c=[86400,3600,60,1],_2d=["d","h","m","s"];
return _1.speed.formatUnits(_2b,_2c,_2d,false);
};
_1.speed.formatBytes=function(_2e){
var _2f=[1073741824,1048576,1024,1],_30=["GB","MB","KB","bytes"];
return _1.speed.formatUnits(_2e,_2f,_30,true);
};
_1.speed.formatPercent=function(_31){
return _31.toFixed(2)+" %";
};
_1.speed.calculateMovingAverage=function(_32){
var _33=[],_34,sum=0,_35=0,_36=0,_37=0,_38=0;
var i;
var _39=0,_3a=0;
_34=_32.length;
if(_34>=8){
for(i=0;i<_34;i++){
_33[i]=_32[i];
sum+=_33[i];
}
_35=sum/_34;
for(i=0;i<_34;i++){
_36+=Math.pow((_33[i]-_35),2);
}
_37=_36/_34;
_38=Math.sqrt(_37);
for(i=0;i<_34;i++){
_33[i]=(_33[i]-_35)/_38;
}
var _3b=2;
for(i=0;i<_34;i++){
if(_33[i]<=_3b&&_33[i]>=-_3b){
_3a++;
_39+=_32[i];
}
}
}else{
_3a=_34;
for(i=0;i<_34;i++){
_39+=_32[i];
}
}
return _39/_3a;
};
}
})();
}


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


var swfobject=function(){
var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;
var h=function(){
var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;
if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){
x=T.plugins[n].description;
if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){
x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);
AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);
AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0;
}
}else{
if(typeof j.ActiveXObject!=b){
var y=null,AB=false;
try{
y=new ActiveXObject(p+".7");
}
catch(t){
try{
y=new ActiveXObject(p+".6");
AC=[6,0,21];
y.AllowScriptAccess="always";
}
catch(t){
if(AC[0]==6){
AB=true;
}
}
if(!AB){
try{
y=new ActiveXObject(p);
}
catch(t){
}
}
}
if(!AB&&y){
try{
x=y.GetVariable("$version");
if(x){
x=x.split(" ")[1].split(",");
AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)];
}
}
catch(t){
}
}
}
}
var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
return {w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w};
}();
var L=function(){
if(!h.w3cdom){
return;
}
f(H);
if(h.ie&&h.win){
try{
K.write("<script id=__ie_ondomload defer=true src=//:></script>");
J=C("__ie_ondomload");
if(J){
I(J,"onreadystatechange",S);
}
}
catch(q){
}
}
if(h.webkit&&typeof K.readyState!=b){
Z=setInterval(function(){
if(/loaded|complete/.test(K.readyState)){
E();
}
},10);
}
if(typeof K.addEventListener!=b){
K.addEventListener("DOMContentLoaded",E,null);
}
R(E);
}();
function S(){
if(J.readyState=="complete"){
J.parentNode.removeChild(J);
E();
}
};
function E(){
if(e){
return;
}
if(h.ie&&h.win){
var v=a("span");
try{
var u=K.getElementsByTagName("body")[0].appendChild(v);
u.parentNode.removeChild(u);
}
catch(w){
return;
}
}
e=true;
if(Z){
clearInterval(Z);
Z=null;
}
var q=o.length;
for(var r=0;r<q;r++){
o[r]();
}
};
function f(q){
if(e){
q();
}else{
o[o.length]=q;
}
};
function R(r){
if(typeof j.addEventListener!=b){
j.addEventListener("load",r,false);
}else{
if(typeof K.addEventListener!=b){
K.addEventListener("load",r,false);
}else{
if(typeof j.attachEvent!=b){
I(j,"onload",r);
}else{
if(typeof j.onload=="function"){
var q=j.onload;
j.onload=function(){
q();
r();
};
}else{
j.onload=r;
}
}
}
}
};
function H(){
var t=N.length;
for(var q=0;q<t;q++){
var u=N[q].id;
if(h.pv[0]>0){
var r=C(u);
if(r){
N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";
N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";
if(c(N[q].swfVersion)){
if(h.webkit&&h.webkit<312){
Y(r);
}
W(u,true);
}else{
if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){
k(N[q]);
}else{
O(r);
}
}
}
}else{
W(u,true);
}
}
};
function Y(t){
var q=t.getElementsByTagName(Q)[0];
if(q){
var w=a("embed"),y=q.attributes;
if(y){
var v=y.length;
for(var u=0;u<v;u++){
if(y[u].nodeName=="DATA"){
w.setAttribute("src",y[u].nodeValue);
}else{
w.setAttribute(y[u].nodeName,y[u].nodeValue);
}
}
}
var x=q.childNodes;
if(x){
var z=x.length;
for(var r=0;r<z;r++){
if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){
w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"));
}
}
}
t.parentNode.replaceChild(w,t);
}
};
function k(w){
A=true;
var u=C(w.id);
if(u){
if(w.altContentId){
var y=C(w.altContentId);
if(y){
M=y;
l=w.altContentId;
}
}else{
M=G(u);
}
if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){
w.width="310";
}
if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){
w.height="137";
}
K.title=K.title.slice(0,47)+" - Flash Player Installation";
var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;
if(h.ie&&h.win&&u.readyState!=4){
var t=a("div");
x+="SWFObjectNew";
t.setAttribute("id",x);
u.parentNode.insertBefore(t,u);
u.style.display="none";
var v=function(){
u.parentNode.removeChild(u);
};
I(j,"onload",v);
}
U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x);
}
};
function O(t){
if(h.ie&&h.win&&t.readyState!=4){
var r=a("div");
t.parentNode.insertBefore(r,t);
r.parentNode.replaceChild(G(t),r);
t.style.display="none";
var q=function(){
t.parentNode.removeChild(t);
};
I(j,"onload",q);
}else{
t.parentNode.replaceChild(G(t),t);
}
};
function G(v){
var u=a("div");
if(h.win&&h.ie){
u.innerHTML=v.innerHTML;
}else{
var r=v.getElementsByTagName(Q)[0];
if(r){
var w=r.childNodes;
if(w){
var q=w.length;
for(var t=0;t<q;t++){
if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){
u.appendChild(w[t].cloneNode(true));
}
}
}
}
}
return u;
};
function U(AG,AE,t){
var q,v=C(t);
if(v){
if(typeof AG.id==b){
AG.id=t;
}
if(h.ie&&h.win){
var AF="";
for(var AB in AG){
if(AG[AB]!=Object.prototype[AB]){
if(AB.toLowerCase()=="data"){
AE.movie=AG[AB];
}else{
if(AB.toLowerCase()=="styleclass"){
AF+=" class=\""+AG[AB]+"\"";
}else{
if(AB.toLowerCase()!="classid"){
AF+=" "+AB+"=\""+AG[AB]+"\"";
}
}
}
}
}
var AD="";
for(var AA in AE){
if(AE[AA]!=Object.prototype[AA]){
AD+="<param name=\""+AA+"\" value=\""+AE[AA]+"\" />";
}
}
v.outerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+AF+">"+AD+"</object>";
i[i.length]=AG.id;
q=C(AG.id);
}else{
if(h.webkit&&h.webkit<312){
var AC=a("embed");
AC.setAttribute("type",P);
for(var z in AG){
if(AG[z]!=Object.prototype[z]){
if(z.toLowerCase()=="data"){
AC.setAttribute("src",AG[z]);
}else{
if(z.toLowerCase()=="styleclass"){
AC.setAttribute("class",AG[z]);
}else{
if(z.toLowerCase()!="classid"){
AC.setAttribute(z,AG[z]);
}
}
}
}
}
for(var y in AE){
if(AE[y]!=Object.prototype[y]){
if(y.toLowerCase()!="movie"){
AC.setAttribute(y,AE[y]);
}
}
}
v.parentNode.replaceChild(AC,v);
q=AC;
}else{
var u=a(Q);
u.setAttribute("type",P);
for(var x in AG){
if(AG[x]!=Object.prototype[x]){
if(x.toLowerCase()=="styleclass"){
u.setAttribute("class",AG[x]);
}else{
if(x.toLowerCase()!="classid"){
u.setAttribute(x,AG[x]);
}
}
}
}
for(var w in AE){
if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){
F(u,w,AE[w]);
}
}
v.parentNode.replaceChild(u,v);
q=u;
}
}
}
return q;
};
function F(t,q,r){
var u=a("param");
u.setAttribute("name",q);
u.setAttribute("value",r);
t.appendChild(u);
};
function X(r){
var q=C(r);
if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){
if(h.ie&&h.win){
if(q.readyState==4){
B(r);
}else{
j.attachEvent("onload",function(){
B(r);
});
}
}else{
q.parentNode.removeChild(q);
}
}
};
function B(t){
var r=C(t);
if(r){
for(var q in r){
if(typeof r[q]=="function"){
r[q]=null;
}
}
r.parentNode.removeChild(r);
}
};
function C(t){
var q=null;
try{
q=K.getElementById(t);
}
catch(r){
}
return q;
};
function a(q){
return K.createElement(q);
};
function I(t,q,r){
t.attachEvent(q,r);
d[d.length]=[t,q,r];
};
function c(t){
var r=h.pv,q=t.split(".");
q[0]=parseInt(q[0],10);
q[1]=parseInt(q[1],10)||0;
q[2]=parseInt(q[2],10)||0;
return (r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false;
};
function V(v,r){
if(h.ie&&h.mac){
return;
}
var u=K.getElementsByTagName("head")[0],t=a("style");
t.setAttribute("type","text/css");
t.setAttribute("media","screen");
if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){
t.appendChild(K.createTextNode(v+" {"+r+"}"));
}
u.appendChild(t);
if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){
var q=K.styleSheets[K.styleSheets.length-1];
if(typeof q.addRule==Q){
q.addRule(v,r);
}
}
};
function W(t,q){
var r=q?"visible":"hidden";
if(e&&C(t)){
C(t).style.visibility=r;
}else{
V("#"+t,"visibility:"+r);
}
};
function g(s){
var r=/[\\\"<>\.;]/;
var q=r.exec(s)!=null;
return q?encodeURIComponent(s):s;
};
var D=function(){
if(h.ie&&h.win){
window.attachEvent("onunload",function(){
var w=d.length;
for(var v=0;v<w;v++){
d[v][0].detachEvent(d[v][1],d[v][2]);
}
var t=i.length;
for(var u=0;u<t;u++){
X(i[u]);
}
for(var r in h){
h[r]=null;
}
h=null;
for(var q in swfobject){
swfobject[q]=null;
}
swfobject=null;
});
}
}();
return {registerObject:function(u,q,t){
if(!h.w3cdom||!u||!q){
return;
}
var r={};
r.id=u;
r.swfVersion=q;
r.expressInstall=t?t:false;
N[N.length]=r;
W(u,false);
},getObjectById:function(v){
var q=null;
if(h.w3cdom){
var t=C(v);
if(t){
var u=t.getElementsByTagName(Q)[0];
if(!u||(u&&typeof t.SetVariable!=b)){
q=t;
}else{
if(typeof u.SetVariable!=b){
q=u;
}
}
}
}
return q;
},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){
if(!h.w3cdom||!x||!AE||!AB||!AD||!q){
return;
}
AB+="";
AD+="";
if(c(q)){
W(AE,false);
var AA={};
if(AC&&typeof AC===Q){
for(var v in AC){
if(AC[v]!=Object.prototype[v]){
AA[v]=AC[v];
}
}
}
AA.data=x;
AA.width=AB;
AA.height=AD;
var y={};
if(z&&typeof z===Q){
for(var u in z){
if(z[u]!=Object.prototype[u]){
y[u]=z[u];
}
}
}
if(r&&typeof r===Q){
for(var t in r){
if(r[t]!=Object.prototype[t]){
if(typeof y.flashvars!=b){
y.flashvars+="&"+t+"="+r[t];
}else{
y.flashvars=t+"="+r[t];
}
}
}
}
f(function(){
U(AA,y,AE);
if(AA.id==AE){
W(AE,true);
}
});
}else{
if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){
A=true;
W(AE,false);
f(function(){
var AF={};
AF.id=AF.altContentId=AE;
AF.width=AB;
AF.height=AD;
AF.expressInstall=w;
k(AF);
});
}
}
},getFlashPlayerVersion:function(){
return {major:h.pv[0],minor:h.pv[1],release:h.pv[2]};
},hasFlashPlayerVersion:c,createSWF:function(t,r,q){
if(h.w3cdom){
return U(t,r,q);
}else{
return undefined;
}
},removeSWF:function(q){
if(h.w3cdom){
X(q);
}
},createCSS:function(r,q){
if(h.w3cdom){
V(r,q);
}
},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){
var u=K.location.search||K.location.hash;
if(v==null){
return g(u);
}
if(u){
var t=u.substring(1).split("&");
for(var r=0;r<t.length;r++){
if(t[r].substring(0,t[r].indexOf("="))==v){
return g(t[r].substring((t[r].indexOf("=")+1)));
}
}
}
return "";
},expressInstallCallback:function(){
if(A&&M){
var q=C(m);
if(q){
q.parentNode.replaceChild(M,q);
if(l){
W(l,true);
if(h.ie&&h.win){
M.style.display="block";
}
}
M=null;
l=null;
A=false;
}
}
}};
}();
(function(){
var _1=lconn.core.swfupload.SWFUpload;
if(typeof (_1)==="function"){
_1.onload=function(){
};
swfobject.addDomLoadEvent(function(){
if(typeof (_1.onload)==="function"){
_1.onload.call(window);
}
});
_1.prototype.initSettings=(function(_2){
return function(){
if(typeof (_2)==="function"){
_2.call(this);
}
this.ensureDefault=function(_3,_4){
this.settings[_3]=(this.settings[_3]==undefined)?_4:this.settings[_3];
};
this.ensureDefault("minimum_flash_version","9.0.28");
this.ensureDefault("swfupload_pre_load_handler",null);
this.ensureDefault("swfupload_load_failed_handler",null);
delete this.ensureDefault;
};
})(_1.prototype.initSettings);
_1.prototype.loadFlash=function(_5){
return function(){
var _6=swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
if(_6){
this.queueEvent("swfupload_pre_load_handler");
if(typeof (_5)==="function"){
_5.call(this);
}
}else{
this.queueEvent("swfupload_load_failed_handler");
}
};
}(_1.prototype.loadFlash);
_1.prototype.displayDebugInfo=function(_7){
return function(){
if(typeof (_7)==="function"){
_7.call(this);
}
this.debug(["SWFUpload.SWFObject Plugin settings:","\n","\t","minimum_flash_version:                      ",this.settings.minimum_flash_version,"\n","\t","swfupload_pre_load_handler assigned:     ",(typeof (this.settings.swfupload_pre_load_handler)==="function").toString(),"\n","\t","swfupload_load_failed_handler assigned:     ",(typeof (this.settings.swfupload_load_failed_handler)==="function").toString(),"\n"].join(""));
};
}(_1.prototype.displayDebugInfo);
}
})();
}


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




dojo.requireLocalization("lconn.core.upload","upload");
(function(){
var _1=dojo.i18n.getLocalization("lconn.core.upload","upload");
var _2=lconn.core.swfupload.SWFUpload;
_2.a11y={};
_2.prototype.initSettings=(function(_3){
return function(){
if(dojo.isFunction(_3)){
_3.call(this);
}
this.a11ySettings={};
this.a11ySettings.userKeyPress=this.settings.key_pressed;
this.settings.key_pressed=_2.a11y.handleKeyPress;
};
})(_2.prototype.initSettings);
_2.prototype.loadFlash=(function(_4){
return function(){
if(dojo.isFunction(_4)){
_4.call(this);
}
var _5=this.movieElement;
if(_5){
dojo.addClass(_5,"lconnInvisibleMovie");
dojo.removeAttr(_5,"width");
dojo.removeAttr(_5,"height");
var _6=_5.parentNode;
this.a11y_input=dojo.create("button",{"type":"button","className":"lotusBtn lconnFocusHelper",id:this.movieName+"_a11y"});
this.a11y_input.appendChild(dojo.doc.createTextNode(this.customSettings.htmlButtonText||(dojo.isWebKit?_1.BUTTON_TEXT_WEBKIT:_1.BUTTON_TEXT)));
_6.insertBefore(this.a11y_input,_5);
dojo.connect(this.a11y_input,"onfocus",this,"focusMovie");
}
};
})(_2.prototype.loadFlash);
_2.prototype.focusMovie=function(){
var _7=this.getMovieElement();
if(_7){
_7.tabIndex=0;
this.a11y_input.tabIndex=-1;
dijit.focus(_7);
}
};
_2.a11y.handleKeyPress=function(_8){
if(_8.keyCode==dojo.keys.TAB){
var _9=dojo.byId(this.customSettings.containerNode)||dojo.body();
var _a=dojo.query("*",_9).filter(dijit.isTabNavigable);
var i=-1;
for(i=0;i<_a.length;++i){
var n=_a[i];
if(n.id==this.movieName){
break;
}
}
var _b=null;
var _c=0;
while(_b==null&&_c<_a.length){
if(_8.shiftKey){
_b=i?_a[i-1]:_a[_a.length-1];
}else{
_b=(i==_a.length-1)?_a[0]:_a[i+1];
}
if(_b.id==this.a11y_input.id){
_b=null;
if(_8.shiftKey){
i=i?i-1:_a.length-1;
}else{
i=(i==_a.length-1)?0:i+1;
}
++_c;
}
}
if(_b){
_b.focus();
}
}else{
_d(this.a11y_input,_8);
}
};
var _d=function(_e,_f){
var _10=null;
if(dojo.isIE){
_10=dojo.doc.createEventObject();
_10.ctrlKey=_f.ctrlKey;
_10.altKey=_f.altKey;
_10.shiftKey=_f.shiftKey;
_10.metaKey=_f.metaKey;
_10.keyCode=_f.keyCode;
_10.charCode=_f.charCode;
_e.fireEvent("onkeypress",_10);
}else{
_10=dojo.doc.createEvent("KeyboardEvent");
var _11=dojo.isMozilla?_10.initKeyEvent:_10.initKeyboardEvent;
_11.call(_10,"keypress",true,true,dojo.global,_f.ctrlKey,_f.altKey,_f.shiftKey,_f.metaKey,_f.keyCode,_f.charCode);
_e.dispatchEvent(_10);
}
};
})();
}


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


(function(_1){
var _2=[];
var _3=function(_4){
document.title=_4.customSettings.pageTitle;
};
var _5=function(_6){
setTimeout(function(){
_3(_6);
},50);
};
var _7=function(_8){
var _9=["fileDialogStart","loadFlash","testExternalInterface","fileQueued","keyPressed","fileQueueError","fileDialogComplete","uploadStart"];
dojo.forEach(_9,function(m){
_2.push(dojo.connect(_8,m,function(){
_3(_8);
}));
});
};
var _a=function(_b){
var _c=["flashReady"];
dojo.forEach(_c,function(m){
_2.push(dojo.connect(_b,m,function(){
_5(_b);
}));
});
};
_1.prototype.initSettings=(function(_d){
return function(){
if(dojo.isFunction(_d)){
_d.call(this);
}
this.customSettings.pageTitle=document.title;
_7(this);
_a(this);
};
})(_1.prototype.initSettings);
_1.prototype.destroy=(function(_e){
return function(){
dojo.forEach(_2,dojo.disconnect);
if(dojo.isFunction(_e)){
_e.apply(this,arguments);
}
};
})(_1.prototype.destroy);
})(lconn.core.swfupload.SWFUpload);
}


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










}


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












(function(_1){
var _2=dojo.isIE&&swfobject.hasFlashPlayerVersion("10");
if(_2){
var _3=false;
try{
_3=dojo.getObject("top.document.activeElement.contentWindow.document",false,window);
}
catch(e){
}
if(_3){
_2=(document==_3);
}
_2=_2&&(!lconn.core.config.properties["flash.LocalFileReadDisable"]||lconn.core.config.properties["flash.LocalFileReadDisable"]!="true");
}
var _4=dojo.i18n.getLocalization("lconn.core.upload","upload");
dojo.declare("lconn.core.upload.provider.FlashFileProvider",lconn.core.upload.provider.HtmlFileProvider,{constructor:function(_5){
dojo.mixin(this,_5);
},_getInputID:function(_6){
if(!_2){
return this.inherited(arguments);
}
var _7=_6.uploader;
if(_7){
return _7.movieName;
}
return null;
},buildInput:function(_8,_9){
if(!_2){
return this.inherited(arguments);
}
var _a=dojo.doc.createDocumentFragment();
var _b=this.browseInput=dojo.create("button",{"type":"button","className":"lotusBtn lotusBtnDisabled"});
_b.appendChild(dojo.doc.createTextNode(_4.BUTTON_TEXT));
_a.appendChild(_b);
this.inputFn=dojo.hitch(this,"_renderFlash",_8,_9,_b);
return {domNode:_a,destroy:function(){
_8.controller.uploader.destroy();
}};
},_renderFlash:function(_c,_d,_e){
var _f=_c.controller.uploader;
if(!_f){
var _10=dojo.hitch(this,"_flashFileQueued",_c);
var _f=_c.controller.uploader=new _1({file_post_name:_c.controller.inputName,button_action:_1.BUTTON_ACTION.SELECT_FILES,button_text:" ",button_placeholder:_e,button_window_mode:SWFUpload.WINDOW_MODE.OPAQUE,custom_settings:{},file_dialog_start_handler:dojo.hitch(this,"_flashFileDialogStart"),file_queued_handler:_10,file_queue_error_handler:_10,swfupload_loaded_handler:dojo.hitch(this,function(){
var _11=this.inputFn=_f.a11y_input;
var _12=dojo.position(_11);
dojo.contentBox(_f.getMovieElement(),_12);
if(this.setFocus!=false){
dijit.focus(_11);
}
}),file_dialog_complete_handler:dojo.hitch(this,function(){
this._beforeInputChanged();
this._flashFileDialogComplete(_c);
})});
this._updateLabel(_c,_d);
}
},getFocusNode:function(){
if(!_2){
return this.inherited(arguments);
}
return this.inputFn;
},uploadFile:function(_13,_14,_15){
if(!_2){
return this.inherited(arguments);
}
var dfd=null;
_15.handleAs=_15.handleAs||"text";
if(!_15.url&&_15.form){
_15.url=_15.form.action;
}
var _16=dojo.mixin({},_15.content||{});
if(_15.form){
dojo.mixin(_16,dojo.formToObject(_15.form));
}
if(_14.getSize()==0){
return this._sendZeroByteUpload(_13,_14,_15);
}
var _17=_13.controller.uploader;
dfd=dojo._ioSetArgs(_15,function cancel(){
_17.stopUpload();
var err=dfd.ioArgs.error;
if(!err){
err=new Error();
err.dojoType="cancel";
}
return err;
},function okHandler(){
},function errHandler(){
});
_17.setUploadURL(dfd.ioArgs.url);
var fid=_14.getId();
for(var k in _16){
if(_16.hasOwnProperty(k)){
_17.removeFileParam(fid,k);
var vs=_16[k];
vs=dojo.isArray(vs)?vs:[vs];
dojo.forEach(vs,function(v){
_17.addFileParam(fid,k,v);
});
}
}
_17.settings.upload_progress_handler=function(f,_18,_19){
_14.setBytesComplete(_18);
};
_17.settings.upload_success_handler=function(f,_1a,_1b){
var ha=dfd.ioArgs.handleAs||"text";
var _1c=null;
if(ha=="text"){
_1c=_1a;
}else{
if(ha=="xml"){
_1c=dojox.xml.parser.parse(_1a);
}else{
if(_1a.indexOf("content=\"409\"")>=0){
_17.requeueUpload(f.id);
}
var dii=dojo.io.iframe;
var _1d=dii.create("flashUploadFrame");
var _1e=dii.doc(_1d);
_1e.close();
_1e.open();
_1e.write(_1a);
_1e.close();
if(ha=="html"){
_1c=_1e;
}else{
var js=_1e.getElementsByTagName("textarea")[0].value;
if(ha=="json"){
_1c=dojo.fromJson(js);
}else{
if(ha=="javascript"){
_1c=dojo.eval(js);
}else{
throw new Error("unsupported handleAs");
}
}
}
}
}
dfd.callback(_1c);
};
_17.settings.upload_error_handler=dojo.hitch(this,function(f,_1f,msg){
var uec=_1.UPLOAD_ERROR;
if(_1f!=uec.FILE_CANCELLED&&_1f!=uec.UPLOAD_STOPPED){
if(_1f==-200&&msg=="409"){
_17.requeueUpload(_14._id);
}
var err=new Error(msg);
err.code=_1f;
dfd.errback(err);
}
});
_17.startUpload(fid);
return dfd;
},_flashFileDialogStart:function(){
this._tmpFiles=[];
},_flashFileQueued:function(_20,_21,_22){
if(_22==-140){
var _22=[{message:dojo.string.substitute(_4.ERROR_IO,[_21.name])}];
_20.controller.fileList.onAddFilesError(_22);
}
var _23=new lconn.core.upload.data.File(_21,_21.name);
_23.setSize(_21.size);
this._tmpFiles.push(_23);
},_flashFileDialogComplete:function(_24){
_24.controller.fileList.addFiles(this._tmpFiles);
_24._focusFirstFileOfCurrentSelection();
},_beforeInputChanged:function(){
}});
})(lconn.core.swfupload.SWFUpload);
}


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


dojo.declare("lconn.core.upload.data.FileList",null,{constructor:function(_1){
dojo.mixin(this,_1);
this._files=[];
this._indexMap={};
this.invalidCharacters=this.invalidCharacters||/[\\\/\:\*\?\<\>\|\"]/g;
this.extensions=this._processExtensions(_1.extensions);
this._errors=[];
this._pendingRemoteChecks=[];
this.allowDuplicates=!!this.allowDuplicates;
},_addFile:function(_2){
var _3=dojo.mixin(dojo.mixin({},_2),{_fileList:this});
var _4=_3.validateSize();
if(!_4){
_4=_3.validateExtension();
}
if(_4){
this._errors.push(_4);
}else{
this._indexMap[_3.getId()]=this._files.length;
this._files.push(_3);
this.onFileAdded(_3);
}
return _3;
},addFiles:function(_5){
if(!dojo.isArray(_5)){
_5=[_5];
}
_5=dojo.map(_5,this._addFile,this);
if(this._errors.length>0){
this.onAddFilesError(this._errors);
this._errors=[];
}
this.onListChanged(this);
dojo.forEach(_5,function(_6){
_6.validateName();
});
},removeFileById:function(id){
var _7=this.getFileIndex(id);
if(_7!=-1){
this.removeFile(_7);
}
},reset:function(){
this._files=[];
this._indexMap={};
this._errors=[];
this._pendingRemoteChecks=[];
},removeFile:function(_8){
if(_8>=0||_8<this._files.length){
var _9=this._files.splice(_8,1);
var _a=_9[0];
var _b=this._indexMap[_a.getId()];
if(_b||_b===0){
delete this._indexMap[_a.getId()];
}
for(var i=_b;i<this._files.length;++i){
this._indexMap[this._files[i].getId()]=i;
}
this.onFileRemoved(_a,_8);
this.onListChanged(this);
var _c=_a.getName();
this.validateDuplicates(_c);
}
},validateDuplicates:function(_d){
var _e=dojo.filter(this.getUploadableFiles(true),function(_f){
return _d==_f.getName();
},this);
var _10=_e.length>1;
dojo.forEach(_e,function(_11){
_11.setLocalDuplicate(_10);
_11.validateRemoteDuplicate();
});
},getMaxFileSize:function(){
if(!isNaN(this.maxFileSize)&&(this.maxFileSize>0)&&(this.maxFileSize!=Number.POSITIVE_INFINITY)){
return this.maxFileSize;
}
return -1;
},getInvalidCharacters:function(){
this.invalidCharacters.lastIndex=0;
return this.invalidCharacters;
},getMaxFilenameLength:function(){
return this.maxFileLength;
},_setMaxFilenameLength:function(mfl){
this.maxFileLength=mfl;
},_setInvalidCharacters:function(ic){
this.invalidCharacters=ic;
},getAllowedExtensions:function(){
return this.extensions;
},getFileByIndex:function(idx){
return this._files[idx];
},getFileIndex:function(_12){
var idx=this._indexMap[_12];
if(typeof (idx)=="undefined"||idx==null){
return -1;
}
return idx;
},getFileById:function(id){
var idx=this.getFileIndex(id);
if(idx==-1){
return null;
}
return this._files[idx];
},getTotalSize:function(){
var _13=0;
for(var i=0;i<this._files.length;++i){
var _14=this._files[i];
if(_14.isSizeAvailable()){
_13+=_14.getSize();
}else{
return -1;
}
}
return _13;
},count:function(){
return this._files.length;
},getAllFiles:function(){
return this._files;
},getUploadableFiles:function(_15){
var _16=lconn.core.upload.data.File.prototype.UploadStates;
return dojo.filter(this._files,function(_17){
var _18=_17.getUploadState();
return ((_18==_16.READY)||(_18==_16.QUEUED))&&(!!_15||_17.isValid());
},this);
},getInProgressFiles:function(_19){
var _1a=lconn.core.upload.data.File.prototype.UploadStates;
return dojo.filter(this._files,function(_1b){
var _1c=_1b.getUploadState();
return (_1c==_1a.IN_PROGRESS)&&(!!_19||_1b.isValid());
},this);
},getUploadedFiles:function(_1d){
var _1e=lconn.core.upload.data.File.prototype.UploadStates;
return dojo.filter(this._files,function(_1f){
var _20=_1f.getUploadState();
return (_20==_1e.UPLOADED);
},this);
},getInvalidFiles:function(){
return dojo.filter(this._files,function(_21){
return !_21.isValid();
});
},isRenameAllowed:function(){
return !!this.allowRename;
},isReplaceAllowed:function(){
return !!this.allowReplace;
},areDuplicatesAllowed:function(){
return !!this.allowDuplicates;
},_processExtensions:function(ext){
var _22={};
if(ext&&dojo.isArray(ext.allowed)){
_22.allowed=dojo.map(ext.allowed,function(_23){
if(_23.charAt(0)=="."){
_23=_23.substring(1);
}
return _23.toLowerCase();
});
}else{
if(ext&&dojo.isArray(ext.prohibited)){
_22.prohibited=dojo.map(ext.prohibited,function(_24){
if(_24.charAt(0)=="."){
_24=_24.substring(1);
}
return _24.toLowerCase();
});
}
}
return _22;
},onListChanged:function(_25){
},startRename:function(_26){
},onFileAdded:function(_27){
},onFileRemoved:function(_28,_29){
},onAddFilesError:function(_2a){
},onPropertyChange:function(_2b,_2c,_2d,_2e){
},onSetStatus:function(_2f,_30){
},onClearStatus:function(_31,_32){
}});
}


;if(!dojo._hasResource["lconn.core.upload.util.UploadManager"]){
dojo._hasResource["lconn.core.upload.util.UploadManager"]=true;
dojo.provide("lconn.core.upload.util.UploadManager");
dojo.declare("lconn.core.upload.util.UploadManager",null,{constructor:function(_1,_2){
this.fileArray=_1;
this.controller=_2;
this.checkProgress=_2.checkProgress;
this.checkProgressInterval=_2.checkProgressInterval||10000;
this.currentFile=null;
this._completedFiles=[];
this._connects=[];
this._totalSize=0;
this._totalBytes=0;
for(var i=0;i<this.fileArray.length;++i){
if(this.fileArray[i].isSizeAvailable()){
this._totalSize+=this.fileArray[i].getSize();
}else{
this._totalSize=this._totalBytes=-1;
break;
}
}
this._connects.push(dojo.connect(this.controller.fileList,"onPropertyChange",dojo.hitch(this,function(_3,_4,_5,_6){
var _7=this.currentFile;
if(_3&&_3==_7){
if(_4=="valid"){
if(_6==false&&_7.uploadDfd){
_7.uploadDfd.cancel();
_7.uploadDfd=null;
}
}else{
if(_4=="bytesComplete"||_4=="size"){
var _8=this._totalBytes;
if(_4=="bytesComplete"){
var _8=this._totalBytes+_6;
}else{
var _8=this._totalBytes;
}
this._onProgress(_3,_8);
}
}
}
})));
this.controller.setEnabled(false);
dojo.forEach(this.fileArray,function(_9){
_9.setEnabled(false);
_9.setUploadState(_9.UploadStates.QUEUED);
});
},_onProgress:function(_a,_b){
var _c=0;
var _d=this._completedFiles.length;
var _e=_d+this.fileArray.length;
if(this.currentFile){
_e+=1;
}
if(this._totalSize<1){
if(_a&&_a.isSizeAvailable()&&_a.getSize()>0&&_a.getBytesComplete()>0){
_c=Math.floor((100/_e)*(_d+(_a.getBytesComplete()/_a.getSize())));
}else{
_c=Math.floor((100/_e)*_d);
}
}else{
_c=Math.floor(100*(_b/this._totalSize));
}
if(this.hasMore()){
_c=Math.min(99,_c);
}
var _f={file:_a,totalBytesComplete:_b,totalBytes:this._totalSize,percentComplete:_c};
this.onProgress(_f);
},hasMore:function(){
return this.fileArray.length>0;
},getCurrentFile:function(){
return this.currentFile;
},getNext:function(){
return this.fileArray[0];
},uploadNext:function(_10){
if(this.hasMore()){
var _11=this.currentFile=this.fileArray.shift();
this.controller.cancelRemoteCheck(_11);
_11.setUploadState(_11.UploadStates.IN_PROGRESS);
this.onItemStart(this,_11);
var _12=dojo.mixin({},_10);
var dfd=this.controller.getFileProvider().uploadFile(this,_11,_12);
this.currentFile.uploadDfd=dfd;
dfd.addBoth(dojo.hitch(this,function(_13,_14){
this._completedFiles.push(_11);
this.currentFile=null;
clearTimeout(this.checkProgressTimer);
this.checkProgressTimer=null;
if(this.currentProgressCheck&&this.currentProgressCheck.fired==-1){
this.currentProgressCheck.cancel();
}
this.currentProgressCheck=null;
if(_11.isSizeAvailable()){
this._totalBytes+=_11.getSize();
}
try{
this._onProgress(null,this._totalBytes);
}
catch(e){
console.error("Error updating upload progress",e);
}
if(!this.hasMore()){
this.cancel();
}
}));
dfd.addCallback(dojo.hitch(this,function(_15,_16){
_11.setUploadState(_11.UploadStates.UPLOADED);
_11.setEnabled(false);
try{
this.onItemComplete(this,_11,_15,_16);
}
catch(e){
console.error("Error sending onItemComplete event",e);
}
}));
dfd.addErrback(dojo.hitch(this,function(_17,_18){
_11.setUploadState(_11.UploadStates.READY);
_11.setEnabled(true);
this.onItemError(this,_11,_17,_18);
}));
return dfd;
}
return null;
},cancel:function(){
if(this.fileArray.length>0){
dojo.forEach(this.fileArray,function(_19){
_19.setEnabled(true);
_19.setUploadState(_19.UploadStates.READY);
},this);
this.fileArray=[];
}
var _1a=this.currentFile;
if(_1a&&_1a.uploadDfd){
_1a.uploadDfd.cancel();
_1a.uploadDfd=null;
}
this.currentFile=null;
this.controller.setEnabled(true);
this.stopProgressCheck();
dojo.forEach(this._connects,dojo.disconnect);
},stopProgressCheck:function(){
if(this.checkProgressTimer){
clearTimeout(this.checkProgressTimer);
this.checkProgressTimer=null;
}
if(this.currentProgressCheck&&this.currentProgressCheck.fired==-1){
this.currentProgressCheck.cancel();
}
this.currentProgressCheck=null;
},retry:function(_1b){
var idx=dojo.indexOf(this._completedFiles,_1b);
if(idx!=-1){
this.fileArray.unshift(_1b);
}
},checkAndUpdateQueue:function(){
var _1c=dojo.filter(this.controller.getFileList().getAllFiles(),function(_1d){
var _1e=_1d.getUploadState();
var _1f=_1d.UploadStates;
if(((_1e==_1f.READY)||(_1e==_1f.QUEUED))&&_1d.isValid()){
return (dojo.indexOf(this.fileArray,_1d)==-1);
}
return false;
},this);
dojo.forEach(_1c,function(_20){
_20.setUploadState(_20.UploadStates.QUEUED);
_20.setEnabled(false);
this.fileArray.push(_20);
},this);
},onProgress:function(obj){
},onItemStart:function(_21,_22){
},onItemComplete:function(_23,_24,_25,_26){
},onItemError:function(_27,_28,_29,_2a){
}});
}


;dojo.cache("lconn.core", "upload/ui/resources/File.html", "<div role=\"presentation\"> <div class=\" lconnFileUpload\" dojoAttachPoint=\"labelRow\" style=\"padding-bottom:2px;\"> <img src=\"${_blankGif}\" dojoAttachPoint=\"fileIcon\" role=\"presentation\" class=\"lconnFileUploadIcon ${_ui.fileIcon}\" /> <div class=\"lconnFileUploadLabel\"> <div> <div dojoAttachPoint=\"nameNode\" class=\"lconnFilenameContainer\">${_ui.originalName}</div> <a role=\"button\" href=\"javascript:;\" class=\"lconnFilenameContainer bidiSTT_URL\" dojoAttachEvent=\"onclick:startRename\" dojoAttachPoint=\"nameLink,focusNode\">${_ui.originalName}</a> <input type=\"text\" class=\"lotusText lotusLtr\" style=\"display: none\" dojoAttachEvent=\"onkeydown:_onEditKeyPress,onblur:_onEditBlur\" dojoAttachPoint=\"nameInput\" /> </div> <div class=\"lotusMeta lotusTiny\" style=\"display:none\" dojoAttachPoint=\"editTooltipNode\">${nls.UI_EDIT_TOOLTIP}</div> </div> <div style=\"display: inline\" dojoAttachPoint=\"actionNode\" class=\"lconnFileUploadAction\"> <a role=\"button\" href=\"javascript:;\" dojoAttachEvent=\"onclick:_remove,onmouseover:_startHover,onmouseout:_stopHover\" class=\"lconnRemoveLink\" dojoAttachPoint=\"removeLink\" ><img src=\"${_blankGif}\" class=\"lotusDelete\" dojoAttachPoint=\"removeNode\" ><span class=\"lotusAltText\">X</span></a> <span dojoAttachPoint=\"progressNode\" style=\"display:none\" ><img src=\"${_blankGif}\" class=\"lotusLoading\" dojoAttachPoint=\"progressNodeImg\"/><span class=\"lotusAltText\" dojoAttachPoint=\"progressNodeA11y\">&#x231b;</span></span> <span dojoAttachPoint=\"uploadedNode\" style=\"display:none\" ><img src=\"${_blankGif}\" class=\"lconnSprite lconnSprite-iconConfirmation16\" dojoAttachPoint=\"uploadedNodeImg\"/><span class=\"lotusAltText\" dojoAttachPoint=\"uploadedNodeA11y\">&#x2713;</span></span> </div> </div> <div dojoAttachPoint=\"statusContainerNode\" class=\"lconnFileUploadStatus lotusIndent20\"></div></div>");

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




















dojo.requireLocalization("lconn.core.upload","upload");
dojo.declare("lconn.core.upload.ui.File",[dijit._Widget,dijit._Templated,dijit._Contained],{templatePath:dojo.moduleUrl("lconn.core","upload/ui/resources/File.html"),postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.core.upload","upload");
this.container=this.container||this.getParent();
this._listeners=[];
var _1=this.file.getName();
this._ui={originalName:lconn.core.util.html.formatFilename(_1),fileIcon:lconn.core.utilities.getFileIconClassName(_1,16)};
},postCreate:function(){
this._setHoverText(this.file.getName());
this._updateNameVisibility();
this._setInitialStatus();
this._setIds();
},_setIds:function(){
this.editTooltipNode.id=this.id+"_editTooltip";
},destroy:function(){
while(this._listeners.length>0){
var _2=this._listeners.shift();
dojo.disconnect(_2);
}
this.inherited(arguments);
},getStatusNode:function(_3){
var _4=dojo.query("> [statusId=\""+_3+"\"]",this.statusContainerNode);
if(_4&&_4.length>0){
return _4[0];
}else{
return null;
}
},setStatus:function(_5){
var _6=this.getStatusNode(_5.id);
var _7=false;
if(!_6){
_6=dojo.create("div",{statusId:_5.id});
_7=true;
}
var _8=dojo.doc.createDocumentFragment();
_8.appendChild(dojo.create("img",{alt:this.nls["LEVEL_"+(["INFO","WARNING","ERROR"])[_5.level]],src:this._blankGif,className:"lconnFileUploadStatusIcon lotusIcon lotusIconMsg"+((["Info","Warning","Error"])[_5.level])}));
var _9=document.createElement("span");
_9.className="lotusAltText";
_9.appendChild(document.createTextNode(this.nls["A11Y_"+(["INFO","WARNING","ERROR"])[_5.level]]));
_8.appendChild(_9);
var _a=dojo.create("span",{"className":"lconnFileUploadStatusMessage",id:this.file._id+"_status_msg"});
var _b=_5.actions||[];
if(!_5.disableActionInline){
var _c=_5.message+"\xa0 ";
lconn.core.util.html.breakString(_c,dojo.doc,_a,30);
if(_b.length==1){
var _d=_b[0];
var _e=this.buildLink(_d,this.file);
_a.appendChild(_e);
if(_5.id==this.file.StatusKeys.RENAMED){
var _f=dojo.doc.createElement("span");
_f.className="lotusAccess";
_f.appendChild(dojo.doc.createTextNode(_5.message));
_e.insertBefore(_f,_e.firstChild);
}
}else{
if(_b.length>1){
var ul=null;
if(_b.length>0){
ul=dojo.create("ul",{"className":"lotusInlinelist"});
}
for(var j=0;j<_b.length;++j){
var _d=_b[j];
var li=dojo.create("li");
if(j==0){
dojo.addClass(li,"lotusFirst");
}
li.appendChild(this.buildLink(_d,this.file));
ul.appendChild(li);
}
if(ul){
var div=document.createElement("div");
dojo.addClass(div,"lotusClear");
dojo.html.set(div,"&nbsp;");
_a.appendChild(div);
_a.appendChild(ul);
}
}
}
}else{
lconn.core.util.html.substitute(dojo.doc,_a,_5.message,{0:dojo.hitch(this,function(_10,_11){
var _12=this.buildLink(_10,_11);
return _12;
},_b[0],this.file)});
}
dijit.setWaiState(this.focusNode,"describedby",_a.id);
_8.appendChild(_a);
_6.innerHTML="";
_6.className="lotusMessage lotusMeta lotusTiny"+" lotus"+(["Info","Warning","Error"])[_5.level]+" lconnFileUploadStatus_"+_5.id;
_6.appendChild(_8);
if(_7){
this.statusContainerNode.appendChild(_6);
}
dijit.setWaiState(this.statusContainerNode,"live","assertive");
this.statusContainerNode.style.display="";
},buildLink:function(_13,_14){
var _15=dojo.create("a",{"href":"javascript:;","className":"lotusAction"});
_15.appendChild(dojo.doc.createTextNode(_13.name));
this._listeners.push(dojo.connect(_15,"onclick",dojo.hitch(this,function(_16){
dojo.stopEvent(_16);
if(_14.isEnabled()){
_13.execute(_14);
if(_13.setFocus!==false){
this.focus();
}
}
})));
dijit.setWaiRole(_15,"button");
return _15;
},clearStatus:function(_17){
var _18=this.getStatusNode(_17.id);
if(_18){
var c=this.statusContainerNode;
c.removeChild(_18);
if(c.childNodes.length==0){
c.style.display="none";
}
}
},onNameChange:function(_19){
var _1a=lconn.core.util.html.formatFilename(_19);
this.nameLink.innerHTML="";
this.nameNode.innerHTML="";
this.nameLink.appendChild(dojo.doc.createTextNode(_1a));
var _1b=this.nameLink.appendChild(dojo.doc.createElement("span"));
_1b.className="lotusAccess";
_1b.appendChild(dojo.doc.createTextNode(this.nls.UI_EDIT_A11Y));
this.nameNode.appendChild(dojo.doc.createTextNode(_1a));
this.fileIcon.className="lconnFileUploadIcon "+lconn.core.utilities.getFileIconClassName(_1a,16);
dojo.attr(this.fileIcon,"alt","");
this._setHoverText(_19);
},onUploadStateChange:function(_1c){
var _1d=this.file.UploadStates;
dojo.style(this.removeLink,"display","none");
dojo.style(this.progressNode,"display","none");
dojo.style(this.uploadedNode,"display","none");
switch(_1c){
case _1d.READY:
dojo.style(this.removeLink,"display","");
break;
case _1d.IN_PROGRESS:
dojo.style(this.progressNode,"display","");
break;
case _1d.UPLOADED:
dojo.style(this.uploadedNode,"display","");
break;
}
},_setHoverText:function(_1e){
if(dojo.isIE){
var _1f=[_1e+(dojo._isBodyLtr()?"":"&rlm;")];
}else{
var _1f=[_1e];
}
var _20=this.file.getSize();
_1f.push(_20>=0?lconn.core.util.text.formatSize(this.nls,_20):this.nls.SIZE_UNKNOWN);
var _21=dojo.string.substitute(this.nls.UI_EDIT,_1f);
var _22=dojo.string.substitute(this.nls.UI_REMOVE,_1f);
var _23=dojo.string.substitute(this.nls.STATE_UPLOADING,_1f);
var _24=dojo.string.substitute(this.nls.STATE_UPLOADED,_1f);
this.nameLink.alt=this.nameLink.title=_21;
this.removeNode.alt=this.removeLink.title=_22;
this.progressNodeImg.alt=this.progressNodeImg.title=this.progressNodeA11y.title=_23;
this.uploadedNodeImg.alt=this.uploadedNodeImg.title=this.uploadedNodeA11y.title=_24;
},onEnabledChange:function(_25){
dojo.toggleClass(this.domNode,"lconnFileUploadDisabled",!_25);
this._updateNameVisibility();
},_setInitialStatus:function(){
this.statusContainerNode.innerHTML="";
this.statusContainerNode.style.display="none";
dojo.forEach(this.file.getStatuses(),this.setStatus,this);
},startRename:function(_26){
if(_26){
dojo.stopEvent(_26);
}
if(!this.file.isEnabled()||!this.file.getOwningList().isRenameAllowed()){
return;
}
if(this.file.canEditFullName()){
this.originalValue=this.file.getName();
}else{
this.originalValue=lconn.core.util.text.trimExtension(this.file.getName());
}
dojo.addClass(this.domNode,"lconnFileUploadEditing");
dojo.style(this.editTooltipNode,"display","");
dojo.style(this.nameLink,"display","none");
dojo.attr(this.nameInput,{"style":{"display":""},"aria-describedby":this.editTooltipNode.id,"value":this.originalValue});
this.nameInput.readOnly=this.nameInput.disabled=false;
delete this.refocus;
dijit.focus(this.nameInput);
this.container.onStartRename(this.file);
},_updateNameVisibility:function(){
if(this.file.isEnabled()&&this.file.getOwningList().isRenameAllowed()){
dojo.style(this.nameNode,"display","none");
dojo.style(this.nameLink,"display","");
}else{
dojo.style(this.nameNode,"display","");
dojo.style(this.nameLink,"display","none");
}
},_onEditKeyPress:function(_27){
var _28=_27.keyCode;
var _29=dojo.keys;
if(_28==_29.ESCAPE){
this.nameInput.value=this.originalValue;
}
if(_28==_29.ESCAPE||_28==_29.ENTER){
dojo.stopEvent(_27);
this.refocus=true;
this.nameInput.blur();
}
},_onEditBlur:function(_2a){
var _2b=dojo.string.trim(this.nameInput.value)||this.originalValue;
if(!this.file.canEditFullName()){
var _2c=this.file.getExtension();
if(_2c&&dojo.string.trim(_2c).length>0){
_2b=_2b+"."+_2c;
}
}
dojo.removeClass(this.domNode,"lconnFileUploadEditing");
dojo.style(this.nameLink,"display","");
dojo.style(this.nameInput,"display","none");
this.file.setName(_2b);
if(this.refocus){
dijit.focus(this.nameLink);
delete this.refocus;
}
dojo.style(this.editTooltipNode,"display","none");
this.container.onEndRename(this.file);
},_remove:function(_2d){
this.file.getOwningList().removeFileById(this.file.getId());
},_startHover:function(){
dojo.addClass(this.labelRow,"lconnUploadHover");
},_stopHover:function(){
dojo.removeClass(this.labelRow,"lconnUploadHover");
},_getFocusNode:function(){
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage();
var _2e=(dojo.style(this.focusNode,"display")!="none");
if(_2e){
return this.focusNode;
}
_2e=(dojo.style(this.nameNode,"display")!="none");
return _2e?this.nameNode:this.domNode;
},focus:function(){
var _2f=this._getFocusNode();
dijit.focus(_2f);
}});
}


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
















dojo.requireLocalization("lconn.core.upload","upload");
dojo.declare("lconn.core.upload.ui.FileField",[dijit._Widget,dijit._Container],{currentLength:0,postMixInProperties:function(){
this.nls=dojo.i18n.getLocalization("lconn.core.upload","upload");
this._listeners=[];
this.allowMultiple=!!this.controller.allowMultiple;
},buildRendering:function(){
this.inherited(arguments);
var _1=this.containerNode=dojo.create("div");
_1.style.padding="2px";
this.inputContainer=dojo.create("span",{"className":"lconnUploadContainer"});
this.domNode.appendChild(this.containerNode);
this.domNode.appendChild(this.inputContainer);
},startup:function(){
this._buildInput();
this._buildTable();
this._started=true;
},destroy:function(){
dojo.forEach(this._listeners,dojo.disconnect);
if(this.currentInput&&dojo.isFunction(this.currentInput.destroy)){
this.currentInput.destroy();
}
this.inherited(arguments);
},isAllowMultipleFiles:function(){
return !!this.allowMultiple;
},updateInputVisibility:function(){
var _2=this.controller.fileList.count();
var _3=(this.isAllowMultipleFiles()||_2==0);
dojo.style(this.inputContainer,"display",_3?"":"none");
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage();
},_buildInput:function(){
if(this.currentInput&&this.currentInput.destroy){
this.currentInput.destroy();
}
var _4=this.currentInput=this.controller.getFileProvider().buildInput(this,this.controller.label);
this.inputContainer.innerHTML="";
this.inputContainer.appendChild(_4.domNode);
dojo.addClass(this.domNode,"lconnFileInput");
if(this.isAllowMultipleFiles()){
dojo.addClass(this.domNode,"lconnUploadMultiple");
}
},_buildTable:function(){
dojo.forEach(this.controller.fileList.getAllFiles(),this._addRow,this);
},_addRow:function(_5){
var id=this.id+"_"+_5.getId();
var _6=new lconn.core.upload.ui.File({id:id,file:_5,container:this});
this.addChild(_6);
dojo.style(this.containerNode,"display","");
this.updateInputVisibility();
this.onLayout();
_6.focus();
},_removeRow:function(_7,_8){
var _9=this._findFileWidget(_7);
this.removeChild(_9);
_9.destroyRecursive(false);
this._focusFile(_8,1)||this._focusFile(_8,-1);
this.updateInputVisibility();
this.setFocus();
this.onLayout(true);
},setFocus:function(){
var _a=this.controller.getFileProvider();
var _b=_a.getFocusNode();
if(dojo.isFunction(_b)){
_b();
}else{
if(_b){
dijit.focus(_b);
}
}
},_handlePropertyChange:function(_c,_d,_e,_f){
if(_e!=_f){
var _10=this._findFileWidget(_c);
if(_10){
if(_d=="name"){
_10.onNameChange(_f);
}else{
if(_d=="enabled"){
_10.onEnabledChange(_f);
this.onLayout(_f==false);
}else{
if(_d=="uploadState"){
_10.onUploadStateChange(_f);
}
}
}
}
}
},_handleSetStatus:function(_11,_12){
var _13=this._findFileWidget(_11);
if(_13){
_13.setStatus(_12);
this.onLayout();
}
},_handleClearStatus:function(_14,_15){
var _16=this._findFileWidget(_14);
if(_16){
_16.clearStatus(_15);
this.onLayout(true);
}
},_handleStartRename:function(_17){
var _18=this._findFileWidget(_17);
if(_18){
_18.startRename();
}
},_findFileWidget:function(_19){
var id=this.id+"_"+_19.getId();
return dijit.byId(id);
},_focusFileWidget:function(_1a){
if(_1a){
var _1b=this._findFileWidget(_1a);
}
if(_1b){
_1b.focus();
}else{
dijit.focus(this.domNode);
}
},_focusFile:function(_1c,_1d){
var _1e=this.getChildren()||[];
var len=_1e.length;
if(_1c>=len){
_1c=len-1;
}
_1d=(_1d<0)?-1:1;
for(var i=_1c;i>=0&&i<len;i+=_1d){
var _1f=_1e[i];
var _20=_1f.file;
var _21=null;
if(_20&&_20.isEnabled()){
_21=_20.getUploadState();
}
if(_21!==null){
var _22=_20.UploadStates;
if(_21==_22.READY||_21==_22.QUEUED){
_1f.focus();
return true;
}
}
}
return false;
},_focusLastFile:function(){
var _23=this.controller.fileList;
var idx=_23.count()-1;
this._focusFile(idx,1)||this._focusFile(idx,-1);
},_focusFirstFileOfCurrentSelection:function(){
var _24=this.controller.fileList;
var cl=this.currentLength;
this._focusFile(cl,1)||this._focusFile(cl,-1);
this.currentLength=_24.count();
},onStartRename:function(_25){
},onEndRename:function(_26){
},onLayout:function(_27){
}});
}


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










dojo.declare("lconn.core.upload.FileField",null,{constructor:function(_1,_2){
dojo.mixin(this,_1);
if(!this.id){
this.id=dijit.getUniqueId("lconn_FileField");
}
this.fileList=new lconn.core.upload.data.FileList(_1);
this._connects=[];
this._connects.push(dojo.connect(this.fileList,"onListChanged",this,"onListChanged"));
this._initWidget(_2);
},startup:function(){
var _3=this.getFileProvider();
var _4=_3.getFocusNode();
if(dojo.isFunction(_4)){
_4();
}
},getInputID:function(){
return this.getFileProvider()._getInputID(this);
},_initWidget:function(_5){
this.widget=new lconn.core.upload.ui.FileField({controller:this},_5);
this._connects.push(dojo.connect(this.fileList,"onFileAdded",this.widget,"_addRow"));
this._connects.push(dojo.connect(this.fileList,"onFileRemoved",this.widget,"_removeRow"));
this._connects.push(dojo.connect(this.fileList,"onPropertyChange",this.widget,"_handlePropertyChange"));
this._connects.push(dojo.connect(this.fileList,"onSetStatus",this.widget,"_handleSetStatus"));
this._connects.push(dojo.connect(this.fileList,"onClearStatus",this.widget,"_handleClearStatus"));
this._connects.push(dojo.connect(this.fileList,"startRename",this.widget,"_handleStartRename"));
this._connects.push(dojo.connect(this.widget,"onStartRename",this,"onStartRename"));
this._connects.push(dojo.connect(this.widget,"onEndRename",this,"onEndRename"));
this._connects.push(dojo.connect(this.widget,"onLayout",this,"onLayout"));
this.widget.startup();
},addHTML5Files:function(_6){
if(_6&&_6.length){
this.getFileProvider().addHTML5Files(_6,this.fileList);
}
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
this.widget.destroyRecursive(false);
},getFileList:function(){
return this.fileList;
},getFileProvider:function(){
if(!this.fileProvider){
this.fileProvider=new lconn.core.upload.provider.HtmlFileProvider();
}
return this.fileProvider;
},setEnabled:function(_7){
var n=this.widget.domNode;
if(n){
dojo.toggleClass(n,"lconnFileUploadDisabled",!_7);
}
},getUIWidget:function(){
return this.widget;
},isFileListDirty:function(){
var _8=this.getFileList()._files;
return _8&&_8.length?true:false;
},createUploadManager:function(_9){
return new lconn.core.upload.util.UploadManager(_9,this);
},end:function(){
var _a=this.fileList._pendingRemoteChecks;
while(_a.length>0){
var _b=_a.shift();
_b.cancel();
}
},cancelRemoteCheck:function(_c){
if(_c._pendingRemoteCheck){
_c._pendingRemoteCheck.cancel();
_c._pendingRemoteCheck=null;
}
},onListChanged:function(_d){
},onStartRename:function(_e){
},onEndRename:function(_f){
},onLayout:function(_10){
}});
}


;dojo.cache("lconn.core", "templates/InsertImageDialogFile.html", "<div role=\"presentation\"> <div class=\" lconnFileUpload\" dojoAttachPoint=\"labelRow\"> <img src=\"${_blankGif}\" dojoAttachPoint=\"fileIcon\" class=\"lconnFileUploadIcon ${_fileIcon}\" /> <div class=\"lconnFileUploadLabel\"> <div> <div dojoAttachPoint=\"nameNode\" class=\"lconnFilenameContainer\">${_fileName}</div> </div> </div> <div style=\"display: inline\" dojoAttachPoint=\"actionNode\" class=\"lconnFileUploadAction\"> <a role=\"button\" href=\"javascript:;\" dojoAttachEvent=\"onclick:_remove,onmouseover:_startHover,onmouseout:_stopHover\" class=\"lconnRemoveLink\" dojoAttachPoint=\"removeLink\" ><img src=\"${_blankGif}\" class=\"lotusDelete\" dojoAttachPoint=\"removeNode\" ><span class=\"lotusAltText\">X</span></a> </div> </div></div>");

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
















dojo.requireLocalization("lconn.core","insertimagedialog");
var _1=dojo.i18n.getLocalization("lconn.core","insertimagedialog");
dojo.declare("lconn.core.InsertImageDialogFile",[dijit._Widget,dijit._Templated],{messages:_1,templatePath:dojo.moduleUrl("lconn.core","templates/InsertImageDialogFile.html"),file:null,remove:function(_2){
},_remove:function(){
this.remove(this);
this.destroy();
},postMixInProperties:function(){
var _3=this._fileName=this.file.getName();
this._fileIcon=lconn.core.utilities.getFileIconClassName(_3,16);
},_startHover:function(){
dojo.addClass(this.labelRow,"lconnUploadHover");
},_stopHover:function(){
dojo.removeClass(this.labelRow,"lconnUploadHover");
}});
})();
}


;dojo.cache("lconn.forums", "templates/ForumInsertImageDialog.html", "<div> <div data-dojo-type=\"dijit.layout.ContentPane\" data-dojo-attach-point=\"uploadTab\" title=\"${forumMessages.rs_insImgLabelMyComputer}\" aria-labelledby=\"${id}_selectImagesToInsertLabel\"> <div data-dojo-attach-point=\"uploadContent\" aria-live=\"assertive\"> <div class=\"lotusHidden forumError\" data-dojo-attach-point=\"uploadErrorRow\"> <div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${forumMessages.rs_error}\" title=\"${forumMessages.rs_error}\"/><span class=\"lotusAltText\">${forumMessages.rs_errorColon}</span><div class=\"lotusMessageBody\" data-dojo-attach-point=\"uploadErrorNode\"></div></div> </div> <div class=\"lotusFormField\"> <span id=\"${id}_selectImagesToInsertLabel\">${forumMessages.rs_insImgSelectImage}</span> </div> <div class=\"lotusFormField\"> <label>${messages.imageFile}</label> <div class=\"lotusFieldWrapper\" style=\"width: 67%;\"><div data-dojo-attach-point=\"fileFieldContainer\"/></div></div> </div> <div class=\"lotusFormField\" > <label for=\"${id}_imageDescription\">${messages.description}</label> <textarea class=\"lotusFieldWrapper lotusText mageDescription\" style=\"width:65%;\" id=\"${id}_imageDescription\" name=\"imageDescription\" rows=\"5\" ></textarea> </div> <div class=\"lotusFormField\"> <label for=\"${id}_uploadAlt\">${messages.alt}</label> <input class=\"lotusFieldWrapper lotusText \" style=\"width:65%;\" type=\"text\" id=\"${id}_uploadAlt\" name=\"uploadAlt mageDescription\" /> </div> </div> </div> <div data-dojo-type=\"dijit.layout.ContentPane\" data-dojo-attach-point=\"urlTab\" title=\"${messages.URL}\" > <div class=\"lotusHidden forumError\" data-dojo-attach-point=\"urlErrorRow\" aria-live=\"assertive\"> <div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${forumMessages.rs_error}\" title=\"${forumMessages.rs_error}\"/><span class=\"lotusAltText\">${forumMessages.rs_errorColon}</span><div class=\"lotusMessageBody\" data-dojo-attach-point=\"urlErrorNode\"></div></div> </div> <div class=\"lotusFormField\" > <div class=\"lotusFormField\" > <label for=\"${id}_URL\"><span class=\"lotusFormRequired\" title=\"${messages.required}\">${forumMessages.rs_asterisk}</span>${forumMessages.rs_insImgLabelURLwithColon}</label> <input class=\"lotusFieldWrapper lotusText\" style=\"width:65%;\" type=\"text\" id=\"${id}_URL\" name=\"URL\" dojoAttachEvent=\"onchange: loadImageUrl\" data-dojo-attach-point=\"urlInput\" value=\"\" aria-required=\"true\" /> </div> <div class=\"lotusFormField\"> <label for=\"${id}_urlAlt\">${messages.alt}</label> <input class=\"lotusFieldWrapper lotusText\" style=\"width:65%;\" type=\"text\" id=\"${id}_urlAlt\" name=\"urlAlt\" data-dojo-attach-point=\"urlAlt\" /> </div> <div class=\"lotusFormField\" > <label>${messages.preview}</label> <div class=\"lotusFieldWrapper\"> <div id=\"${id}_preview\" style=\"width:300px; height:300px; border:1px solid black; overflow:auto\"> <img src=\"${_blankGif}\" data-dojo-attach-point=\"previewImage\" alt=\"\"/> </div> </div> </div> <div title=\"Legend\" class=\"lotusMeta lotusIndent10\">${forumMessages.rs_required}</div> </div> </div></div>");

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














dojo.requireLocalization("lconn.core","insertimagedialog");
dojo.requireLocalization("lconn.forums","strings");
dojo.declare("lconn.forums.ForumInsertImageDialog",[dijit._Widget,dijit._Templated],{widgetsInTemplate:true,parseOnLoad:true,messages:dojo.i18n.getLocalization("lconn.core","insertimagedialog"),forumMessages:dojo.i18n.getLocalization("lconn.forums","strings"),templatePath:dojo.moduleUrl("lconn.forums","templates/ForumInsertImageDialog.html"),_pickerInited:false,_lastPicked:null,_manager:null,_images:[],_fromFilesList:[],filefield:null,forumImageFields:[],feildIndex:-1,formNode:null,invalidCharacters:/[\\\/\:\*\?\<\>\|\"]/g,maxFileLength:256,maxFileSize:1048576000,extensions:{allowed:["jpeg","gif","png","pjpeg","x-png","bmp","jpg"]},allowRename:false,allowReplace:false,allowFlash:true,OKBtn:null,originalBodyClass:null,postForm:"",editor:"",contextPath:"",remoteFileExists:function(_1){
var _2=new dojo.Deferred();
setTimeout(function(){
_2.callback({called:true});
},500);
_2.addBoth(function(){
return false;
});
return _2;
},allowedMimeTypes:null,dataStore:null,setMessage:null,postCreate:function(){
var _3=this._dialog=new lconn.core.TempTabbedDialog({title:this.messages.dialogTitle,width:"500px"});
dojo.removeClass(_3.domNode,"dijitContentPane");
this.uploadContent.style.width="500px";
dojo.removeAttr(_3.form,"aria-live");
_3.tabs.addChild(this.uploadTab);
_3.tabs.addChild(this.urlTab);
_3.createTabs(_3.tabs);
_3.resize();
dojo.query(".tabLabel",_3.domNode).forEach(function(_4){
dojo.attr(_4,"title",_4.innerHTML);
});
dojo.query(".tabStripButton",_3.tabs.domNode).forEach(function(_5){
dojo.addClass(_5,"lotusHidden");
});
this.setMessage=lconn.forums.Util.setMessage;
this.feildIndex=-1;
this.forumImageFields=[];
this.currentTab=this.uploadTab;
this._createImageLibrary();
dojo.connect(_3,"onSave",dojo.hitch(this,this.onOk));
_3.onTabChange=dojo.hitch(this,this.onTabChange);
dojo.connect(this.urlInput,"oninput",this,"_onUrlChange");
if(dojo.isIE){
dojo.connect(this.urlInput,"onkeyup",this,"_onUrlChange");
}
dojo.connect(_3,"onCancel",this,"destroy");
dojo.connect(_3,"resize",dojo.hitch(this,function(){
_3.containerNode.style.removeProperty("overflow");
var _6=_3.domNode;
var _7=dojo.doc.documentElement.clientHeight;
if(_6.scrollHeight>_7){
dojo.style(_3.form,{"overflowY":"auto","overflowX":"hidden","height":(dojo.position(_6).h-50)+"px"});
}else{
dojo.style(_3.form,{"overflowY":"hidden","overflowX":"hidden"});
_3.form.style.removeProperty("height");
}
}));
},show:function(){
this.originalBodyClass=dojo.attr(dojo.body(),"class");
dojo.addClass(dojo.body(),"lotusui30_body lotusui30_fonts lotusui30 lotusui30dojo lotusui30dojo_sharebox");
this._dialog.show();
this._createUpload();
if(dojo._isBodyLtr()==false){
var _8=this._dialog.tabs.tablist.pane2button;
for(attr in _8){
dojo.addClass(_8[attr].domNode,"dijitTabRtl");
}
}
this._disableSubmit();
},hide:function(){
dojo.attr(dojo.body(),"class",this.originalBodyClass);
this._dialog.hide();
},destroy:function(){
if(this._dialog){
this._dialog.destroy();
}
this.postForm.editor.focus();
},onTabChange:function(_9){
this.clearMessage();
this.currentTab=_9;
if(this.libraryTab==_9){
if(!this._pickerInited){
this.initPicker();
}
}
if(this.urlTab==_9){
this._onUrlChange();
setTimeout(dojo.hitch(this,"_setFileMissWarning"),50);
}
if(this.uploadTab==_9){
this._onFileChange();
setTimeout(dojo.hitch(this,"_setUrlMissWarning"),50);
}
},_setFileMissWarning:function(){
if(this.filefield.fileList.count()>0){
dojo.removeClass(this.urlErrorRow,"lotusHidden");
this.setMessage(lconn.forums.Constants.messageTypes.INFO,this.forumMessages.rs_insImgLossURLTab,this.urlErrorRow);
}
},_setUrlMissWarning:function(){
var v=this.urlInput.value;
if(v){
v=dojo.trim(v);
}
if(v&&v.length>0){
dojo.removeClass(this.uploadErrorRow,"lotusHidden");
this.setMessage(lconn.forums.Constants.messageTypes.INFO,this.forumMessages.rs_insImgLossFileTab,this.uploadErrorRow);
}
},initPicker:function(){
this.picker.reset();
this._pickerInited=true;
},_pickerSelect:function(_a){
this._lastPicked=_a;
},_createImageLibrary:function(){
},_createUpload:function(){
var _b=dojo.create("div");
this.fileFieldContainer.appendChild(_b);
var _c=this.filefield=new lconn.core.upload.FileField({id:"file",width:"300",inputName:"images",invalidCharacters:this.invalidCharacters,fileProvider:new lconn.core.upload.provider.FlashFileProvider(),maxFileLength:this.maxFileLength,maxFileSize:this.maxFileSize,extensions:this.extensions,allowRename:this.allowRename,allowReplace:this.allowReplace,allowFlash:this.allowFlash,allowMultiple:true,remoteFileExists:this.remoteFileExists,onFileAdded:dojo.hitch(this,"_addFile"),onFileRemoved:dojo.hitch(this,"_onFileChange")});
_c.startup();
dojo.connect(this.filefield.fileList,"onAddFilesError",this,"_addFileError");
dojo.connect(_c.widget,"_addRow",function(){
var _d=_c.widget.getChildren();
if(_d&&_d.length>0){
dijit.focus(_d[_d.length-1].removeLink);
}
});
_b.appendChild(_c.getUIWidget().domNode);
},clearMessage:function(){
dojo.addClass(this.uploadErrorRow,"lotusHidden");
dojo.addClass(this.urlErrorRow,"lotusHidden");
},_addFile:function(){
this.clearMessage();
this._enableSubmit();
},_addFileError:function(){
this.clearMessage();
dojo.removeClass(this.uploadErrorRow,"lotusHidden");
this.setMessage(lconn.forums.Constants.messageTypes.ERROR,this.forumMessages.rs_insImgNoneImageFile,this.uploadErrorRow);
},_enableSubmit:function(){
if(!this.OKBtn){
this.OKBtn=dojo.query(".lotusFormFooter .lotusFormButton[type=submit]",this._dialog.domNode)[0];
}
if(this.OKBtn){
dojo.removeClass(this.OKBtn,"lotusBtnDisabled");
this.OKBtn.disabled=false;
}
},_disableSubmit:function(){
if(!this.OKBtn){
this.OKBtn=dojo.query(".lotusFormFooter .lotusFormButton[type=submit]",this._dialog.domNode)[0];
}
if(this.OKBtn){
dojo.addClass(this.OKBtn,"lotusBtnDisabled");
this.OKBtn.disabled=true;
}
},_onFileChange:function(){
if(this.filefield.fileList.count()>0){
this._enableSubmit();
}else{
this._disableSubmit();
}
},_onUrlChange:function(_e){
var v=this.urlInput.value;
if(v){
v=dojo.trim(v);
}
if(v&&v.length>0){
this._enableSubmit();
}else{
this._disableSubmit();
}
},loadImageUrl:function(){
var _f=this.urlInput.value;
this.previewImage.src=_f;
var _10=dojo.connect(this.previewImage,"onerror",this,function(){
dojo.disconnect(_10);
if(!this.previewImage.width){
console.log("Image failed to load!");
}
});
},onOk:function(){
if(this.currentTab==this.urlTab){
var v=this.urlInput.value;
if(v){
v=dojo.trim(v);
}
if(v&&v.length>0){
this.onImagesAvailable([{src:this.urlInput.value,alt:this.urlAlt.value}]);
this.hide();
}else{
this.clearMessage();
dojo.removeClass(this.urlErrorRow,"lotusHidden");
this.setMessage(lconn.forums.Constants.messageTypes.ERROR,this.forumMessages.rs_insImgEmptyURL,this.urlErrorRow);
}
}else{
if(this.currentTab==this.libraryTab){
this.hide();
}else{
if(this.currentTab==this.uploadTab){
if(this.filefield.fileList.count()>0){
this.hide();
this._doUpload();
}else{
this.clearMessage();
dojo.removeClass(this.uploadErrorRow,"lotusHidden");
this.setMessage(lconn.forums.Constants.messageTypes.ERROR,this.forumMessages.rs_insImgEmptyFile,this.uploadErrorRow);
}
}else{
if(this.currentTab==this.filesTab){
this._fromFiles();
}
}
}
}
return true;
},onImagesAvailable:function(_11){
var ele=this.editor.document.createElement("img",{attributes:{src:this.urlInput.value,alt:this.urlAlt.value}});
this.editor.insertElement(ele);
},_openPicker:function(){
var _12=this.messages;
lconn.core.filepicker.open({title:_12.imagePickerTitle,externalOnly:false,publicOnly:false,shareableOnly:false,showVisibility:true,showExternal:true,useCompact:false,allowedMimeTypes:this.allowedMimeTypes,filesService:dojo.getObject("lconn.core.config.services.files"),onSave:dojo.hitch(this,this._filesPicked)});
},_filesPicked:function(_13){
var _14=function(f){
var _15=dojo.indexOf(this._fromFilesList,f);
this._fromFilesList.splice(_15,1);
};
dojo.forEach(_13,dojo.hitch(this,function(f){
var _16=new lconn.core.InsertImageDialogFile({file:f,remove:dojo.hitch(this,_14)});
this._fromFilesList.push(_16);
this.fileList.appendChild(_16.domNode);
}));
},_fromFiles:function(){
var _17=this;
var _18=dojo.map(this._fromFilesList,function(_19){
return {src:_19.file.getUrlDownload(),alt:_17.filesAlt.value||_19.file.getName()};
});
this.onImagesAvailable(_18);
this.hide();
},_doUpload:function(){
var _1a=this.filefield;
var _1b=_1a.getFileList().getUploadableFiles();
if(!_1b.length){
return;
}
this._manager=_1a.createUploadManager(_1b);
var _1c=dojo.byId(this.id+"_imageDescription").value;
var _1d=dojo.byId(this.id+"_uploadAlt").value;
for(var i=0;i<_1b.length;i++){
var f=_1b[i].getObject();
dojo.removeClass(this.postForm.insertImageDiv,"lotusHidden");
var sp=dojo.create("span",{"style":"width:25%"},this.postForm.insertImageNode);
var fi=new lconn.forums.ForumsImageField({postForm:this.postForm,editor:this.editor,contextPath:this.contextPath,imageName:f.name,imageSize:f.size,imageDescription:_1c,imageAlt:_1d},sp);
this.forumImageFields.push({imageField:fi,manager:this._manager});
}
dojo.connect(this._manager,"onProgress",dojo.hitch(this,"_onProgress"));
dojo.connect(this._manager,"onItemComplete",dojo.hitch(this,"_uploadComplete"));
dojo.connect(this._manager,"onItemError",dojo.hitch(this,"_uploadError"));
dojo.addClass(this.postForm.footerButtonNode,"lotusHidden");
dojo.removeClass(this.postForm.footerLoadingNode,"lotusHidden");
this._uploadNext();
},_onProgress:function(obj){
this.forumImageFields[this.feildIndex].imageField.updateProgress(obj.percentComplete);
},_uploadError:function(mgr,_1e,_1f,_20){
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
var _21=dojo.string.substitute(rs.rs_imageUploadError,[_1e.getName()]);
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.ERROR,_21,this.formErrorRow);
dojo.removeClass(this.postForm.footerButtonNode,"lotusHidden");
dojo.addClass(this.postForm.footerLoadingNode,"lotusHidden");
},_uploadComplete:function(mgr,_22,_23,_24){
this.onResponseReceived(_23,_24);
if(this._manager.hasMore()){
this._uploadNext();
}else{
dojo.removeClass(this.postForm.footerButtonNode,"lotusHidden");
dojo.addClass(this.postForm.footerLoadingNode,"lotusHidden");
this.destroy();
}
},_uploadNext:function(){
if(this._manager.hasMore()){
var t=this._manager.getNext();
this.feildIndex++;
this._manager.uploadNext(this.onFileUpload(t,dojo.byId(this.id+"_imageDescription").value,dojo.byId(this.id+"_uploadAlt").value));
}
},onFileUpload:function(_25,_26,alt){
var _27=this.contextPath+lconn.forums.Constants.ATTACH_ADDIMAGE;
var _28=dojo.cookie("X-Update-Nonce");
var _29=lconn.core.url.getServiceUrl(lconn.core.config.services.forums);
if(!_28||_27.indexOf(_29.toString())==0){
_28=dojox.uuid.generateTimeBasedUuid();
dojo.cookie("X-Update-Nonce",_28,{expires:1,path:_29.path});
}
return {handleAs:"html",url:_27,content:{jsVar:this.jsVar,"X-Update-Nonce":_28},headers:{"X-Update-Nonce":_28,"content-type":false}};
},onResponseReceived:function(_2a,_2b){
var ta=_2a.getElementsByTagName("textarea")[0];
var _2c=dojo.fromJson(ta.value);
if(_2c.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_2c.status)>-1){
dojo.removeClass(this.postForm.footerButtonNode,"lotusHidden");
dojo.addClass(this.postForm.footerLoadingNode,"lotusHidden");
return;
}
var _2d=_2c.images[0];
this.forumImageFields[this.feildIndex].imageField.completeUpload(_2d.uuid);
}});
}


;dojo.cache("lconn.forums", "templates/ConfirmDelete.html", "<div class=\"ConfirmDelete\"> <div class=\"lotusHidden\" id=\"deleteWarning\" dojoAttachPoint=\"deleteWarningNode\"></div> <div class=\"lotusHidden\" dojoAttachPoint=\"deleteReasonLabelNode\"><label for=\"${id}_deleteReason\">${rs_deleteReason}</label></div> <form class=\"lotusDialog\" dojoAttachPoint=\"formNode\" onsubmit=\"return false\" role=\"application\" aria-label=\"${ariaLabel}\"> <div class=\"lotusHidden\" dojoAttachPoint=\"formErrorRow\" role=\"alert\"> <div class=\"lotusMessage2\" role=\"alert\"> <img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /> <span class=\"lotusAltText\">${rs_errorColon}</span> <div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorNode\"></div> </div> </div> <div class=\"lotusHidden\" dojoAttachPoint=\"deleteReplyNode\"> <input type=\"hidden\" name=\"nodeId\" value=\"${uuid}\" dojoAttachPoint=\"uuidInput\" /> <input type=\"hidden\" name=\"categoryIds\" value=\"\" dojoAttachPoint=\"categoryIdsInput\" /> <input type=\"hidden\" name=\"forumIds\" value=\"\" dojoAttachPoint=\"forumIdsInput\" /> <div dojoAttachPoint=\"reasonErrorRow\" class=\"lotusMessage2 lotusHidden\" role=\"alert\"> <img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /> <span class=\"lotusAltText\">${rs_errorColon}</span> <div dojoAttachPoint=\"reasonErrorLabel\"></div> </div> <div style=\"width:100%;\" ><textarea dojoAttachPoint=\"deleteReasonNode\" class=\"forumTextArea bidiAware\" name=\"reason\" id=\"${id}_deleteReason\"></textarea></div> </div> </form> </div>");

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






dojo.declare("lconn.forums.ConfirmDelete",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.forums","templates/ConfirmDelete.html"),url:"",uuid:"",isReply:false,reasonLimit:256,loadFn:null,ariaLabel:"",jsVar:"",disableSubmit:function(){
},enableSubmit:function(){
},postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function(){
if(typeof this.url!="string"||!this.url){
throw new Error("Exception: "+this.declaredClass+" missing required parameter url.");
return;
}
this.connect(this.formNode,"onsubmit","post");
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},loadNode:function(_1,_2){
if(_2){
this.confirmReply(_1);
}else{
this.confirmTopic(_1);
}
},confirmMember:function confirmMember(_3,_4){
this.uuid=_3;
this.uuidInput.value=_3;
this.categoryIdsInput.name="memberIds";
this.categoryIdsInput.value=_4;
this.loadFn=dojo.hitch(this,"load");
this.deleteWarningNode.innerHTML=this.rs_removeMemberConfirm;
dojo.removeClass(this.deleteWarningNode,"lotusHidden");
dojo.addClass(this.deleteReplyNode,"lotusHidden");
},confirmReply:function confirmReply(id){
this.uuid=id;
this.uuidInput.value=id;
this.loadFn=dojo.hitch(this,"loadPost");
dojo.addClass(this.deleteWarningNode,"lotusHidden");
dojo.removeClass(this.deleteReasonLabelNode,"lotusHidden");
dojo.removeClass(this.deleteReplyNode,"lotusHidden");
},confirmTopic:function confirmTopic(id){
this.uuid=id;
this.uuidInput.value=id;
this.loadFn=dojo.hitch(this,"loadPost");
this.deleteWarningNode.innerHTML=this.rs_deleteTopicConfirm;
dojo.removeClass(this.deleteWarningNode,"lotusHidden");
dojo.addClass(this.deleteReplyNode,"lotusHidden");
},confirmForumsCategories:function confirmForumsCategories(_5,_6,_7,_8){
this.loadFn=dojo.hitch(this,"load");
var _9="<img src=\""+this._blankGif+"\" + class=\"lconnSprite lconnSprite-iconCategory16\" alt=\""+this.rs_category+"\" /><span class=\"lotusAltText\">"+this.rs_category+"</span> ";
var _a="<img src=\""+this._blankGif+"\" + class=\"lconnSprite lconnSprite-iconForumsItem16\" alt=\""+this.rs_forum+"\" /><span class=\"lotusAltText\">"+this.rs_forum+"</span> ";
var _b=typeof this.deleteWarningNode.innerText!="undefined"?"innerText":"textContent";
var _c,_d;
if(_5.length>0){
_d=document.createElement("ul");
var li,_e;
for(var i=0;i<_5.length;i++){
li=document.createElement("li");
_e=document.createElement("span");
_e[_b]=_6[i];
li.innerHTML=_9;
li.appendChild(_e);
_d.appendChild(li);
}
}
if(_7.length>0){
_c=document.createElement("ul");
var li,_f;
for(var i=0;i<_7.length;i++){
li=document.createElement("li");
_f=document.createElement("span");
_f[_b]=_8[i];
li.innerHTML=_a;
li.appendChild(_f);
_c.appendChild(li);
}
}
if(_5.length==0&&_7.length==0){
return;
}else{
if(_5.length>0&&_7.length>0){
this.deleteWarningNode.innerHTML=this.rs_deleteForumsCategories+"<ul>"+_d.innerHTML+_c.innerHTML+"</ul>";
}else{
if(_5.length==1&&_7.length==0){
this.deleteWarningNode[_b]=dojo.string.substitute(this.rs_deleteCategoryConfirm,_6);
}else{
if(_5.length>1&&_7.length==0){
this.deleteWarningNode.innerHTML=this.rs_deleteCategoriesConfirm+"<ul>"+_d.innerHTML+"</ul>";
}else{
if(_7.length==1){
_8[0]=lconn.core.globalization.bidiUtil.enforceTextDirection(_8[0]);
this.deleteWarningNode[_b]=dojo.string.substitute(this.rs_deleteForumConfirm,_8);
}else{
this.deleteWarningNode.innerHTML=this.rs_deleteForumsConfirm+"<ul>"+_c.innerHTML+"</ul>";
}
}
}
}
}
if(_5==null){
this.categoryIdsInput.value="";
}else{
this.categoryIdsInput.value=_5.join(",");
}
if(_7==null){
this.forumIdsInput.value="";
}else{
this.forumIdsInput.value=_7.join(",");
}
dojo.removeClass(this.deleteWarningNode,"lotusHidden");
dojo.addClass(this.deleteReplyNode,"lotusHidden");
},post:function(evt){
dojo.addClass(this.formErrorRow,"lotusHidden");
dojo.addClass(this.reasonErrorRow,"lotusHidden");
if(!this.validate()){
if(evt){
dojo.stopEvent(evt);
}
return false;
}
this.disableSubmit();
var _10={url:this.url,form:this.formNode,content:{},headers:{"X-Update-Nonce":"true"},timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:this.loadFn,error:dojo.hitch(this,"error")};
if(this.jsVar){
_10.content.jsVar=this.jsVar;
}
dojo.xhrPost(_10);
if(evt){
dojo.stopEvent(evt);
}
return false;
},loadPost:function(_11,_12){
try{
var _13=dojo.fromJson(_11);
if(_13.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_13.status)>-1){
this.error(_13,_12);
return;
}
}
catch(e){
}
var _14=document.createElement("div");
_14.innerHTML=_11;
var _15=dojo.fromJson(dojo.query("textarea",_14)[0].value);
if(_15.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_15.status)>-1){
this.error(_15,_12);
}else{
this.deleteDone(_15.response,_12);
}
},load:function(_16,_17){
var _18;
try{
_18=dojo.fromJson(_16);
}
catch(err){
lconn.forums.Util.authHandler(_16,_17);
return;
}
if(_18&&_18.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_18.status)>-1){
this.error(_18,_17);
}else{
this.deleteDone(_16,_17);
}
},deleteDone:function(_19,_1a){
},error:function(_1b,_1c){
this.enableSubmit();
_1b.noTextInput="true";
lconn.forums.Util.ajaxErrorHandler(_1b,_1c,this.formErrorNode,dojo.hitch(this,"post"));
dojo.removeClass(this.formErrorRow,"lotusHidden");
},cancel:function(){
},reset:function(){
this.formNode.reset();
this.uuidInput.value="";
dojo.addClass(this.formErrorRow,"lotusHidden");
dojo.addClass(this.reasonErrorRow,"lotusHidden");
this.enableSubmit();
},validate:function(){
if(this.deleteReasonNode.value.length>this.reasonLimit){
this.reasonErrorLabel.innerHTML=dojo.string.substitute(this.rs_messageTooLong,[this.reasonLimit]);
dojo.removeClass(this.reasonErrorRow,"lotusHidden");
return false;
}
return true;
}});
}


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








dojo.declare("lconn.forums.RequestMemberShip",[lconn.forums.ConfirmDelete],{postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
this.rs_deleteReason=this.rs_requestJoinModInfo1+"<br>"+this.rs_requestJoinModInfo2;
},postCreate:function(){
this.inherited(arguments);
this.confirmReply(this.uuid);
this.domNode.style.width="500px";
},loadPost:function(_1,_2){
if(_1.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_1.status)>-1){
this.error(_1,_2);
}else{
this.joinDone();
}
},post:function(_3){
dojo.addClass(this.formErrorRow,"lotusHidden");
dojo.addClass(this.reasonErrorRow,"lotusHidden");
if(!this.validate()){
if(_3){
dojo.stopEvent(_3);
}
return false;
}
this.disableSubmit();
var _4=["<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" xmlns:app=\"http://www.w3.org/2007/app\">","<title>",this.rs_requestJoinCommunity,"</title>","<content type=\"text\">",this.deleteReasonNode.value,"</content></entry>"].join("");
var _5={url:this.url,postData:_4,handleAs:"text",headers:{"X-Update-Nonce":"true","Accept":"application/xml","Content-Type":"application/xml; charset=utf-8"},timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:this.loadFn,error:dojo.hitch(this,"error")};
dojo.xhrPost(_5);
if(_3){
dojo.stopEvent(_3);
}
return false;
},joinDone:function(){
}});
}


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






dojo.requireLocalization("lconn.forums","strings");
dojo.declare("lconn.forums.CategoryForm",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"CategoryForm\">","<form class=\"lotusForm2\" dojoAttachPoint=\"formNode\" dojoAttachEvent=\"onsubmit:post\" aria-live=\"assertive\" role=\"application\" aria-label=\"${ariaLabel}\">","<input type=\"hidden\" name=\"categoryId\" dojoAttachPoint=\"categoryIdInput\" />","<input type=\"hidden\" name=\"parentId\" value=\"${parentId}\" dojoAttachPoint=\"parentIdInput\" />","<input type=\"hidden\" name=\"dangerousurlnonce\" dojoAttachPoint=\"nonceInput\" />","<div class=\"lotusHidden\" dojoAttachPoint=\"formErrorNode\" role=\"alert\">","<div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div></div>","</div>","<fieldset dojoAttachPoint=\"formInputNode\">","<div dojoAttachPoint=\"titleErrorNode\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">","<img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div>","</div>","<div class=\"lotusFormField\">","<label for=\"${id}_name\"><span class=\"lotusFormRequired\">*</span>${rs_nameColon}</label>","<div><input style=\"width:96%;\" dojoAttachPoint=\"nameInput\" class=\"lotusText bidiAware\" type=\"text\" id=\"${id}_name\" name=\"name\" aria-required=\"true\" /></div>","</div>","<div class=\"lotusFormField\">","<label for=\"${id}_description\">${rs_descriptionColon}</label>","<div><textarea style=\"width:96%;\" id=\"${id}_description\" dojoAttachPoint=\"descriptionInput\" name=\"description\" rows=\"5\" cols=\"20\" class=\"lotusText\"></textarea></div>","</div>","</fieldset>","</form>","</div>"].join(""),contextPath:"",parentId:"",onPost:null,ariaLabel:"",disableSubmit:function(){
},enableSubmit:function(){
},postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function postCreate(){
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},focus:function(){
this.nameInput.focus();
},reset:function(){
this.formNode.reset();
this.categoryIdInput.value=this.nonceInput.value="";
this.enableSubmit();
},edit:function(_1){
if(_1){
if(_1.uuid){
this.categoryIdInput.value=_1.uuid;
}
if(_1.name){
this.nameInput.value=_1.name;
}
if(_1.description){
this.descriptionInput.value=_1.description;
}
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},validate:function validate(){
this.hideErrors();
var _2=false;
if(dojo.string.trim(this.nameInput.value).length==0){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_nameRequired;
_2=true;
}
return !_2;
},hideErrors:function(){
dojo.addClass(this.formErrorNode,"lotusHidden");
dojo.addClass(this.titleErrorNode,"lotusHidden");
},showError:function(_3){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+_3+"</span>";
},post:function post(_4){
if(this.validate()){
var _5;
if(this.categoryIdInput.value){
_5=this.contextPath+lconn.forums.Constants.UPDATE_CATEGORY_PATH;
}else{
_5=this.contextPath+lconn.forums.Constants.CREATE_CATEGORY_PATH;
}
this.disableSubmit();
dojo.xhrPost({url:_5,headers:lconn.forums.Constants.NONCE_HEADER,form:this.formNode,load:dojo.hitch(this,"load"),error:dojo.hitch(this,"postError"),handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,contentType:"application/x-www-form-urlencoded;charset=UTF-8"});
}
if(_4){
dojo.stopEvent(_4);
}
},load:function load(_6,_7){
if(_6.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_6.status)>-1){
this.postError(_6,_7);
}else{
this.postSuccess(_6,_7);
}
},postSuccess:function postSuccess(_8,_9){
if(this.onPost&&_8&&_8.response){
this.onPost(_8.response,_9);
}
},postError:function(_a,_b){
this.enableSubmit();
var _c=dojo.style(this.formInputNode,"width");
dojo.style(this.formErrorNode,"maxWidth",_c+"px");
lconn.forums.Util.ajaxErrorHandler(_a,_b,this.formErrorMessageNode,dojo.hitch(this,"post"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
}});
}


;dojo.cache("lconn.forums", "templates/tagEditor.html", "<span class=\"lotusTags\" > <div dojoAttachPoint=\"_errorContainer\" class=\"forumError lotusHidden\"> <div class=\"lotusMessage2\" role=\"alert\"> <img alt=\"${rs_error}\" class=\"lotusIcon lotusIconMsgError\" src=\"${blankGif}\" /> <span class=\"lotusAltText\">${rs_errorColon}</span> <div class=\"lotusMessageBody\" dojoAttachPoint=\"_errorNode\"></div> </div> </div> <span dojoAttachPoint=\"_tagLoading\"><img src=\"${loadingSmallGif}\"/></span> <span dojoAttachPoint=\"_tagItems\" class=\"lotusHidden\"></span> <a href=\"javascript:;\" dojoAttachPoint=\"_tagClick1\" dojoAttachEvent=\"onclick:_edit\" class=\"tagAdd lotusAction\" title=\"${rs_tagEditorEditDec}\" style=\"display:none;\" role=\"button\"></a> <form dojoAttachPoint=\"_editForm\" dojoAttachEvent=\"onsubmit:_addTag\" style=\"display:none;\" role=\"application\" aria-label=\"${rs_tags}\"> <input dojoAttachEvent=\"onchange:_onChange\" dojoAttachPoint=\"_tagText\" type=\"text\" size=\"30\" class=\"lotusText bidiAware\" title=\"${rs_tagInputLabel}\"/> <input dojoAttachEvent=\"onclick:_addTag\" type=\"submit\" value=\"${rs_ok}\" class=\"lotusBtn\" /> <a dojoAttachEvent=\"onclick:_cancel\" href=\"javascript:;\" title=\"${rs_tagEditorCancelDec}\" role=\"button\" >${rs_cancel}</a> </form></span>");

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






dojo.declare("lconn.forums.TagEditor",[dijit._Widget,dijit._Templated],{tags:"",contextPath:"",nodeUuid:"",containerUuid:"",editable:true,tagLevel:"",tagSplitToken:" ",autoReplace:/,/g,endReplace:/[\s\u3000,]$/g,onAddTag:null,onRemoveTag:null,tagClickable:true,tagLimitLength:64,templatePath:dojo.moduleUrl("lconn.forums","templates/tagEditor.html"),_tagArray:null,_isEdit:false,_dirCode:"",blankGif:dojo.config.blankGif||dijit._Widget.prototype._blankGif,loadingSmallGif:lconn.core.url.getServiceUrl(lconn.core.config.services.webresources)+"/web/com.ibm.oneui.styles/css/images/loadingSmall.gif?etag="+ibmConfig.versionStamp,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function(){
this._loading();
this.inherited(arguments);
dojo.subscribe("lconn/forums/tags/editor/reset",this,this.reset);
this._dirCode=dojo._isBodyLtr()?"":"\u200f";
this.reset(this.tags);
},reset:function(_1){
this.tags=_1;
this._tagArray=new Array();
var _2=this.tags.split(this.tagSplitToken);
for(var i=0;i<_2.length;i++){
var v=dojo.string.trim(_2[i]);
v=v.toLocaleLowerCase();
if(v!=""&&!this._exists(v,this._tagArray)){
this._tagArray.push(v);
}
}
this._tagArray=this._tagArray.sort();
this.tags=this._tagArray.join(this.tagSplitToken);
this._createContents();
},_onChange:function(_3){
dojo.stopEvent(_3);
},_exists:function(a,_4){
if(_4==null){
return false;
}
for(var i=0;i<_4.length;i++){
if(a==_4[i]){
return true;
}
}
return false;
},_edit:function(){
if(arguments.length>0){
try{
dojo.stopEvent(arguments[0]);
}
catch(e){
}
}
this._disHideForm();
},_createContents:function(){
if(this.editable==false){
this._isEdit=false;
this._tagClick1.style.display="none";
this._editForm.style.display="none";
}else{
if(this._isEdit){
this._tagClick1.style.display="none";
this._editForm.style.display="inline";
}else{
this._tagClick1.style.display="inline";
this._editForm.style.display="none";
}
}
var _5=this._tagArray.length;
if(_5==0){
this._tagItems.innerHTML="<span class=\"tagEmpty\">"+this.rs_tagEditorContentNone+"</span>";
this._tagClick1.innerHTML=this.rs_tagEditorAddDec;
}else{
this._tagClick1.innerHTML=this.rs_tagEditorAddRemoveDec;
dojo.attr(this._tagItems,"role","list");
this._tagItems.innerHTML="";
for(var i=0;i<_5;i++){
var _6=this._tagArray[i];
if(this.tagClickable){
var a=document.createElement("a");
dojo.attr(a,{href:"#","lconntagname":_6,"role":"listitem","dir":lconn.core.globalization.bidiUtil.getTextDirection(_6)||"ltr",onclick:dojo.hitch(this,"_search",_6)});
a.appendChild(document.createTextNode(_6));
dojo.place(a,this._tagItems);
}else{
var _7=document.createElement("span");
dojo.attr(_7,{"lconntagname":_6,"role":"listitem","dir":lconn.core.globalization.bidiUtil.getTextDirection(_6)||"ltr"});
_7.appendChild(document.createTextNode(_6));
dojo.place(_7,this._tagItems);
}
if(this._isEdit){
var a2=document.createElement("a");
dojo.attr(a2,{href:"javascript:void(0);","lconntagname":_6,"role":"button",onclick:dojo.hitch(this,"_removeTag",_6)});
dojo.place(document.createTextNode(" "+this._dirCode),a2);
var _8=document.createElement("img");
dojo.attr(_8,{"class":"lconnSprite lconnSprite-STAwnsOffline9","lconntagname":_6,"alt":dojo.string.substitute(this.rs_tagEditorRemoveDec,[lconn.core.globalization.bidiUtil.enforceTextDirection(_6)]),"title":dojo.string.substitute(this.rs_tagEditorRemoveDec,[lconn.core.globalization.bidiUtil.enforceTextDirection(_6)]),"src":this.blankGif});
dojo.place(_8,a2);
var _7=document.createElement("span");
dojo.attr(_7,{"class":"lotusAltText","title":dojo.string.substitute(this.rs_tagEditorRemoveDec,[lconn.core.globalization.bidiUtil.enforceTextDirection(_6)])});
_7.innerHTML="X";
dojo.place(_7,a2);
dojo.place(a2,this._tagItems);
}
if(i<_5-1){
dojo.place(document.createTextNode(", "+this._dirCode),this._tagItems);
}
}
}
this._cancelLoading();
},_search:function(_9){
var _a;
if(this.tagLevel=="category"){
_a=this.contextPath+lconn.forums.Constants.REDIRECT_ONLYFORUM_PATH+"?id="+this.containerUuid+"&tags="+encodeURIComponent(_9);
}else{
if(this.containerUuid==null||this.containerUuid==""){
_a=this.contextPath+lconn.forums.Constants.REDIRECT_ONLYFORUM_PATH+"?id=00000000-0000-000000000-000000000005&tags="+encodeURIComponent(_9);
}else{
_a=this.contextPath+lconn.forums.Constants.REDIRECT_FORUM_PATH+"?id="+this.containerUuid+"&tags="+encodeURIComponent(_9);
}
}
location.href=_a;
},_removeTag:function(_b){
this._loading();
_b=dojo.string.trim(_b);
if(this.onRemoveTag!=null){
var _c=this._tagArray.length;
for(var i=0;i<_c;i++){
if(_b==this._tagArray[i]){
this._tagArray.splice(i,1);
break;
}
}
this.tags=this._tagArray.join(this.tagSplitToken);
this.onRemoveTag(this.tags);
this._createContents();
}else{
var _d=dojo.hitch(this,function(_e){
if(_e){
var _f=dojo.query(".topicUpdateMeta")[0];
if(_f){
var _10=""+_e[1].nodeUpdateInfo;
_f.innerHTML=_10;
var _11=document.createTextNode(_e[1].updateByUserDisplayName);
var _12=dojo.query("#namePositionNode")[0];
dojo.place(_11,_12,"before");
dojo.destroy(_12);
lconn.forums.Util.parseDates(_f);
dojo.removeClass(_f,"lotusHidden");
}
var _13=this._tagArray.length;
for(var i=0;i<_13;i++){
if(_b==this._tagArray[i]){
this._tagArray.splice(i,1);
break;
}
}
this.tags=this._tagArray.join(this.tagSplitToken);
this._createContents();
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
this._tagText.focus();
}else{
dojo.removeClass(this._errorContainer,"lotusHidden");
this._cancelLoading();
}
});
new lconn.forums.TagEditor.Post({callBack:_d,url:this.contextPath+lconn.forums.Constants.REMOVE_TAG_PATH,tags:_b,nodeUuid:this.nodeUuid,errorNode:this._errorNode}).post();
}
},_validate:function(){
if(!this._validateTagLength()){
return false;
}
return true;
},_validateTagLength:function(){
var _14=this._tagText.value;
if(!_14){
return true;
}
_14=_14.replace(this.autoReplace,this.tagSplitToken);
_14=dojo.string.trim(_14);
var _15=_14.split(this.tagSplitToken);
var _16=true;
var _17="";
for(var i=0;i<_15.length;i++){
_17=_15[i];
var _18=lconn.forums.Util.lengthUtf8(_17);
_16=_18<=this.tagLimitLength;
if(!_16){
dojo.removeClass(this._errorContainer,"lotusHidden");
this._errorNode.innerHTML=dojo.string.substitute(this.rs_tagTooLong,[_17,this.tagLimitLength]);
break;
}
}
return _16;
},_addTag:function(_19){
dojo.stopEvent(_19);
if(!this._validate()){
return;
}
this._loading();
var _1a=this._tagText.value;
_1a=_1a.replace(this.autoReplace,this.tagSplitToken);
var _1b=dojo.string.trim(_1a);
this._tagText.value="";
if(_1b==""){
this._cancel();
return;
}
var _1c=_1b.split(this.tagSplitToken);
var _1d=new Array();
for(var i=0;i<_1c.length;i++){
var _1e=dojo.string.trim(_1c[i]);
_1e=_1e.toLocaleLowerCase();
if(_1e!=""&&!this._existInArray(_1e,this._tagArray)&&!this._existInArray(_1e,_1d)){
_1d.push(_1e);
}
}
if(_1d.length==0){
this._cancel();
return;
}
if(this.onAddTag!=null){
this._tagArray=this._tagArray.concat(_1d);
this._tagArray=this._tagArray.sort();
this.tags=this._tagArray.join(this.tagSplitToken);
this.onAddTag(this.tags);
this._hideForm();
}else{
var _1f=dojo.hitch(this,function(_20){
if(_20){
var _21=dojo.query(".topicUpdateMeta")[0];
if(_21){
var _22=""+_20[1].nodeUpdateInfo;
_21.innerHTML=_22;
var _23=document.createTextNode(_20[1].updateByUserDisplayName);
var _24=dojo.query("#namePositionNode")[0];
dojo.place(_23,_24,"before");
dojo.destroy(_24);
lconn.forums.Util.parseDates(_21);
dojo.removeClass(_21,"lotusHidden");
}
this._tagArray=this._tagArray.concat(_1d);
this._tagArray=this._tagArray.sort();
this.tags=this._tagArray.join(this.tagSplitToken);
this._hideForm();
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
}else{
dojo.removeClass(this._errorContainer,"lotusHidden");
this._tagText.value=_1d.join(this.tagSplitToken);
this._cancelLoading();
}
});
new lconn.forums.TagEditor.Post({callBack:_1f,url:this.contextPath+lconn.forums.Constants.ADD_TAG_PATH,tags:_1d.join(this.tagSplitToken),nodeUuid:this.nodeUuid,errorNode:this._errorNode}).post();
}
},_cancel:function(){
if(arguments.length>0){
try{
dojo.stopEvent(arguments[0]);
}
catch(e){
}
}
this._hideForm();
},_hideForm:function(){
dojo.addClass(this._errorContainer,"lotusHidden");
this._tagText.value="";
this._isEdit=false;
this._createContents();
this._tagClick1.focus();
},_disHideForm:function(){
this._isEdit=true;
this._createContents();
this._tagText.focus();
},_loading:function(){
dojo.removeClass(this._tagLoading,"lotusHidden");
dojo.addClass(this._tagItems,"lotusHidden");
},_cancelLoading:function(){
dojo.addClass(this._tagLoading,"lotusHidden");
dojo.removeClass(this._tagItems,"lotusHidden");
},_existInArray:function(_25,arr){
var _26=arr.length;
for(var i=0;i<_26;i++){
if(_25==arr[i]){
return true;
}
}
return false;
}});
dojo.declare("lconn.forums.TagEditor.Post",null,{callBack:null,url:null,tags:null,nodeUuid:null,errorNode:null,constructor:function(_27){
dojo.mixin(this,_27);
},post:function(){
var _28={url:this.url,content:{nodeUuid:this.nodeUuid,tags:this.tags},headers:lconn.forums.Constants.NONCE_HEADER,handleAs:"json",timeout:30000,load:dojo.hitch(this,"load"),error:dojo.hitch(this,"error")};
dojo.xhrPost(_28);
},load:function(_29,_2a){
if(_29.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_29.status)>-1){
this.error(_29,_2a);
}else{
this.callBack(_29);
}
},error:function(_2b,_2c){
var _2d=1;
var _2e=dojo.hitch(this,"post");
lconn.forums.Util.ajaxErrorHandler(_2b,_2c,this.errorNode,_2e);
this.callBack();
}});
}


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






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








dojo.declare("lconn.forums.ForumForm",[dijit._Widget,dijit._Templated],{inlineTemplate:["<form class=\"lotusForm\" dojoAttachPoint=\"formNode\" dojoAttachEvent=\"onsubmit:post\" aria-live=\"assertive\" role=\"application\" aria-label=\"${ariaLabel}\">","<input type=\"hidden\" name=\"forumId\" dojoAttachPoint=\"forumIdInput\" />","<input type=\"hidden\" name=\"parentId\" value=\"${parentId}\" dojoAttachPoint=\"parentIdInput\" />","<input type=\"hidden\" name=\"communityId\" value=\"${communityId}\" />","<table class=\"lotusFormTable forumFormTable\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"><tbody>","<tr><td colspan=\"3\"><h2>${rs_startForum}</h2></td></tr>","<tr class=\"lotusHidden\" dojoAttachPoint=\"formErrorNode\" role=\"alert\">","<td colspan=\"3\">","<div class=\"lotusMessage2\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\"/><span class=\"lotusAltText\">${rs_errorColon}</span> <div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div></div>","</td>","</tr>","<tr class=\"lotusHidden\" dojoAttachPoint=\"titleErrorNode\" >","<td></td>","<td class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span> <div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div></td>","<td></td>","</tr>","<tr class=\"lotusFormFieldRow\">","<td width=\"15%\" class=\"lotusFormLabel\"><label for=\"${id}_name\"><span class=\"lotusFormRequired\">*</span>${rs_nameColon}</label></td>","<td><input class=\"lotusText bidiAware\" dojoAttachPoint=\"nameInput\" type=\"text\" id=\"${id}_name\" name=\"name\" value=\"\" aria-required=\"true\" /></td>","<td></td>","</tr>","<tr class=\"lotusHidden\" dojoAttachPoint=\"tagErrorNode\" >","<td></td>","<td class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"tagErrorMessageNode\"></div></td>","<td></td>","</tr>","<tr class=\"lotusFormFieldRow lotusHidden\" dojoAttachPoint=\"tagFieldTR\" >","<td width=\"15%\" class=\"lotusFormLabel\"><label for=\"${id}_tag\">${rs_tagEditorDec}</label></td>","<td><span class=\"lotusText\" id=\"${id}_tag\" dojoAttachPoint=\"tagInput\"></span></td>","<td></td>","</tr>","<tr class=\"lotusFormFieldRow lotusHidden\" dojoAttachPoint=\"tagEditorTR\">","<td width=\"15%\" class=\"lotusFormLabel\"><label>${rs_tagEditorDec}</label></td>","<td><span class=\"dfTags\" dojoAttachPoint=\"tagEditorNode\"></span></td>","<td></td>","</tr>","<tr class=\"lotusFormFieldRow\">","<td width=\"15%\" class=\"lotusFormLabel\"><label for=\"${id}_description\">${rs_descriptionColon}</label></td>","<td><textarea id=\"${id}_description\" name=\"description\"  dojoAttachPoint=\"descriptionInput\" rows=\"5\" cols=\"20\" class=\"lotusText bidiAware\"></textarea></td>","<td></td>","<tr class=\"lotusFormFieldRow\">","<td width=\"15%\"></td>","<td>","<input type=\"checkbox\" id=\"${id}_autoFollowMark\" title=\"${rs_atuoFollow}\" name=\"autoFollow\" dojoAttachPoint=\"autoFollowMarkNode\" value=\"true\" checked=\"true\"/>","<label for=\"${id}_autoFollowMark\" class=\"lotusCheckbox\">${rs_atuoFollow}</label>","</td>","<td></td>","</tr>","<tr>","<td width=\"15%\" class=\"lotusFormLabel\"><div title=\"Legend\" class=\"lotusFormField lotusMeta lotusIndent10\">${rs_required}</div></td>","<td></td>","<td></td>","</tr>","<tr>","<td colspan=\"3\" class=\"lotusFormFooter\">","<input type=\"submit\" value=\"${rs_save}\" class=\"lotusFormButton\" dojoAttachPoint=\"submitButton\" id=\"addForumButton\" /> <input type=\"button\" value=\"${rs_cancel}\" class=\"lotusFormButton\" dojoAttachEvent=\"onclick:cancel\" />","</td>","</tr>","</tbody></table>","</form>"].join(""),dialogTemplate:["<div class=\"ForumForm\">","<form class=\"lotusForm2\" dojoAttachPoint=\"formNode\" dojoAttachEvent=\"onsubmit:post\" aria-live=\"assertive\" role=\"application\" aria-label=\"${ariaLabel}\">","<input type=\"hidden\" name=\"forumId\" dojoAttachPoint=\"forumIdInput\" />","<input type=\"hidden\" name=\"parentId\" value=\"${parentId}\" dojoAttachPoint=\"parentIdInput\" />","<input type=\"hidden\" name=\"communityId\" value=\"${communityId}\" />","<div class=\"lotusHidden\" dojoAttachPoint=\"formErrorNode\" role=\"alert\">","<div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div></div>","</div>","<fieldset dojoAttachPoint=\"formInputNode\">","<div dojoAttachPoint=\"titleErrorNode\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">","<img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div>","</div>","<div class=\"lotusFormField\">","<label for=\"${id}_name\"><span class=\"lotusFormRequired\">*</span>${rs_nameColon}</label>","<div><input dojoAttachPoint=\"nameInput\" class=\"lotusText bidiAware\" type=\"text\" id=\"${id}_name\" name=\"name\" aria-required=\"true\"  style=\"width:96%\" /></div>","</div>","<div dojoAttachPoint=\"tagErrorNode\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">","<img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"tagErrorMessageNode\"></div>","</div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"tagFieldTR\">","<label for=\"${id}_tag\">${rs_tagEditorDec}</label>","<span id=\"${id}_tag\" dojoAttachPoint=\"tagInput\"></span>","</div>","<div class=\"lotusFormField lotusHidden lotusMeta\" dojoAttachPoint=\"tagEditorTR\">","<label>${rs_tagEditorDec}</label>","<span class=\"dfTags\" dojoAttachPoint=\"tagEditorNode\"></span>","</div>","<div class=\"lotusFormField\">","<label for=\"${id}_description\">${rs_descriptionColon}</label>","<div><textarea id=\"${id}_description\" dojoAttachPoint=\"descriptionInput\" name=\"description\" rows=\"5\" cols=\"20\" class=\"lotusText bidiAware\" style=\"width:96%\"></textarea></div>","</div>","<div title=\"Legend\" class=\"lotusFormField lotusMeta\">${rs_required}</div>","</fieldset>","</form>","</div>"].join(""),tags:"",tagTypeAhead:null,tagEditor:null,contextPath:"",forumId:"",communityId:"",parentId:"",onPost:null,isInlineForm:false,operation:"create",ariaLabel:"",createForumPath:"",updateForumPath:"",tagsPath:"",_tagStore:null,tagSplitToken:",",autoReplace:/[\s\u3000,]+/g,endReplace:/[\s\u3000,]$/g,tagLimitLength:64,disableSubmit:function(){
if(this.isInlineForm){
dojo.addClass(this.submitButton,"lotusBtnDisabled");
this.submitButton.disabled="disabled";
this.submitButton.value=this.rs_loading;
}
},enableSubmit:function(){
if(this.isInlineForm){
dojo.removeClass(this.submitButton,"lotusBtnDisabled");
this.submitButton.disabled="";
this.submitButton.value=this.rs_save;
}
},setSubscribe:function(_1){
var c=this.autoFollowMarkNode;
if(c){
if(_1){
c.removeAttribute("disabled");
c.checked=true;
}else{
c.checked=false;
c.setAttribute("disabled",true);
}
}
},postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
this.templateString=(this.isInlineForm?this.inlineTemplate:this.dialogTemplate);
if(!this.createForumPath){
this.createForumPath=this.contextPath+lconn.forums.Constants.CREATE_FORUM_PATH;
}
if(!this.updateForumPath){
this.updateForumPath=this.contextPath+lconn.forums.Constants.UPDATE_FORUM_PATH;
}
if(!this.tagsPath){
this.tagsPath=this.contextPath+lconn.forums.Constants.GET_TAG_PATH+"?tagType=typeAhead&nodeType=FORUM&communityId="+this.communityId;
}else{
if(this.tagsPath.indexOf("communityId=")<0){
this.tagsPath=this.tagsPath+"&communityId="+this.communityId;
}
}
},postCreate:function postCreate(){
this._tagStore=new lconn.core.TypeAheadDataStore({url:this.tagsPath,queryParam:"partialTagName"});
this.tagTypeAhead=new lconn.core.TypeAhead({minChars:2,searchDelay:400,multipleValues:true,store:this._tagStore,"class":"lotusText forumsTagField",token:" ",hideEmptyResults:true,"name":"tags"},this.tagInput);
this.tagEditor=new lconn.forums.TagEditor({nodeUuid:this.forumId,containerUuid:this.parentId,contextPath:this.contextPath,tags:this.tags,tagClickable:false,onAddTag:dojo.hitch(this,"updateTag"),onRemoveTag:dojo.hitch(this,"updateTag")},this.tagEditorNode);
dojo.attr(this.tagEditor._tagText,"style","width:96%; margin:0");
this.tagTypeAhead.focusNode.value=this.tags;
if(this.operation=="create"){
dojo.removeClass(this.tagFieldTR,"lotusHidden");
}
if(this.operation=="edit"){
dojo.removeClass(this.tagEditorTR,"lotusHidden");
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},updateTag:function(_2){
this.tagTypeAhead.focusNode.value=_2;
this.tags=_2;
},focus:function(){
this.nameInput.focus();
},reset:function(){
this.formNode.reset();
this.forumIdInput.value="";
this.enableSubmit();
},edit:function(_3){
if(_3){
if(_3.uuid){
this.forumIdInput.value=_3.uuid;
}
if(_3.name){
this.nameInput.value=_3.name;
}
if(_3.description){
this.descriptionInput.value=_3.description;
}
if(_3.tags){
this.tagTypeAhead.focusNode.value=_3.tags;
this.tagEditor.reset(_3.tags);
}
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},validate:function validate(){
this.hideErrors();
var _4=false;
if(dojo.string.trim(this.nameInput.value).length==0){
dojo.attr(this.nameInput,"aria-invalid","true");
this.nameInput.focus();
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_nameRequired;
_4=true;
}else{
dojo.attr(this.nameInput,"aria-invalid","false");
}
var _5=this.tagTypeAhead.focusNode.value;
if(_5){
_5=_5.replace(this.autoReplace,this.tagSplitToken);
_5=dojo.string.trim(_5);
var _6=_5.split(this.tagSplitToken);
var _7="";
for(var i=0;i<_6.length;i++){
_7=_6[i];
var _8=lconn.forums.Util.lengthUtf8(_7);
if(_8>this.tagLimitLength){
dojo.removeClass(this.tagErrorNode,"lotusHidden");
var _9=_7.substring(0,60)+"...";
this.tagErrorMessageNode.innerHTML=dojo.string.substitute(this.rs_tagTooLong,[_9,this.tagLimitLength]);
_4=true;
break;
}
}
}
return !_4;
},hideErrors:function(){
dojo.addClass(this.formErrorNode,"lotusHidden");
dojo.addClass(this.titleErrorNode,"lotusHidden");
dojo.addClass(this.tagErrorNode,"lotusHidden");
},showError:function(_a){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+_a+"</span>";
},post:function post(_b){
if(this.validate()){
var _c;
if(this.forumIdInput.value){
_c=this.updateForumPath;
}else{
_c=this.createForumPath;
}
this.disableSubmit();
dojo.xhrPost({url:_c,headers:lconn.forums.Constants.NONCE_HEADER,form:this.formNode,load:dojo.hitch(this,"load"),error:dojo.hitch(this,"postError"),handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,contentType:"application/x-www-form-urlencoded;charset=UTF-8"});
}
if(_b){
dojo.stopEvent(_b);
}
},cancel:function cancel(){
},load:function load(_d,_e){
if(_d.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_d.status)>-1){
this.postError(_d,_e);
}else{
this.postSuccess(_d,_e);
}
},postSuccess:function postSuccess(_f,_10){
if(this.onPost&&_f&&_f.response){
this.onPost(_f.response,_10);
}
},postError:function(_11,_12){
this.enableSubmit();
var _13=dojo.style(this.formInputNode,"width");
dojo.style(this.formErrorNode,"maxWidth",_13+"px");
lconn.forums.Util.ajaxErrorHandler(_11,_12,this.formErrorMessageNode,dojo.hitch(this,"post"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
}});
}


;define("dojo/text!dijit/templates/TreeNode.html", '<div class="dijitTreeNode" role="presentation"\n	><div data-dojo-attach-point="rowNode" class="dijitTreeRow" role="presentation"\n		><span data-dojo-attach-point="expandoNode" class="dijitInline dijitTreeExpando" role="presentation"></span\n		><span data-dojo-attach-point="expandoNodeText" class="dijitExpandoText" role="presentation"></span\n		><span data-dojo-attach-point="contentNode"\n			class="dijitTreeContent" role="presentation">\n			<span role="presentation" class="dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point="iconNode"></span\n			><span data-dojo-attach-point="labelNode,focusNode" class="dijitTreeLabel" role="treeitem" tabindex="-1" aria-selected="false"></span>\n		</span\n	></div>\n	<div data-dojo-attach-point="containerNode" class="dijitTreeNodeContainer" role="presentation" style="display: none;"></div>\n</div>\n');

;define("dojo/text!dijit/templates/Tree.html", '<div role="tree">\n	<div class="dijitInline dijitTreeIndent" style="position: absolute; top: -9999px" data-dojo-attach-point="indentDetector"></div>\n	<div class="dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point="rootLoadingIndicator"></div>\n	<div data-dojo-attach-point="containerNode" class="dijitTreeContainer" role="presentation">\n	</div>\n</div>\n');

;define("dijit/tree/TreeStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(_1,_2,_3,_4){
return _3("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(_5){
_4.mixin(this,_5);
this.connects=[];
var _6=this.store;
if(!_6.getFeatures()["dojo.data.api.Identity"]){
throw new Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");
}
if(_6.getFeatures()["dojo.data.api.Notification"]){
this.connects=this.connects.concat([_2.after(_6,"onNew",_4.hitch(this,"onNewItem"),true),_2.after(_6,"onDelete",_4.hitch(this,"onDeleteItem"),true),_2.after(_6,"onSet",_4.hitch(this,"onSetItem"),true)]);
}
},destroy:function(){
var h;
while(h=this.connects.pop()){
h.remove();
}
},getRoot:function(_7,_8){
if(this.root){
_7(this.root);
}else{
this.store.fetch({query:this.query,onComplete:_4.hitch(this,function(_9){
if(_9.length!=1){
throw new Error("dijit.tree.TreeStoreModel: root query returned "+_9.length+" items, but must return exactly one");
}
this.root=_9[0];
_7(this.root);
}),onError:_8});
}
},mayHaveChildren:function(_a){
return _1.some(this.childrenAttrs,function(_b){
return this.store.hasAttribute(_a,_b);
},this);
},getChildren:function(_c,_d,_e){
var _f=this.store;
if(!_f.isItemLoaded(_c)){
var _10=_4.hitch(this,arguments.callee);
_f.loadItem({item:_c,onItem:function(_11){
_10(_11,_d,_e);
},onError:_e});
return;
}
var _12=[];
for(var i=0;i<this.childrenAttrs.length;i++){
var _13=_f.getValues(_c,this.childrenAttrs[i]);
_12=_12.concat(_13);
}
var _14=0;
if(!this.deferItemLoadingUntilExpand){
_1.forEach(_12,function(_15){
if(!_f.isItemLoaded(_15)){
_14++;
}
});
}
if(_14==0){
_d(_12);
}else{
_1.forEach(_12,function(_16,idx){
if(!_f.isItemLoaded(_16)){
_f.loadItem({item:_16,onItem:function(_17){
_12[idx]=_17;
if(--_14==0){
_d(_12);
}
},onError:_e});
}
});
}
},isItem:function(_18){
return this.store.isItem(_18);
},fetchItemByIdentity:function(_19){
this.store.fetchItemByIdentity(_19);
},getIdentity:function(_1a){
return this.store.getIdentity(_1a);
},getLabel:function(_1b){
if(this.labelAttr){
return this.store.getValue(_1b,this.labelAttr);
}else{
return this.store.getLabel(_1b);
}
},newItem:function(_1c,_1d,_1e){
var _1f={parent:_1d,attribute:this.childrenAttrs[0]},_20;
if(this.newItemIdAttr&&_1c[this.newItemIdAttr]){
this.fetchItemByIdentity({identity:_1c[this.newItemIdAttr],scope:this,onItem:function(_21){
if(_21){
this.pasteItem(_21,null,_1d,true,_1e);
}else{
_20=this.store.newItem(_1c,_1f);
if(_20&&(_1e!=undefined)){
this.pasteItem(_20,_1d,_1d,false,_1e);
}
}
}});
}else{
_20=this.store.newItem(_1c,_1f);
if(_20&&(_1e!=undefined)){
this.pasteItem(_20,_1d,_1d,false,_1e);
}
}
},pasteItem:function(_22,_23,_24,_25,_26){
var _27=this.store,_28=this.childrenAttrs[0];
if(_23){
_1.forEach(this.childrenAttrs,function(_29){
if(_27.containsValue(_23,_29,_22)){
if(!_25){
var _2a=_1.filter(_27.getValues(_23,_29),function(x){
return x!=_22;
});
_27.setValues(_23,_29,_2a);
}
_28=_29;
}
});
}
if(_24){
if(typeof _26=="number"){
var _2b=_27.getValues(_24,_28).slice();
_2b.splice(_26,0,_22);
_27.setValues(_24,_28,_2b);
}else{
_27.setValues(_24,_28,_27.getValues(_24,_28).concat(_22));
}
}
},onChange:function(){
},onChildrenChange:function(){
},onDelete:function(){
},onNewItem:function(_2c,_2d){
if(!_2d){
return;
}
this.getChildren(_2d.item,_4.hitch(this,function(_2e){
this.onChildrenChange(_2d.item,_2e);
}));
},onDeleteItem:function(_2f){
this.onDelete(_2f);
},onSetItem:function(_30,_31){
if(_1.indexOf(this.childrenAttrs,_31)!=-1){
this.getChildren(_30,_4.hitch(this,function(_32){
this.onChildrenChange(_30,_32);
}));
}else{
this.onChange(_30);
}
}});
});


;define("dijit/tree/ForestStoreModel",["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(_1,_2,_3,_4,_5){
return _2("dijit.tree.ForestStoreModel",_5,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(_6){
this.root={store:this,root:true,id:_6.rootId,label:_6.rootLabel,children:_6.rootChildren};
},mayHaveChildren:function(_7){
return _7===this.root||this.inherited(arguments);
},getChildren:function(_8,_9,_a){
if(_8===this.root){
if(this.root.children){
_9(this.root.children);
}else{
this.store.fetch({query:this.query,onComplete:_4.hitch(this,function(_b){
this.root.children=_b;
_9(_b);
}),onError:_a});
}
}else{
this.inherited(arguments);
}
},isItem:function(_c){
return (_c===this.root)?true:this.inherited(arguments);
},fetchItemByIdentity:function(_d){
if(_d.identity==this.root.id){
var _e=_d.scope||_3.global;
if(_d.onItem){
_d.onItem.call(_e,this.root);
}
}else{
this.inherited(arguments);
}
},getIdentity:function(_f){
return (_f===this.root)?this.root.id:this.inherited(arguments);
},getLabel:function(_10){
return (_10===this.root)?this.root.label:this.inherited(arguments);
},newItem:function(_11,_12,_13){
if(_12===this.root){
this.onNewRootItem(_11);
return this.store.newItem(_11);
}else{
return this.inherited(arguments);
}
},onNewRootItem:function(){
},pasteItem:function(_14,_15,_16,_17,_18){
if(_15===this.root){
if(!_17){
this.onLeaveRoot(_14);
}
}
this.inherited(arguments,[_14,_15===this.root?null:_15,_16===this.root?null:_16,_17,_18]);
if(_16===this.root){
this.onAddToRoot(_14);
}
},onAddToRoot:function(_19){
console.log(this,": item ",_19," added to root");
},onLeaveRoot:function(_1a){
console.log(this,": item ",_1a," removed from root");
},_requeryTop:function(){
var _1b=this.root.children||[];
this.store.fetch({query:this.query,onComplete:_4.hitch(this,function(_1c){
this.root.children=_1c;
if(_1b.length!=_1c.length||_1.some(_1b,function(_1d,idx){
return _1c[idx]!=_1d;
})){
this.onChildrenChange(this.root,_1c);
}
})});
},onNewItem:function(_1e,_1f){
this._requeryTop();
this.inherited(arguments);
},onDeleteItem:function(_20){
if(_1.indexOf(this.root.children,_20)!=-1){
this._requeryTop();
}
this.inherited(arguments);
},onSetItem:function(_21,_22,_23,_24){
this._requeryTop();
this.inherited(arguments);
}});
});


;define("dijit/tree/_dndContainer",["dojo/aspect","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/on","dojo/touch"],function(_1,_2,_3,_4,on,_5){
return _2("dijit.tree._dndContainer",null,{constructor:function(_6,_7){
this.tree=_6;
this.node=_6.domNode;
_4.mixin(this,_7);
this.containerState="";
_3.add(this.node,"dojoDndContainer");
this.events=[on(this.node,_5.enter,_4.hitch(this,"onOverEvent")),on(this.node,_5.leave,_4.hitch(this,"onOutEvent")),_1.after(this.tree,"_onNodeMouseEnter",_4.hitch(this,"onMouseOver"),true),_1.after(this.tree,"_onNodeMouseLeave",_4.hitch(this,"onMouseOut"),true),on(this.node,"dragstart, selectstart",function(_8){
_8.preventDefault();
})];
},destroy:function(){
var h;
while(h=this.events.pop()){
h.remove();
}
this.node=this.parent=null;
},onMouseOver:function(_9){
this.current=_9;
},onMouseOut:function(){
this.current=null;
},_changeState:function(_a,_b){
var _c="dojoDnd"+_a;
var _d=_a.toLowerCase()+"State";
_3.replace(this.node,_c+_b,_c+this[_d]);
this[_d]=_b;
},_addItemClass:function(_e,_f){
_3.add(_e,"dojoDndItem"+_f);
},_removeItemClass:function(_10,_11){
_3.remove(_10,"dojoDndItem"+_11);
},onOverEvent:function(){
this._changeState("Container","Over");
},onOutEvent:function(){
this._changeState("Container","");
}});
});


;define("dijit/tree/_dndSelector",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","dojo/dom","dojo/mouse","dojo/on","dojo/touch","../a11yclick","./_dndContainer"],function(_1,_2,_3,_4,_5,_6,_7,on,_8,_9,_a){
return _3("dijit.tree._dndSelector",_a,{constructor:function(){
this.selection={};
this.anchor=null;
this.events.push(on(this.tree.domNode,_8.press,_5.hitch(this,"onMouseDown")),on(this.tree.domNode,_8.release,_5.hitch(this,"onMouseUp")),on(this.tree.domNode,_8.move,_5.hitch(this,"onMouseMove")),on(this.tree.domNode,_9.press,_5.hitch(this,"onClickPress")),on(this.tree.domNode,_9.release,_5.hitch(this,"onClickRelease")));
},singular:false,getSelectedTreeNodes:function(){
var _b=[],_c=this.selection;
for(var i in _c){
_b.push(_c[i]);
}
return _b;
},selectNone:function(){
this.setSelection([]);
return this;
},destroy:function(){
this.inherited(arguments);
this.selection=this.anchor=null;
},addTreeNode:function(_d,_e){
this.setSelection(this.getSelectedTreeNodes().concat([_d]));
if(_e){
this.anchor=_d;
}
return _d;
},removeTreeNode:function(_f){
var _10=_1.filter(this.getSelectedTreeNodes(),function(_11){
return !_6.isDescendant(_11.domNode,_f.domNode);
});
this.setSelection(_10);
return _f;
},isTreeNodeSelected:function(_12){
return _12.id&&!!this.selection[_12.id];
},setSelection:function(_13){
var _14=this.getSelectedTreeNodes();
_1.forEach(this._setDifference(_14,_13),_5.hitch(this,function(_15){
_15.setSelected(false);
if(this.anchor==_15){
delete this.anchor;
}
delete this.selection[_15.id];
}));
_1.forEach(this._setDifference(_13,_14),_5.hitch(this,function(_16){
_16.setSelected(true);
this.selection[_16.id]=_16;
}));
this._updateSelectionProperties();
},_setDifference:function(xs,ys){
_1.forEach(ys,function(y){
y.__exclude__=true;
});
var ret=_1.filter(xs,function(x){
return !x.__exclude__;
});
_1.forEach(ys,function(y){
delete y["__exclude__"];
});
return ret;
},_updateSelectionProperties:function(){
var _17=this.getSelectedTreeNodes();
var _18=[],_19=[],_1a=[];
_1.forEach(_17,function(_1b){
var ary=_1b.getTreePath(),_1c=this.tree.model;
_19.push(_1b);
_18.push(ary);
ary=_1.map(ary,function(_1d){
return _1c.getIdentity(_1d);
},this);
_1a.push(ary.join("/"));
},this);
var _1e=_1.map(_19,function(_1f){
return _1f.item;
});
this.tree._set("paths",_18);
this.tree._set("path",_18[0]||[]);
this.tree._set("selectedNodes",_19);
this.tree._set("selectedNode",_19[0]||null);
this.tree._set("selectedItems",_1e);
this.tree._set("selectedItem",_1e[0]||null);
},onClickPress:function(e){
if(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(e.target,this.current)){
return;
}
if(_7.isLeft(e)){
e.preventDefault();
}
var _20=e.type=="keydown"?this.tree.focusedChild:this.current;
if(!_20){
return;
}
var _21=_2.isCopyKey(e),id=_20.id;
if(!this.singular&&!e.shiftKey&&this.selection[id]){
this._doDeselect=true;
return;
}else{
this._doDeselect=false;
}
this.userSelect(_20,_21,e.shiftKey);
},onClickRelease:function(e){
if(!this._doDeselect){
return;
}
this._doDeselect=false;
this.userSelect(e.type=="keyup"?this.tree.focusedChild:this.current,_2.isCopyKey(e),e.shiftKey);
},onMouseMove:function(){
this._doDeselect=false;
},onMouseDown:function(){
},onMouseUp:function(){
},_compareNodes:function(n1,n2){
if(n1===n2){
return 0;
}
if("sourceIndex" in document.documentElement){
return n1.sourceIndex-n2.sourceIndex;
}else{
if("compareDocumentPosition" in document.documentElement){
return n1.compareDocumentPosition(n2)&2?1:-1;
}else{
if(document.createRange){
var r1=doc.createRange();
r1.setStartBefore(n1);
var r2=doc.createRange();
r2.setStartBefore(n2);
return r1.compareBoundaryPoints(r1.END_TO_END,r2);
}else{
throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");
}
}
}
},userSelect:function(_22,_23,_24){
if(this.singular){
if(this.anchor==_22&&_23){
this.selectNone();
}else{
this.setSelection([_22]);
this.anchor=_22;
}
}else{
if(_24&&this.anchor){
var cr=this._compareNodes(this.anchor.rowNode,_22.rowNode),_25,end,_26=this.anchor;
if(cr<0){
_25=_26;
end=_22;
}else{
_25=_22;
end=_26;
}
var _27=[];
while(_25!=end){
_27.push(_25);
_25=this.tree._getNext(_25);
}
_27.push(end);
this.setSelection(_27);
}else{
if(this.selection[_22.id]&&_23){
this.removeTreeNode(_22);
}else{
if(_23){
this.addTreeNode(_22,true);
}else{
this.setSelection([_22]);
this.anchor=_22;
}
}
}
}
},getItem:function(key){
var _28=this.selection[key];
return {data:_28,type:["treeNode"]};
},forInSelectedItems:function(f,o){
o=o||_4.global;
for(var id in this.selection){
f.call(o,this.getItem(id),id,this);
}
}});
});


;define("dijit/Tree",["dojo/_base/array","dojo/aspect","dojo/_base/connect","dojo/cookie","dojo/_base/declare","dojo/Deferred","dojo/promise/all","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/errors/create","dojo/fx","dojo/has","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/topic","dojo/touch","dojo/when","./a11yclick","./focus","./registry","./_base/manager","./_Widget","./_TemplatedMixin","./_Container","./_Contained","./_CssStateMixin","./_KeyNavMixin","dojo/text!./templates/TreeNode.html","dojo/text!./templates/Tree.html","./tree/TreeStoreModel","./tree/ForestStoreModel","./tree/_dndSelector"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,on,_12,_13,_14,_15,_16,_17,_18,_19,_1a,_1b,_1c,_1d,_1e,_1f,_20,_21,_22,_23){
function _24(d){
return _11.delegate(d.promise||d,{addCallback:function(_25){
this.then(_25);
},addErrback:function(_26){
this.otherwise(_26);
}});
};
var _27=_5("dijit._TreeNode",[_19,_1a,_1b,_1c,_1d],{item:null,isTreeNode:true,label:"",_setLabelAttr:function(val){
this.labelNode[this.labelType=="html"?"innerHTML":"innerText" in this.labelNode?"innerText":"textContent"]=val;
this._set("label",val);
},labelType:"text",isExpandable:null,isExpanded:false,state:"NotLoaded",templateString:_1f,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){
this.inherited(arguments);
this._setExpando();
this._updateItemClasses(this.item);
if(this.isExpandable){
this.labelNode.setAttribute("aria-expanded",this.isExpanded);
}
this.setSelected(false);
},_setIndentAttr:function(_28){
var _29=(Math.max(_28,0)*this.tree._nodePixelIndent)+"px";
_b.set(this.domNode,"backgroundPosition",_29+" 0px");
_b.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",_29);
_1.forEach(this.getChildren(),function(_2a){
_2a.set("indent",_28+1);
});
this._set("indent",_28);
},markProcessing:function(){
this.state="Loading";
this._setExpando(true);
},unmarkProcessing:function(){
this._setExpando(false);
},_updateItemClasses:function(_2b){
var _2c=this.tree,_2d=_2c.model;
if(_2c._v10Compat&&_2b===_2d.root){
_2b=null;
}
this._applyClassAndStyle(_2b,"icon","Icon");
this._applyClassAndStyle(_2b,"label","Label");
this._applyClassAndStyle(_2b,"row","Row");
this.tree._startPaint(true);
},_applyClassAndStyle:function(_2e,_2f,_30){
var _31="_"+_2f+"Class";
var _32=_2f+"Node";
var _33=this[_31];
this[_31]=this.tree["get"+_30+"Class"](_2e,this.isExpanded);
_9.replace(this[_32],this[_31]||"",_33||"");
_b.set(this[_32],this.tree["get"+_30+"Style"](_2e,this.isExpanded)||{});
},_updateLayout:function(){
var _34=this.getParent();
if(!_34||!_34.rowNode||_34.rowNode.style.display=="none"){
_9.add(this.domNode,"dijitTreeIsRoot");
}else{
_9.toggle(this.domNode,"dijitTreeIsLast",!this.getNextSibling());
}
},_setExpando:function(_35){
var _36=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],_37=["*","-","+","*"],idx=_35?0:(this.isExpandable?(this.isExpanded?1:2):3);
_9.replace(this.expandoNode,_36[idx],_36);
this.expandoNodeText.innerHTML=_37[idx];
},expand:function(){
if(this._expandDeferred){
return _24(this._expandDeferred);
}
if(this._collapseDeferred){
this._collapseDeferred.cancel();
delete this._collapseDeferred;
}
this.isExpanded=true;
this.labelNode.setAttribute("aria-expanded","true");
if(this.tree.showRoot||this!==this.tree.rootNode){
this.containerNode.setAttribute("role","group");
}
_9.add(this.contentNode,"dijitTreeContentExpanded");
this._setExpando();
this._updateItemClasses(this.item);
if(this==this.tree.rootNode&&this.tree.showRoot){
this.tree.domNode.setAttribute("aria-expanded","true");
}
var _38=_d.wipeIn({node:this.containerNode,duration:_18.defaultDuration});
var def=(this._expandDeferred=new _6(function(){
_38.stop();
}));
_2.after(_38,"onEnd",function(){
def.resolve(true);
},true);
_38.play();
return _24(def);
},collapse:function(){
if(this._collapseDeferred){
return _24(this._collapseDeferred);
}
if(this._expandDeferred){
this._expandDeferred.cancel();
delete this._expandDeferred;
}
this.isExpanded=false;
this.labelNode.setAttribute("aria-expanded","false");
if(this==this.tree.rootNode&&this.tree.showRoot){
this.tree.domNode.setAttribute("aria-expanded","false");
}
_9.remove(this.contentNode,"dijitTreeContentExpanded");
this._setExpando();
this._updateItemClasses(this.item);
var _39=_d.wipeOut({node:this.containerNode,duration:_18.defaultDuration});
var def=(this._collapseDeferred=new _6(function(){
_39.stop();
}));
_2.after(_39,"onEnd",function(){
def.resolve(true);
},true);
_39.play();
return _24(def);
},indent:0,setChildItems:function(_3a){
var _3b=this.tree,_3c=_3b.model,_3d=[];
var _3e=this.getChildren();
_1.forEach(_3e,function(_3f){
_1b.prototype.removeChild.call(this,_3f);
},this);
this.defer(function(){
_1.forEach(_3e,function(_40){
if(!_40._destroyed&&!_40.getParent()){
_3b.dndController.removeTreeNode(_40);
function _41(_42){
var id=_3c.getIdentity(_42.item),ary=_3b._itemNodesMap[id];
if(ary.length==1){
delete _3b._itemNodesMap[id];
}else{
var _43=_1.indexOf(ary,_42);
if(_43!=-1){
ary.splice(_43,1);
}
}
_1.forEach(_42.getChildren(),_41);
};
_41(_40);
if(_3b.persist){
var _44=_1.map(_40.getTreePath(),function(_45){
return _3b.model.getIdentity(_45);
}).join("/");
for(var _46 in _3b._openedNodes){
if(_46.substr(0,_44.length)==_44){
delete _3b._openedNodes[_46];
}
}
_3b._saveExpandedNodes();
}
_40.destroyRecursive();
}
});
});
this.state="Loaded";
if(_3a&&_3a.length>0){
this.isExpandable=true;
_1.forEach(_3a,function(_47){
var id=_3c.getIdentity(_47),_48=_3b._itemNodesMap[id],_49;
if(_48){
for(var i=0;i<_48.length;i++){
if(_48[i]&&!_48[i].getParent()){
_49=_48[i];
_49.set("indent",this.indent+1);
break;
}
}
}
if(!_49){
_49=this.tree._createTreeNode({item:_47,tree:_3b,isExpandable:_3c.mayHaveChildren(_47),label:_3b.getLabel(_47),labelType:(_3b.model&&_3b.model.labelType)||"text",tooltip:_3b.getTooltip(_47),ownerDocument:_3b.ownerDocument,dir:_3b.dir,lang:_3b.lang,textDir:_3b.textDir,indent:this.indent+1});
if(_48){
_48.push(_49);
}else{
_3b._itemNodesMap[id]=[_49];
}
}
this.addChild(_49);
if(this.tree.autoExpand||this.tree._state(_49)){
_3d.push(_3b._expandNode(_49));
}
},this);
_1.forEach(this.getChildren(),function(_4a){
_4a._updateLayout();
});
}else{
this.isExpandable=false;
}
if(this._setExpando){
this._setExpando(false);
}
this._updateItemClasses(this.item);
var def=_7(_3d);
this.tree._startPaint(def);
return _24(def);
},getTreePath:function(){
var _4b=this;
var _4c=[];
while(_4b&&_4b!==this.tree.rootNode){
_4c.unshift(_4b.item);
_4b=_4b.getParent();
}
_4c.unshift(this.tree.rootNode.item);
return _4c;
},getIdentity:function(){
return this.tree.model.getIdentity(this.item);
},removeChild:function(_4d){
this.inherited(arguments);
var _4e=this.getChildren();
if(_4e.length==0){
this.isExpandable=false;
this.collapse();
}
_1.forEach(_4e,function(_4f){
_4f._updateLayout();
});
},makeExpandable:function(){
this.isExpandable=true;
this._setExpando(false);
},setSelected:function(_50){
this.labelNode.setAttribute("aria-selected",_50?"true":"false");
_9.toggle(this.rowNode,"dijitTreeRowSelected",_50);
},focus:function(){
_16.focus(this.focusNode);
}});
if(_e("dojo-bidi")){
_27.extend({_setTextDirAttr:function(_51){
if(_51&&((this.textDir!=_51)||!this._created)){
this._set("textDir",_51);
this.applyTextDir(this.labelNode);
_1.forEach(this.getChildren(),function(_52){
_52.set("textDir",_51);
},this);
}
}});
}
var _53=_5("dijit.Tree",[_19,_1e,_1a,_1d],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:_20,persist:false,autoExpand:false,dndController:_23,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(_54,_55){
_12.publish(this.id,_11.mixin({tree:this,event:_54},_55||{}));
},postMixInProperties:function(){
this.tree=this;
if(this.autoExpand){
this.persist=false;
}
this._itemNodesMap={};
if(!this.cookieName&&this.id){
this.cookieName=this.id+"SaveStateCookie";
}
this.expandChildrenDeferred=new _6();
this.pendingCommandsPromise=this.expandChildrenDeferred.promise;
this.inherited(arguments);
},postCreate:function(){
this._initState();
var _56=this;
this.own(on(this.containerNode,on.selector(".dijitTreeNode",_13.enter),function(evt){
_56._onNodeMouseEnter(_17.byNode(this),evt);
}),on(this.containerNode,on.selector(".dijitTreeNode",_13.leave),function(evt){
_56._onNodeMouseLeave(_17.byNode(this),evt);
}),on(this.containerNode,on.selector(".dijitTreeRow",_15.press),function(evt){
_56._onNodePress(_17.getEnclosingWidget(this),evt);
}),on(this.containerNode,on.selector(".dijitTreeRow",_15),function(evt){
_56._onClick(_17.getEnclosingWidget(this),evt);
}),on(this.containerNode,on.selector(".dijitTreeRow","dblclick"),function(evt){
_56._onDblClick(_17.getEnclosingWidget(this),evt);
}));
if(!this.model){
this._store2model();
}
this.own(_2.after(this.model,"onChange",_11.hitch(this,"_onItemChange"),true),_2.after(this.model,"onChildrenChange",_11.hitch(this,"_onItemChildrenChange"),true),_2.after(this.model,"onDelete",_11.hitch(this,"_onItemDelete"),true));
this.inherited(arguments);
if(this.dndController){
if(_11.isString(this.dndController)){
this.dndController=_11.getObject(this.dndController);
}
var _57={};
for(var i=0;i<this.dndParams.length;i++){
if(this[this.dndParams[i]]){
_57[this.dndParams[i]]=this[this.dndParams[i]];
}
}
this.dndController=new this.dndController(this,_57);
}
this._load();
this.onLoadDeferred=_24(this.pendingCommandsPromise);
this.onLoadDeferred.then(_11.hitch(this,"onLoad"));
},_store2model:function(){
this._v10Compat=true;
_f.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");
var _58={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};
if(this.params.mayHaveChildren){
_58.mayHaveChildren=_11.hitch(this,"mayHaveChildren");
}
if(this.params.getItemChildren){
_58.getChildren=_11.hitch(this,function(_59,_5a,_5b){
this.getItemChildren((this._v10Compat&&_59===this.model.root)?null:_59,_5a,_5b);
});
}
this.model=new _22(_58);
this.showRoot=Boolean(this.label);
},onLoad:function(){
},_load:function(){
this.model.getRoot(_11.hitch(this,function(_5c){
var rn=(this.rootNode=this.tree._createTreeNode({item:_5c,tree:this,isExpandable:true,label:this.label||this.getLabel(_5c),labelType:this.model.labelType||"text",textDir:this.textDir,indent:this.showRoot?0:-1}));
if(!this.showRoot){
rn.rowNode.style.display="none";
this.domNode.setAttribute("role","presentation");
this.domNode.removeAttribute("aria-expanded");
this.domNode.removeAttribute("aria-multiselectable");
if(this["aria-label"]){
rn.containerNode.setAttribute("aria-label",this["aria-label"]);
this.domNode.removeAttribute("aria-label");
}else{
if(this["aria-labelledby"]){
rn.containerNode.setAttribute("aria-labelledby",this["aria-labelledby"]);
this.domNode.removeAttribute("aria-labelledby");
}
}
rn.labelNode.setAttribute("role","presentation");
rn.containerNode.setAttribute("role","tree");
rn.containerNode.setAttribute("aria-expanded","true");
rn.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular);
}else{
this.domNode.setAttribute("aria-multiselectable",!this.dndController.singular);
this.rootLoadingIndicator.style.display="none";
}
this.containerNode.appendChild(rn.domNode);
var _5d=this.model.getIdentity(_5c);
if(this._itemNodesMap[_5d]){
this._itemNodesMap[_5d].push(rn);
}else{
this._itemNodesMap[_5d]=[rn];
}
rn._updateLayout();
this._expandNode(rn).then(_11.hitch(this,function(){
this.rootLoadingIndicator.style.display="none";
this.expandChildrenDeferred.resolve(true);
}));
}),_11.hitch(this,function(err){
console.error(this,": error loading root: ",err);
}));
},getNodesByItem:function(_5e){
if(!_5e){
return [];
}
var _5f=_11.isString(_5e)?_5e:this.model.getIdentity(_5e);
return [].concat(this._itemNodesMap[_5f]);
},_setSelectedItemAttr:function(_60){
this.set("selectedItems",[_60]);
},_setSelectedItemsAttr:function(_61){
var _62=this;
return this.pendingCommandsPromise=this.pendingCommandsPromise.always(_11.hitch(this,function(){
var _63=_1.map(_61,function(_64){
return (!_64||_11.isString(_64))?_64:_62.model.getIdentity(_64);
});
var _65=[];
_1.forEach(_63,function(id){
_65=_65.concat(_62._itemNodesMap[id]||[]);
});
this.set("selectedNodes",_65);
}));
},_setPathAttr:function(_66){
if(_66.length){
return _24(this.set("paths",[_66]).then(function(_67){
return _67[0];
}));
}else{
return _24(this.set("paths",[]).then(function(_68){
return _68[0];
}));
}
},_setPathsAttr:function(_69){
var _6a=this;
function _6b(_6c,_6d){
var _6e=_6c.shift();
var _6f=_1.filter(_6d,function(_70){
return _70.getIdentity()==_6e;
})[0];
if(!!_6f){
if(_6c.length){
return _6a._expandNode(_6f).then(function(){
return _6b(_6c,_6f.getChildren());
});
}else{
return _6f;
}
}else{
throw new _53.PathError("Could not expand path at "+_6e);
}
};
return _24(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){
return _7(_1.map(_69,function(_71){
_71=_1.map(_71,function(_72){
return _11.isString(_72)?_72:_6a.model.getIdentity(_72);
});
if(_71.length){
return _6b(_71,[_6a.rootNode]);
}else{
throw new _53.PathError("Empty path");
}
}));
}).then(function setNodes(_73){
_6a.set("selectedNodes",_73);
return _6a.paths;
}));
},_setSelectedNodeAttr:function(_74){
this.set("selectedNodes",[_74]);
},_setSelectedNodesAttr:function(_75){
this.dndController.setSelection(_75);
},expandAll:function(){
var _76=this;
function _77(_78){
return _76._expandNode(_78).then(function(){
var _79=_1.filter(_78.getChildren()||[],function(_7a){
return _7a.isExpandable;
});
return _7(_1.map(_79,_77));
});
};
return _24(_77(this.rootNode));
},collapseAll:function(){
var _7b=this;
function _7c(_7d){
var _7e=_1.filter(_7d.getChildren()||[],function(_7f){
return _7f.isExpandable;
}),_80=_7(_1.map(_7e,_7c));
if(!_7d.isExpanded||(_7d==_7b.rootNode&&!_7b.showRoot)){
return _80;
}else{
return _80.then(function(){
return _7b._collapseNode(_7d);
});
}
};
return _24(_7c(this.rootNode));
},mayHaveChildren:function(){
},getItemChildren:function(){
},getLabel:function(_81){
return this.model.getLabel(_81);
},getIconClass:function(_82,_83){
return (!_82||this.model.mayHaveChildren(_82))?(_83?"dijitFolderOpened":"dijitFolderClosed"):"dijitLeaf";
},getLabelClass:function(){
},getRowClass:function(){
},getIconStyle:function(){
},getLabelStyle:function(){
},getRowStyle:function(){
},getTooltip:function(){
return "";
},_onDownArrow:function(evt,_84){
var _85=this._getNext(_84);
if(_85&&_85.isTreeNode){
this.focusNode(_85);
}
},_onUpArrow:function(evt,_86){
var _87=_86.getPreviousSibling();
if(_87){
_86=_87;
while(_86.isExpandable&&_86.isExpanded&&_86.hasChildren()){
var _88=_86.getChildren();
_86=_88[_88.length-1];
}
}else{
var _89=_86.getParent();
if(!(!this.showRoot&&_89===this.rootNode)){
_86=_89;
}
}
if(_86&&_86.isTreeNode){
this.focusNode(_86);
}
},_onRightArrow:function(evt,_8a){
if(_8a.isExpandable&&!_8a.isExpanded){
this._expandNode(_8a);
}else{
if(_8a.hasChildren()){
_8a=_8a.getChildren()[0];
if(_8a&&_8a.isTreeNode){
this.focusNode(_8a);
}
}
}
},_onLeftArrow:function(evt,_8b){
if(_8b.isExpandable&&_8b.isExpanded){
this._collapseNode(_8b);
}else{
var _8c=_8b.getParent();
if(_8c&&_8c.isTreeNode&&!(!this.showRoot&&_8c===this.rootNode)){
this.focusNode(_8c);
}
}
},focusLastChild:function(){
var _8d=this._getLast();
if(_8d&&_8d.isTreeNode){
this.focusNode(_8d);
}
},_getFirst:function(){
return this.showRoot?this.rootNode:this.rootNode.getChildren()[0];
},_getLast:function(){
var _8e=this.rootNode;
while(_8e.isExpanded){
var c=_8e.getChildren();
if(!c.length){
break;
}
_8e=c[c.length-1];
}
return _8e;
},_getNext:function(_8f){
if(_8f.isExpandable&&_8f.isExpanded&&_8f.hasChildren()){
return _8f.getChildren()[0];
}else{
while(_8f&&_8f.isTreeNode){
var _90=_8f.getNextSibling();
if(_90){
return _90;
}
_8f=_8f.getParent();
}
return null;
}
},childSelector:".dijitTreeRow",isExpandoNode:function(_91,_92){
return _8.isDescendant(_91,_92.expandoNode)||_8.isDescendant(_91,_92.expandoNodeText);
},_onNodePress:function(_93,e){
_93.focus();
},__click:function(_94,e,_95,_96){
var _97=e.target,_98=this.isExpandoNode(_97,_94);
if(_94.isExpandable&&(_95||_98)){
this._onExpandoClick({node:_94});
}else{
this._publish("execute",{item:_94.item,node:_94,evt:e});
this[_96](_94.item,_94,e);
this.focusNode(_94);
}
e.stopPropagation();
e.preventDefault();
},_onClick:function(_99,e){
this.__click(_99,e,this.openOnClick,"onClick");
},_onDblClick:function(_9a,e){
this.__click(_9a,e,this.openOnDblClick,"onDblClick");
},_onExpandoClick:function(_9b){
var _9c=_9b.node;
this.focusNode(_9c);
if(_9c.isExpanded){
this._collapseNode(_9c);
}else{
this._expandNode(_9c);
}
},onClick:function(){
},onDblClick:function(){
},onOpen:function(){
},onClose:function(){
},_getNextNode:function(_9d){
_f.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");
return this._getNext(_9d);
},_getRootOrFirstNode:function(){
_f.deprecated(this.declaredClass+"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");
return this._getFirst();
},_collapseNode:function(_9e){
if(_9e._expandNodeDeferred){
delete _9e._expandNodeDeferred;
}
if(_9e.state=="Loading"){
return;
}
if(_9e.isExpanded){
var ret=_9e.collapse();
this.onClose(_9e.item,_9e);
this._state(_9e,false);
this._startPaint(ret);
return ret;
}
},_expandNode:function(_9f){
if(_9f._expandNodeDeferred){
return _9f._expandNodeDeferred;
}
var _a0=this.model,_a1=_9f.item,_a2=this;
if(!_9f._loadDeferred){
_9f.markProcessing();
_9f._loadDeferred=new _6();
_a0.getChildren(_a1,function(_a3){
_9f.unmarkProcessing();
_9f.setChildItems(_a3).then(function(){
_9f._loadDeferred.resolve(_a3);
});
},function(err){
console.error(_a2,": error loading "+_9f.label+" children: ",err);
_9f._loadDeferred.reject(err);
});
}
var def=_9f._loadDeferred.then(_11.hitch(this,function(){
var _a4=_9f.expand();
this.onOpen(_9f.item,_9f);
this._state(_9f,true);
return _a4;
}));
this._startPaint(def);
return def;
},focusNode:function(_a5){
this.focusChild(_a5);
},_onNodeMouseEnter:function(){
},_onNodeMouseLeave:function(){
},_onItemChange:function(_a6){
var _a7=this.model,_a8=_a7.getIdentity(_a6),_a9=this._itemNodesMap[_a8];
if(_a9){
var _aa=this.getLabel(_a6),_ab=this.getTooltip(_a6);
_1.forEach(_a9,function(_ac){
_ac.set({item:_a6,label:_aa,tooltip:_ab});
_ac._updateItemClasses(_a6);
});
}
},_onItemChildrenChange:function(_ad,_ae){
var _af=this.model,_b0=_af.getIdentity(_ad),_b1=this._itemNodesMap[_b0];
if(_b1){
_1.forEach(_b1,function(_b2){
_b2.setChildItems(_ae);
});
}
},_onItemDelete:function(_b3){
var _b4=this.model,_b5=_b4.getIdentity(_b3),_b6=this._itemNodesMap[_b5];
if(_b6){
_1.forEach(_b6,function(_b7){
this.dndController.removeTreeNode(_b7);
var _b8=_b7.getParent();
if(_b8){
_b8.removeChild(_b7);
}
_b7.destroyRecursive();
},this);
delete this._itemNodesMap[_b5];
}
},_initState:function(){
this._openedNodes={};
if(this.persist&&this.cookieName){
var _b9=_4(this.cookieName);
if(_b9){
_1.forEach(_b9.split(","),function(_ba){
this._openedNodes[_ba]=true;
},this);
}
}
},_state:function(_bb,_bc){
if(!this.persist){
return false;
}
var _bd=_1.map(_bb.getTreePath(),function(_be){
return this.model.getIdentity(_be);
},this).join("/");
if(arguments.length===1){
return this._openedNodes[_bd];
}else{
if(_bc){
this._openedNodes[_bd]=true;
}else{
delete this._openedNodes[_bd];
}
this._saveExpandedNodes();
}
},_saveExpandedNodes:function(){
if(this.persist&&this.cookieName){
var ary=[];
for(var id in this._openedNodes){
ary.push(id);
}
_4(this.cookieName,ary.join(","),{expires:365});
}
},destroy:function(){
if(this._curSearch){
this._curSearch.timer.remove();
delete this._curSearch;
}
if(this.rootNode){
this.rootNode.destroyRecursive();
}
if(this.dndController&&!_11.isString(this.dndController)){
this.dndController.destroy();
}
this.rootNode=null;
this.inherited(arguments);
},destroyRecursive:function(){
this.destroy();
},resize:function(_bf){
if(_bf){
_a.setMarginBox(this.domNode,_bf);
}
this._nodePixelIndent=_a.position(this.tree.indentDetector).w||this._nodePixelIndent;
this.expandChildrenDeferred.then(_11.hitch(this,function(){
this.rootNode.set("indent",this.showRoot?0:-1);
this._adjustWidths();
}));
},_outstandingPaintOperations:0,_startPaint:function(p){
this._outstandingPaintOperations++;
if(this._adjustWidthsTimer){
this._adjustWidthsTimer.remove();
delete this._adjustWidthsTimer;
}
var oc=_11.hitch(this,function(){
this._outstandingPaintOperations--;
if(this._outstandingPaintOperations<=0&&!this._adjustWidthsTimer&&this._started){
this._adjustWidthsTimer=this.defer("_adjustWidths");
}
});
_14(p,oc,oc);
},_adjustWidths:function(){
if(this._adjustWidthsTimer){
this._adjustWidthsTimer.remove();
delete this._adjustWidthsTimer;
}
this.containerNode.style.width="auto";
this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%";
},_createTreeNode:function(_c0){
return new _27(_c0);
},focus:function(){
if(this.lastFocusedChild){
this.focusNode(this.lastFocusedChild);
}else{
this.focusFirstChild();
}
}});
if(_e("dojo-bidi")){
_53.extend({_setTextDirAttr:function(_c1){
if(_c1&&this.textDir!=_c1){
this._set("textDir",_c1);
this.rootNode.set("textDir",_c1);
}
}});
}
_53.PathError=_c("TreePathError");
_53._TreeNode=_27;
return _53;
});


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






dojo.declare("lconn.forums.CategoryForumStoreModel",[dijit.tree.ForestStoreModel],{getChildren:function(_1,_2,_3){
if(_1===this.root){
if(this.root.children){
_2(this.root.children);
}else{
this.store.fetch({query:this.query,onComplete:dojo.hitch(this,function(_4){
this.root.children=_4;
_2(_4);
}),onError:_3});
}
}else{
var _5=this.store;
var _6=function _6(_7){
_2(_7);
};
if(!_5.isItemLoaded(_1)){
_5.loadItem({item:_1,onItem:_6,onError:_3});
}
}
},mayHaveChildren:function(_8){
return true;
}});
dojo.declare("lconn.forums.CategoryForumStore",[dojo.data.ItemFileReadStore,dijit._Widget],{contextPath:"",excludeIds:null,isItemLoaded:function(_9){
var _a=this.getValue(_9,"children");
var _b=this.getValue(_9,"type");
if(_b=="continent"&&!_a){
return false;
}
return true;
},loadItem:function(_c){
var _d=this;
var _e=_c.item;
this._assertIsItem(_e);
var _f=this.getValue(_e,"name");
var id=this.getValue(_e,"id");
var _10=_e[this._itemNumPropName];
var _11=this.contextPath+lconn.forums.Constants.GET_ATOM_CATEGORIES_PATH+"?categoryUuid="+id;
var _12=this.excludeIds||[];
var _13=function(_14){
if(_14.status&&_14.status==404){
_e.type=["stub"];
_d._arrayOfAllItems[_10]=_e;
_c.onItem([]);
}else{
var _15=_d.parseChildCategoryFeed(id,_14);
if(_15.length==0){
_e.type=["stub"];
_d._arrayOfAllItems[_10]=_e;
_c.onItem([]);
}else{
if(!_e.children){
_e.children=[];
}
var _16=[];
for(var i=0;i<_15.length;i++){
var _17=_15[i];
if(dojo.indexOf(_12,_17.id[0])==-1){
_e.children.push({_reference:_17.id[0]});
_17[_d._storeRefPropName]=_d;
_17[_d._itemNumPropName]=_d._arrayOfAllItems.length;
_d._arrayOfAllItems.push(_17);
_16.push(_17);
}
}
_d._arrayOfAllItems[_10]=_e;
_c.onItem(_16);
}
}
};
dojo.xhrGet({url:_11,handleAs:"xml",preventCache:true,load:_13,error:_13});
},parseChildCategoryFeed:function(_18,_19){
var _1a=this.getCategoryChildNodes(_19);
if(_1a.length==0){
return [];
}
var _1b=[];
for(var i=0;i<_1a.length;i++){
var _1c={id:[],name:[],type:["continent"]};
var _1d=this.getNodeValueByTagName(_1a[i],"id");
_1c.id=[_1d.substring(_1d.lastIndexOf(":")+1)];
if(_1c.id=="00000000-0000-000000000-000000000006"){
continue;
}
var _1e=this.getNodeValueByTagName(_1a[i],"title");
if(_1e.length>30){
_1c.name=[_1e.substring(0,30)+"..."];
}else{
_1c.name=[_1e];
}
_1b.push(_1c);
}
return _1b;
},getCategoryChildNodes:function(_1f){
var _20=_1f.documentElement.getElementsByTagName("entry");
var _21=[];
for(var i=0;i<_20.length;i++){
var _22=this.getNodeAttributeValueByTagName(_20[i],"category","term");
if(_22=="forum-category"){
_21.push(_20[i]);
}
}
return _21;
},getNodeValueByTagName:function(_23,_24){
return _23.getElementsByTagName(_24)[0].childNodes[0].nodeValue;
},getNodeAttributeValueByTagName:function(_25,_26,_27){
return _25.getElementsByTagName(_26)[0].getAttribute(_27);
}});
}


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






dojo.declare("lconn.forums.CategoryPicker",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lconnDijit\">","<form dojoAttachPoint=\"formNode\" dojoAttachEvent=\"onsubmit:post\" >","<input type=\"hidden\" name=\"parentCategoryId\" dojoAttachPoint=\"treeIdSelect\" />","<input type=\"hidden\" name=\"categoryIds\" dojoAttachPoint=\"categoryIdsInput\" />","<input type=\"hidden\" name=\"forumIds\" dojoAttachPoint=\"forumIdsInput\" />","<input type=\"hidden\" name=\"dangerousurlnonce\" dojoAttachPoint=\"nonceInput\" />","</form>","<div class=\"lotusHidden\" dojoAttachPoint=\"formErrorNode\">","<div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\" />","<span class=\"lotusAltText\">${rs_errorColon}</span> ","<div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div>","</div>","</div>","<div dojoAttachPoint=\"titleErrorNode\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">","<img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\"/>","<span class=\"lotusAltText\">${rs_errorColon}</span> ","<div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div>","</div>","<h3 dojoAttachPoint=\"titleNode\"></h3>","<div class=\"categoryTree\">","<div dojoAttachPoint=\"treeNode\"></div>","</div>","</div>"].join(""),contextPath:"",onPost:null,type:"",selectNode:null,postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function postCreate(){
if(this.type=="category"){
this.titleNode.innerHTML=this.rs_moveCategoryTitle;
}else{
this.titleNode.innerHTML=this.rs_moveForumTitle;
}
this.createTreeDialog();
},putForumsCategories:function putForumsCategories(_1,_2){
if(_1==null){
this.categoryIdsInput.value="";
}else{
this.categoryIdsInput.value=_1.join(",");
}
if(_2==null){
this.forumIdsInput.value="";
}else{
this.forumIdsInput.value=_2.join(",");
}
this.store.excludeIds=_1;
},createTreeDialog:function createTreeDialog(){
this.store=new lconn.forums.CategoryForumStore({contextPath:this.contextPath,data:{label:"name",identifier:"id",items:[{id:"00000000-0000-000000000-000000000005",name:this.rs_root,type:"continent"}]}});
this.treeModel=new lconn.forums.CategoryForumStoreModel({store:this.store,rootId:"root",rootLabel:"rootCategory",query:{"type":"continent"}});
this.treeDijit=new dijit.Tree({model:this.treeModel,onClick:dojo.hitch(this,"treeClick"),getIconClass:this.getCategoryIconClass,showRoot:false,persist:false},this.treeNode);
},postTreeError:function(_3,_4){
lconn.forums.Util.ajaxErrorHandler(_3,_4,this.formErrorMessageNode,dojo.hitch(this,"createTreeDialog"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
},getCategoryIconClass:function getCategoryIconClass(_5,_6){
return "lotusHidden";
},treeClick:function treeClick(_7,_8){
if(this.selectNode){
this.selectNode.style.backgroundColor="";
this.selectNode.style.fontWeight="";
}
this.selectNode=_8.rowNode;
this.selectNode.style.backgroundColor="#cfecff";
this.selectNode.style.fontWeight="bold";
this.treeIdSelect.value=_7.id;
},post:function post(_9){
if(this.validate()){
var _a;
_a=this.contextPath+lconn.forums.Constants.MOVE_PATH;
dojo.xhrPost({url:_a,headers:lconn.forums.Constants.NONCE_HEADER,form:this.formNode,load:dojo.hitch(this,"load"),error:dojo.hitch(this,"postError"),timeout:lconn.forums.Constants.AJAX_TIMEOUT});
}
if(_9){
dojo.stopEvent(_9);
}
},load:function load(_b,_c){
if(dojo.trim(_b)!=""){
_b=eval("("+_b+")");
this.postError(_b,_c);
}else{
this.postSuccess(_b,_c);
}
},validate:function validate(){
this.hideErrors();
var _d=false;
if(this.treeIdSelect.value==""){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_moveCategoryCantBeEmpty;
_d=true;
}
if(this.categoryIdsInput.value!=""){
var _e=this.categoryIdsInput.value.split(",");
for(var i=0;i<_e.length;i++){
if(this.treeIdSelect.value==_e[i]){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_categoryPickerItSelf;
_d=true;
}
}
}
return !_d;
},hideErrors:function(){
dojo.addClass(this.formErrorNode,"lotusHidden");
dojo.addClass(this.titleErrorNode,"lotusHidden");
},showError:function(_f){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+_f+"</span>";
},postSuccess:function postSuccess(_10,_11){
if(this.onPost){
this.onPost(_10.response,_11);
}
},postError:function(_12,_13){
lconn.forums.Util.ajaxErrorHandler(_12,_13,this.formErrorMessageNode,dojo.hitch(this,"post"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
}});
}


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






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


dojo.declare("lconn.forums.FileField",[dijit._Widget,dijit._Templated],{fieldUuid:"",fileName:"",deleteFieldName:"deleteAttachments",newFieldName:"attachments",closeDialogFn:null,isDirty:false,templateString:["<div>","<span class=\"lotusHidden\" dojoAttachPoint=\"fileNode\">","<input type=\"file\" size=\"60\" class=\"lotusLTR lotusAlignLeft forumsFileField\" name=\"${newFieldName}\" dojoAttachPoint=\"fileFieldNode\" />","<input type=\"hidden\" name=\"${deleteFieldName}\" value=\"\" dojoAttachPoint=\"deleteFileNode\" />","</span>","<ul class=\"lotusInlinelist\">","<li class=\"lotusFirst\"><span id=\"{id}_file\" dojoAttachPoint=\"fileNameNode\" class=\"lotusLTR bidiSTT_URL\">${fileName}</span></li>","<li class=\"lotusFirst\"><a aria-describedby=\"{id}_file\" role=\"button\" href=\"javascript:;\" dojoAttachEvent=\"onclick:replace\" class=\"lotusAction\">${rs_replace}</a></li>"," <li><a aria-describedby=\"{id}_file\" role=\"button\" href=\"javascript:;\" dojoAttachEvent=\"onclick:remove\" class=\"lotusAction\">${rs_remove}</a></li>","</ul>","</div>"].join(""),postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function postCreate(){
if(!this.fieldUuid){
this.replace();
}else{
this.isDirty=true;
}
},replace:function replace(_1){
var _2=document.createElement("div");
dojo.place(this.fileFieldNode,_2,"first");
dojo.place(xmlc.UIModification_uploadDisclaimerNode(),_2,"last");
this.closeDialogFn=lconn.forums.Util.popupForm(this.rs_attachFile,_2,xmlc.data.localization.xmlc_rs_upload,this.rs_cancel,dojo.hitch(this,"addFile"),dojo.hitch(this,"cancel")).hide;
if(_1){
dojo.stopEvent(_1);
}
},remove:function remove(){
},addFile:function addFile(){
this.isDirty=true;
this.closeDialogFn();
dojo.place(this.fileFieldNode,this.fileNode,"first");
var _3=this.fileFieldNode.value;
if(_3!=null&&_3!=""){
var _4=_3.lastIndexOf("\\");
if(_4==-1){
_4=_3.lastIndexOf("/");
}
if(_4!=-1&&_4!=_3.length-1){
_3=_3.substring(_4+1);
}
this.fileNameNode.innerHTML=_3;
if(this.fieldUuid&&this.deleteFileNode.value==""){
this.deleteFileNode.value=this.fieldUuid;
}
}else{
this.remove();
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.fileNameNode.parentNode);
},cancel:function cancel(){
this.closeDialogFn();
if(!this.isDirty){
this.remove();
}
}});
}


;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.forums.PostForm"]){
dojo._hasResource["lconn.forums.PostForm"]=true;
dojo.provide("lconn.forums.PostForm");




































dojo.declare("lconn.forums.PostForm",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lotusPostForm lotusPost\">","<div class=\"\">","<form enctype=\"multipart/form-data\" class=\"lotusForm2\" dojoAttachPoint=\"formNode\" method=\"POST\" role=\"application\" aria-label=\"${ariaLabel}\">","<div class=\"lotusFormTitle\"><h2>${rs_newTopic}</h2></div>","<input type=\"hidden\" name=\"communityId\" value=\"${communityUuid}\" dojoAttachPoint=\"communityUuidInput\" />","<input type=\"hidden\" name=\"nodeId\" value=\"\" dojoAttachPoint=\"replyUuidInput\" />","<input type=\"hidden\" name=\"editUuid\" value=\"\" dojoAttachPoint=\"editUuidInput\" />","<input type=\"hidden\" name=\"description\" value=\"\" dojoAttachPoint=\"descriptionInput\" />","<input type=\"hidden\" name=\"parentId\" value=\"\" dojoAttachPoint=\"parentUuidInput\" />","<input type=\"hidden\" name=\"isXHR\" value=\"1\" dojoAttachPoint=\"isXhrInput\" />","<input type=\"hidden\" name=\"isAnswer\" value=\"false\" dojoAttachPoint=\"isAnswerInput\" />","<div class=\"${dialogContentClass}\">","<div class=\"lotusHidden forumError\" dojoAttachPoint=\"formErrorRow\" aria-live=\"assertive\">","<div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\"/><span class=\"lotusAltText\">${rs_errorColon}</span><div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorNode\"></div></div>","</div>","<div class=\"lotusFormBody\">","<div class=\"lotusMessage2 lotusHidden\" dojoAttachPoint=\"titleErrorRow\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorCell\"> </div></div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"titleRow\" style=\"zoom:1\">","<label for=\"${id}_postTitle\"><span class=\"lotusFormRequired\">*</span>${rs_title}</label>","<input class=\"lotusText bidiAware\" id=\"${id}_postTitle\" title=\"${rs_title}\" aria-required=\"true\" type=\"text\" name=\"name\" dojoAttachPoint=\"titleNode\" />","</div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"editTitleRow\">","<a href=\"javascript:;\" class=\"lotusAction\" role=\"button\" dojoAttachEvent=\"onclick:editTitle\">${rs_editReplyTitle}</a>","</div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"questionMarkNodeDiv\">","<input type=\"checkbox\" ${questionCheckedAttr} id=\"${id}_postQestionMark\" title=\"${rs_markQuestion}\" name=\"markAsQuestion\" dojoAttachPoint=\"questionMarkNode\" value=\"true\"/>","<label for=\"${id}_postQestionMark\" class=\"lotusCheckbox\">${rs_markQuestion}</label>","</div>","<div class=\"lotusMessage2 lotusHidden\" dojoAttachPoint=\"tagErrorRow\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lconnSprite lconnSprite-iconError16\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"tagErrorCell\"> </div></div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"tagFieldDiv\" style=\"zoom:1\">","<label for=\"${id}_postTag\">${rs_tagEditorDec}</label>","<span class=\"lotusText\" id=\"${id}_postTag\" dojoAttachPoint=\"tagInput\"></span>","</div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"tagEditorDiv\">","<label>${rs_tagEditorDec}</label>","<span class=\"dfTags\" dojoAttachPoint=\"tagEditorNode\"></span>","</div>","<div class=\"lotusFormField lotusHidden\" dojoAttachPoint=\"insertImageDiv\">","<label >${rs_insImgImageWithColon}</label>","<div class=\"lotusList dfImages\" dojoAttachPoint=\"insertImageNode\"></div>","</div>","<div data-dojo-attach-point=\"attachedFileList\"></div>","<div class=\"lotusMessage2 lotusHidden\" dojoAttachPoint=\"descriptionErrorRow\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"descriptionErrorCell\"> </div></div>","<div class=\"lotusTabContainer\">","<ul class=\"lotusTabs aria_toolbar\" role=\"toolbar\" id=\"editorTab\" aria-controls=\"cke_ckeditor\" aria-label=\"${rs_edit}\">","<li dojoAttachPoint=\"htmlSourceTab\"><span><a href=\"javascript:;\" role=\"button\" dojoAttachEvent=\"onclick:switchToHtmlSourc\" aria-label=\"${rs_htmlSource}\">${rs_htmlSource}</a></span></li>","<li dojoAttachPoint=\"richTextTab\" class=\"lotusSelected\"><span><a href=\"javascript:;\" role=\"button\" dojoAttachEvent=\"onclick:switchToRichText\" aria-label=\"${rs_richText}\">${rs_richText}</a></span></li>","</ul>","</div>","<div class=\"lotusFormField forumTopicDescription\" style=\"overflow:visible\" id=\"cke_ckeditor\"><div name=\"description\" dojoAttachPoint=\"descriptionNode\"></div></div>","<div class=\"lotusMessage2 lotusHidden\" dojoAttachPoint=\"forumErrorRow\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span>  <div class=\"lotusMessageBody\" dojoAttachPoint=\"forumErrorCell\"> </div></div>","<div class=\"lotusFormField ${forumPickerClass}\">","<label for=\"forumsSelection\"><span class=\"lotusFormRequired\">*</span>${rs_forumColon}</label>","<select class=\"lotusHidden bidiAware\" dojoAttachPoint=\"forumsSelect\" id=\"forumsSelection\"></select>","<div dojoAttachPoint=\"forumsLoading\" class=\"lotusLoading\"> </div>","</div>","<div class=\"lotusFormField\" dojoAttachPoint=\"forumInsertedImagesLabelNode\">","<ul class=\"lotusInlinelist lotusForumInsertImageBar\">","<li class=\"lotusFirst\">","<span class=\"lotusInactive\">${insertedImagesLabel}</span>","</li>","<li>","<a href=\"javascript:;\" class=\"lotusAction\" dojoAttachPoint=\"insertImagesDialogBtn\" role=\"button\">${rs_viewImagesLink}</a>","</li>","</ul>","</div>","<div class=\"lotusFormField ${fileUploadClass}\">","<label>${rs_attachmentsColon}</label>","<div dojoAttachPoint=\"attachmentsListNode\"> </div>","<a role=\"button\" href=\"javascript:;\" class=\"lotusAction\" dojoAttachEvent=\"onclick:attachFile\" dojoAttachPoint=\"attachFileNode\">${rs_attachFile}</a>","</div>","<div title=\"Legend\" class=\"lotusMeta lotusIndent10\">${rs_required}</div>","</div></div>","<div class=\"lotusFormFooter\">","<span dojoAttachPoint=\"footerButtonNode\">","<input type=\"button\" class=\"lotusFormButton\" value=\"${rs_save}\" dojoAttachEvent=\"onclick:checkAuth\" id=\"addTopicButton\" />","<input type=\"button\" class=\"lotusFormButton\" value=\"${rs_cancel}\" dojoAttachEvent=\"onclick:cancel\" />","</span>","<span class=\"lotusHidden\" dojoAttachPoint=\"footerLoadingNode\">${rs_loading}</span>","</div>","</form>","</div></div>"].join(""),tags:"",isTopic:false,isAnswer:false,operation:"create",hasQuestionPermission:false,isQuestion:true,questionCheckedAttr:"",ariaLabel:"",tagTypeAhead:null,tagEditor:null,_tagStore:null,autoReplace:/[\s\u3000,]+/g,tagSplitToken:",",endReplace:/[\s\u3000,]$/g,tagLimitLength:64,imagesCount:0,editor:null,jsVar:"",displayName:"",thumbnailPath:"",communityUuid:"",forumUuid:"",topicUuid:"",parentUuid:"",uuid:"",content:"",discussThisPost:"",title:"",showCard:true,xhr:true,contextPath:"",allowUpload:true,titleLimit:256,descriptionLimit:500000,onPost:null,inlineForm:false,attachments:null,newAttachments:[],insertImages:[],forumsPath:"",tagsPath:"",dialogBorderClass:"lotusDialogBorder",dialogContentClass:"lotusDialogContent",dialogFooterClass:"lotusDialogFooter",forumPickerClass:"lotusHidden",fileUploadClass:"lotusHidden",joinCommunity:false,mentions:[],authMentionIds:[],restoreBeforUnload:null,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
if(this.inlineForm){
this.dialogBorderClass="";
this.dialogContentClass="";
this.dialogFooterClass="";
}
if(this.isQuestion){
this.questionCheckedAttr="checked=\"checked\"";
}
if(!this.parentUuid&&!this.uuid){
this.forumPickerClass="";
}
if(this.allowUpload){
this.fileUploadClass="";
}
if(!this.forumsPath){
this.forumsPath=this.contextPath+lconn.forums.Constants.REQUEST_FORUMS_PATH;
}
this.tagsPath=this.contextPath+lconn.forums.Constants.GET_TAG_PATH+"?tagType=typeAhead&nodeType=TOPIC";
if(this.communityUuid&&this.communityUuid!=""){
this.tagsPath=this.tagsPath+"&containerType=COMMUNITY&containerUuid="+this.communityUuid+"&includeExtTagType=PUBLIC";
}else{
this.tagsPath=this.tagsPath+"&containerType=FORUM&containerUuid="+this.parentUuid+"&includeExtTagType=PUBLIC";
}
var _1=this.imagesCount||0;
this.insertedImagesLabel=dojo.string.substitute(_1>1?this.rs_insertImagesLabel_X:this.rs_insertImagesLabel,[_1]);
},postCreate:function(){
this.mentions=[];
this.titleNode.value=this.title;
if(this.isTopic){
dojo.removeClass(this.titleRow,"lotusHidden");
}else{
dojo.removeClass(this.editTitleRow,"lotusHidden");
}
if(this.isTopic==true){
this._tagStore=new lconn.core.TypeAheadDataStore({url:this.tagsPath,queryParam:"partialTagName"});
this.tagTypeAhead=new lconn.core.TypeAhead({minChars:2,searchDelay:400,multipleValues:true,store:this._tagStore,"class":"lotusText",token:" ",hideEmptyResults:true,"name":"tags"},this.tagInput);
this.tagEditor=new lconn.forums.TagEditor({nodeUuid:this.topicUuid,containerUuid:this.forumUuid,contextPath:this.contextPath,tags:this.tags,tagClickable:false,onAddTag:dojo.hitch(this,"updateTag"),onRemoveTag:dojo.hitch(this,"updateTag")},this.tagEditorNode);
this.tagTypeAhead.focusNode.value=this.tags;
if(this.operation=="create"){
dojo.removeClass(this.questionMarkNodeDiv,"lotusHidden");
dojo.removeClass(this.tagFieldDiv,"lotusHidden");
}else{
dojo.removeClass(this.tagEditorDiv,"lotusHidden");
if(this.hasQuestionPermission){
dojo.removeClass(this.questionMarkNodeDiv,"lotusHidden");
}
}
new lconn.core.widget.AttachedFileList({},this.attachedFileList);
}
if(this.showCard){
if(this.thumbnailPath){
}
}
this.titleNode.value=this.title;
lconn.forums.ckeditor.initCKEditorConfig();
var _2=this.insertImages;
var _3=lconn.core.ckplugins.icpublishBinaryData;
if(_3){
var _4=this;
_3.getImageAsBinaryDatacb=dojo.hitch(this,function(){
dojo.removeClass(this.footerLoadingNode,"lotusHidden");
dojo.addClass(this.footerButtonNode,"lotusHidden");
lconn.forums.Util.getImageAsBinaryDatacb.apply(this,arguments);
},function(_5,_6,_7,_8){
var ta=_5.getElementsByTagName("textarea")[0];
var _9=dojo.fromJson(ta.value);
var _a=_9.images[0];
_a.url=lconn.core.url.getServiceUrl(lconn.core.config.services.forums).uri+lconn.forums.Constants.ATTACH_DOWNLOADIMAGE+"?nodeId="+_a.uuid;
_2.push({"name":_8,"uuid":_a.uuid});
dojo.addClass(_4.footerLoadingNode,"lotusHidden");
dojo.removeClass(_4.footerButtonNode,"lotusHidden");
_3.substituteUrlcb(_7,_a.url);
});
dojo.connect(_3,"addCustomConfig",function(){
CKEDITOR.config.ibmFilterPastedDataUriImage=false;
});
}
lconn.core.ckeditor.async(dojo.hitch(this,"onEditorLoaded"));
dojo.subscribe("lconn/microblogging/mention/completed",dojo.hitch(this,"_mentionComplete"));
dojo.subscribe("lconn/microblogging/mention/removed",dojo.hitch(this,"_mentionDelete"));
var _b=this.forumInsertedImagesLabelNode;
dojo.connect(this.insertImagesDialogBtn,"onclick",dojo.hitch(this,function(){
var _c=dojo.getObject(this.jsVar);
if(_c&&_c.listNodeImages){
_c.listNodeImages("reply",this.uuid);
}
}));
if(this.imagesCount==0&&_b){
dojo.addClass(_b,"lotusHidden");
}
if(this.attachments){
var _d;
var _e=this.attachmentsListNode;
for(var i=0;i<this.attachments.length;i++){
_d=document.createElement("div");
_e.appendChild(_d);
this.attachments[i].widget=new lconn.forums.FileField({fieldUuid:this.attachments[i].uuid,fileName:this.attachments[i].name,remove:dojo.hitch(this,"removeExistingAttachment",i)},_d);
}
}
if(!this.parentUuid&&!this.uuid){
this.loadForums();
}
var _f=dojo.byId("editorTab");
if(_f){
new lconn.core.aria.Toolbar(_f);
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
},preventDataLoss:function(){
this.restoreBeforUnload=window.onbeforeunload;
var _10=this;
window.onbeforeunload=function(_11){
try{
if(lconn.forums.Util.needProventDataLoss){
if(_10.editor.checkDirty()){
return _10.rs_leaveTopicConfirm;
}
}else{
lconn.forums.Util.needProventDataLoss=true;
}
}
catch(e){
}
};
},stopPreventDataLoss:function(){
window.onbeforeunload=this.restoreBeforUnload;
},onEditorLoaded:function(){
var _12=this.editor=CKEDITOR.appendTo(this.descriptionNode,{startupFocus:!this.isTopic},"");
this.preventDataLoss();
_12.on("pluginsLoaded",dojo.hitch(this,"_pluginsLoaded"));
var _13=function(_14){
if(_14.indexOf("vcard")>-1){
_14=_14.replace(/(\s|")contenteditable="false"/gi,"$1");
_14=_14.replace(/class=\"fn url hasHover\"/gi,"class=\"fn url\"");
_14=_14.replace(/(\s|")icbizcard_ref="\d+"/gi,"$1");
_14=_14.replace(/(\s|")icbizcard_idx="\d+"/gi,"$1");
_14=_14.replace(/(\s|")aria-label="[^"\r\n]*"/gi,"$1");
}
return _14;
};
_12.setData(_13(this.content));
},editTitle:function(){
var evt=arguments[0]||window.event;
try{
dojo.stopEvent(evt);
}
catch(e){
}
dojo.addClass(this.editTitleRow,"lotusHidden");
dojo.removeClass(this.titleRow,"lotusHidden");
this.titleNode.focus();
},updateTag:function(_15){
this.tagTypeAhead.focusNode.value=_15;
this.tags=_15;
},removeExistingAttachment:function removeExistingAttachment(i){
var _16=document.createElement("input");
_16.type="hidden";
_16.name="deleteAttachments";
_16.value=this.attachments[i].uuid;
this.attachmentsListNode.appendChild(_16);
this.attachments[i].widget.destroyRecursive();
this.attachments[i].widget=null;
this.attachFileNode.focus();
if(arguments.length>1){
var evt=arguments[1];
try{
dojo.stopEvent(evt);
}
catch(e){
}
}
},removeNewAttachment:function removeNewAttachment(i){
this.newAttachments[i].destroyRecursive();
this.newAttachments[i]=null;
this.attachFileNode.focus();
if(arguments.length>1){
var evt=arguments[1];
try{
dojo.stopEvent(evt);
}
catch(e){
}
}
},focus:function(evt){
if(this.isTopic){
this.titleNode.focus();
}
return evt;
},attachFile:function(evt){
var div=document.createElement("div");
this.attachmentsListNode.appendChild(div);
var f=new lconn.forums.FileField({remove:dojo.hitch(this,"removeNewAttachment",this.newAttachments.length)},div);
this.newAttachments.push(f);
dojo.stopEvent(evt);
},_prepareUrl:function(url){
var _17=!!this.communityUuid;
if(_17){
var uri=lconn.share.util.uri.parseUri(url);
var _18=lconn.share.util.uri.parseUri(location.href);
if(uri.scheme!=_18.scheme||uri.authority!=_18.authority){
return _18.scheme+"://"+_18.authority+ibmConfig.proxyURL+url.replace("://","/");
}
}
return url;
},checkAuth:function(){
var url=this._prepareUrl(this.contextPath+"/atom/tags/my");
dojo.xhr("HEAD",{url:url,noStatus:true,load:dojo.hitch(this,function(_19,_1a){
if(200==_1a.xhr.status){
this.post();
}
}),error:dojo.hitch(this,"error")});
},post:function(evt){
if(evt){
dojo.stopEvent(evt);
}
this.hideErrors();
this.mentions=[];
if(!this.validate()){
return false;
}
this.replyUuidInput.value=this.uuid;
if(this.isModeratorEdit){
this.editUuidInput.value=this.uuid;
}
if(this.discussThisPost){
var _1b=dojo.query(".discussThisEditableComment",this.discussThisPost[0])[0];
if(_1b){
_1b.innerHTML=this.editor.getData();
}
this.descriptionInput.value=this.discussThisPost.innerHTML;
}else{
this.descriptionInput.value=this.editor.getData();
}
if(!this.uuid){
this.parentUuidInput.value=this.parentUuid||this.forumsSelect.value;
}
this.isAnswerInput.value=this.isAnswer;
if(this.xhr){
this.isXhrInput.value="1";
dojo.addClass(this.footerButtonNode,"lotusHidden");
dojo.removeClass(this.footerLoadingNode,"lotusHidden");
var _1c=dojo.cookie("X-Update-Nonce");
var _1d=lconn.core.url.getServiceUrl(lconn.core.config.services.forums);
if(!_1c||this.url.indexOf(_1d.toString())==0){
_1c=dojox.uuid.generateTimeBasedUuid();
dojo.cookie("X-Update-Nonce",_1c,{expires:1,path:_1d.path});
}
var _1e=[];
for(var i=0;i<this.insertImages.length;i++){
if(this.insertImages[i]){
_1e.push(this.insertImages[i].uuid);
}
}
var _1f={form:this.formNode,data:{jsVar:this.jsVar,"X-Update-Nonce":_1c,insertImages:_1e,joinCommunity:this.joinCommunity},handleAs:"text"};
if(this.getNumNewAttachments()==0){
_1f.timeout=lconn.forums.Constants.AJAX_TIMEOUT;
}
require(["dojo/request/iframe"],dojo.hitch(this,function(_20){
_20(this._prepareUrl(this.url),_1f).then(dojo.hitch(this,"load"),dojo.hitch(this,"error"));
}));
return false;
}else{
this.isXhrInput.value="";
return true;
}
},load:function load(_21,_22){
var _23=dojo.fromJson(_21);
var _24=_22||{};
if(this.isModeratorEdit){
var url=window.location.href;
if(url.indexOf("?")==-1){
url+="?";
}else{
url+="&";
}
url+="edited=true";
this.stopPreventDataLoss();
window.location.href=url;
return;
}
if(_23.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_23.status)>-1){
this.error(_23,_24);
}else{
this.loadReply(_23.response,_24);
}
},loadReply:function(_25,_26){
if(this.joinCommunity){
var url=window.location.href;
window.location.href=url;
return _25;
}
var _27=com.ibm.ajax.auth;
_26=_26||{};
_26.xhr=_26.xhr||{};
if(!_27.isAuthenticationRequired(_25,_26)&&!(window.IS_FORUMS_AUTHENTICATION_REQUIRED&&IS_FORUMS_AUTHENTICATION_REQUIRED(_25,_26))){
if(this.onPost){
this.onPost(_25,_26);
}
}else{
this.error(_25,_26);
}
if(this.isTopic==true&&this.operation=="edit"){
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
dojo.publish("lconn/forums/tags/editor/reset",[this.tagTypeAhead.focusNode.value]);
}
return _25;
},error:function(_28,_29){
if(_28&&_28.status==403){
var _2a="";
var _2b=dojo.query("[uuid="+this.topicUuid+"] > .lotusPost .forumPostTitle");
if(_2b&&_2b.length>0){
_2a=_2b[0].innerText||_2b[0].textContent;
}
var _2c=dojo.string.substitute(this.rs_errorOperation,[_2a]);
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.ERROR,_2c,this.formErrorRow);
dojo.removeClass(this.formErrorRow,"lotusHidden");
}
_28.currentTargetObj=this;
lconn.forums.Util.ajaxErrorHandler(_28,_29,this.formErrorNode);
var _2d=dojo.isIE&&_28&&_28.number&&_28.number==-2147024891;
var _2e=_28&&(!_28.status&&_28.name=="TypeError");
var _2f=this.newAttachments&&this.newAttachments.length>0;
if(_2d&&_2e&&_2f){
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
this.formErrorNode.innerHTML=rs.rs_fileUploadError;
}
dojo.removeClass(this.formErrorRow,"lotusHidden");
dojo.removeClass(this.footerButtonNode,"lotusHidden");
dojo.addClass(this.footerLoadingNode,"lotusHidden");
_29.args._logIn=dojo.hitch(this,"logIn");
},logIn:function(_30,_31){
var _32=document.createElement("a");
_32.href=_31;
_32.innerHTML=this.rs_logIn;
this.formErrorNode.innerHTML=this.rs_loggedOut;
this.formErrorNode.appendChild(document.createTextNode(" "));
this.formErrorNode.appendChild(_32);
},cancel:function(evt){
this.stopPreventDataLoss();
if(evt){
dojo.stopEvent(evt);
}
},reset:function(){
this.formNode.reset();
this.editor.setData("");
this.descriptionInput.value="";
this.replyUuidInput.value="";
this.parentUuidInput.value="";
this.clearAttachments();
this.mentions=[];
this.hideErrors();
dojo.removeClass(this.footerButtonNode,"lotusHidden");
dojo.addClass(this.footerLoadingNode,"lotusHidden");
dojo.addClass(this.insertImageDiv,"lotusHidden");
},validate:function(){
var _33=true;
this.hideErrors();
if(this.titleNode.value.length==0){
_33=false;
dojo.attr(this.titleNode,"aria-invalid","true");
this.titleNode.focus();
dojo.removeClass(this.titleErrorRow,"lotusHidden");
this.titleErrorCell.innerHTML=this.rs_titleCantBeEmpty;
}else{
if(this.titleNode.value.length>this.titleLimit){
_33=false;
dojo.attr(this.titleNode,"aria-invalid","true");
this.titleNode.focus();
dojo.removeClass(this.titleErrorRow,"lotusHidden");
this.titleErrorCell.innerHTML=dojo.string.substitute(this.rs_titleTooLong,[this.titleLimit]);
}else{
dojo.attr(this.titleNode,"aria-invalid","false");
}
}
var _34=this.editor.getData();
if(_34&&_34.length>this.descriptionLimit){
_33=false;
dojo.removeClass(this.descriptionErrorRow,"lotusHidden");
this.descriptionErrorCell.innerHTML=dojo.string.substitute(this.rs_messageTooLong,[(this.descriptionLimit/1000)+"KB"]);
}
if(this.isTopic){
var _35=this.tagTypeAhead.focusNode.value;
if(_35){
_35=_35.replace(this.autoReplace,this.tagSplitToken);
_35=dojo.string.trim(_35);
var _36=_35.split(this.tagSplitToken);
var _37="";
for(var i=0;i<_36.length;i++){
_37=_36[i];
var _38=lconn.forums.Util.lengthUtf8(_37);
if(_38>this.tagLimitLength){
dojo.removeClass(this.tagErrorRow,"lotusHidden");
var _39=_37.substring(0,60)+"...";
this.tagErrorCell.innerHTML=dojo.string.substitute(this.rs_tagTooLong,[_39,this.tagLimitLength]);
_33=false;
break;
}
}
}
}
if(_33&&((typeof _34=="string"&&dojo.string.trim(_34).length==0)||(dojo.string.trim(this.uuid).length==0&&!this.editor.checkDirty()))&&!this.allowEmptyDescription){
lconn.core.DialogUtil.prompt(this.rs_confirmation,this.rs_emptyPostConfirmation,this.rs_ok,this.rs_cancel,dojo.hitch(this,function(_3a){
if(_3a){
this.allowEmptyDescription=true;
this.post();
}
}));
return false;
}
return _33;
},hideErrors:function(){
dojo.query(".forumError",this.domNode).addClass("lotusHidden");
},showError:function(str){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+str+"</span>";
},clearAttachments:function clearAttachments(){
if(this.attachments){
for(var i=0;i<this.attachments.length;i++){
if(this.attachments[i]&&this.attachments[i].widget){
this.attachments[i].widget.destroyRecursive();
this.attachments[i].widget=null;
}
this.attachments[i]=null;
}
}
for(var i=0;i<this.newAttachments.length;i++){
if(this.newAttachments[i]){
this.newAttachments[i].destroyRecursive();
this.newAttachments[i]=null;
}
}
if(this.insertImages){
for(var i=0;i<this.insertImages.length;i++){
if(this.insertImages[i]&&this.insertImages[i].widget){
this.insertImages[i].widget.destroyRecursive();
this.insertImages[i].widget=null;
}
this.insertImages[i]=null;
}
}
this.newAttachments=[];
this.insertImages=[];
this.attachments=[];
},numAttachments:function getNumAttachments(){
return dojo.query("> div",this.attachmentsListNode).length;
},getNumNewAttachments:function getNumNewAttachments(){
var _3b=0;
for(var i=0;i<this.newAttachments.length;i++){
if(this.newAttachments[i]!=null){
_3b++;
}
}
return _3b;
},loadForums:function(){
dojo.removeClass(this.forumsLoading,"lotusHidden");
dojo.addClass(this.forumsSelect,"lotusHidden");
dojo.xhrGet({url:this.forumsPath,handleAs:"json",content:{communityId:this.communityUuid,json:"true"},load:dojo.hitch(this,"onLoadForums"),headers:lconn.forums.Constants.NONCE_HEADER});
},onLoadForums:function(_3c,_3d){
if(_3c&&_3c.forums){
var _3e,_3f;
for(var i=0;i<_3c.forums.length;i++){
_3e=_3c.forums[i];
_3f=new Option(_3e.name,_3e.id);
try{
this.forumsSelect.add(_3f,null);
}
catch(err){
this.forumsSelect.add(_3f);
}
}
dojo.addClass(this.forumsLoading,"lotusHidden");
dojo.removeClass(this.forumsSelect,"lotusHidden");
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.formNode);
}
},uninitialize:function(){
if(this.editor){
try{
this.editor.destroy();
}
catch(err){
}
}
this.clearAttachments();
},switchToHtmlSourc:function(){
if(this.editor){
if(dojo.isIE){
lconn.forums.Util.needProventDataLoss=false;
}
this.editor.setMode("source");
dojo.addClass(this.htmlSourceTab,"lotusSelected");
dojo.removeClass(this.richTextTab,"lotusSelected");
}
},switchToRichText:function(){
if(this.editor){
if(dojo.isIE){
lconn.forums.Util.needProventDataLoss=false;
}
this.editor.setMode("wysiwyg");
dojo.addClass(this.richTextTab,"lotusSelected");
dojo.removeClass(this.htmlSourceTab,"lotusSelected");
}
},_openInsertImage:function(_40){
var _41=new lconn.forums.ForumInsertImageDialog({contextPath:this.contextPath,editor:this.editor,postForm:this});
_41.show();
if(!dojo.isIE){
_41.filefield.getUIWidget().currentInput.domNode.type="button";
}
},_pluginsLoaded:function(ev){
var _42=this.editor;
if(_42){
_42.addCommand("openInsertImage",{exec:dojo.hitch(this,"_openInsertImage")});
_42.ui.addButton("Image",{label:this.rs_insImgTitle,command:"openInsertImage"});
}
},_mentionComplete:function(_43){
if(_43&&_43.mention){
var _44=dojo.eval("("+_43.mention+")");
this.mentions.push(_44);
var i=0;
var _45=[];
for(i=0;i<this.mentions.length;i++){
_45.push(this.mentions[i].userId);
}
var _46={url:this.contextPath+lconn.forums.Constants.MEMBER_AUTH_CHECK_PATH,headers:{"X-Update-Nonce":"true"},content:{forumUuid:this.forumUuid,communityUuid:this.communityUuid,memberExIds:_45},handleAs:"json",handle:dojo.hitch(this,this.handleMention,_44,_43.remove)};
dojo.xhrGet(_46);
}
return null;
},_mentionDelete:function(_47){
if(_47&&_47.id){
var id=_47.id;
var _48=[];
var _49=dojo.indexOf(this.authMentionIds,id);
if(_49>0){
this.authMentionIds.splice(_49,1);
}
_49=-1;
for(i=0;i<this.mentions.length;i++){
if(id==this.mentions[i].userId){
_49=i;
}else{
if(dojo.indexOf(this.authMentionIds,this.mentions[i].userId)<0){
_48.push(this.mentions[i]);
}
}
}
if(_49>-1){
this.mentions.splice(_49,1);
}
this.showMentionError(_48);
}
},handleMention:function(_4a,_4b,_4c,_4d){
var _4e=_4c.items;
var i=0;
var _4f=[];
this.authMentionIds=[];
for(i=0;i<_4e.length;i++){
this.authMentionIds.push(_4e[i].userid);
}
for(i=0;i<this.mentions.length;i++){
if(dojo.indexOf(this.authMentionIds,this.mentions[i].userId)<0){
_4f.push(this.mentions[i]);
if(_4a.userId==this.mentions[i].userId){
_4b();
}
}
}
this.showMentionError(_4f);
},showMentionError:function(_50){
var _51=this.rs_mentionAuthForumWarning;
for(i=0;i<_50.length;i++){
_51+="<br>"+_50[i].displayName;
}
if(_50.length>0){
var _52=dojo.create("textNode");
_52.innerHTML=_51;
dojo.removeClass(this.formErrorRow,"lotusHidden");
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.WARNING,_52,this.formErrorRow);
}else{
dojo.addClass(this.formErrorRow,"lotusHidden");
}
}});
}


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




















dojo.declare("lconn.forums.PagedList",[dijit._Widget],{tags:null,contextPath:"",uuid:"",view:"",filter:"",topicListTbody:null,previousLink:null,nextLink:null,page:null,ps:null,numPages:null,isPaging:false,listType:null,listUrl:null,isCommunity:false,pageObject:null,initPageHash:null,initPsHash:null,enablePageSizeButton:false,pageSizeHtml:"",sortable:false,sortBy:null,order:null,preSortBy:"",preOrder:"",sorting:false,pageSizeUrls:null,query:null,replyUuid:null,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
if(this.numPages===null){
this.numPages=parseInt(dojo.attr(this.srcNodeRef,"numPages"));
if(!this.numPages){
this.numPages=1;
}
}
if(!this.listType){
this.listType=dojo.attr(this.srcNodeRef,"listType");
}
if(!this.filter){
if(this.listType==lconn.forums.Constants.ListTypes.OPENQUESTIONS){
this.filter=lconn.forums.Constants.ListTypes.OPENQUESTIONS;
}
if(this.listType==lconn.forums.Constants.ListTypes.ANSWEREDQUESTIONS){
this.filter=lconn.forums.Constants.ListTypes.ANSWEREDQUESTIONS;
}
}
if(!this.ps){
this.ps=parseInt(dojo.attr(this.srcNodeRef,"ps"));
this.initPsHash=this.ps;
}
var _1=dojo.hash();
if(!_1||dojo.trim(_1)==""){
if(!this.page){
this.page=parseInt(dojo.attr(this.srcNodeRef,"page"));
}
}else{
if(this.isCommunity){
this.page=this.getHash();
}
}
if(!this.page){
this.page=0;
}
},postCreate:function(){
if(this.sortBy==null&&this.order==null){
this.sortBy="";
this.order="desc";
}else{
if(this.sortBy==null){
this.sortBy="";
}
if(this.order==null){
this.order="desc";
}
this._updatePageSizeUrl();
}
this.preOrder=this.order;
var c=lconn.forums.Constants;
if(!this.listUrl){
if(this.listType==c.ListTypes.FORUMS){
this.listUrl=this.contextPath+lconn.forums.Constants.GET_FORUMS_PATH;
}else{
if(this.listType==c.ListTypes.MYFORUMS){
this.listUrl=this.contextPath+lconn.forums.Constants.GET_MYFORUMS_PATH;
}else{
if(this.listType==c.ListTypes.CATEGORIES){
this.listUrl=this.contextPath+lconn.forums.Constants.GET_CATEGORIES_PATH;
}else{
if(this.listType==c.ListTypes.TOPICS||this.listType==c.ListTypes.OPENQUESTIONS||this.listType==c.ListTypes.ANSWEREDQUESTIONS){
this.listUrl=this.contextPath+lconn.forums.Constants.GET_TOPICS_PATH;
}else{
this.listUrl=this.contextPath+lconn.forums.Constants.GET_REPLIES_PATH;
}
}
}
}
}
lconn.forums.Util.parseDates(this.domNode);
lconn.forums.Util.parseProfileCards(this.domNode);
lconn.forums.Util.parseLikes(this.domNode,this.contextPath,{exid:this.exid,displayName:this.displayName});
lconn.forums.Util.parseAttachments(this.domNode);
var _2=dojo.query("ul.pageSizeButtons",this.domNode);
if(_2&&_2.length>0){
this.enablePageSizeButton=true;
this.pageSizeHtml=_2[0].innerHTML;
}
this._updatePageBar();
if(this._isSortable(this.domNode)){
this._createSortListeners(this.domNode);
}
var _3=this.getHash();
this.initPageHash=this.page;
if(_3!=null&&this.page!=_3){
this.page=_3;
this.pageTo(this.page);
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.domNode);
},_isSortable:function(_4){
var _5=dojo.query(".sortByReplyNum",_4)?dojo.query(".sortByReplyNum",_4)[0]:null;
var _6=dojo.query(".sortByLikeNum",_4)?dojo.query(".sortByLikeNum",_4)[0]:null;
var _7=dojo.query(".sortByLastMod",_4)?dojo.query(".sortByLastMod",_4)[0]:null;
if(_5&&_6&&_7){
this.sortable=true;
}
return this.sortable;
},_createSortListeners:function(_8){
this.preOrder=this.order;
this.preSortBy=this.sortBy;
var _9=dojo.query(".sortByReplyNum",_8)[0];
var _a=dojo.query(".sortByLikeNum",_8)[0];
var _b=dojo.query(".sortByLastMod",_8)[0];
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
var _c=function(_d,_e,_f){
var _10=function(_11,_12){
var _13=dojo.create("span",{className:"lotusAltText"});
var _14=document.createTextNode(_11?" \u25b2 ":" \u25bc ");
_13.appendChild(_14);
_12.appendChild(_13);
};
var _15=function(_16){
var _17=dojo.query("span.lotusAltText",_16);
if(_17&&_17.length>0){
dojo.destroy(_17[0]);
}
};
if(dojo.hasClass(_9,"lotusActiveSort")){
dojo.attr(_9,{"aria-pressed":"true"});
if(_d){
_10(true,_9);
dojo.attr(_9,{"aria-label":rs.rs_clickToSortInDescReplies});
dojo.attr(_9,{"title":rs.rs_sortByReplyNumAsc});
}else{
_10(false,_9);
dojo.attr(_9,{"aria-label":rs.rs_clickToSortInAscReplies});
dojo.attr(_9,{"title":rs.rs_sortByReplyNumDesc});
}
}else{
_15(_9);
dojo.attr(_9,{"aria-pressed":"false"});
dojo.attr(_9,{"aria-label":rs.rs_clickToSortInDescReplies});
dojo.attr(_9,{"title":rs.rs_sortByReplyNum});
}
if(dojo.hasClass(_a,"lotusActiveSort")){
dojo.attr(_a,{"aria-pressed":"true"});
if(_e){
_10(true,_a);
dojo.attr(_a,{"aria-label":rs.rs_clickToSortInDescLikes});
dojo.attr(_a,{"title":rs.rs_sortByLikeNumAsc});
}else{
_10(false,_a);
dojo.attr(_a,{"aria-label":rs.rs_clickToSortInAscLikes});
dojo.attr(_a,{"title":rs.rs_sortByLikeNumDesc});
}
}else{
_15(_a);
dojo.attr(_a,{"aria-pressed":"false"});
dojo.attr(_a,{"aria-label":rs.rs_clickToSortInDescLikes});
dojo.attr(_a,{"title":rs.rs_sortByLikeNum});
}
if(dojo.hasClass(_b,"lotusActiveSort")){
dojo.attr(_b,{"aria-pressed":"true"});
if(_f){
_10(true,_b);
dojo.attr(_b,{"aria-label":rs.rs_clickToSortInDescLatestPost});
dojo.attr(_b,{"title":rs.rs_sortByLastModAsc});
}else{
_10(false,_b);
dojo.attr(_b,{"aria-label":rs.rs_clickToSortInAscLatestPost});
dojo.attr(_b,{"title":rs.rs_sortByLastModDesc});
}
}else{
_15(_b);
dojo.attr(_b,{"aria-pressed":"false"});
dojo.attr(_b,{"aria-label":rs.rs_clickToSortInDescLatestPost});
dojo.attr(_b,{"title":rs.rs_sortByLastMod});
}
};
dojo.connect(_9,"onclick",dojo.hitch(this,"sort",_9,"replyNum"));
dojo.connect(_a,"onclick",dojo.hitch(this,"sort",_a,"likeNum"));
dojo.connect(_b,"onclick",dojo.hitch(this,"sort",_b,"lastMod"));
if(this.sortBy=="replyNum"){
if(this.order=="desc"){
dojo.addClass(_9,"lotusActiveSort lotusDescending");
_c(false,false,false);
}else{
dojo.addClass(_9,"lotusActiveSort lotusAscending");
_c(true,false,false);
}
}else{
if(this.sortBy=="likeNum"){
if(this.order=="desc"){
dojo.addClass(_a,"lotusActiveSort lotusDescending");
_c(false,false,false);
}else{
dojo.addClass(_a,"lotusActiveSort lotusAscending");
_c(false,true,false);
}
}else{
if(this.order=="desc"){
dojo.addClass(_b,"lotusActiveSort lotusDescending");
_c(false,false,false);
}else{
dojo.addClass(_b,"lotusActiveSort lotusAscending");
_c(false,false,true);
}
}
}
},cleanSorts:function(){
var _18=dojo.query(".sortByReplyNum")?dojo.query(".sortByReplyNum")[0]:null;
if(_18){
dojo.removeClass(_18,"lotusActiveSort");
dojo.removeClass(_18,"lotusDescending");
dojo.removeClass(_18,"lotusAscending");
}
var _19=dojo.query(".sortByLikeNum")?dojo.query(".sortByLikeNum")[0]:null;
if(_19){
dojo.removeClass(_19,"lotusActiveSort");
dojo.removeClass(_19,"lotusDescending");
dojo.removeClass(_19,"lotusAscending");
}
var _1a=dojo.query(".sortByLastMod")?dojo.query(".sortByLastMod")[0]:null;
if(_1a){
dojo.removeClass(_1a,"lotusActiveSort");
dojo.removeClass(_1a,"lotusDescending");
dojo.removeClass(_1a,"lotusAscending");
}
},sort:function(_1b,_1c){
if(this.sorting){
return;
}else{
this.sorting=true;
}
this.preSortBy=this.sortBy;
this.sortBy=_1c;
this.preOrder=this.order;
if(dojo.hasClass(_1b,"lotusDescending")){
this.order="asc";
}else{
this.order="desc";
}
this._updatePageSizeUrl();
this.jumpPageTo(0);
},previous:function(){
if(this.page>0){
this.setHash(--this.page);
this.pageTo(this.page);
}
},next:function(){
this.setHash(++this.page);
this.pageTo(this.page);
},jumpPageTo:function(_1d,_1e){
this.page=_1d;
this.setHash(this.page);
this.pageTo(this.page);
if(_1e){
this.replyUuid=_1e;
}
},setHash:function(_1f,_20){
var tp="Pg=";
if(_20=="pagesize"){
tp="Ps=";
}
var _21=dojo.hash();
var _22=this.listType+tp;
var _23;
if(!_21||dojo.trim(_21)==""){
dojo.hash(_22+_1f);
return;
}
var _24=_21.indexOf(_22);
if(_24==-1){
dojo.hash(_21+"&"+_22+_1f);
return;
}
_23=_21.substring(0,_24)+_22+_1f;
var _25=_21.indexOf("&",_24);
if(_25>-1){
_23+=_21.substr(_25);
}
dojo.hash(_23);
},setPgAndPsHash:function(_26,ps){
if(_26!=null&&ps!=null){
var _27=dojo.hash();
var _28;
var _29=this.listType+"Pg=";
var _2a=this.listType+"Ps=";
var _2b,_2c;
if(!_27||dojo.trim(_27)==""){
_28=_29+_26+"&"+_2a+ps;
dojo.hash(_28);
return;
}
_2b=_27.indexOf(_29);
if(_2b==-1){
_28=_27+"&"+_29+_26;
}else{
_28=_27.substring(0,_2b)+_29+_26;
_2c=_27.indexOf("&",_2b);
if(_2c>-1){
_28+=_27.substr(_2c);
}
}
_27=_28;
_2b=_27.indexOf(_2a);
if(_2b==-1){
_28=_27+"&"+_2a+ps;
}else{
_28=_27.substring(0,_2b)+_2a+ps;
_2c=_27.indexOf("&",_2b);
if(_2c>-1){
_28+=_27.substr(_2c);
}
}
dojo.hash(_28);
}else{
return;
}
},getHash:function(_2d){
var _2e=false;
if(_2d=="pagesize"){
_2e=true;
}
var tp="Pg=";
if(_2e){
tp="Ps=";
}
var _2f=dojo.hash();
if(!_2f||dojo.trim(_2f)==""){
if(_2e){
return this.initPsHash;
}else{
return this.initPageHash;
}
}
var _30=this.listType+tp;
var _31=_2f.indexOf(_30);
if(_31==-1){
if(_2e){
return this.initPsHash;
}else{
return this.initPageHash;
}
}
var _32=_2f.indexOf("&",_31);
if(_32==-1){
_32=_2f.length;
}
var val=parseInt(_2f.substring(_31+_30.length,_32));
if(val==undefined&&this.isCommunity&&!_2e&&(this.listType==lconn.forums.Constants.ListTypes.TOPICS||this.listType==lconn.forums.Constants.ListTypes.REPLIES)){
val=this.initPageHash;
}
return val;
},pageTo:function(_33){
if(typeof _33!="number"){
return;
}
if(this.isPaging){
return;
}
var _34={page:_33,sortBy:this.sortBy,order:this.order};
if(this.ps&&this.listType!=lconn.forums.Constants.ListTypes.CATEGORIES){
_34.ps=this.ps;
}else{
if(this.ps){
_34.categoryPs=this.ps;
}
}
if(this.listType==lconn.forums.Constants.ListTypes.MYFORUMS){
_34.view=this.view;
_34.filter=this.filter;
}else{
_34[(this.isCommunity?"communityId":"id")]=this.uuid;
}
if(this.tags!=null){
_34.tags=this.tags;
}
if(this.query!=null){
_34.query=this.query;
}
if(this.listType==lconn.forums.Constants.ListTypes.OPENQUESTIONS||this.listType==lconn.forums.Constants.ListTypes.ANSWEREDQUESTIONS){
_34.filter=this.filter;
}
if(this.listType==lconn.forums.Constants.ListTypes.OPENQUESTIONS){
_34.openQuestionsPs=this.openQuestionsPs;
_34.openQuestionsPg=this.openQuestionsPg;
}
if(this.listType==lconn.forums.Constants.ListTypes.ANSWEREDQUESTIONS){
_34.answeredQuestionsPs=this.answeredQuestionsPs;
_34.answeredQuestionsPg=this.answeredQuestionsPg;
}
this.isPaging=true;
dojo.xhrGet({url:this.listUrl,content:_34,timeout:10000,handleAs:"json",load:dojo.hitch(this,"onPageTo"),error:dojo.hitch(this,"onPageToError")});
},onPageTo:function(_35,_36){
if(_35&&_35.status&&_35.status>=400){
this.onPageToError(_35,_36);
return;
}
this.isPaging=false;
var _37=document.createElement("div");
_37.innerHTML=_35.response;
var _38=this._getPageRangeNodes();
var _39=dojo.query("table",_37);
var _3a=this._getTbody();
var _3b=_39.attr("rangeLow")[0];
var _3c=_39.attr("rangeHigh")[0];
var _3d=_39.attr("rangeTotal")[0];
if(_38){
for(var i=0;i<_38.length;i++){
var _3e=_38[i];
_3e.rangeLow.innerHTML=_3b;
_3e.rangeHigh.innerHTML=_3c;
_3e.rangeTotal.innerHTML=_3d;
}
}
this.numPages=Math.ceil(parseInt(_3d)/this.ps);
this.page=Math.floor(parseInt(_3b)/this.ps);
this._updatePageBar();
if(this.sortable){
this._createSortListeners(_39[0]);
}
if(!_3a){
throw new Exception("Exception: "+this.declaredClass+".onPageTo() couldn't find a table in the topic list.");
return;
}
if(_39.length==0){
throw new Exception("Exception: "+this.declaredClass+".onPageTo() a received malformed HTML response.");
return;
}
parentContainer=_3a.parentNode.parentNode;
dojo.place(_39[0],_3a.parentNode,"before");
if(this.sorting){
this.addFocusOnSort();
}
parentContainer.removeChild(_3a.parentNode);
_3a=null;
_39[0]=null;
this.topicListTbody=null;
lconn.forums.Util.parseDates(this.domNode);
lconn.forums.Util.parseProfileCards(this.domNode);
lconn.forums.Util.parseLikes(this.domNode,this.contextPath,{exid:this.exid,displayName:this.displayName});
lconn.forums.Util.parseAttachments(this.domNode);
lconn.forums.Util.createPostActionsToolbar(this.domNode);
var _3f=dojo.getObject("lconn.profiles.bizCard.bizCard");
if(_3f){
dojo.query(".vcard",_39[0]).forEach(function setProcessTag(_40){
_3f.processTag(_40);
});
}
this.isShowCheckboxes(parentContainer);
if(dojo.isIE&&dojo.isIE<=7){
dojo.query(".dfForumTable td.dfCheckboxAdmin").forEach(function(_41){
dojo.removeClass(_41,"lotusHidden");
dojo.removeClass(_41,"dfCheckboxAdmin");
});
}
if(this.listType==lconn.forums.Constants.ListTypes.REPLIES){
if(this.page==0&&this._getTagNode){
var li=document.createElement("li");
li.innerHTML=_35;
var _42=dojo.query(".lotusPost",li)[0];
var _43=this._getTagNode(_42);
if(_43){
var div=document.createElement("div");
dojo.place(this.tagEditor.domNode,div,"first");
dojo.place(this.tagEditor.domNode,this._getTagNode(),"first");
}
}
if(this.replyUuid!=null){
lconn.forums.Util.focusPost(this.replyUuid);
}
this.replyUuid=null;
}
this.sorting=false;
},addFocusOnSort:function(){
var _44=dojo.query(".sortByReplyNum",this.domNode.parentNode)?dojo.query(".sortByReplyNum",this.domNode.parentNode)[0]:null;
var _45=dojo.query(".sortByLikeNum",this.domNode.parentNode)?dojo.query(".sortByLikeNum",this.domNode.parentNode)[0]:null;
var _46=dojo.query(".sortByLastMod",this.domNode.parentNode)?dojo.query(".sortByLastMod",this.domNode.parentNode)[0]:null;
if(this.sortBy=="replyNum"){
dijit.focus(_44);
}else{
if(this.sortBy=="likeNum"){
dijit.focus(_45);
}else{
dijit.focus(_46);
}
}
},isShowCheckboxes:function(_47){
if(this.pageObject){
if(this.listType==lconn.forums.Constants.ListTypes.CATEGORIES){
var _48=this.pageObject._getCategoryPagedLists()[0];
if(dojo.query("tr",_47).length==1&&this.page==0){
_48.style.display="none";
}else{
_48.style.display="";
}
}else{
if(this.listType==lconn.forums.Constants.ListTypes.FORUMS){
var _49=this.pageObject._getForumPagedLists()[0];
if(dojo.query("tr",_47).length==1&&this.page==0){
_49.style.display="none";
}else{
_49.style.display="";
}
}
}
if(this.pageObject.manageStates){
this.pageObject._showCheckboxes();
}else{
this.pageObject._hideCheckboxes();
}
}
},onPageToError:function(_4a,_4b){
this.sortBy=this.preSortBy;
this.order=this.preOrder;
var rs=dojo.i18n.getLocalization("lconn.forums","strings");
this.isPaging=false;
if(_4a&&_4a.status==401){
var url;
if(_4a.loginUrl){
url=_4a.loginUrl;
}else{
url=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
var _4c=_4a.contextPath?_4a.contextPath:lconn.forums.Constants.CONTEXT_PATH;
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+_4c;
if(this.isCommunity){
window.location.href=url;
return;
}
var _4d=document.createElement("span");
_4d.innerHTML=rs.rs_loggedOut2;
var _4e=document.createElement("a");
_4e.href=url;
_4e.innerHTML=" "+rs.rs_logIn;
_4d.appendChild(_4e);
this.setMessage(lconn.forums.Constants.messageTypes.ERROR,_4d);
this._disableLink(this._getNextLink());
this._disableLink(this._getPreviousLink());
}
this.sorting=false;
},_updatePageBar:function(){
if(this.numPages==1||this.numPages==this.page+1){
this._disableLink(this._getNextLink());
}else{
this._enableLink(this._getNextLink(),dojo.hitch(this,"next"));
}
if(this.page<=0){
this._disableLink(this._getPreviousLink());
}else{
this._enableLink(this._getPreviousLink(),dojo.hitch(this,"previous"));
}
if(this.numPages==1){
this._hideNode(this._getPageListNode());
this._hideNode(this._getPageJumpNode());
}else{
this._createPageList(this._getPageListNode());
this._createPageJump(this._getPageJumpNode());
this._displayNode(this._getPageListNode());
this._displayNode(this._getPageJumpNode());
}
this._updatePageSizes();
},_updatePageSizes:function(){
if(this.enablePageSizeButton){
var _4f=dojo.query("ul.pageSizeButtons",this.domNode)[0];
_4f.innerHTML=this.pageSizeHtml;
var _50=dojo.query("a",_4f);
for(var i=0;i<_50.length;i++){
var ps=dojo.trim(_50[i].innerHTML);
if(this.ps!=ps){
var _51=dojo.hitch(this,function(ps){
this.setPgAndPsHash(0,ps);
},ps);
this.connect(_50[i],"onclick",_51);
}else{
var _52=document.createTextNode(ps);
dojo.place(_52,_50[i],"replace");
}
}
}
},_updatePageSizeUrl:function(){
if(!this.enablePageSizeButton){
var _53=dojo.query("ul.pageSizeUrls",this.domNode)[0];
var _54=dojo.query("a",_53);
var _55=true;
if(this.pageSizeUrls){
_55=false;
}
if(_55){
this.pageSizeUrls=[];
}
for(var i=0;i<_54.length;i++){
if(_55){
this.pageSizeUrls.push(dojo.trim(_54[i].href));
}
var url=this.pageSizeUrls[i]+"&sortBy="+this.sortBy+"&order="+this.order;
_54[i].href=url;
}
}
},_createPageList:function(_56){
if(_56==null){
return;
}
_56.innerHTML="";
var _57=[];
var min=this.page-3;
var max=this.page+3;
for(var i=0;i<this.page;i++){
if(i==0||i>=min){
_57.push(i);
continue;
}
if(i>0&&i<min){
if(min<=2){
_57.push(i);
continue;
}else{
_57.push("...");
i=min-1;
}
}
}
_57.push(this.page);
for(var i=this.page+1;i<this.numPages;i++){
if(i==this.numPages-1||i<=max){
_57.push(i);
continue;
}
if(i>max&&i<this.numPages-1){
if(this.numPages-1-max<=2){
_57.push(i);
continue;
}else{
_57.push("...");
i=this.numPages-2;
}
}
}
var li=dojo.create("li",{"class":"lotusFirst","innerHTML":this.rs_page},_56);
for(var i=0;i<_57.length;i++){
li=dojo.create("li",null,_56);
if(i==0){
dojo.addClass(li,"lotusFirst");
}
if(_57[i]=="..."){
li.innerHTML=_57[i];
continue;
}else{
var pn=_57[i]+1;
var _58=dojo.string.substitute(this.rs_pageList,{0:pn,1:this.numPages});
}
if(_57[i]==this.page){
li.innerHTML="<span title=\""+_58+"\" aria-label=\""+_58+"\">"+pn+"</span>";
continue;
}
dojo.create("a",{"href":"javascript:void(0);","title":_58,"aria-label":_58,"onclick":dojo.hitch(this,this.jumpPageTo,_57[i]),"innerHTML":pn},li);
}
},_createPageJump:function(_59){
if(_59==null){
return;
}
_59.innerHTML="";
var id=dojox.uuid.generateTimeBasedUuid();
var _5a=dojo.string.substitute(this.rs_pageJumpToTitle,{0:1,1:this.numPages});
var _5b="<input type=\"text\" id=\""+id+"\" autocomplete=\"OFF\" title=\""+_5a+"\" aria-label=\""+_5a+"\">";
var _5c=dojo.string.substitute(this.rs_pageJumpTo,{0:"+++",1:this.numPages});
var _5d=_5c.split("+++");
_59.innerHTML=["<form role=\"application\" method=\"get\" action=\"javascript:;\">","<label for=\""+id+"\">",_5d[0],"&nbsp;</label>",_5b,"&nbsp;",_5d[1],"</form>"].join("");
var _5e=dojo.query("input",_59)[0];
_5e.value=this.page+1;
var _5f=dojo.query("form",_59)[0];
dojo.connect(_5f,"onsubmit",dojo.hitch(this,"_jumpTo"));
dijit.setWaiState(_5f,"label",this.rs_pageJumpToLabel);
},_jumpTo:function(evt){
if(this._getPageJumpNode()){
var _60=dojo.query("input",this._getPageJumpNode())[0].value;
if(_60&&typeof _60=="string"){
_60=parseInt(_60);
if(isNaN(_60)){
_60=this.page+1;
}
_60--;
if(_60<0){
_60=0;
}
if(_60>this.numPages-1){
_60=this.numPages-1;
}
this.jumpPageTo(_60);
}
}
},_displayNode:function(_61){
if(_61&&_61.style){
_61.style.display="";
}
},_hideNode:function(_62){
if(_62&&_62.style){
_62.style.display="none";
}
},_disableLink:function(_63){
for(var i=0;_63&&i<_63.length;i++){
var a=dojo.query("a",_63[i]);
if(a.length>0){
_63[i].innerHTML=a[0].innerHTML;
a[0]=null;
}
}
},_enableLink:function(_64,fn){
if(_64&&fn){
for(var i=0;i<_64.length;i++){
if(dojo.query("a",_64[i]).length>0){
return;
}
var a=document.createElement("a");
a.href="javascript:;";
a.onclick=fn;
a.innerHTML=_64[i].innerHTML;
_64[i].innerHTML="";
_64[i].appendChild(a);
}
}
},_getTbody:function(){
if(this.topicListTbody){
return this.topicListTbody;
}
var _65=dojo.query("table tbody",this.domNode);
if(_65.length>0){
return (this.topicListTbody=_65[0]);
}else{
return null;
}
},_getNextLink:function(){
if(this.nextLink){
return this.nextLink;
}
var _66=dojo.query(".lotusNavNext",this.domNode);
if(_66.length>0){
return (this.nextLink=_66);
}else{
return null;
}
},_getPageListNode:function(){
var _67=dojo.query("ul.pageList",this.domNode);
if(_67&&_67.length>0){
return _67[0];
}else{
return null;
}
},_getPageJumpNode:function(){
var _68=dojo.query("div.pageJump",this.domNode);
if(_68&&_68.length>0){
return _68[0];
}else{
return null;
}
},_getPageRangeNodes:function(){
var _69=dojo.query(".forumRangeLow",this.domNode);
var _6a=dojo.query(".forumRangeHigh",this.domNode);
var _6b=dojo.query(".forumRangeTotal",this.domNode);
if(_69.length>0&&_6a.length>0&&_6b.length>0){
var _6c=[];
var _6d=_69.length;
if(_6d>_6a.length){
_6d=_6a.length;
}
if(_6d>_6b.length){
_6d=_6b.length;
}
for(var i=0;i<_6d;i++){
_6c.push({rangeLow:_69[i],rangeHigh:_6a[i],rangeTotal:_6b[i]});
}
return _6c;
}else{
return null;
}
},_getPreviousLink:function(){
if(this.previousLink){
return this.previousLink;
}
var _6e=dojo.query(".lotusNavPrevious",this.domNode);
if(_6e.length>0){
return (this.previousLink=_6e);
}else{
return null;
}
},_getMessageNode:function(){
var _6f=dojo.query(".lotusMessage2",this.domNode);
if(_6f&&_6f.length>0){
return _6f[0];
}else{
return null;
}
},removeMessageNode:function(){
var _70=dojo.query(".lotusMessage2",this.domNode);
if(_70&&_70.length>0){
_70[0].className="lotusMessage2 lotusHidden";
_70[0].innerHTML="";
}
},setMessage:function(_71,_72){
lconn.forums.Util.setMessage(_71,_72,this.domNode);
}});
}


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


dojo.declare("lconn.forums.StartForumMixIn",null,{startForumForm:null,startForum:function(_1){
if(_1){
_1=dojo.fixEvent(_1);
this.startForumButton=_1.target;
}
if(!this.viewNode){
var _2=document.createElement("div");
dojo.place(_2,this.domNode,"before");
dojo.place(this.domNode,_2,"first");
this.viewNode=this.domNode;
this.domNode=_2;
}
dojo.addClass(this.viewNode,"lotusHidden");
if(!this.startForumForm){
var _2=document.createElement("div");
this.domNode.appendChild(_2);
var _3={contextPath:this.contextPath,tagsPath:this.forumTagsPath,createForumPath:this.createForumPath,ariaLabel:this.rs_startForum,isInlineForm:true,onPost:dojo.hitch(this,"onPostForum")};
_3[(this.isCommunity?"communityId":"parentId")]=this.uuid;
this.startForumForm=new lconn.forums.ForumForm(_3,_2);
this.startForumForm.focus();
this.connect(this.startForumForm,"cancel","closeForumForm");
}else{
dojo.removeClass(this.startForumForm.domNode,"lotusHidden");
this.startForumForm.focus();
}
},closeForumForm:function(){
dojo.addClass(this.startForumForm.domNode,"lotusHidden");
dojo.removeClass(this.viewNode,"lotusHidden");
this.startForumForm.reset();
if(this.startForumButton){
this.startForumButton.focus();
}
},onPostForum:function(_4,_5){
if(_4){
location.href=_4;
}else{
throw new Error();
}
}});
}


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


















dojo.requireLocalization("lconn.forums","strings");
dojo.declare("lconn.forums.CategoryView",[dijit._Widget,lconn.forums.StartForumMixIn],{uuid:"",categoryId:"",categoryForm:null,formConnection:null,contextPath:"",tags:"",forumPage:null,categoryPage:null,manageStates:null,categoriesEnabled:true,showForm:null,postMixInProperties:function(){
if(this.showForm===null){
this.showForm=(dojo.attr(this.srcNodeRef,"showForm")=="true"?true:false);
}
if(this.tags===null){
this.tags=dojo.attr(this.srcNodeRef,"tags");
}
},postCreate:function postCreate(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
this.uuid=this.categoryId;
lconn.forums.Util.parseProfileCards(this.domNode);
var _1=this._getForumPagedLists();
var _2=this._getCategoryPagedLists();
this.forumPage=new lconn.forums.PagedList({contextPath:this.contextPath,tags:this.tags,uuid:this.categoryId,pageObject:this,listType:lconn.forums.Constants.ListTypes.FORUMS},_1[0]);
if(this.categoriesEnabled){
this.categoryPage=new lconn.forums.PagedList({contextPath:this.contextPath,tags:this.tags,uuid:this.categoryId,pageObject:this,listType:lconn.forums.Constants.ListTypes.CATEGORIES},_2[0]);
}
if(this.showForm){
this.startForum();
}
this.subscribe("/dojo/hashchange",this.goToPagedListsByHash);
},goToPagedListsByHash:function(){
this.forumPage.pageTo(this.forumPage.getHash());
if(this.categoriesEnabled){
this.categoryPage.pageTo(this.categoryPage.getHash());
}
},manage:function manage(){
dojo.removeClass(this._getManageOnNode(),"lotusHidden");
dojo.addClass(this._getManageOffNode(),"lotusHidden");
this._showCheckboxes();
this.manageStates=true;
},manageOff:function manageOff(){
dojo.addClass(this._getManageOnNode(),"lotusHidden");
dojo.removeClass(this._getManageOffNode(),"lotusHidden");
this._hideCheckboxes();
this.manageStates=false;
},createCategory:function createCategory(){
return this.openCategoryForm();
},openCategoryForm:function openCategoryForm(_3){
if(_3=="00000000-0000-000000000-000000000006"){
lconn.forums.Util.alert(this.rs_warning,dojo.string.substitute(this.rs_checkCommunitEdit,[this._getName(_3)]));
return;
}
if(this.categoryForm){
this.categoryForm.destroyRecursive();
}
this.categoryForm=new lconn.forums.CategoryForm({contextPath:this.contextPath,parentId:this.categoryId,ariaLabel:(_3?this.rs_editCategory:this.rs_newCategory),onPost:dojo.hitch(this,"refreshCategory")});
if(_3){
this.categoryForm.edit({name:this._getName(_3),description:this._getDescription(_3),uuid:_3});
}
var _4=lconn.forums.Util.popupForm((_3?this.rs_editCategory:this.rs_newCategory),this.categoryForm.domNode,this.rs_save,this.rs_cancel,dojo.hitch(this.categoryForm,"post"));
this.categoryForm.enableSubmit=_4.enableSubmit;
this.categoryForm.disableSubmit=_4.disableSubmit;
if(this.formConnection){
dojo.disconnect(this.formConnection);
}
this.formConnection=dojo.connect(this.categoryForm,"postSuccess",_4.hide);
return false;
},createForum:function createForum(){
return this.openForumForm();
},openForumForm:function openForumForm(_5){
if(this.forumForm){
this.forumForm.destroyRecursive();
}
this.forumForm=new lconn.forums.ForumForm({contextPath:this.contextPath,ariaLabel:(_5?this.rs_editForum:this.rs_newForum),parentId:this.categoryId,operation:_5?"edit":"create",onPost:dojo.hitch(this,"refreshForum")});
if(_5){
this.forumForm.edit({name:this._getName(_5),tags:this._getTags(_5),description:this._getDescription(_5),uuid:_5});
}
var _6=lconn.forums.Util.popupForm((_5?this.rs_editForum:this.rs_newForum),this.forumForm.domNode,this.rs_save,this.rs_cancel,dojo.hitch(this.forumForm,"post"));
this.forumForm.enableSubmit=_6.enableSubmit;
this.forumForm.disableSubmit=_6.disableSubmit;
if(this.formConnection){
dojo.disconnect(this.formConnection);
}
this.formConnection=dojo.connect(this.forumForm,"postSuccess",_6.hide);
return false;
},edit:function edit(){
var _7=this._getCheckedForums();
var _8=this._getCheckedCategories();
var _9=_7.length+_8.length;
var _a;
if(_9>1){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkWarningEdit);
}else{
if(_9<1){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkOne);
}else{
if(_7.length==1){
this.openForumForm(_7[0]);
}else{
this.openCategoryForm(_8[0]);
}
}
}
},move:function move(){
var _b=this._getCheckedForums();
var _c=this._getCheckedCategories();
var _d=_b.length+_c.length;
var _e;
if(_d<1){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkOne);
return;
}
for(var i=0;i<_c.length;i++){
if(_c[i]=="00000000-0000-000000000-000000000006"){
lconn.forums.Util.alert(this.rs_warning,dojo.string.substitute(this.rs_checkCommunitMove,[this._getName(_c[i])]));
return;
}
}
if(this.categoryPicker){
this.categoryPicker.destroyRecursive();
}
this.categoryPicker=new lconn.forums.CategoryPicker({contextPath:this.contextPath,onPost:dojo.hitch(this,"onMoveChange"),type:"category"});
this.categoryPicker.putForumsCategories(_c,_b);
var _f=lconn.forums.Util.popupForm(this.rs_move,this.categoryPicker.domNode,this.rs_move,this.rs_cancel,dojo.hitch(this.categoryPicker,"post"));
if(this.formConnection){
dojo.disconnect(this.formConnection);
}
this.formConnection=dojo.connect(this.categoryPicker,"postSuccess",_f.hide);
},onMoveChange:function onMoveChange(_10,_11){
var _12=this._getCheckedForums();
var _13=this._getCheckedCategories();
if(_12.length>0){
this.refreshForum();
}
if(_13.length>0){
this.refreshCategory();
}
messageNode=this._getMessageNode();
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_moveSuccess,messageNode);
},lock:function lock(){
var _14=this._getCheckedForums();
if(_14.length==0){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkForumToLock);
}else{
var _15=dojo.hitch(this,"lockError");
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.LOCK_PATH,content:{forumIds:_14.join(",")},handleAs:"json",headers:lconn.forums.Constants.NONCE_HEADER,load:function(_16,_17){
if(_16&&_16.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_16.status)>-1){
_15(_16,_17);
}else{
var q;
for(var i=0;i<_14.length;i++){
dojo.query("[uuid=\""+_14[i]+"\"]",this.domNode).addClass("forumsLocked");
}
}
},error:_15});
}
},lockError:function(_18,_19){
var _1a=this._getMessageNode();
var _1b=document.createElement("span");
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.ERROR,_1b,_1a);
lconn.forums.Util.ajaxErrorHandler(_18,_19,_1b);
dojo.removeClass(_1a,"lotusHidden");
return;
},unlock:function lock(){
var _1c=this._getCheckedForums();
if(_1c.length==0){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkForumToUnlock);
}else{
var _1d=dojo.hitch(this,"lockError");
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.UNLOCK_PATH,content:{forumIds:_1c.join(",")},headers:lconn.forums.Constants.NONCE_HEADER,handleAs:"json",load:function(_1e,_1f){
if(_1e&&_1e.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_1e.status)>-1){
_1d(_1e,_1f);
}else{
var q;
for(var i=0;i<_1c.length;i++){
dojo.query("[uuid=\""+_1c[i]+"\"]",this.domNode).removeClass("forumsLocked");
}
}
},error:_1d});
}
},del:function del(){
var _20=this._getCheckedForums();
var _21=this._getCheckedCategories();
if(_20.length+_21.length==0){
lconn.forums.Util.alert(this.rs_warning,this.rs_checkOne);
return;
}
var _22=new Array(_21.length);
var _23=new Array(_20.length);
for(var i=0;i<2;i++){
var _24=[_21,_20][i];
var _25=[_22,_23][i];
for(var j=0;j<_24.length;j++){
_25[j]=this._getName(_24[j]);
if(_24[j]=="00000000-0000-000000000-000000000006"){
lconn.forums.Util.alert(this.rs_warning,dojo.string.substitute(this.rs_checkCommunitDelete,[this._getName(_24[j])]));
return;
}
var _26=this._getForumsCount(_24[j]);
var _27=this._getCategoriesCount(_24[j]);
if(_26!="0"||_27!="0"){
lconn.forums.Util.alert(this.rs_warning,dojo.string.substitute(this.rs_nonEmptyCategoryDelete,[this._getName(_24[j])]));
return;
}
}
}
this.confirmDelete=new lconn.forums.ConfirmDelete({url:this.contextPath+lconn.forums.Constants.DELETE_PATH,ariaLabel:this.rs_deleteForumsCategoriesTitle,deleteDone:dojo.hitch(this,"onDelete")});
this.confirmDelete.confirmForumsCategories(_21,_22,_20,_23);
var _28=lconn.forums.Util.popupForm(this.rs_deleteForumsCategoriesTitle,this.confirmDelete.domNode,this.rs_deleteAttachment,this.rs_cancel,dojo.hitch(this.confirmDelete,"post"));
this.confirmDelete.enableSubmit=_28.enableSubmit;
this.confirmDelete.disableSubmit=_28.disableSubmit;
if(this.connection){
dojo.disconnect(this.connection);
}
this.connection=dojo.connect(this.confirmDelete,"deleteDone",_28.hide);
},onDelete:function onDelete(_29,_2a){
var _2b=this._getCheckedForums();
var _2c=this._getCheckedCategories();
if(_2b.length>0){
this.refreshForum();
}
if(_2c.length>0){
this.refreshCategory();
}
messageNode=this._getMessageNode();
lconn.forums.Util.setMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_deleteSuccess,messageNode);
},onCategoryChange:function onCategoryChange(_2d,_2e){
var _2f=this._getCategoriesNode();
var _30=document.createElement("div");
_30.innerHTML=_2d;
if(dojo.query("tr",_30).length==1){
dojo.addClass(_2f,"lotusHidden");
}else{
dojo.removeClass(_2f,"lotusHidden");
}
lconn.forums.Util.parseDates(_30);
lconn.forums.Util.parseProfileCards(_30);
_2f.innerHTML=_30.innerHTML;
this._showCheckboxes();
},onForumChange:function onForumChange(_31,_32){
var _33=this._getForumsNode();
var _34=document.createElement("div");
_34.innerHTML=_31;
if(dojo.query("tr",_34).length==1){
dojo.addClass(_33,"lotusHidden");
}else{
dojo.removeClass(_33,"lotusHidden");
}
lconn.forums.Util.parseDates(_34);
lconn.forums.Util.parseProfileCards(_34);
_33.innerHTML=_34.innerHTML;
this._showCheckboxes();
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
},refreshForum:function refreshForum(){
this._cleanLconnEmptyForum();
this.forumPage.pageTo(this.forumPage.page);
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
},refreshCategory:function refreshCategory(){
this._cleanLconnEmptyCategory();
if(this.categoriesEnabled){
this.categoryPage.pageTo(this.categoryPage.page);
}
},refresh:function refresh(){
this._cleanLconnEmptyForum();
this.forumPage.pageTo(this.forumPage.page);
dojo.publish("com/ibm/lconn/tags/widget/reload",[false]);
if(this.categoriesEnabled){
this._cleanLconnEmptyCategory();
this.categoryPage.pageTo(this.categoryPage.page);
}
},onError:function onError(_35,_36,_37){
var _38=this._getMessageNode();
var _39=document.createElement("span");
_38.innerHTML="";
_38.appendChild(_39);
lconn.forums.Util.ajaxErrorHandler(_35,_36,_39);
dojo.removeClass(_38,"lotusHidden");
},_getCategoriesNode:function _getCategoriesNode(){
var q=dojo.query(".dfCategories",this.domNode);
if(q&&q.length==1){
return q[0];
}else{
throw new Exception(this.declaredClass+"._getCategoriesNode() could not find the category table.");
}
},_getName:function _getName(_3a,_3b){
if(!_3a){
throw new Exception(this.declaredClass+"._getName() requires you pass it an ID");
}
var q=dojo.query("[uuid=\""+_3a+"\"] .dfName",this.domNode);
if(q&&q.length==1){
return (_3b?q[0].innerHTML:(q[0].innerText||q[0].textContent));
}else{
throw new Exception(this.declaredClass+"._getName() could not find the node name.");
}
},_getForumsCount:function _getForumsCount(_3c,_3d){
if(!_3c){
throw new Exception(this.declaredClass+"._getForumsCount() requires you pass it an ID");
}
var q=dojo.query("[uuid=\""+_3c+"\"] .numOfForums",this.domNode);
if(q&&q.length==1){
return (_3d?q[0].innerHTML:(q[0].innerText||q[0].textContent));
}else{
return "0";
}
},_getCategoriesCount:function _getCategoriesCount(_3e,_3f){
if(!_3e){
throw new Exception(this.declaredClass+"._getCategoriesCount() requires you pass it an ID");
}
var q=dojo.query("[uuid=\""+_3e+"\"] .numOfCategories",this.domNode);
if(q&&q.length==1){
return (_3f?q[0].innerHTML:(q[0].innerText||q[0].textContent));
}else{
return "0";
}
},_getTags:function _getTags(_40,_41){
if(!_40){
throw new Exception(this.declaredClass+"._getTags() requires you pass it an ID");
}
var q=dojo.query("[uuid=\""+_40+"\"] .dfTags",this.domNode);
if(q&&q.length==1){
return (_41?q[0].innerHTML:(q[0].innerText||q[0].textContent));
}else{
throw new Exception(this.declaredClass+"._getTags() could not find the node tag.");
}
},_getDescription:function _getDescription(_42){
if(!_42){
throw new Exception(this.declaredClass+"._getDescription() requires you pass it an ID");
}
var q=dojo.query("[uuid=\""+_42+"\"] .dfDescription",this.domNode);
if(q&&q.length==1){
return q[0].innerText||q[0].textContent;
}else{
throw new Exception(this.declaredClass+"._getDescription() could not find the node description.");
}
},_getManageOffNode:function _getManageOffNode(){
var q=dojo.query(".dfManageOff",this.domNode);
if(q&&q.length==1){
return q[0];
}else{
throw new Exception(this.declaredClass+"._getManageOffNode() could not find the action bar.");
}
},_getManageOnNode:function _getManageOnNode(){
var q=dojo.query(".dfManageOn",this.domNode);
if(q&&q.length==1){
return q[0];
}else{
throw new Exception(this.declaredClass+"._getManageOnNode() could not find the action bar.");
}
},_getForumsNode:function _getForumsNode(){
var q=dojo.query(".dfForums",this.domNode);
if(q&&q.length==1){
return q[0];
}else{
throw new Exception(this.declaredClass+"._getForumsNode() could not find the forum table.");
}
},_hideCheckboxes:function _hideCheckboxes(){
this._setCheckboxVisibility(false);
},_showCheckboxes:function _showCheckboxes(){
this._setCheckboxVisibility(true);
},_getCheckedForums:function _getCheckedForums(){
return dojo.query("input[name=\"forumCheckbox\"]:checked",this.domNode).forEach(function(_43,idx,arr){
arr[idx]=_43.value;
});
},_getCheckedCategories:function _getCheckedCategories(){
return dojo.query("input[name=\"categoryCheckbox\"]:checked",this.domNode).forEach(function(_44,idx,arr){
arr[idx]=_44.value;
});
},_setCheckboxVisibility:function _setCheckboxVisibility(_45){
dojo.query(".dfCheckboxAdmin",this.domNode)[_45?"removeClass":"addClass"]("lotusHidden");
},_getMessageNode:function _getMessageNode(){
return dojo.query(".dfMessage",this.domNode)[0];
},_getForumPagedLists:function(){
return dojo.query(".dfForums",this.domNode);
},_getCategoryPagedLists:function(){
return dojo.query(".dfCategories",this.domNode);
},_cleanLconnEmptyForum:function(){
if(dojo.byId("lconnEmptyForum")!=null){
dojo.byId("lconnEmptyForum").innerHTML="";
}
this._cleanLconnEmptyCategory();
},_cleanLconnEmptyCategory:function(){
if(dojo.byId("lconnEmptyCategory")!=null){
dojo.byId("lconnEmptyCategory").innerHTML="";
}
},isCommunitCategory:function(){
}});
}


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


dojo.declare("lconn.forums.ForumPage",[dijit._Widget,dijit._Templated],{templateString:["<div >","<div  dojoAttachPoint=\"forumContents\">","</div>","<div class=\"lotusPaging forumPaging\" role=\"toolbar\" dojoAttachPoint=\"lotusPaging\"><div class=\"lotusLeft\" dojoAttachPoint=\"pageInfo\"></div>","<ul style=\"\" class=\"lotusRight lotusInlinelist\">","<li  ><a href=\"javascript:;\"  dojoAttachPoint=\"previousAttach\">${rs_previous}</a></li>","<li ><a href=\"javascript:;\"   dojoAttachPoint=\"nextAttach\">${rs_next}</a></li>","</ul>","</div>","<span aria-live=\"polite\" class=\"lotusOffScreen\" id=\"selectedForum\"></span>","</div>"].join(""),contextPath:"",categoryId:"",onPost:null,rs_previous:"",rs_next:"",rs_tagDialogPageInfo:"",page:1,numPerPage:10,total:"",totalPage:"",forumPicker:null,trObject:null,communityId:"",movedForumUuid:"",postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function postCreate(){
this.postMixInProperties();
var _1=dojo.query("li",this.lotusPaging)[0];
dojo.connect(dojo.query("a",_1)[0],"onclick",this,this.previous);
var _2=dojo.query("li",this.lotusPaging)[1];
dojo.connect(dojo.query("a",_2)[0],"onclick",this,this.next);
this.requestForums();
},requestForums:function(){
var _3=this.contextPath+lconn.forums.Constants.REQUEST_FORUMS_PATH;
dojo.xhrPost({url:_3,headers:lconn.forums.Constants.NONCE_HEADER,content:{parentCategoryId:this.categoryId,currentPgae:this.page,numPerPage:this.numPerPage,communityId:this.communityId,movedForumUuid:this.movedForumUuid},load:dojo.hitch(this,"requestForumsCallBack"),error:dojo.hitch(this,"postError"),handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,contentType:"application/x-www-form-urlencoded;charset=UTF-8"});
},postError:function(_4,_5){
_4.noTextInput="true";
lconn.forums.Util.ajaxErrorHandler(_4,_5,this.forumPicker.formErrorMessageNode,dojo.hitch(this,"requestForums"));
dojo.addClass(this.forumPicker.titleNode,"lotusHidden");
dojo.addClass(this.forumPicker.forumTable,"lotusHidden");
this.forumPicker.lotusDialogFooter.innerHTML="";
dojo.removeClass(this.forumPicker.formErrorNode,"lotusHidden");
},requestForumsCallBack:function(_6,_7){
if(_6.status==200){
this.forumPicker.hideErrors();
this.updatePageNumber(_6.total);
this.forumContents.innerHTML=_6.response;
this.connectEvent();
this.enforceTextDirection();
this.addForumTableAria();
}else{
this.postError(_6,_7);
}
},previous:function(){
this.page--;
this.requestForums();
},next:function(){
this.page++;
this.requestForums();
},updatePageNumber:function(_8){
this.total=_8;
this.totalPage=Math.ceil(this.total/this.numPerPage);
this.updateFooter();
},addForumTableAria:function(){
var _9;
if(this.total==1){
_9=dojo.string.substitute(this.rs_topicMoveDialogForumTableAriaSingle,[this.total]);
}else{
_9=dojo.string.substitute(this.rs_topicMoveDialogForumTableAriaMul,[this.total]);
}
dojo.attr(this.forumPicker.forumTable,{"aria-label":_9});
},updateFooter:function(){
var _a=this.pageInfo;
var v1=1+(this.page-1)*this.numPerPage;
var v2=this.page*this.numPerPage<this.total?this.page*this.numPerPage:this.total;
var v3=this.total;
if(v3==0){
v1=0;
}
_a.innerHTML=dojo.string.substitute(this.rs_tagDialogPageInfo,[v1,v2,v3]);
var _b=dojo.query("li",this.lotusPaging)[0];
var _c=dojo.query("li",this.lotusPaging)[1];
if(this.page>1){
dojo.addClass(_b,"lotusFirst");
_b.style.display="inline";
}else{
_b.style.display="none";
}
if(this.page==1){
dojo.addClass(_c,"lotusFirst");
}else{
dojo.removeClass(_c,"lotusFirst");
}
if(this.page<this.totalPage){
_c.style.display="inline";
}else{
_c.style.display="none";
}
},enforceTextDirection:function(){
var _d=dojo.query(".lotusFirstCell, .lotusLastCell",this.forumContents);
for(var i=0;i<_d.length;i++){
var _e=_d[i];
var _f=_e.innerText||_e.textContent;
_e.innerText=_e.textContent=lconn.core.globalization.bidiUtil.enforceTextDirection(_f);
}
},connectEvent:function(){
for(var i=1;i<dojo.query("tr",this.forumContents).length;i++){
var _10=dojo.query("tr",this.forumContents)[i];
var _11=dojo.attr(_10,"uuid");
var _12=dojo.query(".forumsName",_10)[0];
var _13=_12.innerText||_12.textContent;
dojo.connect(_10,"onclick",dojo.hitch(this,"onForumTableClick",_10,_11,_13));
dojo.connect(_10,"onkeydown",function(fn,tr,_14,_15){
return function(evt){
if(evt.keyCode==13){
fn(tr,_14,_15);
}
};
}(dojo.hitch(this,"onForumTableClick"),_10,_11,_13));
var _16="";
var _17=this.lotusPaging;
dojo.connect(_10,"onkeydown",function(fn,tr,_18,_19,_1a){
return function(evt){
fn(tr,_18,_19,evt.keyCode);
if(evt.keyCode==38||evt.keyCode==40){
dojo.stopEvent(evt);
}
};
}(dojo.hitch(this,"onForumTableKey"),_10,_11,_13,_16));
dojo.connect(_10,"onfocus",dojo.hitch(this,"onfocusElement",_10));
}
},onfocusElement:function(_1b){
var _1c=_1b.rowIndex*1;
var _1d=dojo.query("table",this.forumContents)[0];
if(_1b&&dojo.attr(_1b,"aria-selected")==="true"){
this.setSelectedForum(this.forumPicker.forumName);
}
},onForumTableClick:function(_1e,_1f,_20){
if(this.trObject!=null){
this.trObject.style.backgroundColor="";
dojo.attr(this.trObject,{"aria-selected":"false"});
dojo.query("td",this.trObject).forEach(function(obj){
obj.style.fontWeight="";
});
}
this.trObject=_1e;
this.trObject.style.backgroundColor="#cfecff";
dojo.attr(this.trObject,{"aria-selected":"true"});
dojo.query("td",this.trObject).forEach(function(obj){
obj.style.fontWeight="bold";
});
this.forumPicker.forumId=_1f;
this.forumPicker.forumName=_20;
this.setSelectedForum(_20);
},setSelectedForum:function(_21){
var _22=dojo.string.substitute(this.rs_moveTopicForumSelected,[_21]);
dojo.query("#selectedForum",this.forumPicker.domNode)[0].innerHTML=_22;
},onForumTableKey:function(_23,_24,_25,_26){
var _27=_23.rowIndex*1;
var _28=dojo.query("table",this.forumContents)[0];
if(_26==38){
if(_27==1){
return;
}else{
_28.rows[_27-1].focus();
}
}
if(_26==40){
if(_27==_28.rows.length-1){
return;
}else{
_28.rows[_27+1].focus();
}
}
}});
}


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








dojo.declare("lconn.forums.ForumPicker",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lotusDialogBorder\" style=\"max-width:450px\">","<div class=\"lotusDialog\" style=\"zoom:1\" role=\"dialog\" aria-labelledby=\"${id}_title\" aria-describedby=\"${id}_content\" waistate=\"${id}_title\">","<div class=\"lotusDialogHeader\">","<h1 class=\"lotusHeading\"><span id=\"${id}_title\" class=\"title\">${rs_titleForPicker}</span></h1>","<a role=\"button\" href=\"javascript:;\" class=\"lotusDialogClose\" title=\"${rs_close}\">","<img src=\"${blankGif}\" aria-label=\"${rs_close}\" alt=\"${rs_close}\" />","<span class=\"lotusAltText\">X</span>","</a>","</div>","<div id=\"${id}_content\" class=\"lotusDialogContent\">","<div class=\"lconnDijit\">","<div class=\"lotusBreakWord lotusHidden\" dojoAttachPoint=\"formErrorNode\" style=\"max-width:400px\">","<div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\" />","<span class=\"lotusAltText\">${rs_errorColon}</span> ","<div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div>","</div>","</div>","<div dojoAttachPoint=\"titleErrorNode\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">","<img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" title=\"${rs_error}\" />","<span class=\"lotusAltText\">${rs_errorColon}</span> ","<div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div>","</div>","<h3 dojoAttachPoint=\"titleNode\" id=\"forumPickerTitle\"></h3>","<h3 dojoAttachPoint=\"selectLabelNode\"></h3>","<div class=\"moveTopicTree\" dojoAttachPoint=\"moveTopicTree\">","<div dojoAttachPoint=\"treeNode\"></div>","</div>","<div dojoAttachPoint=\"forumTable\"></div>","</div>","</div>","<div dojoAttachPoint=\"lotusDialogFooter\" class=\"lotusDialogFooter\">","<table ><tbody><tr><td align=\"left\" width=\"95%\"><input type=\"button\" class=\"cancel lotusFormButton\" value=\"${rs_close}\"></td><td align=\"right\"><input value=\"${rs_next}\"  class=\"lotusFormButton submit\" type=\"button\"></td></tr></tbody></table>","</div>","</div>","</div>"].join(""),contextPath:"",onPost:null,topicName:"",categoryId:"",forumId:"",forumName:"",forumPage:null,haveCategory:true,rs_titleForPicker:"Move Topic",blankGif:dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif?etag=20171105.220517"),dialog:null,communityId:"",rs_buttonText:"",movedForumUuid:"",selectNode:null,postMixInProperties:function postMixInProperties(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function postCreate(){
if(this.rs_buttonText!=""){
this.rs_move=this.rs_buttonText;
}
if(this.topicName!=""){
var _1=dojo.string.substitute(this.rs_moveTopicTitle,[lconn.core.globalization.bidiUtil.enforceTextDirection(this.topicName)]);
if(this.titleNode.innerText==null){
this.titleNode.textContent=_1;
}else{
this.titleNode.innerText=_1;
}
}
if(this.haveCategory==true&&this.communityId==""){
this.selectLabelNode.innerHTML=this.rs_selectCategory;
this.createTreeDialog();
}else{
dojo.addClass(this.moveTopicTree,"lotusHidden");
dojo.addClass(this.selectLabelNode,"lotusHidden");
var _2=new lconn.forums.ForumPage({contextPath:this.contextPath,categoryId:this.categoryId,communityId:this.communityId,forumPicker:this,movedForumUuid:this.movedForumUuid});
this.forumTable.appendChild(_2.domNode);
this.lotusDialogFooter.innerHTML="<input type=\"button\" value=\""+this.rs_move+"\" class=\"lotusFormButton submit\" /> <input type=\"button\" value=\""+this.rs_cancel+"\" class=\"lotusFormButton cancel\" />";
}
},connectEvent:function connectEvent(){
this.dialog.closeBtn=dojo.query(".lotusDialogClose",this.domNode)[0];
this.dialog.connect(this.dialog.closeBtn,"onclick","onCancel");
var _3=dojo.query(".lotusDialogFooter .cancel",this.domNode)[0];
this.dialog.connect(_3,"onclick","onCancel");
var _4=dojo.query(".lotusDialogFooter .submit",this.domNode)[0];
if(this.haveCategory==true&&this.communityId==""){
this.dialog.connect(_4,"onclick",dojo.hitch(this,"next"));
}else{
this.dialog.connect(_4,"onclick",dojo.hitch(this,"onMove"));
}
},hide:function hide(){
if(this.dialog){
this.dialog.hide();
}
},show:function show(){
if(this.dialog){
this.dialog.destroyRecursive();
}
this.dialog=new dijit.Dialog();
this.dialog.containerNode.appendChild(this.domNode);
this.dialog.titleBar.style.display="none";
this.dialog.show();
this.connectEvent();
},createTreeDialog:function createTreeDialog(){
this.store=new lconn.forums.CategoryForumStore({contextPath:this.contextPath,data:{label:"name",identifier:"id",items:[{id:"00000000-0000-000000000-000000000005",name:"Root",type:"continent"}]}});
this.treeModel=new lconn.forums.CategoryForumStoreModel({store:this.store,rootId:"root",rootLabel:"rootCategory",query:{"type":"continent"}});
this.treeDijit=new dijit.Tree({model:this.treeModel,onClick:dojo.hitch(this,"treeClick"),getIconClass:this.getCategoryIconClass,showRoot:false,persist:false},this.treeNode);
},postTreeError:function(_5,_6){
lconn.forums.Util.ajaxErrorHandler(_5,_6,this.formErrorMessageNode,dojo.hitch(this,"createTreeDialog"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
},getCategoryIconClass:function getCategoryIconClass(_7,_8){
return "lotusHidden";
},treeClick:function treeClick(_9,_a){
this.categoryId=_9.id;
if(this.selectNode){
this.selectNode.style.backgroundColor="";
this.selectNode.style.fontWeight="";
}
this.selectNode=_a.rowNode;
this.selectNode.style.backgroundColor="#cfecff";
this.selectNode.style.fontWeight="bold";
},next:function next(_b){
if(this.validate()){
var _c;
_c=this.contextPath+lconn.forums.Constants.MOVE_PATH;
this.onNext(this.categoryId,null);
}
if(_b){
dojo.stopEvent(_b);
}
},onNext:function(_d,_e){
this.categoryId=_d;
dojo.addClass(this.moveTopicTree,"lotusHidden");
dojo.addClass(this.selectLabelNode,"lotusHidden");
if(this.forumPage==null){
this.forumPage=new lconn.forums.ForumPage({rs_previous:this.rs_previous,rs_next:this.rs_next,rs_tagDialogPageInfo:this.rs_tagDialogPageInfo,contextPath:this.contextPath,categoryId:this.categoryId,forumPicker:this,movedForumUuid:this.movedForumUuid});
this.forumTable.appendChild(this.forumPage.domNode);
}else{
if(this.forumPage!=null&&this.forumPage.categoryId==this.categoryId){
dojo.removeClass(this.forumTable,"lotusHidden");
}else{
this.forumPage=new lconn.forums.ForumPage({rs_previous:this.rs_previous,rs_next:this.rs_next,rs_tagDialogPageInfo:this.rs_tagDialogPageInfo,contextPath:this.contextPath,categoryId:this.categoryId,forumPicker:this,movedForumUuid:this.movedForumUuid});
this.forumTable.innerHTML="";
this.forumTable.appendChild(this.forumPage.domNode);
dojo.removeClass(this.forumTable,"lotusHidden");
}
}
this.lotusDialogFooter.innerHTML="<table ><tr><td><input type=\"button\" class=\"lotusFormButton submit\" value=\""+this.rs_back+"\"></td><td align=\"left\" width=\"95%\"><input type=\"button\" class=\"lotusFormButton cancel\" value=\""+this.rs_cancel+"\"></td><td align=\"right\" ><input type=\"button\" value=\""+this.rs_move+"\" class=\"lotusFormButton submit forumPickMoveButton\" /></td></tr></table>";
var _f=dojo.query(".lotusDialogFooter .submit",this.domNode)[0];
var _10=dojo.query(".lotusDialogFooter .submit",this.domNode)[1];
var _11=dojo.query(".lotusDialogFooter .cancel",this.domNode)[0];
this.dialog.connect(_10,"onclick",dojo.hitch(this,"onMove"));
this.dialog.connect(_11,"onclick","onCancel");
this.dialog.connect(_f,"onclick",dojo.hitch(this,"onBack"));
},onBack:function(){
dojo.removeClass(this.moveTopicTree,"lotusHidden");
dojo.removeClass(this.selectLabelNode,"lotusHidden");
dojo.addClass(this.forumTable,"lotusHidden");
this.lotusDialogFooter.innerHTML="<table ><tbody><tr><td align=\"left\" width=\"95%\"><input value=\""+this.rs_cancel+"\" class=\"lotusFormButton cancel\" type=\"button\"></td><td align=\"right\"><input value=\""+this.rs_next+"\" class=\"lotusFormButton submit\" type=\"button\"></td></tr></tbody></table>";
var _12=dojo.query(".lotusDialogFooter .submit",this.domNode)[0];
var _13=dojo.query(".lotusDialogFooter .cancel",this.domNode)[0];
this.dialog.connect(_13,"onclick","onCancel");
this.dialog.connect(_12,"onclick",dojo.hitch(this,"next"));
},onMove:function(){
if(this.validateForum()){
if(this.onPost!=null){
this.onPost(this.forumId,this.forumName);
}
}
},validateForum:function validateForum(){
this.hideErrors();
var _14=false;
if(this.forumId==""){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_moveTopicCantBeEmpty;
_14=true;
}
return !_14;
},validate:function validate(){
this.hideErrors();
var _15=false;
if(this.categoryId==""){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_moveCategoryCantBeEmpty;
_15=true;
}
return !_15;
},hideErrors:function(){
dojo.addClass(this.formErrorNode,"lotusHidden");
dojo.addClass(this.titleErrorNode,"lotusHidden");
},showError:function(str){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+str+"</span>";
},postError:function(_16,_17){
_16.noTextInput="true";
lconn.forums.Util.ajaxErrorHandler(_16,_17,this.formErrorMessageNode,dojo.hitch(this,"onMove"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
}});
}


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




lconn.forums.NodeUtil.forumFeed={};
lconn.forums.NodeUtil.moreActionsMenu={};
lconn.forums.NodeUtil.loadResourceStrings=function loadResourceStrings(){
if(!lconn.forums.NodeUtil.rs){
lconn.forums.NodeUtil.rs=dojo.i18n.getLocalization("lconn.forums","strings");
}
return lconn.forums.NodeUtil.rs;
};
lconn.forums.NodeUtil.menuClose=function menuClose(_1){
if(_1){
dijit.popup.close(_1);
}
};
lconn.forums.NodeUtil.menuAction=function menuAction(_2,_3){
dijit.popup.close(lconn.forums.NodeUtil.moreActionsMenu[_2].menu);
if(lconn.forums.NodeUtil.moreActionsMenu[_2].menu.openedBy){
lconn.forums.NodeUtil.moreActionsMenu[_2].menu.openedBy.focus();
}
_3();
};
lconn.forums.NodeUtil.menuOpen=function menuOpen(_4,_5,_6,_7,_8,_9){
if(!_5){
throw ("lconn.forums.NodeUtil.openMenu called without an idPrefix");
}
_4=dojo.fixEvent(_4);
var rs=lconn.forums.NodeUtil.loadResourceStrings();
if(!lconn.forums.NodeUtil.moreActionsMenu[_5]){
var _a;
lconn.forums.NodeUtil.moreActionsMenu[_5]={};
lconn.forums.NodeUtil.moreActionsMenu[_5].menu=_a=new dijit.Menu();
if(_8==true){
lconn.forums.NodeUtil.moreActionsMenu[_5].moveItem=new dijit.MenuItem({label:rs.rs_moveTopic,parentMenu:_a,onClick:function(){
lconn.forums.NodeUtil.menuAction(_5,_6);
}});
_a.addChild(lconn.forums.NodeUtil.moreActionsMenu[_5].moveItem);
}
if(_9==true){
lconn.forums.NodeUtil.moreActionsMenu[_5].deleteItem=new dijit.MenuItem({label:rs.rs_deleteTopic,iconClass:"lconnSprite lconnSprite-iconTrashCan16",parentMenu:_a,onClick:function(){
lconn.forums.NodeUtil.menuAction(_5,_7);
}});
_a.addChild(lconn.forums.NodeUtil.moreActionsMenu[_5].deleteItem);
}
dojo.connect(_a,"_onBlur",function(){
lconn.forums.NodeUtil.menuClose(_a);
});
}
lconn.forums.NodeUtil.moreActionsMenu[_5].menu.openedBy=_4.target;
dijit.popup.open({popup:lconn.forums.NodeUtil.moreActionsMenu[_5].menu,around:_4.target,onExecute:function(){
},onCancel:function(){
dijit.popup.close(lconn.forums.NodeUtil.moreActionsMenu[_5].menu);
if(this.around){
this.around.focus();
}
},onClose:function(){
}});
lconn.forums.NodeUtil.moreActionsMenu[_5].menu.focus();
dojo.stopEvent(_4);
};
}


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














dojo.declare("lconn.forums.ForumsActions",[],{moreActionsMenu:null,confirmDelete:null,forumForm:null,loginUrl:null,createMenu:function(){
var _1=this.moreActionsMenu=new dijit.Menu();
_1.addChild(new dijit.MenuItem({iconClass:"lconnSprite lconnSprite-iconWidgetEdit16",label:this.rs_editForum,onClick:dojo.hitch(this,"edit")}));
_1.addChild(new dijit.MenuItem({iconClass:"lconnSprite lconnSprite-iconTrashCan16",label:this.rs_deleteForum,onClick:dojo.hitch(this,"del"),disabled:!this.forum.canDelete}));
_1.addChild(new dijit.MenuSeparator());
_1.addChild(new dijit.MenuItem({label:this.rs_lockForum,onClick:dojo.hitch(this,"lock"),disabled:this.forum.locked}));
_1.addChild(new dijit.MenuItem({label:this.rs_unlockForum,onClick:dojo.hitch(this,"unlock"),disabled:!this.forum.locked}));
},showMenu:function(_2){
if(typeof _2==undefined){
_2=window.event;
}
if(this.moreActionsMenu){
this.moreActionsMenu=null;
}
this.createMenu();
var _3={orient:(dojo._isBodyLtr()?{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}:{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"})};
menuUtility.openMenu(_2,this.moreActionsMenu.id,_2.target,_3);
dojo.stopEvent(_2);
},edit:function(){
if(this.forumForm){
this.forumForm.destroyRecursive();
}
this.forumForm=new lconn.forums.ForumForm({contextPath:this.contextPath,ariaLabel:this.rs_editForum,operation:"edit",onPost:dojo.hitch(this,"edited")});
this.forumForm.edit({name:this.forum.name,tags:this.forum.tags.join(" "),description:this.forum.description,uuid:this.forum.id});
var _4=lconn.core.DialogUtil.popupForm(this.rs_editForum,this.forumForm.domNode,this.rs_save,this.rs_cancel,dojo.hitch(this.forumForm,"post"));
this.forumForm.enableSubmit=_4.enableSubmit;
this.forumForm.disableSubmit=_4.disableSubmit;
if(this.forumFormConnection){
dojo.disconnect(this.forumFormConnection);
}
this.forumFormConnection=dojo.connect(this.forumForm,"postSuccess",_4.hide);
},edited:function(){
location.href=location.href;
},del:function(){
this.confirmDelete=new lconn.forums.ConfirmDelete({url:this.contextPath+lconn.forums.Constants.DELETE_PATH,ariaLabel:this.rs_deleteForum,deleteDone:dojo.hitch(this,"onDelete")});
this.confirmDelete.confirmForumsCategories([],[],[this.forum.id],[this.forum.name]);
var _5=lconn.forums.Util.popupForm(this.rs_deleteForum,this.confirmDelete.domNode,this.rs_deleteAttachment,this.rs_cancel,dojo.hitch(this.confirmDelete,"post"));
this.confirmDelete.enableSubmit=_5.enableSubmit;
this.confirmDelete.disableSubmit=_5.disableSubmit;
if(this.connection){
dojo.disconnect(this.connection);
}
this.connection=dojo.connect(this.confirmDelete,"deleteDone",_5.hide);
},onDelete:function(){
if(!this.communityUuid){
dojo.cookie(lconn.forums.Constants.CONFIRM_MESSAGE_COOKIE,"delete_forum",{expires:365});
location.href=this.contextPath+lconn.forums.Constants.REDIRECT_CATEGORY_PATH;
}else{
location.href=ServiceConstants.URL.communities+"/service/html/communityview?communityUuid="+this.communityUuid;
}
},lock:function(){
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.LOCK_PATH,headers:lconn.forums.Constants.NONCE_HEADER,content:{forumIds:this.forum.id},handleAs:"json",load:dojo.hitch(this,"lockSuccess"),error:dojo.hitch(this,"lockError")});
},lockSuccess:function(_6,_7){
if(_6&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_6.status)>-1){
this.lockError(_6,_7);
return;
}
this.forum.locked=true;
dojo.addClass(this.viewNode,"forumsLocked");
dojo.publish("com/ibm/lconn/forums/topic/reload",null);
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_lockForumSuccess);
},lockError:function(_8,_9){
if(_8&&_8.status==401){
if(_8.loginUrl){
this.loginUrl=_8.loginUrl;
}else{
this.loginUrl=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
this.setRedirectCookie(_8);
var _a=this.rs_loggedOut2+" <a href=\""+this.loginUrl+"\">"+this.rs_logInTryAgain+"</a>";
lconn.core.DialogUtil.alert(this.rs_error,_a,dojo.hitch(this,"_toLogin"));
for(var i=0;i<lconn.core.DialogUtil._dialogs.length;i++){
var _b=lconn.core.DialogUtil._dialogs[i];
dojo.connect(_b.closeBtn,"onclick",dojo.hitch(this,"_toLogin"));
}
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_8,_9)){
lconn.core.DialogUtil.alert(this.rs_error,this.rs_unknownError);
}
}
},unlock:function(){
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.UNLOCK_PATH,headers:lconn.forums.Constants.NONCE_HEADER,content:{forumIds:this.forum.id},handleAs:"json",load:dojo.hitch(this,"unlockSuccess"),error:dojo.hitch(this,"lockError")});
},unlockSuccess:function(_c,_d){
if(_c&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_c.status)>-1){
this.lockError(_c,_d);
return;
}
this.forum.locked=false;
dojo.removeClass(this.viewNode,"forumsLocked");
dojo.publish("com/ibm/lconn/forums/topic/reload",null);
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_unlockForumSuccess);
},_getForumDescription:function(){
},subscribeForum:function(_e){
var _f=dojo.xhrPost({content:{subscribe:true,forumId:_e},handleAs:"json",url:this.contextPath+lconn.forums.Constants.SUBSCRIBE_FORUM_PATH,headers:lconn.forums.Constants.NONCE_HEADER,timeout:lconn.forums.Constants.AJAX_TIMEOUT,error:dojo.hitch(this,"subscribeForumError"),load:dojo.hitch(this,"subscribeForumSuccess")});
return _f;
},subscribeForumSuccess:function(_10,_11){
if(_10&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_10.status)>-1){
this.subscribeForumError(_10,_11);
return;
}
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_subscribeForumConfirm);
},unsubscribeForum:function(_12){
var _13=dojo.xhrPost({content:{subscribe:false,forumId:_12},handleAs:"json",url:this.contextPath+lconn.forums.Constants.SUBSCRIBE_FORUM_PATH,headers:lconn.forums.Constants.NONCE_HEADER,timeout:lconn.forums.Constants.AJAX_TIMEOUT,error:dojo.hitch(this,"subscribeForumError"),load:dojo.hitch(this,"unsubscribeForumSuccess")});
return _13;
},unsubscribeForumSuccess:function(_14,_15){
if(_14&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_14.status)>-1){
this.subscribeForumError(_14,_15);
return;
}
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_unsubscribeForumConfirm);
},subscribeForumError:function(_16,_17){
if(_16&&_16.status==401){
if(_16.loginUrl){
this.loginUrl=_16.loginUrl;
}else{
this.loginUrl=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
this.setRedirectCookie(_16);
var _18=this.rs_loggedOut2+" <a href=\""+this.loginUrl+"\">"+this.rs_logInTryAgain+"</a>";
lconn.core.DialogUtil.alert(this.rs_error,_18,dojo.hitch(this,"_toLogin"));
for(var i=0;i<lconn.core.DialogUtil._dialogs.length;i++){
var _19=lconn.core.DialogUtil._dialogs[i];
dojo.connect(_19.closeBtn,"onclick",dojo.hitch(this,"_toLogin"));
}
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_16,_17)){
lconn.core.DialogUtil.alert(this.rs_error,_16.message);
}
}
},subscribeTopic:function(_1a){
var _1b=dojo.xhrPost({content:{subscribe:true,nodeId:_1a},handleAs:"json",url:this.contextPath+lconn.forums.Constants.SUBSCRIBE_TOPIC_PATH,headers:lconn.forums.Constants.NONCE_HEADER,timeout:lconn.forums.Constants.AJAX_TIMEOUT,error:dojo.hitch(this,function(_1c,_1d){
this.subscribeTopicError(_1c,_1d);
_1b.errback();
}),load:dojo.hitch(this,"subscribeTopicSuccess")});
return _1b;
},subscribeTopicSuccess:function(_1e,_1f){
if(_1e.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_1e.status)>-1){
this.subscribeTopicError(_1e,_1f);
return;
}
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_subscribeTopicConfirm);
},unsubscribeTopic:function(_20){
var _21=dojo.xhrPost({content:{subscribe:false,nodeId:_20},handleAs:"json",url:this.contextPath+lconn.forums.Constants.SUBSCRIBE_TOPIC_PATH,headers:lconn.forums.Constants.NONCE_HEADER,timeout:lconn.forums.Constants.AJAX_TIMEOUT,error:dojo.hitch(this,function(_22,_23){
this.subscribeTopicError(_22,_23);
_21.errback();
}),load:dojo.hitch(this,"unsubscribeTopicSuccess")});
return _21;
},unsubscribeTopicSuccess:function(_24,_25){
if(_24.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_24.status)>-1){
this.subscribeTopicError(_24,_25);
return;
}
this.sendMessage(lconn.forums.Constants.messageTypes.CONFIRM,this.rs_unsubscribeTopicConfirm);
},subscribeTopicError:function(_26,_27){
if(_26&&_26.status==401){
if(_26.loginUrl){
this.loginUrl=_26.loginUrl;
}else{
this.loginUrl=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
var _28=_26.contextPath?_26.contextPath:lconn.forums.Constants.CONTEXT_PATH;
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+_28+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
var _29=this.rs_loggedOut2+" <a href=\""+this.loginUrl+"\">"+this.rs_logInTryAgain+"</a>";
lconn.core.DialogUtil.alert(this.rs_error,_29,dojo.hitch(this,"_toLogin"));
for(var i=0;i<lconn.core.DialogUtil._dialogs.length;i++){
var _2a=lconn.core.DialogUtil._dialogs[i];
dojo.connect(_2a.closeBtn,"onclick",dojo.hitch(this,"_toLogin"));
}
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_26,_27)){
lconn.core.DialogUtil.alert(this.rs_error,_26.message);
}
}
},_toLogin:function(){
window.location.href=this.loginUrl;
},_getMessageNode:function(){
var _2b=dojo.query(".lotusMessage2",this.domNode);
if(_2b&&_2b.length>0){
return _2b[0];
}else{
return null;
}
},removeMessageNode:function(){
var _2c=dojo.query(".lotusMessage2",this.domNode);
if(_2c&&_2c.length>0){
_2c[0].className="lotusMessage2 lotusHidden";
_2c[0].innerHTML="";
}
},sendMessage:function(_2d,_2e){
if(this.domNode!=null){
lconn.forums.Util.setMessage(_2d,_2e,this.domNode);
}
},setRedirectCookie:function(_2f){
var _30=_2f.contextPath?_2f.contextPath:lconn.forums.Constants.CONTEXT_PATH;
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+_30+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
}});
}


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








dojo.declare("lconn.forums.FlagInappropriate",[lconn.forums.ConfirmDelete],{isReply:true,flagCategories:null,deleteDone:function(_1,_2){
if(_1&&_1!=null&&_1!=""){
if(_1.url){
window.location.href=_1.url;
}
if(_1.reply){
var _3=dojo.query("[uuid="+this.uuid+"] > .lotusPost");
if(_3&&_3.length>0){
var _4=_3[0];
var _5=dojo.clone(_1.reply);
var _6=dojo.create("div");
_6.innerHTML=_5;
_6=dojo.query(".lotusPost",_6)[0];
dojo.place(_6,_4,"after");
_4.parentNode.removeChild(_4);
}
}
}
this.flagDone(arguments);
},flagDone:function(){
},postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
this.rs_deleteReason=this.rs_flagLabel;
},postCreate:function(){
this.inherited(arguments);
this.confirmReply(this.uuid);
if(this.flagCategories&&this.flagCategories.length>0){
this.createFlagCategories();
}
},createFlagCategories:function(){
var _7="<div><label for=\"input_issue\">"+this.rs_issue+"</label></div>";
_7+="<div><select id=\"input_issue\" title=\""+this.rs_issue+"\" class=\"lotusText\" name=\"issue\">";
var _8=this.flagCategories.length;
for(i=0;i<_8;i++){
_7+="<option value=\""+this.flagCategories[i].id+"\">"+this.flagCategories[i].description+"</option>";
}
_7+="</select></div>";
var _9=dojo.create("div",{innerHTML:_7});
dojo.place(_9,this.deleteReplyNode,"before");
}});
}


;if(!dojo._hasResource["lconn.forums.types.Forum"]){
dojo._hasResource["lconn.forums.types.Forum"]=true;
dojo.provide("lconn.forums.types.Forum");
dojo.declare("lconn.forums.types.Forum",null,{name:null,id:null,description:null,tags:[],parentId:null,locked:false,constructor:function(_1){
this.name=_1.name||"";
this.id=_1.id||"";
this.description=_1.description||"";
this.parentId=_1.parentId||"";
this.locked=_1.locked?true:false;
this.canDelete=_1.canDelete?true:false;
if(typeof _1.tags=="string"){
this.tags=[];
var _2=_1.tags.split(" ");
var _3;
for(var i=0;i<_2.length;i++){
_3=dojo.trim(_2[i]);
if(_3){
this.tags.push(_3);
}
}
}else{
this.tags=_1.tags;
}
}});
}


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








dojo.requireLocalization("lconn.forums","strings");
dojo.declare("lconn.forums.InsertImagesDialog",null,{scope:"topic",contextPath:"/forums",parentUuid:"",nls:dojo.i18n.getLocalization("lconn.forums","strings"),ps:20,page:1,selectedImages:{},constructor:function(_1){
dojo.mixin(this,_1);
},deleteImages:function(_2){
var _3=this.selectedImages,_4=[];
if(_2&&_2.status==401){
this._handleError(_2);
return;
}
if(_2&&_2.status==200){
_3.count-=1;
this.imageDeleted=true;
}
var _5=_3.count;
if(_5==0){
this.renderPagedImages(1);
return;
}
delete _3.count;
for(var _6 in _3){
_4.push(_3[_6]);
}
_3.count=_5;
var _6=_4[0];
delete _3[_6.nodeUuid];
var _7=_6.container;
var p=dojo.position(_7);
var _8=_7.appendChild(dojo.doc.createElement("div"));
_8.style.opacity=0.1;
_8.style.position="absolute";
_8.style.top=_8.style.left=0;
_8.style.width=p.w+"px";
_8.style.height=p.h+"px";
_8.style.padding="15px";
_8.style.backgroundColor="#000000";
var _9=_8.appendChild(dojo.doc.createElement("img"));
_9.src=dojo.config.blankGif;
_9.className="lotusLoading";
_9.style.margin="15px";
dojo.xhrPost({headers:lconn.forums.Constants.NONCE_HEADER,url:this.contextPath+lconn.forums.Constants.DELETE_IMAGE,content:{imageId:_6.nodeUuid,parentUuid:_6.parentUuid},handleAs:"json",load:dojo.hitch(this,this.deleteImages),error:dojo.hitch(this,this._handleError)});
},_createPaging:function(){
var _a=this.nls;
var _b=dojo.doc.createElement("div");
_b.className="lotusPaging";
var ul=_b.appendChild(dojo.doc.createElement("ul"));
ul.className="lotusInlinelist lotusRight";
var li=ul.appendChild(dojo.doc.createElement("li"));
li.className="lotusFirst";
if(this._hasPrevious()){
var _c=li.appendChild(dojo.doc.createElement("a"));
_c.href="javascript:;";
_c.className="lotusAction";
dijit.setWaiRole(_c,"button");
_c.appendChild(dojo.doc.createTextNode(_a.rs_previous));
dojo.connect(_c,"onclick",dojo.hitch(this,this.previous));
}else{
li.appendChild(dojo.doc.createTextNode(_a.rs_previous));
}
li=ul.appendChild(dojo.doc.createElement("li"));
if(this._hasNext()){
var _d=li.appendChild(dojo.doc.createElement("a"));
_d.href="javascript:;";
_d.className="lotusAction";
dijit.setWaiRole(_d,"button");
_d.appendChild(dojo.doc.createTextNode(_a.rs_next));
dojo.connect(_d,"onclick",dojo.hitch(this,this.next));
}else{
li.appendChild(dojo.doc.createTextNode(_a.rs_next));
}
return _b;
},_renderList:function(_e){
if(_e instanceof Error){
this._handleError(_e);
return;
}
var d=this.dialog,_f=this.nls;
var _10=d.lotusContentNode.firstChild;
if(_e&&_e.total&&_e.total>0){
this.total=_e.total;
var div=_10.appendChild(dojo.doc.createElement("div"));
if(this._hasNext()||this._hasPrevious()){
div.appendChild(this._createPaging());
}
var _11=div.appendChild(dojo.doc.createElement("div"));
_11.style.clear="both";
for(var i=0;i<_e.items.length;i++){
var _12=_e.items[i];
var _13=_12.nodeUuid;
var _14=_11.appendChild(dojo.doc.createElement("div"));
_14.style.position="relative";
_14.style.padding="5px";
_14.style.display="inline-block";
if(_12.canDelete){
var _15="chx_"+_13;
var chx=dojo.doc.createElement("input");
chx.type="checkbox";
chx.className="forumsImgChx";
chx.id=_15;
_14.appendChild(chx);
dojo.connect(chx,"onclick",dojo.hitch(this,function(_16,_17,_18){
var _19=this;
setTimeout(function(){
var _1a=_19.selectedImages,_1b=_16.checked;
if(_1b){
if(!_1a[_17.nodeUuid]){
_1a[_17.nodeUuid]={nodeUuid:_17.nodeUuid,parentUuid:_17.parentUuid,container:_18};
_1a.count=(_1a.count||0)+1;
}
}else{
if(_1a[_17.nodeUuid]){
delete _1a[_17.nodeUuid];
_1a.count-=1;
}
}
if(_1a.count&&_1a.count>0){
dojo.removeClass(d.lotusSubmitNode,"lotusBtnDisabled");
d.lotusSubmitNode.disabled=false;
}else{
dojo.addClass(d.lotusSubmitNode,"lotusBtnDisabled");
d.lotusSubmitNode.disabled=true;
}
},10);
},chx,_12,_14));
var _1c=_14.appendChild(dojo.doc.createElement("label"));
_1c.className="lotusAccess";
_1c.setAttribute("for",_15);
_1c.appendChild(dojo.doc.createTextNode(_f.rs_selectImage));
}
var img=_14.appendChild(dojo.doc.createElement("img"));
img.src=[this.contextPath,lconn.forums.Constants.ATTACH_DOWNLOADIMAGE,"?","nodeId=",_13,"&thumbnail=true"].join("");
img.alt=_12.description;
}
if(this._hasNext()||this._hasPrevious()){
div.appendChild(this._createPaging());
}
}else{
var _1d=_10.appendChild(dojo.doc.createElement("span"));
_1d.appendChild(dojo.doc.createTextNode(_f.rs_noImages));
}
},renderPagedImages:function(_1e){
if(_1e&&_1e>=1){
var _1f=(_1e-1)*this.ps+1;
}else{
return;
}
var d=this.dialog,nls=this.nls;
var _20=d.lotusContentNode.firstChild;
_20.style.width="450px";
_20.style.height="300px";
dojo.empty(_20);
dojo.addClass(_20,"forumInsertedImages");
dojo.attr(_20,"tabindex","-1");
var div=dojo.doc.createElement("div");
var _21=div.appendChild(dojo.doc.createElement("img"));
_21.src=dojo.config.blankGif;
_21.className="lotusLoading";
_21.alt="";
var _22=div.appendChild(dojo.doc.createElement("span"));
_22.appendChild(dojo.doc.createTextNode(nls.rs_loading));
var _23={scope:this.scope,startPos:_1f,increase:this.ps,parentUuid:this.parentUuid};
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.INSERTED_IMAGES,content:_23,handleAs:"json",handle:dojo.hitch(this,this._renderList),error:dojo.hitch(this,this._handleError)});
},_handleError:function(_24){
if(_24&&_24.status==401){
var _25=this.dialog,nls=this.nls;
var _26=_25.lotusContentNode;
dojo.empty(_26);
var div=_26.appendChild(dojo.doc.createElement("div"));
div.className="lotusMessage2 lotusError";
dojo.attr(div,"role","alert");
var img=div.appendChild(dojo.doc.createElement("img"));
img.className="lconnSprite lconnSprite-iconError16";
img.src=dojo.config.blankGif;
img.alt=img.title=nls.rs_errorColon;
div.appendChild(dojo.doc.createTextNode(nls.rs_loggedOut2));
var a=div.appendChild(dojo.doc.createElement("a"));
a.href="javascript:;";
a.appendChild(dojo.doc.createTextNode(nls.rs_logIn));
a.className="lotusAction";
dijit.setWaiRole(a,"button");
dijit.setWaiState(a,"label",nls.rs_logIn);
dojo.connect(a,"onclick",dojo.hitch(this,function(){
dojo.cookie(lconn.forums.Constants.REDIRECT_COOKIE,"",{expires:-1,path:this.contextPath});
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+this.contextPath+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
lconn.core.auth.login();
}));
}
},next:function(){
if(this._hasNext()){
this.page=this.page+1;
}
this.renderPagedImages(this.page);
},previous:function(){
if(this._hasPrevious()){
this.page=this.page-1;
}
this.renderPagedImages(this.page);
},_hasNext:function(){
return this.total>this.page*this.ps;
},_hasPrevious:function(){
return this.page>1;
},show:function(){
var nls=this.nls;
var _27=this.dialog;
if(!_27){
_27=this.dialog=lconn.core.DialogUtil.popupForm(nls.rs_insertedImagesTitle,dojo.doc.createElement("div"),nls.rs_deleteSelected,nls.rs_close)._dialog;
if(this.onClose){
dojo.connect(_27,"hide",dojo.hitch(this,function(){
if(this.imageDeleted){
this.onClose();
}
}));
}
}
dojo.addClass(_27.lotusSubmitNode,"lotusBtnDisabled");
_27.lotusSubmitNode.disabled=true;
dojo.connect(_27.lotusSubmitNode,"onclick",dojo.hitch(this,function(btn){
dojo.addClass(btn,"lotusBtnDisabled");
btn.disabled=true;
this.deleteImages();
},_27.lotusSubmitNode));
this.renderPagedImages(this.page);
_27.show();
}});
}


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




















































dojo.declare("lconn.forums.TopicThread",[dijit._Widget,lconn.forums.ForumsActions,lconn.forums.PagedList],{canEditQuestion:false,isQuestion:false,isSequentialView:false,replyForm:null,confirmDelete:null,deleteDialog:null,tagEditor:null,contextPath:"",thumbnailPath:"",displayName:"",topicUuid:"",forumUuid:"",openReplyForm:"",openEditForm:"",jsVar:"",tags:"",canEditTopic:false,pinUrl:lconn.forums.Constants.PIN_TOPIC_PATH,delReplyUrl:lconn.forums.Constants.DELETE_REPLY_PATH,delTopicUrl:lconn.forums.Constants.DELETE_TOPIC_PATH,acceptAnswerUrl:lconn.forums.Constants.ACCEPT_ANSWER_PATH,rejectAnswerUrl:lconn.forums.Constants.REJECT_ANSWER_PATH,reopenQuestionUrl:lconn.forums.Constants.REOPEN_QUESTION_PATH,getQuestionStateUrl:lconn.forums.Constants.GET_QUESTIONSTATUS_PATH,flagInappropriateUrl:lconn.forums.Constants.FLAG_INAPPROPRIATE_PATH,checkFlagUrl:lconn.forums.Constants.CAN_FLAG_PATH,getFlagCategoriesUrl:lconn.forums.Constants.GET_FLAGCATEGORIES_PATH,forumUrl:lconn.forums.Constants.REDIRECT_FORUM_PATH,uuidToDelete:"",uuidToReply:"",deletedTopic:null,allowUpload:true,topicName:"",trObject:null,categoriesEnabled:true,communityId:"",exid:null,messageTypes:lconn.forums.Constants.messageTypes,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},goToPagedListsByHash:function(){
var _1=this.getHash("pagesize");
var _2=this.getHash();
var _3=this.initPsHash;
if((!isNaN(_2)&&_2!=this.page)||(!isNaN(_1)&&_1!=this.ps)||_1==_3){
this.ps=_1;
this.pageTo(_2);
}
this.openReplyToByCookie();
},_switchSortOrder:function(_4){
var _5=location.href;
if(_5.indexOf("#")>0){
_5=_5.substring(0,_5.indexOf("#"));
}
var _6=lconn.share.util.uri.parseUri(_5);
var p=_6.queryParameters||{};
if(p.order!=_4){
p.order=_4;
}
delete p.page;
dojo.cookie("FORUMS_REPLIES_SEQUENTIAL_SORT_AS",_4,{expires:36500,path:this.contextPath});
location.href=lconn.share.util.uri.rewriteUri(_5.indexOf("?")<0?_5:_5.substring(0,_5.indexOf("?")),p);
},_createSortOptsMenu:function(){
var _7=location.href;
var _8=new dijit.Menu(),d=dojo.doc,t=this;
_8.addChild(new dijit.MenuItem({label:t.rs_sequentialViewOldFirst,onClick:function(){
dijit.popup.close(_8);
t._switchSortOrder("asc");
}}));
_8.addChild(new dijit.MenuItem({label:t.rs_conversationsViewNewFirst,onClick:function(){
dijit.popup.close(_8);
t._switchSortOrder("desc");
}}));
return _8;
},renderSortToggle:function(el,_9){
if(el){
dojo.empty(el);
}
var d=dojo.doc,t=this;
var _a=(_9&&_9=="asc")?t.rs_sequentialViewOldFirst:t.rs_conversationsViewNewFirst;
var _b=el.appendChild(d.createElement("div"));
_b.className="lotusMeta";
_b.appendChild(d.createTextNode(t.rs_show));
_b.appendChild(d.createTextNode(" "));
var a=_b.appendChild(d.createElement("A"));
a.href="javascript:;";
a.appendChild(d.createTextNode(_a));
a.appendChild(d.createTextNode(" "));
dijit.setWaiRole(a,"button");
dijit.setWaiState(a,"label",dojo.string.substitute(this.rs_toggleSort,[_a]));
var _c=a.appendChild(d.createElement("img"));
_c.src=dojo.config.blankGif;
_c.className="lotusArrow lotusDropDownSprite";
_c.alt="";
dijit.setWaiRole(_c,"presentation");
var _d=a.appendChild(d.createElement("span"));
_d.className="lotusAltText";
_d.innerHTML="&#9660;";
var _e=t._createSortOptsMenu();
dojo.connect(a,"onclick",dojo.partial(lconn.core.MenuUtility.open,_e.id));
},listNodeImages:function(_f,_10){
new lconn.forums.InsertImagesDialog({scope:_f,contextPath:this.contextPath,parentUuid:_10,onClose:_f=="topic"?dojo.hitch(this,function(){
window.location.reload();
}):null}).show();
},postCreate:function(){
if(!this.topicUuid){
throw new Error("Exception: "+this.declaredClass+" initialized without required parameter topicUuid");
}
this.flagCategories=dojo.fromJson(this.flagflagCategoriesStr);
this.pinUrl=this.contextPath+this.pinUrl;
this.delReplyUrl=this.contextPath+this.delReplyUrl;
this.delTopicUrl=this.contextPath+this.delTopicUrl;
this.subscribeUrl=this.contextPath+this.subscribeUrl;
this.acceptAnswerUrl=this.contextPath+this.acceptAnswerUrl;
this.rejectAnswerUrl=this.contextPath+this.rejectAnswerUrl;
this.reopenQuestionUrl=this.contextPath+this.reopenQuestionUrl;
this.getQuestionStateUrl=this.contextPath+this.getQuestionStateUrl;
this.flagInappropriateUrl=this.contextPath+this.flagInappropriateUrl;
this.checkFlagUrl=this.contextPath+this.checkFlagUrl;
this.getFlagCategoriesUrl=this.contextPath+this.getFlagCategoriesUrl;
this.forumUrl=this.contextPath+this.forumUrl+"?id="+this.forumUuid;
lconn.forums.Util.parse(this.domNode);
lconn.forums.Util.parseLikes(this.domNode,this.contextPath,{exid:this.exid,displayName:this.displayName});
this.tagEditor=new lconn.forums.TagEditor({nodeUuid:this.topicUuid,containerUuid:this.forumUuid,editable:this.canEditTopic,contextPath:this.contextPath,tags:this.tags},this._getTagNode());
if(this.openReplyForm){
this.reply(this.openReplyForm);
}else{
if(this.openEditForm){
this.edit(this.openEditForm);
this.scroll(this.openEditForm);
}
}
var _11=dojo.query(".forumPostActionToolBarIndicator");
_11.forEach(function(_12){
new lconn.core.aria.Toolbar(_12.parentNode);
});
if(!this.isSequentialView){
this.addIndentAlt();
}
if(this.isSequentialView){
this.inherited(arguments);
this.subscribe("/dojo/hashchange",this.goToPagedListsByHash);
dojo.connect(this,"onPageTo",dojo.hitch(this,function(){
dojo.query("blockquote script",dojo.query(".lotusFormTable")[0]).forEach(function(el){
if(window.execScript){
window.execScript(el.innerHTML);
}else{
eval.call(window,el.innerHTML);
}
});
if(this.quoteContentNode){
delete this.quoteContentNode;
}
if(this.quoteNode){
delete this.quoteNode;
}
}));
}
this.openReplyToByCookie();
},lock:function(){
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.LOCK_PATH,headers:lconn.forums.Constants.NONCE_HEADER,content:{topicId:this.topicUuid},handleAs:"json",load:dojo.hitch(this,"lockSuccess"),error:dojo.hitch(this,"lockError")});
},lockSuccess:function(_13,_14){
if(_13.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_13.status)>-1){
this.lockError(_13,_14);
return;
}
var _15=dojo.query(".topicLockedInfo",this.domNode);
if(_15.length==1){
dojo.removeClass(_15[0],"lotusHidden");
dojo.addClass(_15[0],"forumsLockedLabel");
}
dojo.addClass(this.domNode,"forumsLocked");
dojo.query(".forumUnlockButton",this.domNode)[0].focus();
this.setMessage(this.messageTypes.CONFIRM,this.rs_lockTopicSuccess);
},lockError:function(_16,_17){
if(_16&&_16.status==401){
var _18=document.createElement("span");
_18.innerHTML=this.rs_loggedOut2+" ";
var _19=document.createElement("a");
_19.href=_16.loginUrl;
_19.innerHTML=this.rs_logInTryAgain;
_18.appendChild(_19);
this.setMessage(this.messageTypes.ERROR,_18);
this.setRedirectCookie();
}else{
if(_16&&_16.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_16.status)>-1){
this.setMessage(this.messageTypes.ERROR,_16.message);
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_16,_17)){
var _1a=this.topicUuid;
var _1b=this._getTopicTitle(_1a);
var _1c=dojo.string.substitute(this.rs_errorOperation,[_1b]);
this.setMessage(this.messageTypes.ERROR,_1c);
}
}
}
},unlock:function(){
dojo.xhrGet({url:this.contextPath+lconn.forums.Constants.UNLOCK_PATH,headers:lconn.forums.Constants.NONCE_HEADER,content:{topicId:this.topicUuid},handleAs:"json",load:dojo.hitch(this,"unlockSuccess"),error:dojo.hitch(this,"lockError")});
},unlockSuccess:function(_1d,_1e){
if(_1d.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_1d.status)>-1){
this.lockError(_1d,_1e);
return;
}
var _1f=dojo.query(".topicLockedInfo",this.domNode);
if(_1f.length==1){
dojo.removeClass(_1f[0],"forumsLockedLabel");
dojo.addClass(_1f[0],"lotusHidden");
}
dojo.removeClass(this.domNode,"forumsLocked");
dojo.query(".forumLockButton",this.domNode)[0].focus();
this.setMessage(this.messageTypes.CONFIRM,this.rs_unlockTopicSuccess);
},reply:function(_20,_21,_22){
var _23=this.isSequentialView;
if(!_20||typeof _20!="string"){
throw new Error("lconn.forums.TopicThread.reply(string uuid) was not initialized with the correct parameter.");
}
if(_21&&typeof _21!="boolean"){
throw new Error("lconn.forums.TopicThread.reply(string uuid, boolean isAnswer) was not initialized with the correct parameter.");
}
if(!_21){
_21=false;
}
if(this.replyForm){
if(_22){
this.replyForm.cancel();
}else{
lconn.core.DialogUtil.prompt(this.rs_warning,this.rs_formOpen,this.rs_ok,this.rs_cancel,dojo.hitch(this,function(_24){
if(_24){
this.reply(_20,_21,true);
}
}));
return;
}
}
var _25=null;
if(!_23){
_25=this._getPostChildrenNodeByUuid(_20);
}
var _26=this._getPostLevel(_20);
if(_25==null){
if(!_23){
var _27=dojo.query("[uuid="+_20+"]",this.domNode)[0];
}else{
var _28=dojo.query(".lotusCommentList");
if(!_28||_28.length==0){
var _27=dojo.create("ul",{className:"lotusCommentList"});
var _29=this._getPostNodeByUuid(this.topicUuid);
dojo.place(_27,this._getPostNodeByUuid(this.topicUuid),"after");
}else{
var _27=_28[_28.length-1];
}
}
_25=document.createElement("ul");
if(!_23){
if(_26>=7){
dojo.addClass(_25,"lotusChildNoIndent lotusCommentList");
}else{
if(_26>=1){
dojo.addClass(_25,"lotusChild lotusCommentList");
}else{
dojo.addClass(_25,"lotusCommentList");
}
}
}else{
dojo.addClass(_25,"lotusChildNoIndent lotusCommentList");
if(_26>0){
var _2a=this.quoteNode;
if(_2a){
this.getQuoteNode(_20);
_2a.style.display="";
}else{
_27.appendChild(this.getQuoteNode(_20));
}
}
if(SemTagSvc){
SemTagSvc.parseDom(0,this.quoteNode);
}
}
_27.appendChild(_25);
}
if(_25){
var _2b=(dojo.query("[uuid]",_25).length==0);
if(_26&&_26>=1&&_26<7&&!_23&&_2b){
this.addIndentAlt(_25);
}
var l=_25;
var li=document.createElement("li");
l.appendChild(li);
if(!this.replyForm){
var div=document.createElement("div");
li.appendChild(div);
var _2c=this._getTopicTitle(_20);
var reg=new RegExp(dojo.string.substitute(this.rs_re,["*"]));
if(!_2c.match(reg)){
_2c=dojo.string.substitute(this.rs_re,[_2c]);
}
this.replyForm=new lconn.forums.PostForm({isTopic:false,isAnswer:_21,operation:"create",jsVar:this.jsVar,title:_2c,inlineForm:true,contextPath:this.contextPath,url:this.contextPath+lconn.forums.Constants.CREATE_REPLY_PATH,displayName:this.displayName,thumbnailPath:this.thumbnailPath,parentUuid:_20,forumUuid:this.forumUuid,ariaLabel:this.rs_reply,topicUuid:this.topicUuid,allowUpload:this.allowUpload},div);
if(this.isSequentialView){
dojo.query(".lotusFormBody",_25)[0].style.padding=0;
}
if(_21){
this.connect(this.replyForm,"onPost","onCreateAnswer");
}else{
this.connect(this.replyForm,"onPost","onReply");
}
this.replyForm.focus();
this.connect(this.replyForm,"cancel","cancelForm");
if(!_23&&_2b){
this.connect(this.replyForm,"cancel",dojo.hitch(this,"removeIndentAlt",_25.previousSibling));
}
this.connect(this.replyForm,"cancel",dojo.hitch(this,"focusPost",_20));
}
this.scrollToMiddle(li);
}
this._toggleActionsBar(false);
},isDiscussThis:function(_2d){
var _2e=dojo.query(".discussThisContent",_2d);
if(_2e&&_2e.length==1){
return true;
}
return false;
},edit:function(_2f,_30){
if(!_2f||typeof _2f!="string"){
throw new Error("lconn.forums.TopicThread.edit(string uuid) was not initialized with the correct parameter.");
}
if(this.replyForm){
if(_30){
this.replyForm.cancel();
}else{
lconn.core.DialogUtil.prompt(this.rs_warning,this.rs_formOpen,this.rs_ok,this.rs_cancel,dojo.hitch(this,function(_31){
if(_31){
this.edit(_2f,true);
}
}));
return;
}
}
var _32=this._getPostNodeByUuid(_2f);
if(_32){
_32.style.display="none";
var _33=document.createElement("div");
var _34=document.createElement("div");
try{
dojo.place(_33,_32,"after");
_33.appendChild(_34);
}
catch(e){
_33=document.createElement("div");
_34=document.createElement("div");
dojo.place(_33,_32,"before");
_33.appendChild(_34);
}
var _35="",_36;
var _37=false;
_36=dojo.query(".unformattedLotusPostDetails",_32);
if(_36&&_36.length>0){
_37=true;
}else{
_36=dojo.query(".lotusPostDetails",_32);
}
var _38=null;
if(_36&&_36.length>0){
if(this.isDiscussThis(_36[0])){
var _39=dojo.query(">.discussThisContent>.discussThisEditableComment",_36[0]);
if(_39.length>0){
_35=_39[0].innerHTML;
}else{
var _3a=dojo.query(">.discussThisContent",_36[0])[0];
dojo.create("div",{"class":"discussThisEditableComment"},_3a,"first");
_35="";
}
_38=_36[0];
}else{
_35=_36[0].innerHTML;
}
}else{
throw new Error("lconn.forums.TopicThread.edit() expected the forum post "+_2f+" to contain a DOM node with class forumPostDetails.");
return;
}
if(_35!=null&&_37){
_35=_35.replace(/&lt;pre([^&]*)&gt;/mg,"<pre$1>");
_35=_35.replace(/&lt;\/pre&gt;/ig,"</pre>");
}
var url;
var _3b;
var _3c="edit";
var _3d="";
if(_2f==this.topicUuid){
url=this.contextPath+lconn.forums.Constants.UPDATE_TOPIC_PATH;
_3b=true;
_3d=this.tagEditor.tags;
}else{
url=this.contextPath+lconn.forums.Constants.UPDATE_REPLY_PATH;
_3b=false;
}
var _3e=dojo.query(".dfAttachments",_32);
var a=null;
if(_3e&&_3e.length>0&&(_3e=dojo.query("> li",_3e[0])).length>0){
a=[];
for(var i=0;i<_3e.length;i++){
a.push({uuid:dojo.attr(_3e[i],"uuid"),name:dojo.attr(_3e[i],"fileName")});
}
}
if(_35){
var div=dojo.doc.createElement("div");
div.innerHTML=_35;
dojo.query("blockquote.quote",div).forEach(function(_3f){
if(_3f.parentNode){
_3f.parentNode.removeChild(_3f);
}
});
_35=div.innerHTML;
}
var _40=dojo.query(".dfInsertedImages",_32);
if(_40&&_40.length>0){
var _41=_40[0].getAttribute("imagesCount");
}
this.replyForm=new lconn.forums.PostForm({url:url,jsVar:this.jsVar,isOutline:_2f.indexOf("outline_")!=-1,tags:_3d,isTopic:_3b,operation:_3c,hasQuestionPermission:this.canEditQuestion,isQuestion:this.isQuestion,attachments:a,imagesCount:_41||0,inlineForm:true,contextPath:this.contextPath,displayName:this.displayName,thumbnailPath:this.thumbnailPath,uuid:_2f.replace("outline_",""),isModeratorEdit:this.isModeratorEdit,topicUuid:this.topicUuid,forumUuid:this.forumUuid,discussThisPost:_38,content:_35,title:this._getTopicTitle(_2f),ariaLabel:this.rs_edit,allowUpload:this.allowUpload},_34);
this.replyForm.focus();
this.connect(this.replyForm,"onPost","onReply");
this.connect(this.replyForm,"cancel","cancelForm");
this.connect(this.replyForm,"cancel",dojo.hitch(this,"focusPost",_2f));
}
this._toggleActionsBar(false);
},onMoveComplete:function(_42,_43){
if(dojo.trim(_42)!=""){
_42=eval("("+_42+")");
this.forumPicker.postError(_42,_43);
}else{
this.postSuccess(_42,_43);
}
},postSuccess:function postSuccess(_44,_45){
window.location=this.contextPath+lconn.forums.Constants.REDIRECT_TOPIC_PATH+"?id="+this.topicUuid;
this.forumPicker.hide();
},onMove:function(_46){
var url=this.contextPath+lconn.forums.Constants.MOVE_TOPIC_PATH;
dojo.xhrPost({url:url,headers:lconn.forums.Constants.NONCE_HEADER,content:{moveForumId:_46,topicId:this.topicUuid},load:dojo.hitch(this,"onMoveComplete"),error:dojo.hitch(this.forumPicker,"postError"),timeout:lconn.forums.Constants.AJAX_TIMEOUT,contentType:"application/x-www-form-urlencoded;charset=UTF-8"});
},moveTopic:function(){
uuid=this.topicUuid;
topicName=this._getTopicTitle(uuid);
if(topicName.length>30){
topicName=topicName.substring(0,30)+"...";
}
if(this.forumPicker){
this.forumPicker.destroyRecursive();
}
this.forumPicker=new lconn.forums.ForumPicker({contextPath:this.contextPath,topicName:topicName,haveCategory:this.categoriesEnabled,onPost:dojo.hitch(this,"onMove"),rs_titleForPicker:this.rs_move,communityId:this.communityId,movedForumUuid:this.forumUuid});
this.forumPicker.show();
},deletePost:function(_47,_48){
if(_47==this.topicUuid){
_48=true;
}
if(!_47||typeof _47!="string"){
throw new Error("Exception: "+this.declaredClass+".delete(string uuid) was not initialized with the correct parameter.");
}
if(this.confirmDelete){
this.confirmDelete.destroyRecursive();
}
if(!_48){
this.deletedTopic=false;
_48=false;
}else{
this.deletedTopic=true;
_48=true;
}
this.confirmDelete=new lconn.forums.ConfirmDelete({url:(_48?this.delTopicUrl:this.delReplyUrl),jsVar:this.jsVar,ariaLabel:(_48?this.rs_deleteTopic:this.rs_deleteReply),deleteDone:dojo.hitch(this,"onDelete")});
this.confirmDelete.loadNode(_47,!_48);
var _49=lconn.forums.Util.popupForm((_48?this.rs_deleteTopic:this.rs_deleteReply),this.confirmDelete.domNode,this.rs_deleteAttachment,this.rs_cancel,dojo.hitch(this.confirmDelete,"post"));
if(this.connection){
dojo.disconnect(this.connection);
}
this.confirmDelete.enableSubmit=_49.enableSubmit;
this.confirmDelete.disableSubmit=_49.disableSubmit;
this.connection=dojo.connect(this.confirmDelete,"deleteDone",_49.hide);
this.uuidToDelete=_47;
},pin:function(_4a,_4b){
if(!_4a||typeof _4a!="string"){
throw new Error("Exception: "+this.declaredClass+".pin(string uuid) was not called with the correct parameter.");
return;
}
if(typeof _4b=="undefined"){
_4b=true;
}
dojo.xhrPost({url:this.pinUrl,headers:lconn.forums.Constants.NONCE_HEADER,content:{nodeId:_4a,pin:(_4b?"true":"false")},handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:dojo.hitch(this,"onPin"),error:dojo.hitch(this,"pinError")});
},onPin:function(_4c,_4d){
if(_4c.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_4c.status)>-1){
this.pinError(_4c,_4d);
return;
}
var _4e=_4d.args.content.nodeId;
var _4f=(_4d.args.content.pin=="true");
var _50=dojo.query("[uuid="+_4e+"] .lotusPost .lotusPinAction",this.domNode);
var _51=dojo.query("[uuid="+_4e+"] .lotusPost .lotusUnpinAction",this.domNode);
var _52=dojo.query(".forumPinIndicator",this.domNode);
if(_50.length==0||_51.length==0){
throw new Exception("Exception: "+this.declaredClass+" expected to find pin and unpin links but couldn't.");
}
if(_52.length==0){
throw new Exception("Exception: "+this.declaredClass+" expected to find a pin icon with class forumPinIndicator.");
}
if(_4f){
this.setMessage(this.messageTypes.CONFIRM,this.rs_pinConfirm);
_50[0].style.display="none";
_51[0].style.display="";
dojo.query("a ",_51[0])[0].focus();
dojo.removeClass(_52[0],"lotusHidden");
}else{
this.setMessage(this.messageTypes.CONFIRM,this.rs_unpinConfirm);
_50[0].style.display="";
_51[0].style.display="none";
dojo.query("a ",_50[0])[0].focus();
dojo.addClass(_52[0],"lotusHidden");
}
},pinError:function(_53,_54){
if(_53&&_53.status==401){
var _55=document.createElement("span");
_55.innerHTML=this.rs_loggedOut2;
var _56=document.createElement("a");
_56.href=_53.loginUrl;
_56.innerHTML=" "+this.rs_logInTryAgain;
_55.appendChild(_56);
this.setMessage(this.messageTypes.ERROR,_55);
this.setRedirectCookie();
}else{
if(_53&&_53.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_53.status)>-1){
this.setMessage(this.messageTypes.ERROR,_53.message);
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_53,_54)){
var _57=this.topicUuid;
var _58=this._getTopicTitle(_57);
var _59=dojo.string.substitute(this.rs_errorOperation,[_58]);
this.setMessage(this.messageTypes.ERROR,_59);
}
}
}
},cancelForm:function(){
var _5a=this.replyForm;
dojo.addClass(_5a.domNode,"lotusHidden");
_5a.stopPreventDataLoss();
var _5b;
if(_5a.uuid){
if(_5a.isOutline){
_5b=this._getPostNodeByUuid("outline_"+_5a.uuid);
}else{
_5b=this._getPostNodeByUuid(_5a.uuid);
}
if(_5b){
_5b.style.display="";
}
}
var _5c=_5a.domNode.parentNode;
_5a.destroyRecursive();
this.replyForm=null;
_5c.parentNode.removeChild(_5c);
this._toggleActionsBar(true);
},_toggleActionsBar:function(_5d){
var _5e=dojo.query("div.lotusBtnContainer",this.domNode);
if(_5e&&_5e.length>0){
dojo.forEach(_5e,function(bar){
bar.style.display=(_5d?"":"none");
});
}
},focusPost:function(_5f){
if(!_5f){
return;
}
var _60;
if(typeof _5f=="string"){
_60=this._getPostNodeByUuid(_5f);
}else{
_60=_5f;
}
if(_60){
setTimeout(dojo.hitch(this,"focusFirstLink",_60),0);
}
},focusFirstLink:function(_61){
var _62=dojo.query("a[href]",_61);
if(_62.length>0){
dijit.focus(_62[0]);
}
},onDelete:function(_63,_64){
if(this.deletedTopic){
dojo.cookie(lconn.forums.Constants.CONFIRM_MESSAGE_COOKIE,"delete_topic",{expires:365});
window.location.href=this.forumUrl;
}else{
if(this.isSequentialView){
this.totalCount--;
}
this.onFinishPost(_63,_64,null,this.uuidToDelete);
if(this.isAnswer(this.uuidToDelete)){
this.updateQuestionStatus();
}
}
},removeReplyLink:function(){
dojo.query(".forumPostActionToolBarIndicator .forumReplyAction",dojo.byId("forum")).forEach(function(_65){
_65.parentNode.parentNode.removeChild(_65.parentNode);
});
dojo.query(".forumPostActionToolBarIndicator .forumAnswerIndicator",dojo.byId("forum")).forEach(function(_66){
_66.parentNode.parentNode.removeChild(_66.parentNode);
});
dojo.query(".forumPostActionToolBarIndicator .forumNotAnswerIndicator",dojo.byId("forum")).forEach(function(_67){
_67.parentNode.parentNode.removeChild(_67.parentNode);
});
dojo.query(".forumPostActionToolBarIndicator",dojo.byId("forum")).forEach(function(_68){
dojo.addClass(_68.children[0],"lotusFirst");
});
},onReply:function(_69,_6a){
var _6b=this.replyForm.replyUuidInput.value;
var _6c=this.replyForm.parentUuidInput.value;
var _6d=false;
if(this.replyForm.isTopic){
var _6e=this.replyForm.questionMarkNode.checked;
_6d=(_6e!=this.isQuestion);
this.isQuestion=_6e;
if(_6d){
this.updateQuestionAnswerClass();
}
var _6f=this.replyForm.titleNode.value;
if(_6f.length>105){
_6f=_6f.substring(0,105)+"...";
}
dojo.byId("breakcrumbsTopic").innerHTML="";
dojo.byId("breakcrumbsTopic").appendChild(document.createTextNode(_6f));
}
var _70="";
if(_6d&&this.isQuestion){
_70+="<div>"+this.rs_markQuestionConfirm+"</div>";
}else{
if(_6d&&!this.isQuestion){
_70+="<div>"+this.rs_unmarkQuestionConfirm+"</div>";
}
}
if(_70!=""){
var _71=document.createElement("span");
_71.innerHTML=_70;
this.setMessage(this.messageTypes.CONFIRM,_71);
}
this.cancelForm();
this.onFinishPost(_69,_6a,_6c,_6b);
},toggleView:function(_72){
if(_72&&_72.viewAsThread){
dojo.cookie("FORUMS_REPLIES_VIEW_AS","replies_thread",{expires:36500,path:this.contextPath});
location.href=this.contextPath+"/html/threadTopic?id="+_72.topicId+"&ps="+_72.ps;
}else{
dojo.cookie("FORUMS_REPLIES_VIEW_AS","sequential",{expires:36500,path:this.contextPath});
location.href=this.contextPath+"/html/topic?id="+_72.topicId+"&ps="+_72.ps;
}
},onFinishPost:function(_73,_74,_75,_76){
var _77=this.isSequentialView;
_73=dojo.string.trim(_73);
if(!_76&&!_75){
throw new Error("Exception: lconn.forums.TopicThread missing either parentUuid or replyUuid parameters");
return;
}
var p1=_73.indexOf("<ul class=\"lotusList dfAttachments\">");
if(p1>-1){
var c1=_73.substr(p1);
console.log("** [c1] ** \n"+c1);
var p2=c1.indexOf("</ul>");
if(p2>-1){
var c2=c1.substr(0,p2);
console.log("** [c2] ** \n"+c2);
var _78=/href="([^"]*)"/g;
var _79=c2.match(_78);
var _7a=new Array();
if(_79&&_79.length>0){
for(var k=0;k<_79.length;k++){
var h=_79[k];
if(h&&h!=""){
h=h.replace("href=","");
h=h.replace(/"/g,"");
if(h!=""){
if(_7a[h]){
continue;
}
_7a[h]=true;
console.log("** [h] ** \n"+h);
var _7b=xmlc.UIModification_downloadDisclaimer_NodeHold(null,h,null);
_73=_73.replace(h,"javascript:xmlc.UIModification_downloadDisclaimer_NodeHoldProcess("+_7b+")");
}
}
}
}
}
}
var li=document.createElement("li");
li.innerHTML=_73.replace(/#dw_new_line_replacement#/ig,"\n");
var _7c=null;
var _7d=null;
var _7e=false;
var _7f=null;
for(var i=0;i<li.childNodes.length;i++){
if(dojo.hasClass(li.childNodes[i],"forumPostSummary")){
_7d=li.childNodes[i];
if(_77){
var a=dojo.query("a",_7d)[0];
if(a){
var _80=dojo.clone(a.firstChild);
dojo.place(_80,a,"after");
a.parentNode.removeChild(a);
}
}
}
if(dojo.hasClass(li.childNodes[i],"lotusPost")){
_7c=li.childNodes[i];
}
if(dojo.hasClass(li.childNodes[i],"lotusDeletedReplyCreator")){
_7f=li.childNodes[i];
}
if(_7c&&_7d&&_7f){
break;
}
}
if(!_7c||!_7d){
throw new Error("Exception: response was malformed");
return;
}
if(dojo.hasClass(_7c,"lotusPostPendingForReview")){
_7e=true;
if(_76==this.topicUuid){
dojo.cookie(lconn.forums.Constants.CONFIRM_MESSAGE_COOKIE,"pending_topic",{expires:365});
window.location.href=this.forumUrl;
}else{
this.setMessage(this.messageTypes.CONFIRM,this.rs_submitReply);
}
}
var _81=this._getPostSummary();
if(this.uuidToDelete&&_7f){
var _82=dojo.query("[name]",_7f);
if(_82.length>0){
var t=dojo.attr(_82[0],"name");
dojo.query("[name='"+t+"']").forEach(function(_83){
_83.innerHTML=_82[0].innerHTML;
});
}
}
if(_81){
if((!_76||this.uuidToDelete)&&dojo.trim(_7d.innerHTML)!=""){
dojo.place(_7d,_81,"after");
_81.parentNode.removeChild(_81);
_81=null;
lconn.forums.Util.parseDates(_7d);
}
}else{
throw new Error("Exception: "+this.declaredClass+" expected to find a post summary.");
return;
}
if(_76){
if(_76==this.topicUuid){
this.topicTitle=dojo.query(".lotusPostContent .lotusHeader .forumPostTitle",_7c)[0].innerHTML;
}
if(_77&&_76!=this.topicUuid){
var _84=this.totalCount,_85=this.getHash();
var ps=this.getHash("pagesize")||this.ps;
if(ps*_85<_84){
this.jumpPageTo(_85,_76);
}else{
this.jumpPageTo(_85-1,_76);
}
return;
}
var _86=this._getPostNodeByUuid(_76);
if(_86){
var _87=this._getTagNode(_7c);
if(_87){
this.tags=_87.innerHTML;
_87.innerHTML="";
var div=document.createElement("div");
dojo.place(this.tagEditor.domNode,div,"first");
_86.innerHTML=_7c.innerHTML;
dojo.place(this.tagEditor.domNode,this._getTagNode(),"first");
this.tagEditor.reset(this.tags);
}else{
_86.innerHTML=_7c.innerHTML;
}
lconn.forums.Util.parse(_86);
var _88=dojo.query(".forumPostActionToolBarIndicator",_86)[0];
if(_88){
new lconn.core.aria.Toolbar(_88.parentNode);
}
lconn.forums.Util.parseLikes(_86,this.contextPath,{exid:this.exid,displayName:this.displayName});
_86.style.display="";
this.focusPost(_86);
}else{
throw new Error("Exception: lconn.forums.TopicThread expected to find a DOM node with uuid="+_76);
return;
}
}else{
var _89=dojo.query(".lotusPost > a",li);
for(var i=0;i<_89.length;i++){
if((_76=_89[i].getAttribute("name"))){
break;
}
}
if(_77){
this.totalCount++;
var _8a=this.order;
if(_8a=="desc"){
this.jumpPageTo(0,_76);
}else{
var _84=this.totalCount,_8b=this.numPages;
var ps=this.getHash("pagesize")||this.ps;
if(ps*_8b<_84){
this.jumpPageTo(_8b,_76);
}else{
this.jumpPageTo(_8b-1,_76);
}
}
return;
}
var _82=dojo.query("[name='post"+this.exid+"']",li);
if(_82.length>0){
dojo.query("[name='post"+this.exid+"']").forEach(function(_8c){
_8c.innerHTML=_82[0].innerHTML;
});
}
if(_76){
li.setAttribute("uuid",_76);
}
li.setAttribute("level",this._getPostLevel(_75)+1);
var _8d=this._getPostChildrenNodeByUuid(_75);
if(_8d){
var _8e=dojo.query(".canDeleteTopic",li);
if(_8e==null||_8e.length==0){
var _8f=this._getPostNodeByUuid(this.topicUuid);
var _90=dojo.query(".deleteToolBtn",_8f);
if(_90&&_90.length!=0){
_90=_90[0];
_90.parentNode.removeChild(_90);
}
}else{
var g=_8e[0];
g.parentNode.removeChild(g);
}
_8d.appendChild(li);
lconn.forums.Util.parse(li);
new lconn.core.aria.Toolbar(dojo.query(".forumPostActionToolBarIndicator",li)[0].parentNode);
lconn.forums.Util.parseLikes(li,this.contextPath,{exid:this.exid,displayName:this.displayName});
this.focusPost(li);
}else{
throw new Error("Exception: lconn.forums.TopicThread expected to find a node matching [uuid="+_75+"] > .lotusCommentList");
return;
}
}
if(!_77){
var _91=dojo.query("div.associatedImages",li);
var _86=dojo.query(".lotusForumInsertImageBar",this._getPostNodeByUuid(this.topicUuid));
if(_91&&_91.length>0){
if(_86&&_86.length>0){
_86[0].parentNode.innerHTML=_91[0].innerHTML;
}else{
var _92=dojo.query(".lotusui30 .lotusPostContent .lotusActions");
if(_92&&_92.length>0){
var _93=dojo.clone(_91[0]);
_93.style.display="";
_92[0].parentNode.insertBefore(_93,_92[0]);
}
}
}else{
if(_86&&_86.length>0){
dojo.empty(_86[0].parentNode);
_86[0].parentNode.style.display="none";
}
}
}
highlightDwCodeBlocks();
},joinCommunity:function(_94){
var _95=null;
var _96=lconn.communities.bizCard.bizCard.currentCommunity.communityType;
var _97=lconn.core.url.getServiceUrl(lconn.core.config.services.communities).toString();
if(_96=="public"){
this.uuidToReply=_94;
_95=_97+lconn.forums.Constants.COMM_PUBLIC_JOIN_PATH+"?communityUuid="+this.communityId;
var _98=dojo.cookie("ForumsUser");
var _99=dojo.cookie("ForumsUserId");
var str=["<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" xmlns:app=\"http://www.w3.org/2007/app\">","<contributor><name>",_98,"</name><snx:userid>",_99,"</snx:userid><uri></uri>","</contributor>","<snx:role xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" component=\"http://www.ibm.com/xmlns/prod/sn/communities\">member</snx:role>","</entry>"].join("");
dojo.xhrPost({url:_95,headers:{"X-Update-Nonce":"true","Accept":"application/xml","Content-Type":"application/xml; charset=utf-8"},postData:str,handleAs:"text",load:dojo.hitch(this,"onJoinPublicCommunity"),error:dojo.hitch(this,"onJoinCommunityError"),timeout:lconn.forums.Constants.AJAX_TIMEOUT});
}else{
if(_96=="publicInviteOnly"){
_95=_97+lconn.forums.Constants.COMM_MOD_JOIN_REQUEST_PATH+"?communityUuid="+this.communityId;
this.joinForm=new lconn.forums.RequestMemberShip({url:_95,ariaLabel:this.rs_requestJoinCommunity,joinDone:dojo.hitch(this,"onJoinModerateCommunity"),uuid:_94});
var _9a=lconn.forums.Util.popupForm(this.rs_requestJoinCommunity,this.joinForm.domNode,this.rs_send,this.rs_cancel,dojo.hitch(this.joinForm,"post"));
if(this.connection){
dojo.disconnect(this.connection);
}
this.joinForm.enableSubmit=_9a.enableSubmit;
this.joinForm.disableSubmit=_9a.disableSubmit;
this.connection=dojo.connect(this.joinForm,"joinDone",_9a.hide);
}
}
},onJoinPublicCommunity:function(_9b,_9c){
if(_9b&&_9b.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_9b.status)>-1){
this.onJoinCommunityError(_9b,_9c);
}
var _9d=lconn.forums.Constants;
dojo.cookie(_9d.MEMBER_FLUSH_COOKIE_NAME,_9d.MEMBER_FLUSH_COOKIE_VALUE,{expires:36500,path:this.contextPath});
dojo.cookie(_9d.REPLYTO_COOKIE_NAME,this.uuidToReply,{expires:36500,path:this.contextPath});
window.location.href=window.location.href;
},onJoinModerateCommunity:function(){
this.setMessage(this.messageTypes.CONFIRM,this.rs_requestJoinConfirm);
},onJoinCommunityError:function(_9e,_9f){
if(_9e&&_9e.status==401){
var _a0=document.createElement("span");
_a0.innerHTML=this.rs_loggedOut2;
var _a1=document.createElement("a");
if(!_9e.loginUrl){
_a1.href=this.loginUrl;
}else{
_a1.href=_9e.loginUrl;
}
_a1.innerHTML=" "+this.rs_logInTryAgain;
_a0.appendChild(_a1);
this.setMessage(this.messageTypes.ERROR,_a0);
this.setRedirectCookie();
}else{
if(_9e&&_9e.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_9e.status)>-1){
this.setMessage(this.messageTypes.ERROR,this.rs_joinCommunityError);
}
}
},assignDomNodeWithoutTag:function(_a2,_a3){
var _a4=dojo.query(".lotusPostContent",_a2)[0];
var _a3=dojo.query("div.lotusPostContent",_a3)[0];
var _a5=new Array();
var _a6=null;
for(var i=0;i<_a4.childNodes.length;i++){
if(_a4.childNodes[i].className!="lotusMeta"){
_a5.push(_a4.childNodes[i]);
}else{
_a6=_a4.childNodes[i];
}
}
for(var i=0;i<_a5.length;i++){
_a4.removeChild(_a5[i]);
}
var _a7=new Array();
var _a8=-1;
var _a9=_a3.childNodes.length;
for(var i=0;i<_a9;i++){
_a7[i]=_a3.childNodes[i];
if(_a3.childNodes[i].className=="lotusMeta"){
_a8=i;
}
}
for(var i=0;i<_a8;i++){
dojo.place(_a7[i],_a6,"before");
}
for(var i=_a9;i>_a8;i--){
if(i>_a8){
dojo.place(_a7[i],_a6,"after");
}
}
var old=dojo.query(".formatDate",_a6)[0];
var nw=dojo.query(".formatDate",_a7[_a8])[0];
old.innerHTML=nw.innerHTML;
},scroll:function(_aa){
var q="[uuid="+_aa+"]";
var _ab=dojo.query(q,this.domNode);
if(_ab.length>0){
dojox.fx.smoothScroll({duration:400,win:window,node:_ab[0],easing:dojox.fx.easing.easeOut}).play();
return true;
}else{
return false;
}
},scrollToMiddle:function(_ac){
if(!_ac){
return;
}
var _ad;
if(window.innerHeight){
_ad=window.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight&&document.documentElement.clientHeight>0){
_ad=document.documentElement.clientHeight;
}
}
var _ae=dojo.coords(_ac,true);
if(_ad){
var _af=_ad/2-_ae.h/2;
_ae.y-=(_af>0?_af:0);
}
dojox.fx.smoothScroll({duration:400,win:window,target:_ae,easing:dojox.fx.easing.easeOut}).play();
},removeMessageNode:function(){
var _b0=dojo.query(".lotusMessage2",this.domNode);
if(_b0&&_b0.length>0){
_b0[0].className="lotusMessage2 lotusHidden";
_b0[0].innerHTML="";
}
},setMessage:function(_b1,_b2){
lconn.forums.Util.setMessage(_b1,_b2,this.domNode);
if(_b1==this.messageTypes.ERROR){
window.scrollTo(0,0);
}
},setRedirectCookie:function(){
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+this.contextPath;
},canFlag:function(_b3){
var _b4=true;
if(dojo.isString(this.checkFlagUrl)){
dojo.xhrGet({url:this.checkFlagUrl,content:{"nodeId":_b3},handleAs:"json",load:function(_b5,_b6){
_b4=_b5["canFlag"];
},error:function(_b7,_b8){
return;
},sync:true,preventCache:true});
}
return _b4;
},getFlagCategories:function(){
var _b9="[]";
if(dojo.isString(this.getFlagCategoriesUrl)){
dojo.xhrGet({url:this.getFlagCategoriesUrl,content:{},handleAs:"json",load:function(_ba,_bb){
_b9=_ba;
},error:function(_bc,_bd){
return [];
},sync:true,preventCache:true});
}
return _b9;
},flagInappropriate:function(_be,_bf){
if(!_be||typeof _be!="string"){
throw new Error("Exception: "+this.declaredClass+".flagInappropriate(string uuid) was not initialized with the correct parameter.");
}
if(this.flagForm){
this.flagForm.destroyRecursive();
}
if(this.canFlag(_be)){
var _c0=this.getFlagCategories();
this.flagForm=new lconn.forums.FlagInappropriate({url:this.flagInappropriateUrl,checkUrl:this.checkFlagUrl,ariaLabel:this.rs_flagInappropriate,flagDone:dojo.hitch(this,"onFlag",_bf),uuid:_be,flagCategories:_c0});
var _c1=lconn.forums.Util.popupForm(this.rs_flagInappropriate,this.flagForm.domNode,this.rs_flag,this.rs_cancel,dojo.hitch(this.flagForm,"post"));
if(this.connection){
dojo.disconnect(this.connection);
}
this.flagForm.enableSubmit=_c1.enableSubmit;
this.flagForm.disableSubmit=_c1.disableSubmit;
this.connection=dojo.connect(this.flagForm,"flagDone",_c1.hide);
this.uuidToFlag=_be;
}else{
var div=dojo.create("div",{"innerHTML":this.rs_cantFlag});
var df={};
df=lconn.forums.Util.popupForm(this.rs_warning,div,this.rs_ok,this.rs_cancel,function(){
df.hide();
});
}
},onFlag:function(_c2){
var _c3=dojo.string.substitute(this.rs_flagConfirm,[_c2]);
this.setMessageOnNode(this.uuidToFlag,_c3);
},setMessageOnNode:function(_c4,_c5){
var _c6=this._getPostNodeByUuid(_c4);
var _c7=dojo.create("div",{"class":"lotusMessage2 lotusHidden","role":"alert"});
dojo.place(_c7,_c6,"before");
lconn.forums.Util.setMessage(this.messageTypes.CONFIRM,_c5,_c6.parentNode);
},_getMessageNode:function(){
var _c8=dojo.query(".lotusMessage2",this.domNode);
if(_c8&&_c8.length>0){
return _c8[0];
}else{
return null;
}
},_getPostLevel:function(_c9){
if(!_c9||typeof _c9!="string"){
throw new Error(this.declaredClass+"._getPostLevel(string uuid) was not initialized with the correct parameter.");
}
if(_c9==this.topicUuid){
return 0;
}
var _ca=dojo.query("[uuid="+_c9+"]",this.domNode);
if(_ca&&_ca.length>0){
var _cb=_ca[0].getAttribute("level");
if(_cb){
return parseInt(_cb);
}else{
return 0;
}
}else{
throw new Error("Uuid was not found.");
}
},_getPostNodeByUuid:function(_cc){
if(!_cc||typeof _cc!="string"){
throw new Error("lconn.forums.TopicThread._getDomNodeByUuid(string uuid) was not initialized with the correct parameter.");
}
var _cd=dojo.query("[uuid="+_cc+"] .lotusPost",this.domNode);
if(_cd&&_cd.length>0){
return _cd[0];
}else{
return null;
}
},_getPostChildrenNodeByUuid:function(_ce){
if(!_ce||typeof _ce!="string"){
throw new Error("lconn.forums.TopicThread._getPostChildrenNodeByUuid(string uuid) was not initialized with the correct parameter.");
}
var _cf=dojo.query("[uuid="+_ce+"] .lotusCommentList",this.domNode);
if(_cf&&_cf.length>0){
return _cf[0];
}else{
return null;
}
},_getPostSummary:function(){
var _d0=dojo.query(".forumPostSummary",this.domNode);
if(_d0&&_d0.length>0){
return _d0[0];
}else{
return null;
}
},_getTagNode:function(_d1){
if(!_d1){
_d1=this.domNode;
}
var _d2=dojo.query(".dfTags",_d1);
if(_d2&&_d2.length>0){
return _d2[0];
}else{
return null;
}
},_getTopicTitle:function(_d3){
if(!_d3||typeof _d3!="string"){
throw new Error(this.declaredClass+"._getTopicTitle(string uuid) was not initialized with the correct parameter");
}
if(this.topicUuid&&this.topicUuid==_d3){
if(this.topicTitle){
return lconn.core.util.html.decodeHtml(this.topicTitle);
}else{
return "";
}
}else{
var _d4=dojo.query("[uuid='"+_d3+"'] > .lotusPost .forumPostTitle",this.domNode);
if(_d4&&_d4.length>0){
return _d4[0].innerText||_d4[0].textContent;
}else{
return "";
}
}
},updateQuestionAnswerClass:function(){
if(this.isQuestion){
var _d5=dojo.query("[uuid="+this.topicUuid+"]",this.domNode)[0];
dojo.addClass(_d5,"forumQuestion");
var _d6=this._getPostNodeByUuid(this.topicUuid);
dojo.addClass(_d6,"forumNotResolvedQuestion");
var _d7=dojo.query(".lotusCommentList .lotusPost");
for(var i=0;i<_d7.length;i++){
var _d8=_d7[i];
var _d9=(_d8.firstElementChild||_d8.children[0]||{}).name;
var _da=dojo.query(".forumPostActionToolBarIndicator",_d8);
if(_da&&_da.length>0){
var _db=_da[0];
var _dc=(_db.firstElementChild||_db.children[0]||{});
dojo.removeClass(_dc,"lotusFirst");
var _dd="<span class=\"forumAnswerIndicator\">"+"<a href=\"javascript:"+this.jsVar+".markAnswer('"+_d9+"', false)\"  role=\"button\">"+this.rs_rejectAnswerLabel+"</a></span>";
var ali=dojo.create("li",{"class":"lotusFirst",innerHTML:_dd});
_db.insertBefore(ali,_dc);
_dd="<span class=\"forumNotAnswerIndicator\">"+"<a href=\"javascript:"+this.jsVar+".markAnswer('"+_d9+"', true)\"  role=\"button\">"+this.rs_acceptAnswerLabel+"</a></span>";
var bli=dojo.create("li",{"class":"lotusFirst",innerHTML:_dd});
_db.insertBefore(bli,ali);
}
}
}else{
var _d5=dojo.query("[uuid="+this.topicUuid+"]",this.domNode)[0];
dojo.removeClass(_d5,"forumQuestion");
var _d6=this._getPostNodeByUuid(this.topicUuid);
dojo.removeClass(_d6,"forumNotResolvedQuestion");
dojo.removeClass(_d6,"forumResolvedQuestion");
var _de=dojo.query(".forumAnswer").forEach(function(_df,_e0,arr){
dojo.removeClass(_df,"forumAnswer");
});
dojo.query(".lotusCommentList .actionSecondCell").forEach(function(_e1,_e2,arr){
var _e3=_e1.parentNode;
var _e4=(_e3.firstElementChild||_e3.children[0]||{});
_e3.removeChild(_e4);
_e4=(_e3.firstElementChild||_e3.children[0]||{});
_e3.removeChild(_e4);
dojo.addClass(_e1,"lotusFirst");
});
}
},updateQuestionStatus:function(){
dojo.xhrGet({url:this.getQuestionStateUrl,content:{nodeId:this.topicUuid},handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:dojo.hitch(this,"updateQuestionClass"),error:dojo.hitch(this,"errUpdateQuestionStatus")});
},updateQuestionClass:function(_e5,_e6){
if(_e5.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_e5.status)>-1){
this.errUpdateQuestionStatus(_e5,_e6);
}else{
var _e7=this._getPostNodeByUuid(this.topicUuid);
if(_e5.isAnswered){
dojo.addClass(_e7,"forumResolvedQuestion");
dojo.removeClass(_e7,"forumNotResolvedQuestion");
var _e8=dojo.query(".actionSecondCell",_e7)[0];
dojo.removeClass(_e8,"lotusFirst");
var _e9=dojo.query(".actionfirstCell",_e7)[0];
var _ea=dojo.query("a ",_e9)[0];
var _eb=dojo.query("a ",_e8)[0];
dojo.attr(_eb,"tabindex","-1");
dojo.removeAttr(_ea,"tabindex");
}else{
dojo.addClass(_e7,"forumNotResolvedQuestion");
dojo.removeClass(_e7,"forumResolvedQuestion");
var _e8=dojo.query(".actionSecondCell",_e7)[0];
dojo.addClass(_e8,"lotusFirst");
var _eb=dojo.query("a ",_e8)[0];
dojo.removeAttr(_eb,"tabindex");
}
}
},errUpdateQuestionStatus:function(_ec,_ed){
if(_ec&&_ec.status==401){
var _ee;
if(_ec.loginUrl){
_ee=_ec.loginUrl;
}else{
_ee=lconn.forums.Constants.CONTEXT_PATH+lconn.forums.Constants.AUTH_REDIRECT_PATH;
}
lconn.core.DialogUtil.alert(this.rs_warning,this.rs_loggedOut2+" <a href=\""+_ec.loginUrl+"\">"+this.rs_logInTryAgain+"</a>");
this.setRedirectCookie();
}else{
if(_ec&&_ec.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_ec.status)>-1){
this.setMessage(this.messageTypes.ERROR,_ec.message);
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_ec,_ed)){
this.setMessage(this.messageTypes.ERROR,this.rs_updateQuestionStatusError);
}
}
}
},markAnswer:function(_ef,_f0,_f1){
var url="";
if(_f0){
url=this.acceptAnswerUrl;
}else{
url=this.rejectAnswerUrl;
}
dojo.xhrPost({url:url,headers:lconn.forums.Constants.NONCE_HEADER,content:{nodeId:_ef},handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:dojo.hitch(this,function(_f2){
this.onMarkAnswer(_ef,_f0,_f2,_f1);
}),error:dojo.hitch(this,"errMarkAnswer")});
},onMarkAnswer:function(_f3,_f4,_f5,_f6){
if(_f5.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_f5.status)>-1){
this.errMarkAnswer(_f5);
}else{
if(this.getHash()==0){
this.jumpPageTo(0,_f3);
var _f7=dojo.connect(this,"onPageTo",dojo.hitch(this,function(){
dojo.disconnect(_f7);
var _f8=this;
setTimeout(function(){
if(_f6){
var _f9=dojo.query(".lotusBreadcrumbs a.forumLink")[0];
if(_f9){
dijit.focus(_f9);
}
}else{
_f8._focusAnswerLink(_f3,_f4);
}
},50);
}));
}else{
this._focusAnswerLink(_f3,_f4);
}
}
},_focusAnswerLink:function(_fa,_fb){
var _fc=this._getPostNodeByUuid(_fa);
var _fd=dojo.query(".lotusPostName .lotusPerson",_fc)[0].innerHTML;
if(_fd){
_fd=_fd.replace(/<wbr>/g,"");
_fd=_fd.replace(/<wbr\/>/g,"");
_fd=_fd.replace(/<WBR>/g,"");
_fd=_fd.replace(/<WBR\/>/g,"");
}
if(_fb){
if(!this.isSequentialView){
dojo.addClass(_fc,"forumAnswer");
}else{
dojo.addClass(_fc,"acceptedReply");
}
this.setMessage(this.messageTypes.CONFIRM,dojo.string.substitute(this.rs_acceptAnswer,[_fd]));
var _fe=dojo.query(".forumAnswerIndicator.lotusFirst",_fc)[0];
if(_fe){
var _ff=dojo.query("a ",_fe)[0];
if(_ff){
dojo.removeAttr(_ff,"tabindex");
_ff.focus();
}
}
}else{
if(!this.isSequentialView){
dojo.removeClass(_fc,"forumAnswer");
}else{
dojo.removeClass(_fc,"acceptedReply");
}
this.setMessage(this.messageTypes.CONFIRM,dojo.string.substitute(this.rs_rejectAnswer,[_fd]));
var _100=dojo.query(".forumNotAnswerIndicator.lotusFirst",_fc)[0];
if(_100){
var _101=dojo.query("a",_100)[0];
if(_101){
dojo.removeAttr(_101,"tabindex");
_101.focus();
}
}
}
this.updateQuestionStatus();
},errMarkAnswer:function(_102,_103){
if(_102&&_102.status==401){
lconn.core.DialogUtil.alert(this.rs_warning,this.rs_loggedOut2+" <a href=\""+_102.loginUrl+"\">"+this.rs_logInTryAgain+"</a>");
this.setRedirectCookie();
}else{
if(_102&&_102.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_102.status)>-1){
this.setMessage(this.messageTypes.ERROR,_102.message);
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_102,_103)){
this.setMessage(this.messageTypes.ERROR,this.rs_markAnswerError);
}
}
}
},reopenQuestion:function(uuid){
if(uuid!=this.topicUuid){
throw new Error(this.declaredClass+".reopenQuestion(string uuid) uuid is not topic uuid.");
}
dojo.xhrPost({url:this.reopenQuestionUrl,headers:lconn.forums.Constants.NONCE_HEADER,content:{nodeId:uuid},handleAs:"json",timeout:lconn.forums.Constants.AJAX_TIMEOUT,load:dojo.hitch(this,"onReopenQuestion"),error:dojo.hitch(this,"errReopenQuestion")});
},onReopenQuestion:function(_104,_105){
if(_104&&_104.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_104.status)>-1){
this.errReopenQuestion(_104,_105);
}else{
var _106=this._getPostNodeByUuid(this.topicUuid);
dojo.addClass(_106,"forumNotResolvedQuestion");
dojo.removeClass(_106,"forumResolvedQuestion");
var _107=dojo.query(".forumAnswer").forEach(function(node,_108,arr){
dojo.removeClass(node,"forumAnswer");
});
this.setMessage(this.messageTypes.CONFIRM,this.rs_reopenQuestion);
this.updateQuestionStatus();
if(this.isSequentialView){
this.jumpPageTo(this.getHash(),this.topicUuid);
var _109=dojo.connect(this,"onPageTo",dojo.hitch(this,function(){
dojo.disconnect(_109);
var _10a=dojo.query(".forumQestionIndicator a",this._getPostNodeByUuid(this.topicUuid))[0];
setTimeout(function(){
if(_10a){
dijit.focus(_10a);
}
},50);
}));
}else{
var _10b=dojo.query(".forumQestionIndicator a",_106)[0];
if(_10b){
dijit.focus(_10b);
}
}
}
},errReopenQuestion:function(_10c,_10d){
if(_10c&&_10c.status==401){
var span=document.createElement("span");
span.innerHTML=this.rs_loggedOut2;
var _10e=document.createElement("a");
_10e.href=_10c.loginUrl;
_10e.innerHTML=" "+this.rs_logInTryAgain;
span.appendChild(_10e);
this.setMessage(this.messageTypes.ERROR,span);
this.setRedirectCookie();
}else{
if(_10c&&_10c.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_10c.status)>-1){
this.setMessage(this.messageTypes.ERROR,_10c.message);
}else{
if(!com.ibm.ajax.auth.isAuthenticationRequired(_10c,_10d)){
this.setMessage(this.messageTypes.ERROR,this.rs_reopenQuestionError);
}
}
}
},createAnswer:function(uuid){
if(uuid!=this.topicUuid){
throw new Error(this.declaredClass+".createAnswer(string uuid) uuid is not topic uuid.");
}
this.reply(uuid,true);
},onCreateAnswer:function(_10f,_110){
var _111=this.replyForm.replyUuidInput.value;
var _112=this.replyForm.parentUuidInput.value;
var _113="<div>"+this.rs_createAnswer+"</div>";
if(_113!=""){
var _114=document.createElement("span");
_114.innerHTML=_113;
this.setMessage(this.messageTypes.CONFIRM,_114);
}
this.cancelForm();
this.onFinishPost(_10f,_110,_112,_111);
this.updateQuestionStatus();
},addIndentAlt:function(_115){
var _116=dojo.create("span",{"class":"lotusAltText postIndentAlt","innerHTML":"|_"});
if(!dojo._isBodyLtr){
_116.innerHTML="_|";
}
if(_115){
dojo.place(_116,_115,"before");
}else{
dojo.query(".lotusChild.lotusCommentList").forEach(function(_117){
var _118=dojo.clone(_116);
dojo.place(_118,_117,"before");
});
}
},removeIndentAlt:function(_119){
if(_119&&dojo.hasClass(_119,"postIndentAlt")){
dojo.destroy(_119);
}else{
var _11a=dojo.query(".lotusAltText.postIndentAlt",_119.parentNode);
if(_11a&&_11a.length>1){
dojo.destroy(_11a[_11a.length-1]);
}
}
},getQuoteNode:function(_11b){
var _11c=this.quoteNode;
var _11d=this.quoteContentNode;
if(_11d){
dojo.empty(_11d);
}
if(!_11c){
_11c=this.quoteNode=dojo.create("div",{className:"lotusPostDetails"});
_11d=this.quoteContentNode=dojo.create("blockquote",{className:"quote"});
_11c.appendChild(_11d);
}
var _11e=this._getPostNodeByUuid(_11b);
var div=_11d.appendChild(dojo.create("div"));
lconn.core.util.html.substitute(dojo.doc,div,this.rs_inResponseTo,{0:function(){
var _11f=dojo.query(".lotusPostName .vcardParent .vcard",_11e);
if(_11f&&_11f[0]){
var span=div.appendChild(dojo.doc.createElement("span"));
span.className="vcard";
var link=dojo.query("a.lotusPerson",_11f[0])[0];
var a=span.appendChild(dojo.doc.createElement("a"));
a.className="lotusPerson fn bidiAware hasHover";
a.href=link.href;
dijit.setWaiRole(a,"button");
a.title=link.title;
a.appendChild(dojo.clone(link.firstChild));
var _120=dojo.query(".x-lconn-userid",_11f[0])[0];
if(_120){
span.appendChild(dojo.clone(_120,true));
}
var _121=dojo.query(".email",_11f[0])[0];
if(_121){
span.appendChild(dojo.clone(_121,true));
}
}
div.appendChild(dojo.doc.createElement("br"));
div.appendChild(dojo.doc.createElement("br"));
}});
var _122=dojo.query(".lotusPostDetails",_11e);
if(_122[0]){
var div=_11d.appendChild(dojo.doc.createElement("div"));
div.innerHTML+=_122[0].innerHTML;
}
dojo.query("blockquote.quote",_11d).forEach(function(item){
if(item.parentNode){
item.parentNode.removeChild(item);
}
});
this.connect(this,"cancelForm",function(){
dojo.empty(_11d);
_11c.style.display="none";
});
return _11c;
},isAnswer:function(uuid){
var _123=this._getPostNodeByUuid(uuid);
return dojo.hasClass(_123,"forumAnswer");
},openReplyToByCookie:function(){
var uuid=dojo.cookie(lconn.forums.Constants.REPLYTO_COOKIE_NAME);
dojo.cookie(lconn.forums.Constants.REPLYTO_COOKIE_NAME,uuid,{expires:-1,path:this.contextPath});
if(uuid&&dojo.trim(uuid)!=""){
this.uuidToReply=dojo.trim(uuid);
if(this.scroll(this.uuidToReply)){
this.reply(this.uuidToReply,false,false,true);
}else{
this.uuidToReply="";
}
}
var _124=dojo.cookie(lconn.forums.Constants.MEMBER_FLUSH_COOKIE_NAME);
dojo.cookie(lconn.forums.Constants.MEMBER_FLUSH_COOKIE_NAME,_124,{expires:-1,path:this.contextPath});
if(_124==lconn.forums.Constants.MEMBER_FLUSH_COOKIE_VALUE){
this.setMessage(this.messageTypes.CONFIRM,this.rs_joinCommConfirm1);
}
},onPageTo:function(_125,_126){
if(_125&&_125.status&&_125.status>=400){
this.onPageToError(_125,_126);
return;
}
console.log(2);
this.isPaging=false;
var _127=document.createElement("div");
var _128=_125.response;
var p1=_128.indexOf("<ul class=\"lotusList dfAttachments\">");
console.log(p1);
if(p1>-1){
var doit=true;
var rest=_128.substr(p1+20);
do{
var p11=rest.indexOf("<ul class=\"lotusList dfAttachments\">");
console.log(p11);
if(p11>-1){
var _129=rest.substr(0,p11);
rest=rest.substr(p11+20);
}else{
var _129=rest;
doit=false;
}
var c1=_129;
var p2=c1.indexOf("</ul>");
if(p2>-1){
var c2=c1.substr(0,p2);
var _12a=/href="([^"]*)"/g;
var _12b=c2.match(_12a);
var _12c=new Array();
if(_12b&&_12b.length>0){
for(var k=0;k<_12b.length;k++){
var h=_12b[k];
if(h&&h!=""){
h=h.replace("href=","");
h=h.replace(/"/g,"");
if(h!=""){
if(_12c[h]){
continue;
}
_12c[h]=true;
console.log("** [h] ** \n"+h);
var _12d=xmlc.UIModification_downloadDisclaimer_NodeHold(null,h,null);
console.log(_12d);
_128=_128.replace(h,"javascript:xmlc.UIModification_downloadDisclaimer_NodeHoldProcess("+_12d+")");
}
}
}
}
}
}while(doit);
}
_127.innerHTML=_128.replace(/#dw_new_line_replacement#/ig,"\n");
var _12e=this._getPageRangeNodes();
var _12f=dojo.query("div.lotusPagedContent",_127);
if(_12f.length==0){
throw new Exception("Exception: "+this.declaredClass+".onPageTo() a received malformed HTML response.");
return;
}
var _130=dojo.query("div.lotusPagedContent",this.domNode)[0];
var _131=_12f.attr("rangeLow")[0];
var _132=_12f.attr("rangeHigh")[0];
var _133=_12f.attr("rangeTotal")[0];
if(_12e){
for(var i=0;i<_12e.length;i++){
var _134=_12e[i];
_134.rangeLow.innerHTML=_131;
_134.rangeHigh.innerHTML=_132;
_134.rangeTotal.innerHTML=_133;
}
}
this.numPages=Math.ceil(parseInt(_133)/this.ps);
this.page=Math.floor(parseInt(_131)/this.ps);
this._updatePageBar();
if(this.sortable){
this._createSortListeners(_12f[0]);
}
if(!_130){
throw new Exception("Exception: "+this.declaredClass+".onPageTo() couldn't find a table in the topic list.");
return;
}
parentContainer=_130.parentNode;
dojo.place(_12f[0],_130,"before");
if(this.sorting){
this.addFocusOnSort();
}
parentContainer.removeChild(_130);
_130=null;
_12f[0]=null;
lconn.forums.Util.parseDates(this.domNode);
lconn.forums.Util.parseProfileCards(this.domNode);
lconn.forums.Util.parseLikes(this.domNode,this.contextPath,{exid:this.exid,displayName:this.displayName});
lconn.forums.Util.parseAttachments(this.domNode);
lconn.forums.Util.createPostActionsToolbar(this.domNode);
var _135=dojo.getObject("lconn.profiles.bizCard.bizCard");
if(_135){
dojo.query(".vcard",_12f[0]).forEach(function setProcessTag(item){
_135.processTag(item);
});
}
this.isShowCheckboxes(parentContainer);
if(dojo.isIE&&dojo.isIE<=7){
dojo.query(".dfForumTable td.dfCheckboxAdmin").forEach(function(item){
dojo.removeClass(item,"lotusHidden");
dojo.removeClass(item,"dfCheckboxAdmin");
});
}
if(this.listType==lconn.forums.Constants.ListTypes.REPLIES){
if(this.page==0&&this._getTagNode){
var li=document.createElement("li");
li.innerHTML=_125;
var _136=dojo.query(".lotusPost",li)[0];
var _137=this._getTagNode(_136);
if(_137){
var div=document.createElement("div");
dojo.place(this.tagEditor.domNode,div,"first");
dojo.place(this.tagEditor.domNode,this._getTagNode(),"first");
}
}
if(this.replyUuid!=null){
lconn.forums.Util.focusPost(this.replyUuid);
}else{
window.scrollTo(0,50);
}
this.replyUuid=null;
}
this.sorting=false;
highlightDwCodeBlocks();
}});
}


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




dojo.declare("lconn.forums.FormAuthUtility",null,{_contextRoot:null,REDIRECT_PATH:lconn.forums.Constants.AUTH_REDIRECT_PATH,COOKIE_NAME:lconn.forums.Constants.REDIRECT_COOKIE,constructor:function(_1){
if(!lconn.forums.FormAuthUtility.prototype._init){
lconn.forums.FormAuthUtility.prototype._init=true;
this._contextRoot=_1;
this._overrideXhrCalls();
}else{
throw new Error("lconn.forums.FormAuthUtility is a singleton. It cannot be instantiated twice");
}
},_overrideXhrCalls:function(){
console.log("overrideXhrCalls");
var _2=com.ibm.ajax.auth;
var _3=this._contextRoot+this.REDIRECT_PATH;
var _4=this;
var _5={url:_3,authenticationRequired:function(_6,_7,_8){
var _9=window.location.href.replace(/,/g,"%2C");
document.cookie=_4.COOKIE_NAME+"="+_9+"; path="+_4._contextRoot+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
console.log("Hit authenticationRequired");
if(_7.args._logIn==undefined){
location.href=this.url;
}else{
_7.args._logIn(_7.args._tryAgainLink,this.url);
}
},onSuccess:function(_a,_b){
console.log("Successfully loaded");
}};
var _c=function(_d,_e){
var _f=com.ibm.ajax.auth;
if(typeof _e.xhr.status=="unknown"){
return true;
}
var _10=_e.xhr.status;
if(_10==302||(dojo.isIE&&(_10==0||_10==12150))){
return true;
}
if(_e.xhr&&(!_d||dojo.indexOf(["cancel","timeout"],_d.dojoType)==-1)){
if(_f.checkByContentType&&_e.args&&_e.args.isPostRequest&&_e.xhr&&/^text\/html/.exec(_e.xhr.getResponseHeader("Content-Type"))&&_e.xhr.status>=200&&_e.xhr.status<300){
return true;
}
}
return false;
};
IS_FORUMS_AUTHENTICATION_REQUIRED=_c;
var _11=_c;
if(typeof (CUSTOM_AUTH_JS_CLASS)!=="undefined"){
var _12=eval("new "+CUSTOM_AUTH_JS_CLASS+"()");
if(typeof (_12.isAuthenticationRequired)!=="undefined"){
_2.setDefaultAuthenticationTests(true,true,true);
_11=_12.isAuthenticationRequired;
if(typeof (_12.handler)!=="undefined"){
_2.setAuthenticationHandler(dojo.hitch(_12.handler,_12.handler.authenticationRequired));
}else{
_2.setAuthenticationHandler(dojo.hitch(_5,_5.authenticationRequired));
}
}
}else{
_2.setDefaultAuthenticationTests(true,true,true);
_2.setAuthenticationHandler(dojo.hitch(_5,_5.authenticationRequired));
}
originaldojoxhr=dojo.xhr;
dojo.xhr=function(){
var _13=arguments[1];
if(typeof _13.handleAs=="undefined"){
_13.handleAs="text";
}
try{
_13[1]=_2.prepareSecure(_13,_11);
}
catch(e){
console.log("exception in overriden dojo.xhr (form-based auth");
console.log(e);
}
return originaldojoxhr(arguments[0],arguments[1],arguments[2]);
};
}});
lconn.forums.FormAuthUtility.prototype._init=false;
}


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




















dojo.declare("lconn.forums.ViewController",[dijit._Widget,lconn.forums.StartForumMixIn],{tags:null,topicForm:null,testparam:null,contextPath:"",uuid:"",showForm:false,topicForm:null,subscriptionsEnabled:true,sortBy:null,order:null,viewNode:null,pagedListWidgets:null,isCommunity:null,allowUpload:true,communityUuid:null,query:null,canPost:true,userLoggedIn:true,forumsPath:"",postTopicPath:"",createForumPath:"",forumTagsPath:"",topicTagsPath:"",listPaths:null,postMixInProperties:function(){
if(!this.uuid){
this.uuid=dojo.attr(this.srcNodeRef,"uuid");
}
if(!this.contextPath){
this.contextPath=dojo.attr(this.srcNodeRef,"contextPath");
}
if(!this.tags){
this.tags=dojo.attr(this.srcNodeRef,"tags");
}
if(!this.subscriptionsEnabled){
this.subscriptionsEnabled=dojo.attr(this.srcNodeRef,"subscriptionsEnabled");
}
if(!this.showForm){
this.showForm=(dojo.attr(this.srcNodeRef,"showForm")=="true"?true:false);
}
if(!this.query){
this.query=dojo.attr(this.srcNodeRef,"query");
}
if(!this.sortBy){
this.sortBy=dojo.attr(this.srcNodeRef,"sortBy");
}
if(!this.order){
this.order=dojo.attr(this.srcNodeRef,"order");
}
if(this.numPages===null){
this.numPages=parseInt(dojo.attr(this.srcNodeRef,"numPages"));
if(!this.numPages){
this.numPages=1;
}
}
if(!this.ps){
this.ps=parseInt(dojo.attr(this.srcNodeRef,"ps"));
}
if(this.isCommunity===null){
var _1=dojo.attr(this.srcNodeRef,"isCommunity");
this.isCommunity=(_1&&_1.toLowerCase()=="true"?true:false);
}
if(this.isCommunity==true){
this.communityUuid=dojo.attr(this.srcNodeRef,"uuid");
}
var _2;
if((_2=dojo.attr(this.srcNodeRef,"canPost"))!==null){
this.canPost=(_2=="false"?false:true);
}
var _3;
if((_3=dojo.attr(this.srcNodeRef,"userLoggedIn"))!==null){
this.userLoggedIn=(_3=="false"?false:true);
}
var _4;
if((_4=dojo.attr(this.srcNodeRef,"allowUpload"))!==null){
this.allowUpload=(_4=="false"?false:true);
}
if(!this.postTopicPath){
this.postTopicPath=this.contextPath+lconn.forums.Constants.CREATE_TOPIC_PATH;
}
this.creatorSubscribe=this.isCommunity?dojo.attr(this.srcNodeRef,"creatorSubscribe")=="true":true;
},postCreate:function(){
var c=lconn.forums.Constants;
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
var _5=document.createElement("div");
dojo.place(_5,this.domNode,"before");
dojo.place(this.domNode,_5,"first");
this.viewNode=this.domNode;
this.domNode=_5;
if(this.showForm){
this.newTopic();
}
this.createAriaHelper();
this.createPagedLists();
this.subscribe("com/ibm/lconn/forums/send/message",this.setMessage);
this.subscribe("com/ibm/lconn/forums/topic/reload",this.goToPagedLists);
this.subscribe("/dojo/hashchange",this.goToPagedListsByHash);
dojo.connect(this,"startForum",this,"setSubscribe");
},setSubscribe:function(){
var _6=!!this.creatorSubscribe;
var _7=this.startForumForm;
if(_7){
_7.setSubscribe(_6);
}
},goToPagedListsByHash:function(){
for(var i=0;i<this.pagedListWidgets.length;i++){
var _8=this.pagedListWidgets[i].getHash("pagesize");
var _9=this.pagedListWidgets[i].getHash();
var _a=this.pagedListWidgets[i].initPsHash;
if((!isNaN(_9)&&_9!=this.pagedListWidgets[i].page)||(!isNaN(_8)&&_8!=this.pagedListWidgets[i].ps)||_8==_a){
this.pagedListWidgets[i].ps=_8;
this.pagedListWidgets[i].pageTo(_9);
}
}
},goToPagedLists:function(){
for(var i=0;i<this.pagedListWidgets.length;i++){
this.pagedListWidgets[i].pageTo(this.pagedListWidgets[i].page);
}
},createAriaHelper:function(){
if(this.isCommunity==false){
return;
}
var _b=dojo.query(".lotusTabContainer .lotusTabs",this.domNode)[0];
new lconn.core.aria.TabPanel(_b);
},createPagedLists:function(){
var _c=this._getPagedLists();
var _d;
this.pagedListWidgets=new Array();
for(var i=0;i<_c.length;i++){
_d="";
if(this.listPaths){
_d=this.listPaths[dojo.attr(_c[i],"listType")];
}
this.pagedListWidgets.push(new lconn.forums.PagedList({contextPath:this.contextPath,uuid:this.uuid,isCommunity:this.isCommunity,tags:this.tags,query:this.query,sortBy:this.sortBy,order:this.order,listUrl:(_d?_d:null)},_c[i]));
}
},changeCategory:function(){
if(this.categoryPicker){
this.categoryPicker.destroyRecursive();
}
this.categoryPicker=new lconn.forums.CategoryPicker({contextPath:this.contextPath,onPost:dojo.hitch(this,"onchangeCategory"),type:"forum"});
var _e=[];
_e.push(this.uuid);
this.categoryPicker.putForumsCategories(null,_e);
var _f=lconn.forums.Util.popupForm(this.rs_move,this.categoryPicker.domNode,this.rs_move,this.rs_cancel,dojo.hitch(this.categoryPicker,"post"));
if(this.formConnection){
dojo.disconnect(this.formConnection);
}
this.formConnection=dojo.connect(this.categoryPicker,"postSuccess",_f.hide);
},onchangeCategory:function(){
location.href=this.contextPath+lconn.forums.Constants.REDIRECT_FORUM_PATH+"?id="+this.uuid;
},newTopic:function(evt){
if(evt){
dojo.stopEvent(evt);
}
if(evt){
evt=dojo.fixEvent(evt);
this.startTopicButton=evt.target;
}
dojo.addClass(this.viewNode,"lotusHidden");
if(!this.topicForm){
var div=document.createElement("div");
this.domNode.appendChild(div);
this.topicForm=new lconn.forums.PostForm({"class":"lotusForumNewTopic",isTopic:true,operation:"create",contextPath:this.contextPath,url:this.postTopicPath,forumsPath:this.forumsPath,tagsPath:this.topicTagsPath,showCard:false,ariaLabel:this.rs_startTopic,allowUpload:this.allowUpload,forumUuid:(this.uuid==this.communityUuid)?"":this.uuid,communityUuid:this.communityUuid,parentUuid:(this.isCommunity?null:this.uuid),subscribed:true,subscriptionsEnabled:this.subscriptionsEnabled,onPost:dojo.hitch(this,"onPost")},div);
this.topicForm.focus();
this.connect(this.topicForm,"cancel","closeTopicForm");
}else{
dojo.removeClass(this.topicForm.domNode,"lotusHidden");
this.topicForm.focus();
}
},closeTopicForm:function(){
dojo.addClass(this.topicForm.domNode,"lotusHidden");
dojo.removeClass(this.viewNode,"lotusHidden");
this.topicForm.destroy();
this.topicForm=null;
if(this.startTopicButton){
this.startTopicButton.focus();
}
},onPost:function(_10,_11){
if(_10){
this.topicForm.stopPreventDataLoss();
if(_10.url){
dojo.cookie(lconn.forums.Constants.CONFIRM_MESSAGE_COOKIE,"pending_topic",{expires:365,path:"/"});
location.href=_10.url;
}else{
location.href=_10;
}
}else{
throw new Error("Response from trying to create a topic did not contain anything");
}
},focusTopic:function(_12){
if(!_12){
_12=this.domNode;
}
links=dojo.query("a[href]",_12);
if(links.length>0){
links[0].focus();
}
},setRedirectCookie:function(){
document.cookie=lconn.forums.Constants.REDIRECT_COOKIE+"="+location.href+"; expires="+new Date(new Date().getTime()+365*24*60*60*1000).toGMTString()+"; path="+this.contextPath+(lconn.forums.Constants.FORCE_SSL=="true"?"; secure":"");
},_getPagedLists:function(){
return dojo.query(".forumPagedList",this.domNode);
},uninitialize:function(){
for(var i=0;i<this.pagedListWidgets.length;i++){
this.pagedListWidgets[i].destroyRecursive();
}
},_getMessageNode:function(){
var _13=dojo.query(".lotusMessage2",this.domNode);
if(_13&&_13.length>0){
return _13[0];
}else{
return null;
}
},removeMessageNode:function(){
var _14=dojo.query(".lotusMessage2",this.domNode);
if(_14&&_14.length>0){
_14[0].className="lotusMessage2 lotusHidden";
_14[0].innerHTML="";
}
},setMessage:function(_15,_16){
lconn.forums.Util.setMessage(_15,_16,this.domNode);
}});
}


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


dojo.declare("lconn.forums.MyForumsView",[lconn.forums.ViewController],{view:"",filter:"",createPagedLists:function(){
var _1=this._getPagedLists();
this.pagedListWidgets=new Array();
for(var i=0;i<_1.length;i++){
this.pagedListWidgets.push(new lconn.forums.PagedList({contextPath:this.contextPath,view:this.view,filter:this.filter,tags:this.tags,sortBy:this.sortBy,order:this.order},_1[i]));
}
}});
}


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




dojo.declare("lconn.forums.ForumView",[lconn.forums.ViewController,lconn.forums.ForumsActions],{postMixInProperties:function(){
this.inherited("postMixInProperties",arguments);
if(dojo.attr(this.srcNodeRef,"forumName")){
this.forum=new lconn.forums.types.Forum({id:this.uuid,name:dojo.attr(this.srcNodeRef,"forumName")||"",description:dojo.attr(this.srcNodeRef,"forumDescription")||"",parentId:dojo.attr(this.srcNodeRef,"forumParentId")||"",tags:dojo.attr(this.srcNodeRef,"forumTags")||"",locked:dojo.attr(this.srcNodeRef,"forumLocked")=="true"?true:false,canDelete:dojo.attr(this.srcNodeRef,"forumCanDelete")=="true"?true:false});
}
this.subscribe("com/ibm/lconn/tags/widget/reload","tagsChanged");
},tagsChanged:function(){
var _1=dijit.byId("forumTagEditer");
if(_1){
this.forum.tags=_1._tagArray;
}
}});
}


;define("dojox/string/Builder",["dojo/_base/lang"],function(_1){
var _2=_1.getObject("string",true,dojox).Builder=function(_3){
var b="";
this.length=0;
this.append=function(s){
if(arguments.length>1){
var _4="",l=arguments.length;
switch(l){
case 9:
_4=""+arguments[8]+_4;
case 8:
_4=""+arguments[7]+_4;
case 7:
_4=""+arguments[6]+_4;
case 6:
_4=""+arguments[5]+_4;
case 5:
_4=""+arguments[4]+_4;
case 4:
_4=""+arguments[3]+_4;
case 3:
_4=""+arguments[2]+_4;
case 2:
b+=""+arguments[0]+arguments[1]+_4;
break;
default:
var i=0;
while(i<arguments.length){
_4+=arguments[i++];
}
b+=_4;
}
}else{
b+=s;
}
this.length=b.length;
return this;
};
this.concat=function(s){
return this.append.apply(this,arguments);
};
this.appendArray=function(_5){
return this.append.apply(this,_5);
};
this.clear=function(){
b="";
this.length=0;
return this;
};
this.replace=function(_6,_7){
b=b.replace(_6,_7);
this.length=b.length;
return this;
};
this.remove=function(_8,_9){
if(_9===undefined){
_9=b.length;
}
if(_9==0){
return this;
}
b=b.substr(0,_8)+b.substr(_8+_9);
this.length=b.length;
return this;
};
this.insert=function(_a,_b){
if(_a==0){
b=_b+b;
}else{
b=b.slice(0,_a)+_b+b.slice(_a);
}
this.length=b.length;
return this;
};
this.toString=function(){
return b;
};
if(_3){
this.append(_3);
}
};
return _2;
});


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






dojo.declare("lconn.core.SpinnerOverlay",[dijit._Widget,lconn.core.Res,dijit._Templated],{templateString:"<div class='SpinnerOverlay' dojoAttachPoint='root_AP'><div style='${spinnerDisplay}' class='spinner'>&nbsp;</div><div dojoAttachPoint='loadingText_AP'>${rs_loading}</div></div>",rs_loading:"rs_loading",hasSpinner:true,spinnerDisplay:"",postMixInProperties:function(){
this.rs_loading=this.getString(this.rs_loading);
if(!this.hasSpinner){
this.spinnerDisplay="display: none;";
}
},overlaidNode:null,postCreate:function(){
},showSpinner:function(){
this.root_AP.style.display="block";
if(this.overlaidNode){
dojo.addClass(this.overlaidNode,"fadedOut");
var _1=dojo.position(this.overlaidNode,true);
if(_1.h>0){
this.root_AP.style.position="absolute";
dojo.style(this.root_AP,{left:Math.round(_1.x)+"px",top:Math.round(_1.y)+"px",width:Math.round(_1.w)+"px",height:Math.round(_1.h)+"px"});
}else{
this.root_AP.style.height="auto";
this.root_AP.style.width="auto";
this.root_AP.style.position="relative";
}
}else{
this.root_AP.style.position="static";
this.root_AP.style.width="auto";
this.root_AP.style.height="auto";
}
},hideSpinner:function(){
this.root_AP.style.display="none";
this.root_AP.style.position="static";
this.root_AP.style.width="1px";
this.root_AP.style.height="1px";
if(this.overlaidNode){
dojo.removeClass(this.overlaidNode,"fadedOut");
}
}});
}


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








lconn.forums.NameUtil={getHTML:function(_1,id,_2){
var _3=["<span class=\"vcard\" "];
if(id){
_3.push("id=\"",id,"\"");
}
_3.push(">");
var _4="lotusPerson";
var _5="";
var _6="active";
_5=lconn.core.HTMLUtil.escapeText(_1.name);
if(_1.inactive){
_6="inactive";
_4="lotusPersonInactive";
}
if(_2){
var _7=lconn.forums.Constants.CONTEXT_PATH+"/html/search?userid="+_1.userid+"&name="+_5;
_3.push("<a class=\"fn person bidiAware "+_4+"\" aria-describedby=\"semtagmenu\" title="+_5+"\" href=\""+_7+"\" >",_5,"</a>");
}else{
var a;
if(_1.email){
a=com.ibm.lconn.layout.people.createLink({email:_1.email,name:_5,state:_6});
}else{
a=com.ibm.lconn.layout.people.createLink({userid:_1.userid,name:_5,state:_6});
}
var _8=dojo.create("div");
_8.appendChild(a);
_3.push(_8.innerHTML);
}
if(_1.email){
_3.push("<span class=\"fn person "+_4+" email\" style=\"display:none\">",lconn.core.HTMLUtil.escapeText(_1.email),"</span>");
}
if(_1.userid){
_3.push("<span class=\"fn person "+_4+" x-lconn-userid\" style=\"display:none\">",lconn.core.HTMLUtil.escapeText(_1.userid),"</span>");
}
_3.push("</span>");
return _3.join("");
},_rs_inactiveUser:"",getInactiveUserString:function(){
var _9=lconn.forums.NameUtil._rs_inactiveUser;
if(!_9){
_9=dojo.i18n.getLocalization("lconn.forums","strings").rs_inactiveUser;
}
return _9;
}};
}


;dojo.cache("lconn.forums", "templates/AddMembers.html", "<div class=\"lotusForm lotusFormTable AddMembersForm\"> <form dojoAttachPoint=\"form_AP\" method=\"post\" onsubmit=\"return false\"> <input type=\"hidden\" value=\"${forumUuid}\" name=\"forumUuid\"/> <div dojoAttachPoint=\"addMembers_AP\"> <div class=\"AddMembers\" > <label dojoAttachPoint=\"descriptionNode\" for=\"${id}_input\"></label> <div dojoAttachPoint=\"inputContainer_AP\"></div> <div class=\"lotusHidden lotusBreakWord\" dojoAttachPoint=\"formErrorNode\" style=\"width: 400px;\"> <div class=\"lotusMessage2\" role=\"alert\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span><div class=\"lotusMessageBody\" dojoAttachPoint=\"formErrorMessageNode\"></div> </div> </div> <div role=\"alert\" dojoAttachPoint=\"titleErrorNode\" class=\"lotusMessage2 lotusHidden\"><img src=\"${_blankGif}\" class=\"lotusIcon lotusIconMsgError\" alt=\"${rs_error}\" /><span class=\"lotusAltText\">${rs_errorColon}</span> <div class=\"lotusMessageBody\" dojoAttachPoint=\"titleErrorMessageNode\"></div> </div> <div class=\"field\"> <input dojoAttachPoint=\"membersCombo_AP\" id=\"${id}_input\" class=\"bidiAware\"></input> </div> <div class=\"lotusFilters2\"> <div class=\"lotusList lotusEditable lotusMeta\" dojoAttachPoint=\"memberList_AP\" role=\"toolbar\"></div> </div> </div> </div> </form></div>");

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










dojo.declare("lconn.forums.AddMembers",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.forums","templates/AddMembers.html"),rs_addMemberDescription:"Give these users forum moderation access:",rs_addMember_title:"add member",rs_memberIsEmpty:"Please select at least one member",contextPath:"",onPost:null,type:"",forumUuid:null,forumName:null,memberStore:null,memberHelper:null,typeAhead_W:null,members:{},membersByUUID:{},scrollThreshold:20,blankImgUrl:dojo.config.blankGif||dijit._Widget.prototype._blankGif,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function(){
if(this.forumName!=""){
var _1=dojo.string.substitute(this.rs_addMemberDescription,[lconn.core.globalization.bidiUtil.enforceTextDirection(this.forumName)]);
if(this.descriptionNode.innerText==null){
this.descriptionNode.textContent=_1;
}else{
this.descriptionNode.innerText=_1;
}
}
this.members=[];
this.membersByUUID={};
var _2=this.contextPath+"/ajax/getMembers";
this.memberStore=new lconn.core.PeopleDataStore({url:_2,queryParam:"member"},this.memberStore_AP);
var _3={minChars:2,searchDelay:600,multipleValues:false,store:this.memberStore,onChange:dojo.hitch(this,"onChange")};
this.typeAhead_W=new lconn.core.PeopleTypeAhead(_3,this.membersCombo_AP);
dojo.connect(this.typeAhead_W,"_doSelect",this,"newMember");
this.memberList_AP.style.height="";
this.memberList_AP.style.width="400px";
dojo.removeClass(this.memberList_AP,"scroll");
},onChange:function(){
this.newMember();
},reset:function(){
this.members=[];
this.membersByUUID={};
this.typeAhead_W.setValue("");
this.inputContainer_AP.innerHTML="";
this.memberList_AP.innerHTML="";
this.memberList_AP.style.height="";
this.memberList_AP.style.width="400px";
dojo.removeClass(this.memberList_AP,"scroll");
this.memberList_AP.style.visibility="";
},newMember:function(){
var _4=null;
var _5=[];
var _6=false;
_4=this.typeAhead_W.getItem();
var _7,_8,_9;
if(_4){
_7=_4.memberid;
_9=_4.userid;
_8="id";
}else{
if(this.typeAhead_W.getTextBoxValue()){
}
}
if(_7||_9){
if(this.membersByUUID[_9]){
alert(this.rs_memberAlreadyAdded);
return;
}
var _a={id:_7,userId:_9,idType:_8};
this.membersByUUID[_9]=_a;
this.members.push(_a);
var _b=document.createElement("a");
_b.href="javascript:;";
_b.className="lotusFilter";
_b.style.margin="2px";
_b.title=dojo.string.substitute(this.rs_removeMemberAlt,[_4.name]);
dojo.attr(_b,"role","button");
var _c="<span class=\"forumIconLeft lotusLeft lconnSprite lconnSprite-iconPerson16\"></span>";
_c="";
var _d;
if(_4){
var _e=_4.name;
_d=lconn.core.NameUtil.getHTML(_e,null,_4.userid);
}else{
_d=lconn.core.NameUtil.getHTML(_7,_7,_7);
}
_d=_c+"<span>"+_d.replace(/&lt;/g,"&lrm;&lt;").replace(/&gt;/g,"&gt;&lrm;")+"<img alt=\"Remove\" class=\"lotusDelete\" src=\""+this.blankImgUrl+"\"></span>";
_b.innerHTML+=_d;
var _f=document.createElement("span");
_f.className="lotusAltText";
_f.title=dojo.string.substitute(this.rs_removeMemberAlt,[_4.name]);
_f.innerHTML="<span class=\"lotusClose\" role=\"presentation\">X</span>";
this.connect(_b,"ondijitclick",dojo.hitch(this,"removeMember",_9,_b));
_b.appendChild(_f);
this.memberList_AP.appendChild(_b);
this.memberHelper=new lconn.core.aria.Toolbar(this.memberList_AP);
this.memberList_AP.style.visibility="visible";
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,_b);
}
if(this.members.length>=this.scrollThreshold){
this.memberList_AP.style.height=this.memberList_AP.offsetHeight+"px";
dojo.addClass(this.memberList_AP,"scroll");
}
}
this.typeAhead_W.setValue("");
},removeMember:function(_10,_11){
if(_11){
this.memberList_AP.removeChild(_11);
}
delete this.membersByUUID[_10];
var _12=this.members.length;
var i;
for(i=0;i<_12;i++){
if(this.members[i].userId==_10){
break;
}
}
if(i<_12){
this.members.splice(i,1);
}
_12--;
if(_12==0){
this.memberList_AP.style.visibility="hidden";
}else{
if(_12<this.scrollThreshold){
dojo.removeClass(this.memberList_AP,"scroll");
this.memberList_AP.style.height="";
}
}
if(_12==0){
this.typeAhead_W.domNode.focus();
}else{
var _13=this.memberHelper.selIdx;
this.memberHelper=new lconn.core.aria.Toolbar(this.memberList_AP);
if(_13>0){
this.memberHelper.selIdx=_13-1;
}else{
this.memberHelper.selIdx=_13;
}
this.memberHelper.focus();
}
},setHiddenFields:function(){
this.inputContainer_AP.innerHTML="";
var _14="\t";
for(var i=0;i<this.members.length;i++){
var _15=document.createElement("input");
_15.type="hidden";
if(this.members[i].id){
_15.value=this.members[i].id+_14+this.members[i].idType;
_15.name="memberIds";
}else{
if(this.members[i].userId){
_15.value=this.members[i].userId+_14+this.members[i].idType;
_15.name="userIds";
}
}
this.inputContainer_AP.appendChild(_15);
}
},_focusTextbox:function(){
if(window.OAIEFocusBugTriggered){
OAIEFocusBugTriggered=false;
window.setTimeout(dojo.hitch(this,function(){
dijit.focus(this.typeAhead_W);
}),0);
}
},post:function(evt){
if(this.validate()){
this.setHiddenFields();
var url;
url=this.contextPath+"/ajax/addMembers";
dojo.xhrPost({url:url,headers:{"X-Update-Nonce":"true"},form:this.form_AP,load:dojo.hitch(this,"load"),error:dojo.hitch(this,"postError"),timeout:lconn.forums.Constants.AJAX_TIMEOUT});
}
if(evt){
dojo.stopEvent(evt);
}
},load:function(_16,_17){
var _18;
try{
_18=dojo.fromJson(_16);
}
catch(err){
lconn.forums.Util.authHandler(_16,_17);
return;
}
if(_18&&_18.status&&dojo.indexOf(lconn.forums.Constants.ERROR_CODES,_18.status)>-1){
this.postError(_18,_17);
}else{
this.addSpan(_18,_17);
this.postSuccess();
}
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage();
},validate:function validate(){
this.hideErrors();
var _19=false;
if(this.members.length==0){
dojo.removeClass(this.titleErrorNode,"lotusHidden");
this.titleErrorMessageNode.innerHTML=this.rs_memberIsEmpty;
_19=true;
}
return !_19;
},hideErrors:function(){
dojo.addClass(this.formErrorNode,"lotusHidden");
dojo.addClass(this.titleErrorNode,"lotusHidden");
},showError:function(str){
dojo.removeClass(this.formErrorRow,"lotusHidden");
this.formErrorNode.innerHTML="<span>"+str+"</span>";
},postSuccess:function postSuccess(_1a,_1b){
if(this.onPost){
this.onPost();
}
},addSpan:function(_1c){
},postError:function(_1d,_1e){
if(_1d){
_1d.noTextInput="true";
}
lconn.forums.Util.ajaxErrorHandler(_1d,_1e,this.formErrorMessageNode,dojo.hitch(this,"post"));
dojo.removeClass(this.formErrorNode,"lotusHidden");
}});
}


;dojo.cache("lconn.forums", "templates/PeopleList.html", "<div class=\"PeopleList\"> <div dojoAttachPoint=\"loading_AP\"></div> <div dojoAttachPoint=\"list_AP\"></div> <a href=\"javascript:;\" style=\"display:none\" dojoAttachEvent=\"onclick:toggleMore\" dojoAttachPoint=\"moreLink_AP\">${rs_linkMore}</a> <a href=\"javascript:;\" style=\"display:none\" dojoAttachEvent=\"onclick:toggleLess\" dojoAttachPoint=\"lessLink_AP\">${rs_linkLess}</a> <div><a href=\"javascript:;\" style=\"display:none\" dojoAttachEvent=\"onclick:addOwner\" dojoAttachPoint=\"addOwner_AP\" role=\"button\">${rs_addOwner}</a></div></div>");

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












dojo.declare("lconn.forums.PeopleList",[dijit._Widget,dijit._Templated],{templatePath:dojo.moduleUrl("lconn.forums","templates/PeopleList.html"),contextPath:null,spinnerOverlay_W:null,forumUuid:"",forumName:"",canManage:false,fullList:"",miniList:"",isTemplate:null,feedObj:null,addmember:null,currentUserUuid:null,confirmDelete:null,jsVar:"",PEOPLE_LIMIT:10,postMixInProperties:function(){
dojo.mixin(this,dojo.i18n.getLocalization("lconn.forums","strings"));
},postCreate:function(){
this.spinnerOverlay_W=new lconn.core.SpinnerOverlay({hasSpinner:false,overlaidNode:this.list_AP},this.loading_AP);
this.getPeople(this.forumUuid);
if(this.canManage){
this.addOwner_AP.style.display="";
}
},reset:function(){
this.list_AP.innerHTML="";
this.moreLink_AP.style.display="none";
this.lessLink_AP.style.display="none";
this.feedObj=null;
this.fullList="";
this.miniList="";
},getPeople:function(_1){
this.spinnerOverlay_W.showSpinner();
this.fullList="";
this.miniList="";
var _2=true;
dojo.xhrGet({url:this.contextPath+"/ajax/getMembers",content:{forumUuid:this.forumUuid,type:"owner"},handleAs:"json",load:dojo.hitch(this,"loadPeople"),error:dojo.hitch(this,"getError")});
},getError:function(_3,_4){
},loadPeople:function(_5,_6){
this.parsePeople(_5,false);
},parsePeople:function(_7,_8){
this.feedObj=_7;
var _9=_7;
var _a=false;
var _b=_9.items.length;
if(_b>this.PEOPLE_LIMIT){
_a=true;
if(!_8){
_b=this.PEOPLE_LIMIT;
}
}
var _c=document.createElement("div");
var ul=document.createElement("ul");
dojo.addClass(ul,"lotusList lotusEditable lotusMeta");
_c.appendChild(ul);
this.list_AP.innerHTML="";
this.list_AP.appendChild(_c);
for(var i=0;i<_b;i++){
li=document.createElement("li");
span=document.createElement("span");
dojo.addClass(span,"lotusLeft");
li.appendChild(span);
ul.appendChild(li);
var _d=true;
var _e=lconn.core.config.services.profiles;
if(_e){
_d=false;
}
span.innerHTML=lconn.forums.NameUtil.getHTML(_9.items[i],_9.items[i].memberid,_d);
if(this.canManage&&this.currentUserUuid!=_9.items[i].memberid&&_9.items.length>1){
var _f=document.createElement("a");
_f.href="javascript:void(0);";
_f.title=this.rs_memberDelete_alt;
dojo.addClass(_f,"lotusDelete");
dojo.addClass(_f,"lotusPerson");
_f.innerHTML="<img src=\""+this._blankGif+"\" alt=\""+this.rs_memberDelete_alt+"\" title=\""+this.rs_memberDelete_alt+"\" width=\"16\" height=\"14\" />"+"<span class=\"lotusAltText\">X</span>";
dojo.connect(_f,"onclick",dojo.hitch(this,"removeMember",_9.items[i]));
li.appendChild(_f);
}
}
if(_8){
this.fullList=this.list_AP.innerHTML;
}else{
this.miniList=this.list_AP.innerHTML;
}
if(_a){
this.moreLink_AP.style.display="";
this.lessLink_AP.style.display="none";
}else{
this.moreLink_AP.style.display="none";
this.lessLink_AP.style.display="none";
}
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.list_AP);
}
this.spinnerOverlay_W.hideSpinner();
lconn.core.globalization.bidiUtil.enforceTextDirectionOnPage(this.list_AP);
},removeMember:function(_10){
if(this.confirmDelete){
this.confirmDelete.destroyRecursive();
}
var _11=this.contextPath+"/ajax/removeMembers";
this.confirmDelete=new lconn.forums.ConfirmDelete({url:_11,jsVar:this.jsVar,ariaLabel:this.rs_removeMemberTitle,deleteDone:dojo.hitch(this,"onDelete")});
this.confirmDelete.confirmMember(this.forumUuid,_10.memberid);
var _12=lconn.forums.Util.popupForm(this.rs_removeMemberTitle,this.confirmDelete.domNode,this.rs_ok,this.rs_cancel,dojo.hitch(this.confirmDelete,"post"));
if(this.connection){
dojo.disconnect(this.connection);
}
this.confirmDelete.enableSubmit=_12.enableSubmit;
this.confirmDelete.disableSubmit=_12.disableSubmit;
this.connection=dojo.connect(this.confirmDelete,"deleteDone",_12.hide);
},onDelete:function(_13,_14){
this.reset();
this.postCreate();
},toggleMore:function(){
if(this.fullList){
this.list_AP.innerHTML=this.fullList;
}else{
this.parsePeople(this.feedObj,true);
}
this.moreLink_AP.style.display="none";
this.lessLink_AP.style.display="";
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.list_AP);
}
},toggleLess:function(){
if(this.miniList){
this.list_AP.innerHTML=this.miniList;
}else{
this.parsePeople(this.feedObj,false);
}
this.lessLink_AP.style.display="none";
this.moreLink_AP.style.display="";
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.list_AP);
}
},addOwner:function(){
if(this.addmember){
this.addmember.destroyRecursive();
}
this.addmember=new lconn.forums.AddMembers({"class":"content",contextPath:this.contextPath,forumUuid:this.forumUuid,forumName:this.forumName,onPost:dojo.hitch(this,"onAddOwner")},this.addOwner.addMembers_AP);
var _15=lconn.forums.Util.popupForm(this.rs_addOwner,this.addmember.domNode,this.rs_ok,this.rs_cancel,dojo.hitch(this.addmember,"post"));
if(this.formConnection){
dojo.disconnect(this.formConnection);
}
this.formConnection=dojo.connect(this.addmember,"postSuccess",_15.hide);
},onAddOwner:function(){
this.reset();
this.postCreate();
}});
}


;if(!dojo._hasResource["lconn.forums.Menu"]){
dojo._hasResource["lconn.forums.Menu"]=true;
dojo.provide("lconn.forums.Menu");
dojo.declare("lconn.core.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="1000";
}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;
_12=dojo.coords(_10,true).y;
return _12;
},menuGetOffsetLeft:function(_13,_14){
var _15=0;
var _16=_13;
while(_16){
_15+=_16.offsetLeft;
_16=_16.offsetParent;
if(_16){
_15-=_16.scrollLeft;
}
}
return _15;
},calculatePosition:function(_17,_18,_19,_1a){
var _1b;
if(_1a==""){
if(typeof (bidir)!="undefined"&&bidir!=null&&bidir=="rtl"){
_1b=(_17.offsetWidth>0)?_17.offsetWidth:175;
_1b=24-_1b;
}else{
_1b=_18.offsetWidth-24;
}
var _1c=(this.menuGetOffsetTop(_18,0)+_18.offsetHeight-10);
var _1d=(this.menuGetOffsetLeft(_18,0)+_1b);
}else{
_1b=0;
var _1e=_1a.split(",");
switch(_1e[0]){
case "left":
_1d=this.menuGetOffsetLeft(_18,0);
break;
case "right":
_1d=this.menuGetOffsetLeft(_18,0)+_18.offsetWidth;
break;
default:
_1d=parseInt(_1e[0]);
}
switch(_1e[1]){
case "above":
_1c=this.menuGetOffsetTop(_18,0)-_17.offsetHeight;
break;
case "top":
_1c=this.menuGetOffsetTop(_18,0);
break;
case "bottom":
_1c=this.menuGetOffsetTop(_18,0)+_18.offsetHeight;
break;
default:
_1c=parseInt(_1e[1]);
}
}
var _1f=document.documentElement?document.documentElement:document.body;
var _20=window.innerHeight?window.innerHeight:_1f.clientHeight;
var _21=window.innerWidth?window.innerWidth:_1f.clientWidth;
var _22=document.all?document.body.scrollLeft:window.pageXOffset;
var _23=document.all?document.body.scrollTop:window.pageYOffset;
if((_1c+_17.offsetHeight)>(_20+_23)){
_1c-=_17.offsetHeight;
}
if((_1d+_17.offsetWidth)>(_21+_22)){
_1d-=_17.offsetWidth;
}
if(_1c<_23){
_1c=_23;
}
if(_1d<_22){
_1d=_22;
}
if(dojo.isSafari){
_1d+=_22;
_1c+=_23;
}
return {left:_1d+"px",top:_1c+"px"};
},sizeBackground:function(_24,_25,_26,_27){
_25.width=_24.offsetWidth;
_25.height=_24.offsetHeight;
}});
dojo.declare("lconn.core.MenuPopupClass",lconn.core.PopupClass,{currentMenu:false,hideMenu:function(_28){
if(this.currentMenu){
this.hide(this.currentMenu);
this.currentMenu=false;
}
},showMenu:function(id,_29,_2a){
var _2b=this.currentMenu;
this.hideMenu();
if(id!=_2b){
this.currentMenu=id;
this.show(id,_29,_2a);
}
},hideOnKeypress:function(_2c){
if(typeof (_2c)!="undefined"&&_2c!==null&&_2c.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.core.PopupClass();
MenuPopup=new lconn.core.MenuPopupClass();
Popup.Effect={};
Popup.Effect.DURATION=250;
Popup.Effect.Fade=function(_2d){
_2d=dojo.byId(_2d);
var _2e=dojo.style(_2d,"opacity");
var _2f=dojo.fadeOut({node:_2d,duration:Popup.Effect.DURATION});
dojo.connect(_2f,"onEnd",function(){
dojo.style(_2d,"opacity",_2e);
dojo.style(_2d,"top","-9999px");
});
_2f.play();
};
Popup.Effect.Appear=function(_30,x,y){
_30=dojo.byId(_30);
dojo.style(_30,"opacity",0);
dojo.style(_30,"left",x);
dojo.style(_30,"top",y);
dojo.fadeIn({node:_30,duration:Popup.Effect.DURATION}).play();
};
}


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




































































}


window['_js_modules']=(window['_js_modules']||[]).concat(["lconn.forums.forumsApp"]);
