/* ***************************************************************** */
/* Copyright IBM Corp. 2001, 2009  All Rights Reserved.              */
/* ***************************************************************** */
dojo.provide("lconn.dogear");
if(!dojo._hasResource["lconn.core"]){
dojo._hasResource["lconn.core"]=true;
dojo.provide("lconn.core");
lconn.core.sayHi=function(){
alert("hello from the Core");
};
}
if(!dojo._hasResource["lconn.core.Res"]){
dojo._hasResource["lconn.core.Res"]=true;
dojo.provide("lconn.core.Res");
dojo.declare("lconn.core.Res",[],{bundleFor:"lconn.core",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(_1){
this.resBundle=dojo.i18n.getLocalization(_1,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(_2){
return dojo.i18n.getLocalization(_2,"strings");
},getStringFrom:function(_3,_4,_5){
var _6=dojo.i18n.getLocalization(_3,"strings")[_4];
if(_5==undefined){
return _6;
}else{
return dojo.string.substitute(_6,_5);
}
},getString:function(_7,_8){
var _9=dojo.i18n.getLocalization(this.bundleFor,"strings")[_7];
if(_8==undefined){
return _9;
}else{
return dojo.string.substitute(_9,_8);
}
}});
}
if(!dojo._hasResource["lconn.core.DateUtil"]){
dojo._hasResource["lconn.core.DateUtil"]=true;
dojo.provide("lconn.core.DateUtil");
var w={};
w.MILLS_IN_DAY=86400000;
w.inited=null;
w.Today="Error: not inited";
w.Yesterday="Error: not inited";
w.Tomorrow="Error: not inited";
w.initResStrings=function(){
var _a=new lconn.core.Res();
_a.loadDefaultBundle();
var b=_a.resBundle;
this.Today=b.rs_today;
this.Yesterday=b.rs_yesterday;
this.Tomorrow=b.rs_tomorrow;
this.inited=true;
};
w.delta=function(_c,_d){
var _e=_c.getTime()-_d;
var _f=Math.ceil(_e/(this.MILLS_IN_DAY));
return _f;
};
w.toString=function(_10,_11){
var _12;
if(!_10||!(_12=Date.parse(_10))){
console.log("Invalid date passed to DateUtil.toString(): "+_10);
return;
}
var _13="";
_13=this.toStringForTimeinMs(_12,_11);
if(djConfig.locale=="ar"){
return "‏"+_13;
}
return _13;
};
w.toStringForTimeinMs=function(_14,_15){
if(this.Days==null){
this.Days=dojo.i18n.getLocalization("dojo.cldr","gregorian")["days-format-wide"];
}
if(this.Month==null){
this.Month=dojo.i18n.getLocalization("dojo.cldr","gregorian")["months-format-abbr"];
}
if(this.inited==null){
this.initResStrings();
}
var _16=new Date();
_16.setHours(0,0,0,0);
var _17=new Date();
_17.setTime(_14);
var _18=this.delta(_16,_14);
var _19="";
if(_18<=2&&_18>=-2){
if(_18==2){
if(_15===undefined){
_19=this.Days[_17.getDay()]+" "+this.getLocalizedTime(_17);
}else{
_19=this.Days[_17.getDay()];
}
}else{
if(_18==1){
if(_15===undefined){
_19=this.Yesterday+" "+this.getLocalizedTime(_17);
}else{
_19=this.Yesterday;
}
}else{
if(_18==0){
if(_15===undefined){
_19=this.Today+" "+this.getLocalizedTime(_17);
}else{
_19=this.Today;
}
}else{
if(_18==-1){
_19=this.Tomorrow;
}else{
if(_18==-2){
_19=this.Days[_17.getDay()];
}
}
}
}
}
}else{
if(_16.getFullYear()==_17.getFullYear()){
var _1a=djConfig.locale.substring(0,2).toLowerCase();
var _1b="";
if(djConfig.locale.length>2){
_1b=djConfig.locale.substring(3,5).toLowerCase();
}
if(_1a=="en"&&(_1b==""||_1b=="us")){
_19=this.Month[_17.getMonth()]+" "+_17.getDate();
}else{
_19=this.getLocalizedDate(_17);
}
}else{
var _1a=djConfig.locale.substring(0,2).toLowerCase();
var _1b="";
if(djConfig.locale.length>2){
_1b=djConfig.locale.substring(3,5).toLowerCase();
}
if(_1a=="en"&&(_1b==""||_1b=="us")){
_19=this.Month[_17.getMonth()]+" "+_17.getDate()+" "+_17.getFullYear();
}else{
_19=this.getLocalizedDate(_17);
}
}
}
return _19;
};
w.getLocalizedTime=function(_1c){
return dojo.date.locale.format(_1c,{selector:"time",formatLength:"short",locale:djConfig.locale});
};
w.getLocalizedDate=function(_1d){
return dojo.date.locale.format(_1d,{selector:"date",formatLength:"medium",locale:djConfig.locale});
};
w.getLocaleString=function(_1e){
var _1f=new Date();
_1f.setTime(_1e);
return _1f.toLocaleString();
};
lconn.core.DateUtil=w;
lconn.core.DateUtil.AtomDateToString=function(_20){
var _21=_20;
var s=_20;
var _23=(s.charAt(s.length-1)=="Z");
var _24=s.indexOf("-");
if(s.length>="yyyy-mm-ddThh:mm".length){
s=s.substring(_24-4);
var y=parseInt(s.substr(0,4));
var m=parseInt(s.substr(5,2),10)-1;
var d=parseInt(s.substr(8,2),10);
var h=parseInt(s.substr(11,2),10);
var mi=parseInt(s.substr(14,2),10);
var utc=0;
if(_23){
var _2b=s.substring(17,s.length-1);
var _2c=parseFloat(_2b);
utc=Date.UTC(y,m,d,h,mi)+_2c*1000;
}else{
var zh=0;
var zm=0;
var _2f=s.length-6;
var _30=s.charAt(_2f);
if((_30=="+"||_30=="-")&&s.indexOf("T")<s.length-5){
var se=parseInt(s.substr(17,2),10);
var zh=parseInt(s.substr(_2f,3),10);
var zm=parseInt(s.substr(_2f+4,2),10);
}
utc=Date.UTC(y,m,d,h,mi,se)-(zh*60*60*1000+zm*60*1000);
}
var _32=new Date(utc);
_21=lconn.core.DateUtil.toString(_32);
}
return _21;
};
}
if(!dojo._hasResource["lconn.core.HTMLUtil"]){
dojo._hasResource["lconn.core.HTMLUtil"]=true;
dojo.provide("lconn.core.HTMLUtil");
lconn.core.HTMLUtil.setInnerTextNode=function(_33,_34){
_33.innerHTML="";
_33.appendChild(document.createTextNode(_34));
};
lconn.core.HTMLUtil.escapeInlineText=function(_35){
return lconn.core.HTMLUtil.escapeText(_35,true);
};
lconn.core.HTMLUtil.escapeText=function(_36,_37){
var _38=document.getElementById("escapeBufferDiv");
if(!_38){
var tmp=document.createElement("div");
tmp.id="escapeBufferDiv";
document.body.appendChild(tmp);
_38=tmp;
}
_38.appendChild(document.createTextNode(_36));
var _3a=_38.innerHTML;
_38.innerHTML="";
if(_37){
_3a=lconn.core.HTMLUtil.escape_q(_3a);
}
return _3a;
};
lconn.core.HTMLUtil.escape_q=function(s){
var t="";
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
if(c=="\""){
t+="&#34;";
}else{
if(c=="'"){
t+="&#39;";
}else{
if(c=="\\"){
t+="&#92;&#92;";
}else{
t+=c;
}
}
}
}
return t;
};
}
if(!dojo._hasResource["lconn.core.NameUtil"]){
dojo._hasResource["lconn.core.NameUtil"]=true;
dojo.provide("lconn.core.NameUtil");
lconn.core.NameUtil={getHTML:function(_3f,_40,_41,id,_43){
var _44;
var _45=lconn.core.HTMLUtil.escapeText(_41);
if(_40){
var _46=lconn.core.HTMLUtil.escapeText(_40);
if(_3f){
_44=(_43?_3f:lconn.core.HTMLUtil.escapeText(_3f));
}else{
_44=_46;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_44+"</span><span class=\"email\" style=\"display: none;\">"+_46+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_45+"</span></span></span>";
}else{
var _44;
var _47=lconn.core.HTMLUtil.escapeInlineText(_41);
if(_3f){
_44=(_43?_3f:lconn.core.HTMLUtil.escapeText(_3f));
}else{
_44=_45;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_44+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_45+"</span></span></span>";
}
}};
}
if(!dojo._hasResource["lconn.core.MimeClass"]){
dojo._hasResource["lconn.core.MimeClass"]=true;
dojo.provide("lconn.core.MimeClass");
lconn.core.MimeClass={getClass:function(_48){
var _49=lconn.core.MimeClass.mimetypes[_48];
if(_49!=undefined){
return _49;
}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"}};
}
({today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow"});
if(!dojo._hasResource["lconn.core.TypeAhead"]){
dojo._hasResource["lconn.core.TypeAhead"]=true;
dojo.provide("lconn.core.TypeAhead");
dojo.declare("lconn.core.TypeAhead",[dijit.form.ComboBox],{formatItem:function(_4a,_4b){
if(!_4b){
return _4a;
}else{
return _4a=_4a.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
}
},minChars:1,hasDownArrow:false,multipleValues:true,token:"",autoComplete:false,submitFormOnKey:false,_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _4e=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_4e=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _51;
if(this._isShowingNow&&(_51=pw.getHighlightedOption())){
if(_51==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_51==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
if(!this.submitFormOnKey){
evt.preventDefault();
}
case dk.TAB:
var _52=this.attr("displayedValue");
if(pw&&(_52==pw._messages["previousMessage"]||_52==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_4e=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_4e=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_4e){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_numTokensPreceding:function(str,pos){
var i=-1,_56=0;
while(i<pos){
i=str.indexOf(this.token,i+1);
if(i==-1){
i=str.length;
}else{
if(i<pos){
_56++;
}
}
}
return _56;
},_autoCompleteText:function(_57){
var fn=this.focusNode;
var _59=this._getCaretPos(fn);
dijit.selectInputText(fn,fn.value.length);
var _5a;
if(this.multipleValues){
_5a=fn.value.split(this.token);
}else{
_5a=[fn.value];
}
var _5b=0;
if(this.multipleValues){
_5b=this._numTokensPreceding(fn.value,_59);
}
if(this.multipleValues&&this.token!=" "&&_5b>0){
_57=" "+_57;
}
var _5c=this.ignoreCase?"toLowerCase":"substr";
if(dojo.string.trim(_57[_5c](0)).indexOf(dojo.string.trim(_5a[_5b][_5c](0)))==0){
if(_59+1>fn.value.length||fn.value.charAt(_59)==this.token){
var end=_59+_57.length-_5a[_5b].length;
_5a[_5b]=_57;
fn.value=_5a.join(this.token);
dijit.selectInputText(fn,_59,end);
}
}else{
_5a[_5b]=_57;
fn.value=_5a.join(this.token);
var _5e=0;
for(var i=0;i<_5b;i++){
_5e+=_5a[i].length;
}
_5e+=this.token.length*_5b;
dijit.selectInputText(fn,_5e,_5e+_57.length);
}
},_openResultList:function(_60,_61){
if(this.disabled||this.readOnly||(_61.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_60.length){
this._hideResultList();
return;
}
var _62=new String(this.formatItem(_60[0]));
if(_62&&this.autoComplete&&!this._prev_key_backspace&&(_61.query!="")){
this._autoCompleteText(_62);
}
_61._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_60,_61,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_61.direction){
if(1==_61.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_61.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_announceOption:function(_63){
if(_63==null){
return;
}
var _64;
if(_63==this._popupWidget.nextButton||_63==this._popupWidget.previousButton||_63==this._popupWidget.searchButton){
_64=_63.innerHTML;
}else{
_64=this.formatItem(_63.item);
}
if(this.multipleValues){
var _65=this._getCaretPos(this.focusNode);
var _66=this.focusNode.value.split(this.token);
var _67=this._numTokensPreceding(this.focusNode.value,_65);
var q=this._lastQuery;
if(this.multipleValues&&this.token!=" "&&_67>0){
q=" "+q;
}
_66[_67]=q;
this.focusNode.value=_66.join(this.token);
}else{
this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));
}
this._setCaretPos(this.focusNode,_65);
dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(_63,"id"));
this._autoCompleteText(_64);
},_doSelect:function(tgt){
var _6a=this.formatItem(tgt.item);
if(this.multipleValues){
var _6b=this.keyArr[this.keyIdx];
this.keyArr[this.keyIdx]=(this.keyIdx!=0&&this.token!=" "?" ":"")+_6a;
_6a=this.keyArr.join(this.token);
var _6c=this.token+(this.token!=" "?" ":"");
if(_6a.length>=_6c.length&&_6a.substring(_6a.length-_6c.length)!=_6c){
_6a+=_6c;
}
}else{
this.item=tgt.item;
}
this.attr("value",_6a);
this._setCaretPos(this.focusNode,_6a.length);
},_startSearchFromInput:function(){
var _6d=this.focusNode.value;
var _6e=_6d;
if(this.multipleValues){
this.keyArr=_6d.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_6d,this.caretPos);
_6e=this.keyArr[this.keyIdx];
}
_6e=dojo.string.trim(_6e);
if(_6e.length>=this.minChars){
this._startSearch(_6e);
}else{
this._hideResultList();
}
},_startSearch:function(key){
if(!this._popupWidget){
var _70=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_70});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_70);
}
this.item=null;
var _71=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_71=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_72,_73){
var _74={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_72,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_75){
console.error("dijit.form.ComboBox: "+_75);
dojo.hitch(_73,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_74,_73.fetchProperties);
var _76=_73.store.fetch(_74);
var _77=function(_78,_79){
_78.start+=_78.count*_79;
_78.direction=_79;
this.store.fetch(_78);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_77,_76);
},_71,this),this.searchDelay);
},getAttribute:function(_7a){
if(this.item&&this.item[_7a]){
return this.item[_7a];
}else{
return "";
}
},getTextBoxValue:function(){
return this.focusNode.value;
},_getMenuLabelFromItem:function(_7b){
var _7c=this.formatItem(_7b,true);
var key="";
if(this.multipleValues){
key=dojo.string.trim(this.keyArr[this.keyIdx]);
}else{
key=dojo.string.trim(this.focusNode.value);
}
key=key.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
var _7e=_7c.toLowerCase();
var _7f=key.toLowerCase();
var _80=0;
var _81=null;
while(key&&-1<(_81=_7e.indexOf(_7f,_80))){
_7c=_7c.substr(0,_81)+"<b>"+_7c.substring(_81,_81+key.length)+"</b>"+_7c.substring(_81+key.length);
_80=_81+key.length+7;
_7e=_7c.toLowerCase();
}
return {html:true,label:_7c};
}});
}
if(!dojo._hasResource["lconn.core.TypeAheadDataStore"]){
dojo._hasResource["lconn.core.TypeAheadDataStore"]=true;
dojo.provide("lconn.core.TypeAheadDataStore");
dojo.declare("lconn.core.TypeAheadDataStore",null,{constructor:function(_82,_83){
this.queryParam=(_82.queryParam?_82.queryParam:_83.getAttribute("queryParam"));
this.url=(_82.url?_82.url:_83.getAttribute("url"));
},queryParam:"",cache:[],fetch:function(_84){
var _85={};
this.searchDirectory=(_84.searchDirectory?true:false);
if(typeof this.cache[_84.query.toLowerCase()]=="object"){
_84.onComplete(this.cache[_84.query.toLowerCase()],_84);
return _84;
}
if(this.queryParam){
_85[this.queryParam]=_84.query;
}
dojo.xhrPost({url:this.url,content:_85,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(_86){
this.cache[_84.query.toLowerCase()]=_86;
if(_84.onComplete){
_84.onComplete(_86,_84);
}
}),error:function(){
console.log("There was an error");
}});
return _84;
},getValue:function(_87,_88,_89){
return _87;
}});
}
if(!dojo._hasResource["lconn.core.PeopleDataStore"]){
dojo._hasResource["lconn.core.PeopleDataStore"]=true;
dojo.provide("lconn.core.PeopleDataStore");
dojo.declare("lconn.core.PeopleDataStore",null,{constructor:function(_8a,_8b){
this.queryParam=(_8a.queryParam?_8a.queryParam:_8b.getAttribute("queryParam"));
this.url=(_8a.url?_8a.url:_8b.getAttribute("url"));
},queryParam:"",searchDirectory:false,cache:[],dirCache:[],fetch:function(_8c){
var _8d={};
var _8e;
this.searchDirectory=(_8c.searchDirectory?true:false);
if(this.searchDirectory){
_8e=this.dirCache;
}else{
_8e=this.cache;
}
if(typeof _8e[_8c.query.toLowerCase()]=="object"){
_8c.onComplete(_8e[_8c.query.toLowerCase()],_8c);
return _8c;
}
if(this.queryParam){
_8d[this.queryParam]=_8c.query;
}
if(this.searchDirectory){
_8d.usedirectory="yes";
}
dojo.xhrPost({url:this.url,content:_8d,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(_8f){
var _90;
if(this.searchDirectory){
_90=this.dirCache;
}else{
_90=this.cache;
}
_90[_8c.query.toLowerCase()]=_8f.items;
if(_8c.onComplete){
_8c.onComplete(_8f.items,_8c);
}
}),error:function(){
console.log("There was an error");
}});
return _8c;
},getValue:function(_91,_92,_93){
if(_91[_92]){
return _91[_92];
}else{
return _93;
}
}});
}
if(!dojo._hasResource["lconn.core.PeopleTypeAhead"]){
dojo._hasResource["lconn.core.PeopleTypeAhead"]=true;
dojo.provide("lconn.core.PeopleTypeAhead");
dojo.declare("lconn.core.PeopleTypeAhead",[lconn.core.TypeAhead],{getItem:function(){
return (this.item?this.item:null);
},formatItem:function(_94,_95){
var str="";
if(_94.name.indexOf(",")!=-1&&_94.name.length>1&&_94.name[0]!="\""&&_94.name[_94.name.length-1]!="\""){
if(_95){
str+="&quot;"+_94.name.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&quot;";
}else{
str+="\""+_94.name+"\"";
}
}else{
str+=_94.name;
}
if(_94.member){
if(_95){
str+=" &lt;"+_94.member.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&gt;&lrm;";
}else{
str+=" <"+_94.member+">‎";
}
}
return str;
},_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _99=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_99=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _9c;
if(this._isShowingNow&&(_9c=pw.getHighlightedOption())){
if(_9c==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_9c==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}else{
if(_9c==pw.searchButton){
pw.searchDirectory();
dojo.stopEvent(evt);
return;
}else{
if(_9c.item&&parseInt(_9c.item.type)<0){
dojo.stopEvent(evt);
break;
}
}
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
evt.preventDefault();
case dk.TAB:
var _9d=this.attr("displayedValue");
if(pw&&(_9d==pw._messages["previousMessage"]||_9d==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case " ":
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(this._isShowingNow&&pw.getHighlightedOption()){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_99=true;
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_99=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_99=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_99){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_openResultList:function(_9e,_9f){
if(this.disabled||this.readOnly||(_9f.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(_9e.length){
var _a0=new String(this.formatItem(_9e[0]));
if(_a0&&this.autoComplete&&!this._prev_key_backspace&&(_9f.query!="")){
this._autoCompleteText(_a0);
}
}
_9f._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_9e,_9f,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_9f.direction){
if(1==_9f.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_9f.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_startSearchFromInput:function(_a1,_a2){
var _a3=this.focusNode.value;
var _a4=_a3;
if(this.multipleValues){
this.keyArr=_a3.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_a3,this.caretPos);
_a4=this.keyArr[this.keyIdx];
}
_a4=dojo.string.trim(_a4);
if(_a4.length>=this.minChars){
this._startSearch(_a4,_a2);
}else{
this._hideResultList();
}
},_startSearch:function(key,_a6){
if(!this._popupWidget){
var _a7=this.id+"_popup";
this._popupWidget=new lconn.act.PeopleTypeAheadMenu({onChange:dojo.hitch(this,this._selectOption),id:_a7});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_a7);
}
if(_a6==undefined){
_a6=false;
}
this.item=null;
var _a8=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_a8=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_a9,_aa){
var _ab={queryOptions:{ignoreCase:this.ignoreCase,deep:true},searchDirectory:_a6,query:_a9,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_ac){
console.error("dijit.form.ComboBox: "+_ac);
dojo.hitch(_aa,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_ab,_aa.fetchProperties);
var _ad=_aa.store.fetch(_ab);
var _ae=function(_af,_b0){
_af.start+=_af.count*_b0;
_af.direction=_b0;
this.store.fetch(_af);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_ae,_ad);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
this._startSearch(key,true);
}));
},_a8,this),this.searchDelay);
}});
dojo.declare("lconn.act.PeopleTypeAheadMenu",[dijit.form._ComboBoxMenu,lconn.core.Res],{rs_searchDirectory:"",templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' waiRole='alert' role='waiRole:alert' tabIndex='-1' style='overflow:\"auto\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></li>"+"<li class='dijitMenuItem searchDirectory' dojoAttachPoint='searchButton'>${rs_searchDirectory}</li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></li>"+"</ul>",_messages:null,tooltipAroundNode:null,tooltipTimeout:null,tooltipDelay:600,tooltipId:0,popupClosed:true,postMixInProperties:function(){
this.loadDefaultBundle();
this.rs_searchDirectory=this.resBundle.rs_searchDirectory;
this.inherited("postMixInProperties",arguments);
},searchDirectory:function(){
},_setValueAttr:function(_b1){
if(_b1.target.item&&parseInt(_b1.target.item.type)>=0){
this.value=_b1;
this.onChange(_b1);
}
},_createOption:function(_b2,_b3){
var _b4=_b3(_b2);
var _b5=document.createElement("li");
dijit.setWaiRole(_b5,"option");
if(_b2.userid){
dojo.attr(_b5,"exid",_b2.userid);
}
if(_b4.html){
_b5.innerHTML=_b4.label;
}else{
_b5.appendChild(document.createTextNode(_b4.label));
}
if(_b5.innerHTML==""){
_b5.innerHTML="&nbsp;";
}
_b5.item=_b2;
return _b5;
},createOptions:function(_b6,_b7,_b8){
this.previousButton.style.display=(_b7.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_b6,function(_b9,i){
var _bb=this._createOption(_b9,_b8);
_bb.className="dijitMenuItem";
dojo.attr(_bb,"id",this.id+i);
this.domNode.insertBefore(_bb,this.searchButton);
},this);
var _bc=false;
if(_b7._maxOptions&&_b7._maxOptions!=-1){
if((_b7.start+_b7.count)<_b7._maxOptions){
_bc=true;
}else{
if((_b7.start+_b7.count)>(_b7._maxOptions-1)){
if(_b7.count==_b6.length){
_bc=true;
}
}
}
}else{
if(_b7.count==_b6.length){
_bc=true;
}
}
this.nextButton.style.display=_bc?"":"none";
dojo.attr(this.nextButton,"id",this.id+"_next");
this.searchButton.style.display=(_b7.searchDirectory?"none":"");
},_onMouseUp:function(evt){
if(evt.target==this.searchButton){
this.searchDirectory();
}else{
this.inherited("_onMouseUp",arguments);
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!(tgt==this.previousButton||tgt==this.nextButton||tgt==this.searchButton)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_focusOptionNode:function(_c0){
if(this._highlighted_option!=_c0){
var _c1=dojo.attr(_c0,"exid");
this.closeTooltip();
this.tooltipId++;
this.popupClosed=false;
if(_c1&&window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
this.tooltipTimeout=setTimeout(dojo.hitch(this,"renderBizCard",_c1,dojo.hitch(this,"showTooltip",this.tooltipId,_c0)),this.tooltipDelay);
}
}
this.inherited("_focusOptionNode",arguments);
},renderBizCard:function(_c2,fn){
if(window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
lconn.profiles.bizCard.bizCard.renderMiniBizCard(_c2,fn);
}
},showTooltip:function(id,_c5,_c6){
if(id==this.tooltipId&&!this.popupClosed){
this.tooltipAroundNode=_c5;
dijit.showTooltip(_c6,_c5,["after","before"]);
}
},closeTooltip:function(){
if(this.tooltipAroundNode){
dijit.hideTooltip(this.tooltipAroundNode);
this.tooltipAroundNode=null;
}
if(this.tooltipTimeout){
clearTimeout(this.tooltipTimeout);
this.tooltipTimeout=null;
}
},onClose:function(){
this.popupClosed=true;
this.closeTooltip();
this._blurOptionNode();
},clearResultList:function(){
while(this.domNode.childNodes.length>3){
this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-3]);
}
},getListLength:function(){
return this.domNode.childNodes.length-3;
}});
}
if(!dojo._hasResource["lconn.core.MenuItem"]){
dojo._hasResource["lconn.core.MenuItem"]=true;
dojo.provide("lconn.core.MenuItem");
var w={};
w.iconSrc="";
w.postCreate=function(){
this.inherited("postCreate",arguments);
if(this.iconSrc!=""){
var img=document.createElement("img");
img.src=this.iconSrc;
this.iconNode.appendChild(img);
}
};
dojo.declare("lconn.core.MenuItem",[dijit.MenuItem],w);
}
if(!dojo._hasResource["lconn.dogear.Res"]){
dojo._hasResource["lconn.dogear.Res"]=true;
dojo.provide("lconn.dogear.Res");
dojo.declare("lconn.dogear.Res",[],{bundleFor:"lconn.dogear",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(pkg){
this.resBundle=dojo.i18n.getLocalization(pkg,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(pkg){
return dojo.i18n.getLocalization(pkg,"strings");
},getStringFrom:function(pkg,key,_cc){
var _cd=dojo.i18n.getLocalization(pkg,"strings")[key];
if(_cc==undefined){
return _cd;
}else{
return dojo.string.substitute(_cd,_cc);
}
},getString:function(key,_cf){
var _d0=dojo.i18n.getLocalization(this.bundleFor,"strings")[key];
if(_cf==undefined){
return _d0;
}else{
return dojo.string.substitute(_d0,_cf);
}
}});
}
if(!dojo._hasResource["lconn.dogear._Templated"]){
dojo._hasResource["lconn.dogear._Templated"]=true;
dojo.provide("lconn.dogear._Templated");
dojo.declare("lconn.dogear._Templated",dijit._Templated,{escapeText:function(_d1){
return escapeText(_d1);
},escapeInlineText:function(_d2){
return escapeInlineText(_d2);
},destroy_AP:dojo.isIE<7?function(){
for(var ap in this){
if(ap.indexOf("_AP")>0){
delete this[ap];
}
}
}:function(){
}});
}
if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){
dojo._hasResource["dojo.dnd.TimedMoveable"]=true;
dojo.provide("dojo.dnd.TimedMoveable");
(function(){
var _d4=dojo.dnd.Moveable.prototype.onMove;
dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(_d5,_d6){
if(!_d6){
_d6={};
}
if(_d6.timeout&&typeof _d6.timeout=="number"&&_d6.timeout>=0){
this.timeout=_d6.timeout;
}
},markupFactory:function(_d7,_d8){
return new dojo.dnd.TimedMoveable(_d8,_d7);
},onMoveStop:function(_d9){
if(_d9._timer){
clearTimeout(_d9._timer);
_d4.call(this,_d9,_d9._leftTop);
}
dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments);
},onMove:function(_da,_db){
_da._leftTop=_db;
if(!_da._timer){
var _t=this;
_da._timer=setTimeout(function(){
_da._timer=null;
_d4.call(_t,_da,_da._leftTop);
},this.timeout);
}
}});
})();
}
if(!dojo._hasResource["dojo.fx"]){
dojo._hasResource["dojo.fx"]=true;
dojo.provide("dojo.fx");
dojo.provide("dojo.fx.Toggler");
(function(){
var _dd={_fire:function(evt,_df){
if(this[evt]){
this[evt].apply(this,_df||[]);
}
return this;
}};
var _e0=function(_e1){
this._index=-1;
this._animations=_e1||[];
this._current=this._onAnimateCtx=this._onEndCtx=null;
this.duration=0;
dojo.forEach(this._animations,function(a){
this.duration+=a.duration;
if(a.delay){
this.duration+=a.delay;
}
},this);
};
dojo.extend(_e0,{_onAnimate:function(){
this._fire("onAnimate",arguments);
},_onEnd:function(){
dojo.disconnect(this._onAnimateCtx);
dojo.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;
if(this._index+1==this._animations.length){
this._fire("onEnd");
}else{
this._current=this._animations[++this._index];
this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play(0,true);
}
},play:function(_e3,_e4){
if(!this._current){
this._current=this._animations[this._index=0];
}
if(!_e4&&this._current.status()=="playing"){
return this;
}
var _e5=dojo.connect(this._current,"beforeBegin",this,function(){
this._fire("beforeBegin");
}),_e6=dojo.connect(this._current,"onBegin",this,function(arg){
this._fire("onBegin",arguments);
}),_e8=dojo.connect(this._current,"onPlay",this,function(arg){
this._fire("onPlay",arguments);
dojo.disconnect(_e5);
dojo.disconnect(_e6);
dojo.disconnect(_e8);
});
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");
this._current.play.apply(this._current,arguments);
return this;
},pause:function(){
if(this._current){
var e=dojo.connect(this._current,"onPause",this,function(arg){
this._fire("onPause",arguments);
dojo.disconnect(e);
});
this._current.pause();
}
return this;
},gotoPercent:function(_ec,_ed){
this.pause();
var _ee=this.duration*_ec;
this._current=null;
dojo.some(this._animations,function(a){
if(a.duration<=_ee){
this._current=a;
return true;
}
_ee-=a.duration;
return false;
});
if(this._current){
this._current.gotoPercent(_ee/this._current.duration,_ed);
}
return this;
},stop:function(_f0){
if(this._current){
if(_f0){
for(;this._index+1<this._animations.length;++this._index){
this._animations[this._index].stop(true);
}
this._current=this._animations[this._index];
}
var e=dojo.connect(this._current,"onStop",this,function(arg){
this._fire("onStop",arguments);
dojo.disconnect(e);
});
this._current.stop();
}
return this;
},status:function(){
return this._current?this._current.status():"stopped";
},destroy:function(){
if(this._onAnimateCtx){
dojo.disconnect(this._onAnimateCtx);
}
if(this._onEndCtx){
dojo.disconnect(this._onEndCtx);
}
}});
dojo.extend(_e0,_dd);
dojo.fx.chain=function(_f3){
return new _e0(_f3);
};
var _f4=function(_f5){
this._animations=_f5||[];
this._connects=[];
this._finished=0;
this.duration=0;
dojo.forEach(_f5,function(a){
var _f7=a.duration;
if(a.delay){
_f7+=a.delay;
}
if(this.duration<_f7){
this.duration=_f7;
}
this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));
},this);
this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});
dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){
this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));
},this);
};
dojo.extend(_f4,{_doAction:function(_f9,_fa){
dojo.forEach(this._animations,function(a){
a[_f9].apply(a,_fa);
});
return this;
},_onEnd:function(){
if(++this._finished==this._animations.length){
this._fire("onEnd");
}
},_call:function(_fc,_fd){
var t=this._pseudoAnimation;
t[_fc].apply(t,_fd);
},play:function(_ff,_100){
this._finished=0;
this._doAction("play",arguments);
this._call("play",arguments);
return this;
},pause:function(){
this._doAction("pause",arguments);
this._call("pause",arguments);
return this;
},gotoPercent:function(_101,_102){
var ms=this.duration*_101;
dojo.forEach(this._animations,function(a){
a.gotoPercent(a.duration<ms?1:(ms/a.duration),_102);
});
this._call("gotoPercent",arguments);
return this;
},stop:function(_105){
this._doAction("stop",arguments);
this._call("stop",arguments);
return this;
},status:function(){
return this._pseudoAnimation.status();
},destroy:function(){
dojo.forEach(this._connects,dojo.disconnect);
}});
dojo.extend(_f4,_dd);
dojo.fx.combine=function(_106){
return new _f4(_106);
};
})();
dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){
var _t=this;
dojo.mixin(_t,args);
_t.node=args.node;
_t._showArgs=dojo.mixin({},args);
_t._showArgs.node=_t.node;
_t._showArgs.duration=_t.showDuration;
_t.showAnim=_t.showFunc(_t._showArgs);
_t._hideArgs=dojo.mixin({},args);
_t._hideArgs.node=_t.node;
_t._hideArgs.duration=_t.hideDuration;
_t.hideAnim=_t.hideFunc(_t._hideArgs);
dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));
dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));
},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_109){
return this.showAnim.play(_109||0);
},hide:function(_10a){
return this.hideAnim.play(_10a||0);
}});
dojo.fx.wipeIn=function(args){
args.node=dojo.byId(args.node);
var node=args.node,s=node.style,o;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){
o=s.overflow;
s.overflow="hidden";
if(s.visibility=="hidden"||s.display=="none"){
s.height="1px";
s.display="";
s.visibility="";
return 1;
}else{
var _110=dojo.style(node,"height");
return Math.max(_110,1);
}
},end:function(){
return node.scrollHeight;
}}}},args));
dojo.connect(anim,"onEnd",function(){
s.height="auto";
s.overflow=o;
});
return anim;
};
dojo.fx.wipeOut=function(args){
var node=args.node=dojo.byId(args.node);
var s=node.style;
var o;
var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));
dojo.connect(anim,"beforeBegin",function(){
o=s.overflow;
s.overflow="hidden";
s.display="";
});
dojo.connect(anim,"onEnd",function(){
s.overflow=o;
s.height="auto";
s.display="none";
});
return anim;
};
dojo.fx.slideTo=function(args){
var node=(args.node=dojo.byId(args.node));
var top=null;
var left=null;
var init=(function(n){
return function(){
var cs=dojo.getComputedStyle(n);
var pos=cs.position;
top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);
left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);
if(pos!="absolute"&&pos!="relative"){
var ret=dojo.coords(n,true);
top=ret.y;
left=ret.x;
n.style.position="absolute";
n.style.top=top+"px";
n.style.left=left+"px";
}
};
})(node);
init();
var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));
dojo.connect(anim,"beforeBegin",anim,init);
return anim;
};
}
if(!dojo._hasResource["dojo.html"]){
dojo._hasResource["dojo.html"]=true;
dojo.provide("dojo.html");
(function(){
var _120=0;
dojo.html._secureForInnerHtml=function(cont){
return cont.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");
};
dojo.html._emptyNode=function(node){
while(node.firstChild){
dojo._destroyElement(node.firstChild);
}
};
dojo.html._setNodeContent=function(node,cont,_125){
if(_125){
dojo.html._emptyNode(node);
}
if(typeof cont=="string"){
var pre="",post="",walk=0,name=node.nodeName.toLowerCase();
switch(name){
case "tr":
pre="<tr>";
post="</tr>";
walk+=1;
case "tbody":
case "thead":
pre="<tbody>"+pre;
post+="</tbody>";
walk+=1;
case "table":
pre="<table>"+pre;
post+="</table>";
walk+=1;
break;
}
if(walk){
var n=node.ownerDocument.createElement("div");
n.innerHTML=pre+cont+post;
do{
n=n.firstChild;
}while(--walk);
dojo.forEach(n.childNodes,function(n){
node.appendChild(n.cloneNode(true));
});
}else{
node.innerHTML=cont;
}
}else{
if(cont.nodeType){
node.appendChild(cont);
}else{
dojo.forEach(cont,function(n){
node.appendChild(n.cloneNode(true));
});
}
}
return node;
};
dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(_12d,node){
dojo.mixin(this,_12d||{});
node=this.node=dojo.byId(this.node||node);
if(!this.id){
this.id=["Setter",(node)?node.id||node.tagName:"",_120++].join("_");
}
if(!(this.node||node)){
new Error(this.declaredClass+": no node provided to "+this.id);
}
},set:function(cont,_130){
if(undefined!==cont){
this.content=cont;
}
if(_130){
this._mixin(_130);
}
this.onBegin();
this.setContent();
this.onEnd();
return this.node;
},setContent:function(){
var node=this.node;
if(!node){
console.error("setContent given no node");
}
try{
node=dojo.html._setNodeContent(node,this.content);
}
catch(e){
var _132=this.onContentError(e);
try{
node.innerHTML=_132;
}
catch(e){
console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);
}
}
this.node=node;
},empty:function(){
if(this.parseResults&&this.parseResults.length){
dojo.forEach(this.parseResults,function(w){
if(w.destroy){
w.destroy();
}
});
delete this.parseResults;
}
dojo.html._emptyNode(this.node);
},onBegin:function(){
var cont=this.content;
if(dojo.isString(cont)){
if(this.cleanContent){
cont=dojo.html._secureForInnerHtml(cont);
}
if(this.extractContent){
var _135=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_135){
cont=_135[1];
}
}
}
this.empty();
this.content=cont;
return this.node;
},onEnd:function(){
if(this.parseContent){
this._parse();
}
return this.node;
},tearDown:function(){
delete this.parseResults;
delete this.node;
delete this.content;
},onContentError:function(err){
return "Error occured setting content: "+err;
},_mixin:function(_137){
var _138={},key;
for(key in _137){
if(key in _138){
continue;
}
this[key]=_137[key];
}
},_parse:function(){
var _13a=this.node;
try{
this.parseResults=dojo.parser.parse(_13a,true);
}
catch(e){
this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);
}
},_onError:function(type,err,_13d){
var _13e=this["on"+type+"Error"].call(this,err);
if(_13d){
console.error(_13d,err);
}else{
if(_13e){
dojo.html._setNodeContent(this.node,_13e,true);
}
}
}});
dojo.html.set=function(node,cont,_141){
if(undefined==cont){
console.warn("dojo.html.set: no cont argument provided, using empty string");
cont="";
}
if(!_141){
return dojo.html._setNodeContent(node,cont,true);
}else{
var op=new dojo.html._ContentSetter(dojo.mixin(_141,{content:cont,node:node}));
return op.set();
}
};
})();
}
if(!dojo._hasResource["dijit.layout.ContentPane"]){
dojo._hasResource["dijit.layout.ContentPane"]=true;
dojo.provide("dijit.layout.ContentPane");
dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,_isRealContent:true,postMixInProperties:function(){
this.inherited(arguments);
var _143=dojo.i18n.getLocalization("dijit","loading",this.lang);
this.loadingMessage=dojo.string.substitute(this.loadingMessage,_143);
this.errorMessage=dojo.string.substitute(this.errorMessage,_143);
},buildRendering:function(){
this.inherited(arguments);
if(!this.containerNode){
this.containerNode=this.domNode;
}
},postCreate:function(){
this.domNode.title="";
if(!dijit.hasWaiRole(this.domNode)){
dijit.setWaiRole(this.domNode,"group");
}
dojo.addClass(this.domNode,this.baseClass);
},startup:function(){
if(this._started){
return;
}
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild){
this._singleChild.startup();
}
}
this._loadCheck();
this.inherited(arguments);
},_checkIfSingleChild:function(){
var _144=dojo.query(">",this.containerNode),_145=_144.filter(function(node){
return dojo.hasAttr(node,"dojoType")||dojo.hasAttr(node,"widgetId");
}),_147=dojo.filter(_145.map(dijit.byNode),function(_148){
return _148&&_148.domNode&&_148.resize;
});
if(_144.length==_145.length&&_147.length==1){
this.isContainer=true;
this._singleChild=_147[0];
}else{
delete this.isContainer;
delete this._singleChild;
}
},refresh:function(){
return this._prepareLoad(true);
},setHref:function(href){
dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated.\tUse attr('href', ...) instead.","","2.0");
return this.attr("href",href);
},_setHrefAttr:function(href){
this.href=href;
if(this._created){
return this._prepareLoad();
}
},setContent:function(data){
dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");
this.attr("content",data);
},_setContentAttr:function(data){
this.href="";
this.cancel();
this._setContent(data||"");
this._isDownloaded=false;
if(this.doLayout!="false"&&this.doLayout!==false){
this._checkIfSingleChild();
if(this._singleChild&&this._singleChild.resize){
this._singleChild.startup();
var cb=this._contentBox||dojo.contentBox(this.containerNode);
this._singleChild.resize({w:cb.w,h:cb.h});
}
}
},_getContentAttr:function(){
return this.containerNode.innerHTML;
},cancel:function(){
if(this._xhrDfd&&(this._xhrDfd.fired==-1)){
this._xhrDfd.cancel();
}
delete this._xhrDfd;
},destroyRecursive:function(_14e){
if(this._beingDestroyed){
return;
}
this._beingDestroyed=true;
this.inherited(arguments);
},resize:function(size){
dojo.marginBox(this.domNode,size);
var node=this.containerNode,mb=dojo.mixin(dojo.marginBox(node),size||{});
var cb=this._contentBox=dijit.layout.marginBox2contentBox(node,mb);
if(this._singleChild&&this._singleChild.resize){
this._singleChild.resize({w:cb.w,h:cb.h});
}
},_prepareLoad:function(_153){
this.cancel();
this.isLoaded=false;
this._loadCheck(_153);
},_isShown:function(){
if("open" in this){
return this.open;
}else{
var node=this.domNode;
return (node.style.display!="none")&&(node.style.visibility!="hidden");
}
},_loadCheck:function(_155){
var _156=this._isShown();
if(this.href&&(_155||(this.preload&&!this.isLoaded&&!this._xhrDfd)||(this.refreshOnShow&&_156&&!this._xhrDfd)||(!this.isLoaded&&_156&&!this._xhrDfd))){
this._downloadExternalContent();
}
},_downloadExternalContent:function(){
this._setContent(this.onDownloadStart(),true);
var self=this;
var _158={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};
if(dojo.isObject(this.ioArgs)){
dojo.mixin(_158,this.ioArgs);
}
var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_158);
hand.addCallback(function(html){
try{
self._isDownloaded=true;
self._setContent(html,false);
self.onDownloadEnd();
}
catch(err){
self._onError("Content",err);
}
delete self._xhrDfd;
return html;
});
hand.addErrback(function(err){
if(!hand.cancelled){
self._onError("Download",err);
}
delete self._xhrDfd;
return err;
});
},_onLoadHandler:function(data){
this.isLoaded=true;
try{
this.onLoad(data);
}
catch(e){
console.error("Error "+this.widgetId+" running custom onLoad code");
}
},_onUnloadHandler:function(){
this.isLoaded=false;
try{
this.onUnload();
}
catch(e){
console.error("Error "+this.widgetId+" running custom onUnload code");
}
},destroyDescendants:function(){
if(this._isRealContent){
this._onUnloadHandler();
}
var _15d=this._contentSetter;
if(_15d){
_15d.empty();
}else{
this.inherited(arguments);
dojo.html._emptyNode(this.containerNode);
}
},_setContent:function(cont,_15f){
this.destroyDescendants();
this._isRealContent=!_15f;
var _160=this._contentSetter;
if(!(_160&&_160 instanceof dojo.html._ContentSetter)){
_160=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(e){
var _162=this.onContentError(e);
try{
this.containerNode.innerHTML=_162;
}
catch(e){
console.error("Fatal "+this.id+" could not change content due to "+e.message,e);
}
})});
}
var _163=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});
dojo.mixin(_160,_163);
_160.set((dojo.isObject(cont)&&cont.domNode)?cont.domNode:cont);
delete this._contentSetterParams;
if(!_15f){
this._onLoadHandler(cont);
}
},_onError:function(type,err,_166){
var _167=this["on"+type+"Error"].call(this,err);
if(_166){
console.error(_166,err);
}else{
if(_167){
this._setContent(_167,true);
}
}
},_createSubWidgets:function(){
try{
dojo.parser.parse(this.containerNode,true);
}
catch(e){
this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));
}
},onLoad:function(data){
},onUnload:function(){
},onDownloadStart:function(){
return this.loadingMessage;
},onContentError:function(_169){
},onDownloadError:function(_16a){
return this.errorMessage;
},onDownloadEnd:function(){
}});
}
if(!dojo._hasResource["dijit.form.Form"]){
dojo._hasResource["dijit.form.Form"]=true;
dojo.provide("dijit.form.Form");
dojo.declare("dijit.form._FormMixin",null,{reset:function(){
dojo.forEach(this.getDescendants(),function(_16b){
if(_16b.reset){
_16b.reset();
}
});
},validate:function(){
var _16c=false;
return dojo.every(dojo.map(this.getDescendants(),function(_16d){
_16d._hasBeenBlurred=true;
var _16e=_16d.disabled||!_16d.validate||_16d.validate();
if(!_16e&&!_16c){
dijit.scrollIntoView(_16d.containerNode||_16d.domNode);
_16d.focus();
_16c=true;
}
return _16e;
}),function(item){
return item;
});
},setValues:function(val){
dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");
return this.attr("value",val);
},_setValueAttr:function(obj){
var map={};
dojo.forEach(this.getDescendants(),function(_173){
if(!_173.name){
return;
}
var _174=map[_173.name]||(map[_173.name]=[]);
_174.push(_173);
});
for(var name in map){
if(!map.hasOwnProperty(name)){
continue;
}
var _176=map[name],_177=dojo.getObject(name,false,obj);
if(_177===undefined){
continue;
}
if(!dojo.isArray(_177)){
_177=[_177];
}
if(typeof _176[0].checked=="boolean"){
dojo.forEach(_176,function(w,i){
w.attr("value",dojo.indexOf(_177,w.value)!=-1);
});
}else{
if(_176[0]._multiValue){
_176[0].attr("value",_177);
}else{
dojo.forEach(_176,function(w,i){
w.attr("value",_177[i]);
});
}
}
}
},getValues:function(){
dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");
return this.attr("value");
},_getValueAttr:function(){
var obj={};
dojo.forEach(this.getDescendants(),function(_17d){
var name=_17d.name;
if(!name||_17d.disabled){
return;
}
var _17f=_17d.attr("value");
if(typeof _17d.checked=="boolean"){
if(/Radio/.test(_17d.declaredClass)){
if(_17f!==false){
dojo.setObject(name,_17f,obj);
}
}else{
var ary=dojo.getObject(name,false,obj);
if(!ary){
ary=[];
dojo.setObject(name,ary,obj);
}
if(_17f!==false){
ary.push(_17f);
}
}
}else{
dojo.setObject(name,_17f,obj);
}
});
return obj;
},isValid:function(){
this._invalidWidgets=[];
return dojo.every(this.getDescendants(),function(_181){
var _182=_181.disabled||!_181.isValid||_181.isValid();
if(!_182){
this._invalidWidgets.push(_181);
}
return _182;
},this);
},onValidStateChange:function(_183){
},_widgetChange:function(_184){
var _185=this._lastValidState;
if(!_184||this._lastValidState===undefined){
_185=this.isValid();
if(this._lastValidState===undefined){
this._lastValidState=_185;
}
}else{
if(_184.isValid){
this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(w){
return (w!=_184);
},this);
if(!_184.isValid()&&!_184.attr("disabled")){
this._invalidWidgets.push(_184);
}
_185=(this._invalidWidgets.length===0);
}
}
if(_185!==this._lastValidState){
this._lastValidState=_185;
this.onValidStateChange(_185);
}
},connectChildren:function(){
dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));
var _187=this;
var _188=this._changeConnections=[];
dojo.forEach(dojo.filter(this.getDescendants(),function(item){
return item.validate;
}),function(_18a){
_188.push(_187.connect(_18a,"validate",dojo.hitch(_187,"_widgetChange",_18a)));
_188.push(_187.connect(_18a,"_setDisabledAttr",dojo.hitch(_187,"_widgetChange",_18a)));
});
this._widgetChange(null);
},startup:function(){
this.inherited(arguments);
this._changeConnections=[];
this.connectChildren();
}});
dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' name='${name}'></form>",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),execute:function(_18b){
},onExecute:function(){
},_setEncTypeAttr:function(_18c){
this.encType=_18c;
dojo.attr(this.domNode,"encType",_18c);
if(dojo.isIE){
this.domNode.encoding=_18c;
}
},postCreate:function(){
if(dojo.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){
var item=this.srcNodeRef.attributes.getNamedItem("encType");
if(item&&!item.specified&&(typeof item.value=="string")){
this.attr("encType",item.value);
}
}
this.inherited(arguments);
},onReset:function(e){
return true;
},_onReset:function(e){
var faux={returnValue:true,preventDefault:function(){
this.returnValue=false;
},stopPropagation:function(){
},currentTarget:e.currentTarget,target:e.target};
if(!(this.onReset(faux)===false)&&faux.returnValue){
this.reset();
}
dojo.stopEvent(e);
return false;
},_onSubmit:function(e){
var fp=dijit.form.Form.prototype;
if(this.execute!=fp.execute||this.onExecute!=fp.onExecute){
dojo.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0");
this.onExecute();
this.execute(this.getValues());
}
if(this.onSubmit(e)===false){
dojo.stopEvent(e);
}
},onSubmit:function(e){
return this.isValid();
},submit:function(){
if(!(this.onSubmit()===false)){
this.containerNode.submit();
}
}});
}
if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");
dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper' id='${id}_wrapper'><div class='dijitDialogUnderlay ${class}' id='${id}' dojoAttachPoint='node'></div></div>",attributeMap:{},postCreate:function(){
dojo.body().appendChild(this.domNode);
this.bgIframe=new dijit.BackgroundIframe(this.domNode);
},layout:function(){
var _194=dijit.getViewport();
var is=this.node.style,os=this.domNode.style;
os.top=_194.t+"px";
os.left=_194.l+"px";
is.width=_194.w+"px";
is.height=_194.h+"px";
var _197=dijit.getViewport();
if(_194.w!=_197.w){
is.width=_197.w+"px";
}
if(_194.h!=_197.h){
is.height=_197.h+"px";
}
},show:function(){
this.domNode.style.display="block";
this.layout();
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},hide:function(){
this.domNode.style.display="none";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
},uninitialize:function(){
if(this.bgIframe){
this.bgIframe.destroy();
}
}});
dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(_198){
},onCancel:function(){
},onExecute:function(){
},_onSubmit:function(){
this.onExecute();
this.execute(this.attr("value"));
},_getFocusItems:function(_199){
var _19a=dijit._getTabNavigable(dojo.byId(_199));
this._firstFocusItem=_19a.lowest||_19a.first||_199;
this._lastFocusItem=_19a.last||_19a.highest||this._firstFocusItem;
if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){
dojo.attr(_199,"tabindex","0");
this._firstFocusItem=_199;
}
}});
dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:null,templateString:"<div class=\"dijitDialog\" tabindex=\"-1\" waiRole=\"dialog\" waiState=\"labelledby-${id}_title\">\r\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\r\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\r\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"onclick: onCancel\" title=\"${buttonCancel}\">\r\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\r\n\t</span>\r\n\t</div>\r\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\r\n</div>\r\n",attributeMap:dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap),{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}]}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,postMixInProperties:function(){
var _19b=dojo.i18n.getLocalization("dijit","common");
dojo.mixin(this,_19b);
this.inherited(arguments);
},postCreate:function(){
var s=this.domNode.style;
s.visibility="hidden";
s.position="absolute";
s.display="";
s.top="-9999px";
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
this.connect(this,"onExecute","hide");
this.connect(this,"onCancel","hide");
this._modalconnects=[];
},onLoad:function(){
this._position();
this.inherited(arguments);
},_endDrag:function(e){
if(e&&e.node&&e.node===this.domNode){
var vp=dijit.getViewport();
var p=e._leftTop||dojo.coords(e.node,true);
this._relativePosition={t:p.t-vp.t,l:p.l-vp.l};
}
},_setup:function(){
var node=this.domNode;
if(this.titleBar&&this.draggable){
this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(node,{handle:this.titleBar}):new dojo.dnd.Moveable(node,{handle:this.titleBar,timeout:0});
dojo.subscribe("/dnd/move/stop",this,"_endDrag");
}else{
dojo.addClass(node,"dijitDialogFixed");
}
this._underlay=new dijit.DialogUnderlay({id:this.id+"_underlay","class":dojo.map(this["class"].split(/\s/),function(s){
return s+"_underlay";
}).join(" ")});
var _1a2=this._underlay;
this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,onBegin:dojo.hitch(_1a2,"show")});
this._fadeOut=dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){
node.style.visibility="hidden";
node.style.top="-9999px";
_1a2.hide();
}});
},uninitialize:function(){
if(this._fadeIn&&this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
if(this._fadeOut&&this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
if(this._underlay){
this._underlay.destroy();
}
if(this._moveable){
this._moveable.destroy();
}
},_size:function(){
var mb=dojo.marginBox(this.domNode);
var _1a4=dijit.getViewport();
if(mb.w>=_1a4.w||mb.h>=_1a4.h){
dojo.style(this.containerNode,{width:Math.min(mb.w,Math.floor(_1a4.w*0.75))+"px",height:Math.min(mb.h,Math.floor(_1a4.h*0.75))+"px",overflow:"auto",position:"relative"});
}
},_position:function(){
if(!dojo.hasClass(dojo.body(),"dojoMove")){
var node=this.domNode;
var _1a6=dijit.getViewport();
var p=this._relativePosition;
var mb=p?null:dojo.marginBox(node);
dojo.style(node,{left:Math.floor(_1a6.l+(p?p.l:(_1a6.w-mb.w)/2))+"px",top:Math.floor(_1a6.t+(p?p.t:(_1a6.h-mb.h)/2))+"px"});
}
},_onKey:function(evt){
if(evt.charOrCode){
var dk=dojo.keys;
var node=evt.target;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.domNode);
}
var _1ac=(this._firstFocusItem==this._lastFocusItem);
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_1ac){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_1ac){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
while(node){
if(node==this.domNode){
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
}else{
return;
}
}
node=node.parentNode;
}
if(evt.charOrCode!==dk.TAB){
dojo.stopEvent(evt);
}else{
if(!dojo.isOpera){
try{
this._firstFocusItem.focus();
}
catch(e){
}
}
}
}
}
}
},show:function(){
if(this.open){
return;
}
if(!this._alreadyInitialized){
this._setup();
this._alreadyInitialized=true;
}
if(this._fadeOut.status()=="playing"){
this._fadeOut.stop();
}
this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));
this._modalconnects.push(dojo.connect(window,"onresize",this,"layout"));
this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));
dojo.style(this.domNode,{opacity:0,visibility:""});
dojo.style(this.containerNode,{width:"auto",height:"auto"});
this.open=true;
this._loadCheck();
this._size();
this._position();
this._fadeIn.play();
this._savedFocus=dijit.getFocus(this);
if(this.autofocus){
this._getFocusItems(this.domNode);
setTimeout(dojo.hitch(dijit,"focus",this._firstFocusItem),50);
}
},hide:function(){
if(!this._alreadyInitialized){
return;
}
if(this._fadeIn.status()=="playing"){
this._fadeIn.stop();
}
this._fadeOut.play();
if(this._scrollConnected){
this._scrollConnected=false;
}
dojo.forEach(this._modalconnects,dojo.disconnect);
this._modalconnects=[];
if(this.refocus){
this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus));
}
if(this._relativePosition){
delete this._relativePosition;
}
this.open=false;
},layout:function(){
if(this.domNode.style.visibility!="hidden"){
this._underlay.layout();
this._position();
}
},destroy:function(){
dojo.forEach(this._modalconnects,dojo.disconnect);
if(this.refocus&&this.open){
setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25);
}
this.inherited(arguments);
}});
dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,"class":"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:"<div waiRole=\"presentation\">\r\n\t<div class=\"dijitTooltipContainer\" waiRole=\"presentation\">\r\n\t\t<div class =\"dijitTooltipContents dijitTooltipFocusNode\" dojoAttachPoint=\"containerNode\" tabindex=\"-1\" waiRole=\"dialog\"></div>\r\n\t</div>\r\n\t<div class=\"dijitTooltipConnector\" waiRole=\"presentation\"></div>\r\n</div>\r\n",postCreate:function(){
this.inherited(arguments);
this.connect(this.containerNode,"onkeypress","_onKey");
this.containerNode.title=this.title;
},orient:function(node,_1ae,_1af){
this.domNode.className=this["class"]+" dijitTooltipAB"+(_1af.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_1af.charAt(0)=="T"?"Below":"Above");
},onOpen:function(pos){
this.orient(this.domNode,pos.aroundCorner,pos.corner);
this._loadCheck();
if(this.autofocus){
this._getFocusItems(this.containerNode);
dijit.focus(this._firstFocusItem);
}
},_onKey:function(evt){
var node=evt.target;
var dk=dojo.keys;
if(evt.charOrCode===dk.TAB){
this._getFocusItems(this.containerNode);
}
var _1b4=(this._firstFocusItem==this._lastFocusItem);
if(evt.charOrCode==dk.ESCAPE){
this.onCancel();
dojo.stopEvent(evt);
}else{
if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){
if(!_1b4){
dijit.focus(this._lastFocusItem);
}
dojo.stopEvent(evt);
}else{
if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){
if(!_1b4){
dijit.focus(this._firstFocusItem);
}
dojo.stopEvent(evt);
}else{
if(evt.charOrCode===dk.TAB){
evt.stopPropagation();
}
}
}
}
}});
}
if(!dojo._hasResource["dijit.form.CheckBox"]){
dojo._hasResource["dijit.form.CheckBox"]=true;
dojo.provide("dijit.form.CheckBox");
dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\r\n\t><input\r\n\t \ttype=\"${type}\" name=\"${name}\"\r\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\r\n\t\tdojoAttachPoint=\"focusNode\"\r\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\r\n/></div>\r\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",_setValueAttr:function(_1b5){
if(typeof _1b5=="string"){
this.value=_1b5;
dojo.attr(this.focusNode,"value",_1b5);
_1b5=true;
}
if(this._created){
this.attr("checked",_1b5);
}
},_getValueAttr:function(){
return (this.checked?this.value:false);
},postMixInProperties:function(){
if(this.value==""){
this.value="on";
}
this.inherited(arguments);
},_fillContent:function(_1b6){
},reset:function(){
this._hasBeenBlurred=false;
this.attr("checked",this.params.checked||false);
this.value=this.params.value||"on";
dojo.attr(this.focusNode,"value",this.value);
},_onFocus:function(){
if(this.id){
dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");
}
},_onBlur:function(){
if(this.id){
dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");
}
}});
dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_1b7){
this.inherited(arguments);
if(!this._created){
return;
}
if(_1b7){
var _1b8=this;
dojo.query("INPUT[type=radio][name="+this.name+"]",this.focusNode.form||dojo.doc).forEach(function(_1b9){
if(_1b9!=_1b8.focusNode&&_1b9.form==_1b8.focusNode.form){
var _1ba=dijit.getEnclosingWidget(_1b9);
if(_1ba&&_1ba.checked){
_1ba.attr("checked",false);
}
}
});
}
},_clicked:function(e){
if(!this.checked){
this.attr("checked",true);
}
}});
}
if(!dojo._hasResource["dojo.io.iframe"]){
dojo._hasResource["dojo.io.iframe"]=true;
dojo.provide("dojo.io.iframe");
dojo.io.iframe={create:function(_1bc,_1bd,uri){
if(window[_1bc]){
return window[_1bc];
}
if(window.frames[_1bc]){
return window.frames[_1bc];
}
var _1bf=null;
var turi=uri;
if(!turi){
if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){
console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");
}
turi=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));
}
var _1c1=dojo.isIE?"<iframe name=\""+_1bc+"\" src=\""+turi+"\" onload=\""+_1bd+"\">":"iframe";
_1bf=dojo.doc.createElement(_1c1);
with(_1bf){
name=_1bc;
setAttribute("name",_1bc);
id=_1bc;
}
dojo.body().appendChild(_1bf);
window[_1bc]=_1bf;
with(_1bf.style){
if(!(dojo.isSafari<3)){
position="absolute";
}
left=top="1px";
height=width="1px";
visibility="hidden";
}
if(!dojo.isIE){
this.setSrc(_1bf,turi,true);
_1bf.onload=new Function(_1bd);
}
return _1bf;
},setSrc:function(_1c2,src,_1c4){
try{
if(!_1c4){
if(dojo.isSafari){
_1c2.location=src;
}else{
frames[_1c2.name].location=src;
}
}else{
var idoc;
if(dojo.isIE||dojo.isSafari>2){
idoc=_1c2.contentWindow.document;
}else{
if(dojo.isSafari){
idoc=_1c2.document;
}else{
idoc=_1c2.contentWindow;
}
}
if(!idoc){
_1c2.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
console.debug("dojo.io.iframe.setSrc: ",e);
}
},doc:function(_1c6){
var doc=_1c6.contentDocument||(((_1c6.name)&&(_1c6.document)&&(document.getElementsByTagName("iframe")[_1c6.name].contentWindow)&&(document.getElementsByTagName("iframe")[_1c6.name].contentWindow.document)))||((_1c6.name)&&(document.frames[_1c6.name])&&(document.frames[_1c6.name].document))||null;
return doc;
},send:function(args){
if(!this["_frame"]){
this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");
}
var dfd=dojo._ioSetArgs(args,function(dfd){
dfd.canceled=true;
dfd.ioArgs._callNext();
},function(dfd){
var _1cc=null;
try{
var _1cd=dfd.ioArgs;
var dii=dojo.io.iframe;
var ifd=dii.doc(dii._frame);
var _1d0=_1cd.handleAs;
_1cc=ifd;
if(_1d0!="html"){
if(_1d0=="xml"){
if(dojo.isIE){
dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();
var _1d1=(dii._frame.contentWindow.document).documentElement.innerText;
_1d1=_1d1.replace(/>\s+</g,"><");
if(!this._ieXmlDom){
for(var i=0,a=["MSXML2","Microsoft","MSXML","MSXML3"],l=a.length;i<l;i++){
try{
var test=new ActiveXObject(a[i]+".XmlDom");
this._ieXmlDom=a[i]+".XmlDom";
break;
}
catch(e){
}
}
if(!this._ieXmlDom){
throw new Error("dojo.io.iframe.send (return handler): your copy of Internet Explorer does not support XML documents.");
}
}
var _xml=new ActiveXObject(this._ieXmlDom);
_xml.async=false;
_xml.loadXML(_1d1);
_1cc=_xml;
}
}else{
_1cc=ifd.getElementsByTagName("textarea")[0].value;
if(_1d0=="json"){
_1cc=dojo.fromJson(_1cc);
}else{
if(_1d0=="javascript"){
_1cc=dojo.eval(_1cc);
}
}
}
}
}
catch(e){
_1cc=e;
}
finally{
_1cd._callNext();
}
return _1cc;
},function(_1d7,dfd){
dfd.ioArgs._hasError=true;
dfd.ioArgs._callNext();
return _1d7;
});
dfd.ioArgs._callNext=function(){
if(!this["_calledNext"]){
this._calledNext=true;
dojo.io.iframe._currentDfd=null;
dojo.io.iframe._fireNextRequest();
}
};
this._dfdQueue.push(dfd);
this._fireNextRequest();
dojo._ioWatch(dfd,function(dfd){
return !dfd.ioArgs["_hasError"];
},function(dfd){
return (!!dfd.ioArgs["_finished"]);
},function(dfd){
if(dfd.ioArgs._finished){
dfd.callback(dfd);
}else{
dfd.errback(new Error("Invalid dojo.io.iframe request state"));
}
});
return dfd;
},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){
try{
if((this._currentDfd)||(this._dfdQueue.length==0)){
return;
}
var dfd=this._currentDfd=this._dfdQueue.shift();
var _1dd=dfd.ioArgs;
var args=_1dd.args;
_1dd._contentToClean=[];
var fn=dojo.byId(args["form"]);
var _1e0=args["content"]||{};
if(fn){
if(_1e0){
var _1e1=function(name,_1e3){
var tn;
if(dojo.isIE){
tn=dojo.doc.createElement("<input type='hidden' name='"+name+"'>");
}else{
tn=dojo.doc.createElement("input");
tn.type="hidden";
tn.name=name;
}
tn.value=_1e3;
fn.appendChild(tn);
_1dd._contentToClean.push(name);
};
for(var x in _1e0){
var val=_1e0[x];
if(dojo.isArray(val)&&val.length>1){
var i;
for(i=0;i<val.length;i++){
_1e1(x,val[i]);
}
}else{
if(!fn[x]){
_1e1(x,val);
}else{
fn[x].value=val;
}
}
}
}
var _1e8=fn.getAttributeNode("action");
var _1e9=fn.getAttributeNode("method");
var _1ea=fn.getAttributeNode("target");
if(args["url"]){
_1dd._originalAction=_1e8?_1e8.value:null;
if(_1e8){
_1e8.value=args.url;
}else{
fn.setAttribute("action",args.url);
}
}
if(!_1e9||!_1e9.value){
if(_1e9){
_1e9.value=(args["method"])?args["method"]:"post";
}else{
fn.setAttribute("method",(args["method"])?args["method"]:"post");
}
}
_1dd._originalTarget=_1ea?_1ea.value:null;
if(_1ea){
_1ea.value=this._iframeName;
}else{
fn.setAttribute("target",this._iframeName);
}
fn.target=this._iframeName;
fn.submit();
}else{
var _1eb=args.url+(args.url.indexOf("?")>-1?"&":"?")+_1dd.query;
this.setSrc(this._frame,_1eb,true);
}
}
catch(e){
dfd.errback(e);
}
},_iframeOnload:function(){
var dfd=this._currentDfd;
if(!dfd){
this._fireNextRequest();
return;
}
var _1ed=dfd.ioArgs;
var args=_1ed.args;
var _1ef=dojo.byId(args.form);
if(_1ef){
var _1f0=_1ed._contentToClean;
for(var i=0;i<_1f0.length;i++){
var key=_1f0[i];
for(var j=0;j<_1ef.childNodes.length;j++){
var _1f4=_1ef.childNodes[j];
if(_1f4.name==key){
dojo._destroyElement(_1f4);
break;
}
}
}
if(_1ed["_originalAction"]){
_1ef.setAttribute("action",_1ed._originalAction);
}
if(_1ed["_originalTarget"]){
_1ef.setAttribute("target",_1ed._originalTarget);
_1ef.target=_1ed._originalTarget;
}
}
_1ed._finished=true;
}};
}
if(!dojo._hasResource["lconn.dogear.bookmarkimporter"]){
dojo._hasResource["lconn.dogear.bookmarkimporter"]=true;
dojo.provide("lconn.dogear.bookmarkimporter");
dojo.declare("lconn.dogear.bookmarkimporter",null,{pageSize:10,bookmarks:null,currentPageIndex:-1,importAsPrivate:false,waitDialog:null,showError:function(_1f5){
var _1f6=dojo.byId("bookmarksUploadErrors");
if(!_1f6){
_1f6=document.createElement("div");
_1f6.id="bookmarksUploadErrors";
document.body.appendChild(_1f6);
}
_1f6.innerHTML="<img title='Error icon' alt='Error icon' src='"+dogearContext+"/nav/common/styles/images/iconError.gif'/>&nbsp;"+_1f5;
_1f6.style.display="";
},showWait:function(){
this.waitDialog=dijit.byId("dogearBookmarkWaitDiv");
if(!this.waitDialog){
var _1f7=this.getBundle();
var _1f8=document.createElement("div");
_1f8.id="dogearBookmarkWaitDiv";
_1f8.className="lotusDialogWrapper";
_1f8.innerHTML="<div class='lotusDialogBorder'><div class='lotusDialog'><div class='lotusDialogContent'>"+"<img title=\""+_1f7["uploading"]+"\" alt=\""+_1f7["uploading"]+"\" src='"+dogearContext+"/h3/images/progressIndicator.gif' />&nbsp;"+_1f7["uploading"]+"</div></div></div>";
document.body.appendChild(_1f8);
this.waitDialog=new dijit.Dialog({id:"dogearBookmarkWaitDiv"},_1f8);
this.waitDialog.startup();
}
this.waitDialog.show();
},hideWait:function(){
this.waitDialog.hide();
},upload:function(){
var _1f9=this;
_1f9.importAsPrivate=dojo.byId("private").checked;
var _1fa=dojo.byId("uploadBookmarksFile");
if(dojo.isIE){
_1fa.encoding="multipart/form-data";
var _1fb=_1fa.getAttributeNode("method");
_1fb.value="POST";
}
var kw={form:_1fa,method:"POST",url:fileUploadActionURL+"&forceRefresh="+Math.random(),handleAs:"json",handle:function(rt){
_1f9.hideWait();
if(rt instanceof Error){
_1f9.showError("Dogear failed to read the file.");
return;
}
if(rt){
if(rt=="0"){
_1f9.showError("Dogear failed to read the file.");
}else{
_1f9.generatePagedBookmarks(rt);
_1f9.showBookmarksPage();
}
}
},error:function(data){
_1f9.hideWait();
},sync:true};
this.showWait();
var _1ff=dojo.io.iframe.send(kw);
},getBundle:function(){
var res=new lconn.dogear.Res();
res.loadDefaultBundle();
return res.resBundle;
},generatePagedBookmarks:function(_201){
this.bookmarks=_201;
var _202=this.getBundle();
var html="<div class='lotusDialogBorder'><div class='lotusDialog'><h1><a href='#' class='lotusRight' onclick='javascript:dijit.byId(\"bookmarksUploadedDialog\").onCancel();return false;'>";
html+="<img alt='close' src='"+dogearContext+"/nav/common/styles/images/iconClosePopUp.gif' />";
html+="</a>";
html+=_202["importDialogTitle"]+"</h1>";
html+="<div class='lotusDialogContent'>";
html+="<div class='importDialogDesc'>";
html+=_202["importDialogTooltip"]+"<br />";
html+=_202["select"];
html+="<a onclick='importer.selectAllInPage(); return false;' href='#'>"+_202["all"]+"</a>&nbsp;&nbsp;<a onclick='importer.selectNoneInPage();return false;' href='#'>"+_202["none"]+"</a>";
html+="</div>";
var _204=Math.ceil(this.bookmarks.length/this.pageSize);
var reg=/^\w*:\/\//;
var _206="<div class='' id='bookmarksImportContainer'>";
_206+="<div align='center' style='display:none;' id='selectAllLinkContainer'></div>";
for(var i=0;i<_204;i++){
_206+="<table class='lotusTable' id='bookmarks_page_"+i+"' cellspacing='0' cellspadding='0' border='0' style='display:none;'>";
for(var j=i*this.pageSize;j<(i+1)*this.pageSize&&j<this.bookmarks.length;j++){
_206+="<tr>";
_206+="<td class='lotusFirstCell' width='16px'><input type='checkbox' onclick='if (this.checked == false) {importer.hideSelectAllLink();importer.bookmarks["+j+"].selected = false;}else{importer.bookmarks["+j+"].selected = true;}' class='lotusCheckBox' value='"+j+"'></td>";
_206+="<td width='20px'><img width='16px' height='16px' src='"+cPath+"/favicon?host="+this.bookmarks[j].url.replace(reg,"").split("/")[0]+"'></td>";
_206+="<td>"+"<h4><a href='"+this.bookmarks[j].url+"' target='blank'>"+this.bookmarks[j].title+"</a></h4>"+"<span class='tags'>"+_202["tags"]+this.bookmarks[j].tags+"</span>"+"</td>";
_206+="</tr>";
if(this.bookmarks[j].description){
_206+="<tr class='lotusDetails'>";
_206+="<td> </td><td colspan='2'>"+this.bookmarks[j].description+"</td>";
_206+="</tr>";
}
}
_206+="</table>";
}
_206+="</div>";
this.currentPageIndex=0;
var _209=this.generatePagingButton();
dijit.byId("importDialog").hide();
var _20a=dojo.byId("bookmarksUploaded");
if(!_20a){
_20a=document.createElement("DIV");
_20a.id="bookmarksUploaded";
_20a.className="lotusDialogWrapper";
document.body.appendChild(_20a);
}
var w=dijit.byId("bookmarksUploadedDialog");
if(w){
w.setContent((html+"<div class='lotusPaging' id='pagingBar1'></div>"+_206+"<div class='lotusPaging' id='pagingBar2'></div></div><div class='lotusDialogFooter'>"+this.generateActionButtons()+"</div></div></div>"));
w.show();
}else{
_20a.innerHTML="";
_20a.innerHTML=(html+"<div class='lotusPaging' id='pagingBar1'></div>"+_206+"<div class='lotusPaging' id='pagingBar2'></div></div><div class='lotusDialogFooter'>"+this.generateActionButtons()+"</div></div></div>");
w=new dijit.Dialog({id:"bookmarksUploadedDialog"},_20a);
w.startup();
w.show();
}
},showBookmarksPage:function(){
var _20c=Math.ceil(this.bookmarks.length/this.pageSize);
for(var i=0;i<_20c;i++){
if(dojo.byId("bookmarks_page_"+i)){
dojo.byId("bookmarks_page_"+i).style.display="none";
}
}
if(dojo.byId("bookmarks_page_"+this.currentPageIndex)){
dojo.byId("bookmarks_page_"+this.currentPageIndex).style.display="";
}
if(dojo.byId("pagingBar1")){
dojo.byId("pagingBar1").innerHTML=this.generatePagingButton();
}
if(dojo.byId("pagingBar2")){
dojo.byId("pagingBar2").innerHTML=this.generatePagingButton();
}
},generateActionButtons:function(){
var _20e=this.getBundle();
var html="";
html+="<input type='button' class='lotusFormButton' value='"+_20e["importBtnLabel"]+"' onclick='importer.doImport();'>";
html+="&nbsp;&nbsp;";
html+="<a onclick='dijit.byId(\"bookmarksUploadedDialog\").onCancel();return false;' href='#'>"+_20e["cancelBtnLabel"]+"</a>";
return html;
},generateSelectAllLink:function(){
var _210=this.getBundle();
var html=dojo.string.substitute(_210["selectAllTip"],[this.pageSize])+"<a onclick='importer.selectAllCrossPage(); return false;' href='#'>"+dojo.string.substitute(_210["selectAllLinkTxt"],[this.bookmarks.length])+"</a>";
return html;
},generateCleanSelectionLink:function(){
var _212=this.getBundle();
var html=dojo.string.substitute(_212["allSelected"],[this.bookmarks.length])+"<a onclick='importer.selectNone(); return false;' href='#'>"+_212["cleanSelection"]+"</a>";
return html;
},generatePagingButton:function(){
var _214=this.getBundle();
var _215=Math.ceil(this.bookmarks.length/this.pageSize);
var _216=false,_217=false;
var _218,_219;
if(this.currentPageIndex+1==_215){
_216=true;
}
if(this.currentPageIndex==0){
_217=true;
}
_218=this.currentPageIndex*this.pageSize+1;
_219=(this.currentPageIndex+1)*this.pageSize>this.bookmarks.length?this.bookmarks.length:(this.currentPageIndex+1)*this.pageSize;
var _21a="";
_21a+="<div class='lotusLeft lotusInlinelist'>"+dojo.string.substitute(_214["pagingString"],[_218,_219,this.bookmarks.length])+"</div>";
_21a+="<ul class='lotusRight lotusInlinelist'>"+"<li class='lotusFirst'>"+(_217?_214["previousPage"]:"<a href='#' onclick='importer.previousPage();'>"+_214["previousPage"]+"</a>")+"</li>"+"<li>"+(_216?_214["nextPage"]:"<a href='#' onclick='importer.nextPage();'>"+_214["nextPage"]+"</a>")+"</li>"+"</ul>";
return _21a;
},nextPage:function(){
var _21b=Math.ceil(this.bookmarks.length/this.pageSize);
this.currentPageIndex=(this.currentPageIndex+1)%_21b;
this.showBookmarksPage();
},previousPage:function(){
var _21c=Math.ceil(this.bookmarks.length/this.pageSize);
this.currentPageIndex=(this.currentPageIndex+_21c-1)%_21c;
this.showBookmarksPage();
},showSelectAllLink:function(){
if(dojo.byId("selectAllLinkContainer")){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateSelectAllLink();
dojo.byId("selectAllLinkContainer").style.display="";
}
},hideSelectAllLink:function(){
if(dojo.byId("selectAllLinkContainer")){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateSelectAllLink();
dojo.byId("selectAllLinkContainer").style.display="none";
}
},selectAllInPage:function(){
dojo.query("#bookmarks_page_"+this.currentPageIndex+" input.lotusCheckBox").attr("checked",true);
for(var i=this.currentPageIndex*this.pageSize;i<(this.currentPageIndex+1)*this.pageSize&&i<this.bookmarks.length;i++){
this.bookmarks[i].selected=true;
}
if(this.bookmarks.length>this.pageSize){
this.showSelectAllLink();
}
},selectNone:function(){
dojo.query("#bookmarksImportContainer input.lotusCheckBox").attr("checked",false);
for(var i=0;i<this.bookmarks.length;i++){
this.bookmarks[i].selected=false;
}
this.hideSelectAllLink();
},selectNoneInPage:function(){
dojo.query("#bookmarks_page_"+this.currentPageIndex+" input.lotusCheckBox").attr("checked",false);
for(var i=this.currentPageIndex*this.pageSize;i<(this.currentPageIndex+1)*this.pageSize&&i<this.bookmarks.length;i++){
this.bookmarks[i].selected=false;
}
},selectAllCrossPage:function(){
dojo.query("#bookmarksImportContainer input.lotusCheckBox").attr("checked",true);
for(var i=0;i<this.bookmarks.length;i++){
this.bookmarks[i].selected=true;
}
if(this.bookmarks.length>this.pageSize){
dojo.byId("selectAllLinkContainer").innerHTML=this.generateCleanSelectionLink();
}
},doImport:function(){
this.showWait();
dojo.forEach(this.bookmarks,function(item){
if(item.selected){
var _222="<?xml version=\"1.0\" encoding=\"utf-8\"?>"+"<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\">"+"\t<title>"+item.title.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</title>"+"\t<category scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" term=\"bookmark\" />"+"\t<link href=\""+item.url.replace(/&/g,"&amp;")+"\" />"+"\t<content type=\"html\"><![CDATA["+item.description+"\t]]></content>";
var tags=item.tags==""?[]:item.tags.split(" ");
for(var i=0;i<tags.length;i++){
_222+="<category term=\""+tags[i].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"\" />";
}
if(importer.importAsPrivate){
_222+="<category scheme=\"http://www.ibm.com/xmlns/prod/sn/flags\" term=\"private\"/>";
}
_222+="</entry>";
dojo.rawXhrPost({url:dogearContext+"/api/app",handleAs:"xml",postData:_222,headers:{"Content-Type":"application/atom+xml"},load:function(data){
},error:function(data){
if(console.debug){
console.debug(item.title)+"  failed...";
}
},sync:true});
}
});
this.hideWait();
location.reload();
}});
importer=new lconn.dogear.bookmarkimporter();
}
if(!dojo._hasResource["lconn.dogear.DogearPeopleTypeAhead"]){
dojo._hasResource["lconn.dogear.DogearPeopleTypeAhead"]=true;
dojo.provide("lconn.dogear.DogearPeopleTypeAhead");
dojo.declare("lconn.dogear.DogearPeopleTypeAhead",[lconn.core.PeopleTypeAhead],{submitFormDirectly:false,wrapText:false,nameIndicator:"",_openResultList:function(_227,_228){
if(this.disabled||this.readOnly||(_228.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_227.length){
this._hideResultList();
return;
}
var _229=new String(this.formatItem(_227[0]));
if(_229&&this.autoComplete&&!this._prev_key_backspace&&(_228.query!="")){
this._autoCompleteText(_229);
}
this._popupWidget.createOptions(_227,_228,dojo.hitch(this,"_getMenuLabelFromItem"));
this._popupWidget.searchButton.innerHTML=dojo.string.substitute(dojo.i18n.getLocalization("lconn.dogear","strings")["rs_searchDirectoryFor"],[this._lastQuery.replace(/</g,"&lt;").replace(/>/g,"&gt;")])+"&lrm;";
this._showResultList();
if(_228.direction){
if(1==_228.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_228.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_startSearch:function(key,_22b){
if(!this._popupWidget){
var _22c=this.id+"_popup";
this._popupWidget=new lconn.act.PeopleTypeAheadMenu({rs_searchDirectory:this.rs_searchDirectory,onChange:dojo.hitch(this,this._selectOption),id:_22c});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_22c);
}
if(_22b==undefined){
_22b=false;
}
this.item=null;
var _22d=dojo.clone(this.query);
this._lastQuery=_22d=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_22e,_22f){
var _230=this.store.fetch({queryOptions:{ignoreCase:this.ignoreCase,deep:true},searchDirectory:_22b,query:_22e,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_231){
console.error("dijit.form.ComboBox: "+_231);
dojo.hitch(_22f,"_hideResultList")();
},start:0,count:this.pageSize});
var _232=function(_233,_234){
_233.start+=_233.count*_234;
_233.direction=_234;
this.store.fetch(_233);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_232,_230);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
this._startSearch(key,true);
}));
},_22d,this),this.searchDelay);
},_getMenuLabelFromItem:function(item){
var _236=this.formatItem(item);
var key="";
if(this.multipleValues){
key=dojo.string.trim(this.keyArr[this.keyIdx]);
}else{
key=dojo.string.trim(this.focusNode.value);
}
key=key.replace(/</g,"&lt;").replace(/>/g,"&gt;");
if(!this.wrapText){
_236=_236.replace(/</g,"&lt;").replace(/>/g,"&gt;");
}else{
_236=item.name.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"<br>"+(item.member?item.member.replace(/</g,"&lt;").replace(/>/g,"&gt;"):"");
}
var _238=_236.toLowerCase();
var _239=key.toLowerCase();
var _23a=0;
var _23b=null;
while(key&&-1<(_23b=_238.indexOf(_239,_23a))){
_236=_236.substr(0,_23b)+"<b>"+_236.substring(_23b,_23b+key.length)+"</b>"+_236.substring(_23b+key.length);
_23a=_23b+key.length+7;
_238=_236.toLowerCase();
}
_236=_236+"&lrm;";
return {html:true,label:_236};
}});
}
if(!dojo._hasResource["lconn.core.MenuUtility"]){
dojo._hasResource["lconn.core.MenuUtility"]=true;
dojo.provide("lconn.core.MenuUtility");
dojo.declare("lconn.core.MenuUtility",null,{openedBy:null,openMenu:function(evt,_23d){
var menu=dijit.byId(_23d);
evt=dojo.fixEvent(evt);
var _23f=evt.target;
function closeAndRestoreFocus(){
try{
dijit.focus(_23f);
}
catch(exception){
}
dijit.popup.close(menu);
};
dijit.popup.open({popup:menu,around:evt.target,orient:dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus});
menu.focus();
dojo.connect(menu,"_onBlur",function(){
dijit.popup.close(menu);
});
dojo.stopEvent(evt);
},openMenuA11y:function(evt,_241){
if(evt.keyCode==dojo.keys.ENTER){
this.openMenu(evt,_241);
}
}});
menuUtility=new lconn.core.MenuUtility();
lconn.core.MenuUtility.open=function(_242,e){
menuUtility.openMenu(e,_242);
};
}
if(!dojo._hasResource["lconn.core.LanguageSelector"]){
dojo._hasResource["lconn.core.LanguageSelector"]=true;
dojo.provide("lconn.core.LanguageSelector");
dojo.declare("lconn.core.LanguageSelector",null,{_jsonString:null,_selectorNode:null,_menu:null,_cookieProperties:null,COOKIE_NAME:null,constructor:function(_244,_245,_246,_247){
this._selectorNode=_244;
this._jsonString=_245;
this._cookieProperties=_247;
this.COOKIE_NAME=_246;
this._setSelectorLabel();
dojo.connect(this._selectorNode,"onclick",dojo.hitch(this,"_openMenu"));
},_openMenu:function(evt){
try{
this._buildLanguageMenu();
menuUtility.openMenu(evt,this._menu.id);
dojo.stopEvent(evt);
}
catch(e){
console.log(e);
}
},_setSelectorLabel:function(){
var _249=dojo.cookie(this.COOKIE_NAME);
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
if(_249!=null){
for(var key in this._jsonString){
if(this._isCodeEqual(key,_249)){
this._selectorNode.innerHTML=this._jsonString[key]+" &#9660;";
break;
}
}
if(!this._isCodeEqual(key,_249)){
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
}else{
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
},_buildLanguageMenu:function(){
if(this._menu==null){
this._menu=new dijit.Menu();
for(var key in this._jsonString){
this._menu.addChild(this._buildMenuItem(this._jsonString[key],key));
}
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
this._menu.addChild(this._buildMenuItem(this.strBundle.rs_browser_setting,"BD"));
this._menu.domNode.style.display="none";
dojo.body().appendChild(this._menu.domNode);
var that=this;
dojo.connect(this._menu,"onItemClick",function(item){
if((item!=null)&&(typeof item.language!="undefined")){
dojo.cookie(that.COOKIE_NAME,item.language,that._cookieProperties);
var _250=null;
var _251=document.getElementById("REFRESH_URL");
if(_251!=null){
_250=_251.getAttribute("href");
}else{
_250=window.location.href;
}
if(_250.indexOf("lang=")>0){
var _252=/([\&\?])(lang=)([^\&\#]*)/g;
var _253=null;
if(item.language&&item.language!=="BD"){
_253=_250.replace(_252,function(){
var _254=arguments[1]+arguments[2]+item.language;
return _254;
});
}else{
_253=_250.replace(_252,function(){
var _255=arguments[1];
return _255;
});
}
window.location=_253;
if(_253.indexOf("#")!==-1){
window.location.reload(false);
}
}else{
window.location=_250;
if(_250.indexOf("#")!==-1){
window.location.reload(false);
}
}
}
});
}
},_buildMenuItem:function(_256,_257){
var item=new dijit.MenuItem({label:_256});
item.language=_257;
return item;
},_isCodeEqual:function(_259,_25a){
var str1=_259.toLowerCase().replace(/-/,"_");
var str2=_25a.toLowerCase().replace(/-/,"_");
return str1===str2;
}});
}
if(!dojo._hasResource["com.ibm.ajax.auth"]){
dojo._hasResource["com.ibm.ajax.auth"]=true;
dojo.provide("com.ibm.ajax.auth");
com.ibm.ajax.auth={prepareSecure:function(args,_25e,_25f){
if(args["com.ibm.ajax.auth.prepareSecureCalled"]){
return args;
}else{
args["com.ibm.ajax.auth.prepareSecureCalled"]=true;
}
args._handle=args.handle;
args.handle=dojo.partial(this.testAuthenticationHandler,this,_25e,_25f);
return args;
},setAuthenticationHandler:function(_260){
this.authenticationHandler=_260;
},setTestAuthenticationHandler:function(_261){
this.testAuthenticationHandler=_261;
},setDefaultAuthenticationTests:function(_262,_263,_264){
this.checkFromCaller=_262;
this.checkByContentType=_263;
this.checkByStatusCode=_264;
},addAuthenticationCheck:function(_265){
if(_265){
this.authenticationChecks.push(_265);
}
},isAuthenticationRequired:function(_266,_267){
if(_267.xhr&&(!_266||dojo.indexOf(["cancel","timeout"],_266.dojoType)==-1)){
var _268;
try{
_268=_267.xhr.status;
}
catch(e){
}
var _269=_267.args.expectedContentType;
if(!_269){
_269=_267.args.handleAs;
}
var _26a=dojo.indexOf(["xml","json","json-comment-optional"],_269)!=-1;
if(window.debugMode!=null){
console.log("auth::isAuthenticationRequired DEBUG expectedContentType: "+_269+" restContentExpected: "+_26a+" for "+_267.args.url);
}
if(this.checkByContentType&&_26a&&/^text\/html/.exec(_267.xhr.getResponseHeader("Content-Type"))&&_268>=200&&_268<300){
console.log("auth::isAuthenticationRequired DEBUG content type does not match request, assume logged out");
return true;
}
if(this.checkByStatusCode&&_26a){
if(_268==302){
console.log("auth::isAuthenticationRequired DEBUG redirect received, assume login request");
return true;
}
if(_268==401){
console.log("auth::isAuthenticationRequired DEBUG 401 Unauthorized, assume login required");
return true;
}
if(dojo.isIE&&(_268==0||_268=="unknown")){
console.log("auth::isAuthenticationRequired DEBUG status code was 0 or 'unknown' in IE, assume login request");
return true;
}
}
}
for(var i=0;i<this.authenticationChecks.length;i++){
if(this.authenticationChecks[i](this,_266,_267)){
return true;
}
}
return false;
},testAuthenticationHandler:function(auth,_26d,_26e,_26f,_270){
var args=dojo._toArray(arguments).slice(3);
var _272=false;
if(!_26f||dojo.indexOf(["cancel","timeout"],_26f.dojoType)==-1){
if(auth.checkFromCaller&&typeof _26d=="function"&&_26d(_26f,_270)){
console.log("auth::_testAuthentication DEBUG caller provided detection logic that indicated form login, assume logged out");
_272=true;
}else{
_272=auth.isAuthenticationRequired(_26f,_270,_26d);
}
}
if(_272){
var path=auth._parseUri(_270.args.url).path;
dojo.cookie("WASPostParam",null,{expires:-1,path:path});
dojo.cookie("WASReqURL",null,{expires:-1,path:"/"});
auth.authenticationHandler(_26f,_270,_26e);
args[0]=new Error("xhr unauthenticated");
args[0].dojoType="unauthenticated";
}
if(_270.args._handle){
return _270.args._handle.apply(this,args);
}else{
return (_26f);
}
},_parseUri:function(uri){
if(!uri){
return null;
}
uri=new dojo._Url(uri);
var _275=this._splitQuery(uri.query);
uri.queryParameters=_275;
return uri;
},_splitQuery:function(_276){
var _277={};
if(!_276){
return _277;
}
if(_276.charAt(0)=="?"){
_276=_276.substring(1);
}
var args=_276.split("&");
for(var i=0;i<args.length;i++){
if(args[i].length>0){
var _27a=args[i].indexOf("=");
if(_27a==-1){
var key=decodeURIComponent(args[i]);
var _27c=_277[key];
if(dojo.isArray(_27c)){
_27c.push("");
}else{
if(_27c){
_277[key]=[_27c,""];
}else{
_277[key]="";
}
}
}else{
if(_27a>0){
var key=decodeURIComponent(args[i].substring(0,_27a));
var _27d=decodeURIComponent(args[i].substring(_27a+1));
var _27c=_277[key];
if(dojo.isArray(_27c)){
_27c.push(_27d);
}else{
if(_27c){
_277[key]=[_27c,_27d];
}else{
_277[key]=_27d;
}
}
}
}
}
}
return _277;
},checkFromCaller:true,checkByContentType:true,checkByStatusCode:true,authenticationChecks:[],authenticationHandler:function(){
console.log("auth::authenticationHandler DEBUG authentication was required");
}};
}
if(!dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]){
dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]=true;
dojo.provide("com.ibm.mm.livetext.serviceImpl");
dojo.declare("com.ibm.mm.livetext.serviceImpl",null,{_tagTypes:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",init:function(){
this._loadTags();
dojo.subscribe(this.tagChanged,this,"onTagChanged");
dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");
dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");
dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");
dojo.publish(this.tagContentChanged,[document,true]);
},_getNodes:function(node,_27f){
if(_27f.processEnclosedTags){
return dojo.query(_27f.match,node);
}else{
var a=dojo.query(_27f.match+" "+_27f.match,node);
var b=dojo.query(_27f.match,node);
var _282,_283;
while(a.length>0){
_282=a[0];
_283=0;
while(_283<b.length){
if(_282==b[_283]){
a.splice(0,1);
b.splice(_283,1);
break;
}else{
_283++;
}
}
}
return b;
}
},onTagChanged:function(node,_285,_286,_287){
var tag=null,_289=null,tags=null;
for(var _28b=0;_28b<this._tagTypes.length;_28b++){
tag=this._tagTypes[_28b];
this._processTypeTag(node,tag,_285,_286,_287,true);
}
},onTagContentChanged:function(node,_28d,_28e,_28f){
var tag=null,_291=null,tags=null;
for(var _293=0;_293<this._tagTypes.length;_293++){
tag=this._tagTypes[_293];
this._processTypeTag(node,tag,_28d,_28e,_28f,false);
}
},_processTypeTag:function(node,tag,_296,_297,_298,_299){
var tags=[];
if(_299&&this._checkRoot(node,tag)){
tags[0]=node;
}
tags=tags.concat(this._getNodes(node,tag));
var _29b=[];
_29b=_29b.concat(tags);
if(_29b.length>0){
if(tag.loaded==null){
this._loadTagHandler(tag);
}
var _29c=[];
if(dojo.isFunction(_297)){
try{
_297(node,_29b);
}
catch(error){
console.debug(error);
}
}
for(var _29d=0;_29d<tags.length;_29d++){
try{
tag.tagHandler.processTag(tags[_29d]);
}
catch(error){
_29c[_29c.length]=error;
if(_296){
break;
}
}
}
if(dojo.isFunction(_298)){
try{
_298(node,_29b,_29c);
}
catch(error){
console.debug(error);
}
}
}
},_checkRoot:function(node,tag){
var _2a0=false;
if(node!=null&&node.nodeType){
var _2a1=node.cloneNode(false);
var _2a2=document.createElement("div");
_2a2.appendChild(_2a1);
var _2a3=this._getNodes(_2a2,tag);
if(_2a3!=null&&_2a3.length>0){
_2a0=true;
}
delete _2a1;
delete _2a2;
delete _2a3;
}
return _2a0;
},_loadTags:function(){
if(this._tagTypes==null){
var _2a4=this;
if(typeof livetextCfg!="undefined"){
this._tagTypes=livetextCfg;
}else{
dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),handleAs:"text",sync:true,load:function(_2a5){
_2a4._tagTypes=dojo.fromJson(_2a5);
},error:function(data){
console.dir(data);
}});
}
}
},onAddConfigEntry:function(_2a7){
},onRemoveConfigEntry:function(_2a8){
},parseDom:function(_2a9,node){
dojo.publish(this.tagChanged,[node]);
},_loadTagHandler:function(tag){
dojo.registerModulePath(tag.module,tag.path);
dojo.eval("dojo.r"+"equire('"+tag.baseClass+"')");
var _2ac="{create:function(){return new "+tag.baseClass+"()}}";
var _2ad=dojo.fromJson(_2ac);
tag.tagHandler=_2ad.create();
tag.loaded=true;
}});
}
if(!dojo._hasResource["lconn.core.url"]){
dojo._hasResource["lconn.core.url"]=true;
dojo.provide("lconn.core.url");
dojo.provide("lconn.core.url.UrlStruct");
dojo.provide("lconn.core.url.ProxyUrlHelper");
lconn.core.url._const={regex:/(^[a-zA-Z]+)\:\/\/([a-zA-Z\d][\a-z\A-Z\d\-\.]*)(:\d{1,5})?([\/\?\#].*)?/,protocolPorts:{"http":80,"https":443}};
dojo.declare("lconn.core.url.UrlStruct",null,{isInvalidUrl:false,url:"",protocol:"",host:"",port:"",hasPort:false,urlRemainder:"",constructor:function(url){
if(url!=null&&url.match(lconn.core.url._const.regex)){
var t=lconn.core.url._const.regex.exec(url);
this.url=t[0];
this.protocol=t[1];
this.host=t[2];
this.port=this._parsePort(t[3]);
this.urlRemainder=t[4];
}else{
this.isInvalidUrl=true;
}
},_parsePort:function(_2b0){
if(_2b0==null||_2b0==""){
return "";
}
this.hasPort=true;
return _2b0.substr(_2b0.indexOf(":")+1);
},normalizedPort:function(){
var pp=lconn.core.url._const.protocolPorts;
if(this.hasPort){
return this.port;
}else{
if(typeof (pp[this.protocol])=="undefined"){
return "";
}else{
return pp[this.protocol];
}
}
}});
dojo.declare("lconn.core.url.ProxyUrlHelper",null,{proxyURL:"",_proxyStruct:null,constructor:function(_2b2){
if(_2b2.length>1&&_2b2.lastIndexOf("/")==_2b2.length-1){
_2b2=_2b2.substr(0,_2b2.length-1);
}
this.proxyURL=_2b2;
this._proxyStruct=new lconn.core.url.UrlStruct(this.proxyURL);
},getProxifiedURL:function(url){
var surl=new lconn.core.url.UrlStruct(url);
var _2b5=this._proxyStruct;
if(this._matchUrlBase(surl)){
return surl.protocol+"://"+surl.host+(_2b5.hasPort?":"+_2b5.port:"")+surl.urlRemainder;
}
return this.proxyURL+"/"+surl.protocol+"/"+surl.host+(surl.hasPort?"%3A"+surl.port:"")+surl.urlRemainder;
},_matchUrlBase:function(surl){
var ps=this._proxyStruct;
return (ps.protocol==surl.protocol&&ps.host==surl.host&&this._matchPort(surl));
},_matchPort:function(surl){
var np=this._proxyStruct.normalizedPort();
return np==surl.normalizedPort();
}});
}
if(!dojo._hasResource["lconn.core.bizCard.bizCardUtils"]){
dojo._hasResource["lconn.core.bizCard.bizCardUtils"]=true;
dojo.provide("lconn.core.bizCard.bizCardUtils");
lconn.core.bizCard.bizCardUtils={isDebug:false,scriptResourceName:"semanticTagService.js",version:"2.5.0",scripts:new Array(),css:new Array(),initiated:false,_haveProxy:false,_proxyHelper:null,appChksum:null,init:function(_2ba){
if(this.initiated==false){
this.baseUrl=lconn.core.bizCard.bizCardUtils.initBaseUrl();
this._initProxyHelper();
this._initAppCksum();
if(window.semtagrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(this.baseUrl+"/resourceStrings.do?t=1");
}
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.debug==true){
lconn.core.bizCard.bizCardUtils.isDebug=true;
}
if(window.SemTagPersonConfig_noCss==null){
if(window.SemTagSvcConfig!=null){
if(SemTagSvcConfig.loadCssFiles==true){
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}else{
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}
this.initiated=true;
}
},initBaseUrl:function(){
var _2bb="";
if(window.SemTagSvc_baseUrl!=null){
_2bb=SemTagSvc_baseUrl;
}else{
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.baseUrl!=null){
_2bb=SemTagSvcConfig.baseUrl;
}else{
_2bb=this.getURL(this.scriptResourceName,"script",SemTagSvc.baseUrl,"src").baseUrl;
}
}
return _2bb;
},_initProxyHelper:function(){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig.proxyURL)!="undefined"&&window.SemTagSvcConfig.proxyURL.length>0){
this._haveProxy=true;
this._proxyHelper=new lconn.core.url.ProxyUrlHelper(window.SemTagSvcConfig.proxyURL);
}
},_initAppCksum:function(){
this.appChksum=this._getConfigValue("appChksum","UNDEFINED");
},_getConfigValue:function(_2bc,_2bd){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig[_2bc])!="undefined"){
return window.SemTagSvcConfig[_2bc];
}
return _2bd;
},appendAppChkSum:function(url){
if(url==null||url.indexOf("acs=")>=0){
return url;
}
var c=null;
if(url.indexOf("?")<0){
c="?";
}else{
c="&";
}
return url+c+"acs="+this.appChksum;
},getService:function(_2c0){
for(i=0;i<livetextCfg.length;i++){
var _2c1=livetextCfg[i];
if(_2c1.id==_2c0){
return _2c1;
}
}
return null;
},processUntilAvailable:function(_2c2,test,_2c4){
var _2c5="";
_2c5=window.setInterval(function(){
if(eval(test)){
if(_2c4!=null){
_2c2(_2c4);
}else{
_2c2();
}
window.clearInterval(_2c5);
}
},300);
},getBaseURL:function(_2c6){
var _2c7=lconn.core.bizCard.bizCardUtils.getService(_2c6);
if(_2c7!=null&&_2c7.baseURL!=null){
return _2c7.baseURL;
}else{
return this.baseUrl;
}
},buildBaseURL:function(_2c8){
var _2c9=_2c8.indexOf("//")+2;
var _2ca=_2c8.substring(0,_2c9);
var _2cb=_2c8.substring(_2c9,_2c8.length);
_2c9=_2cb.indexOf("/")+1;
var _2cc=_2cb.substring(0,_2c9);
_2cb=_2cb.substring(_2c9,_2cb.length);
_2c9=_2cb.indexOf("/");
var _2cd=_2cb.substring(0,_2c9);
_2cb=_2cb.substring(_2c9,_2cb.length);
var _2ce=_2ca+_2cc+_2cd;
return _2ce;
},getURL:function(_2cf,_2d0,_2d1,_2d2){
var temp={};
var _2d4=location.protocol+"//"+location.host;
var s=document.getElementsByTagName(_2d0);
var _2d6="";
var _2d7=null;
for(var i=0;i<s.length;i++){
var src=s[i].getAttribute(_2d2);
if(src&&src.indexOf(_2cf)!=-1){
_2d7=src;
_2d6=src.substring(0,src.indexOf(_2d1));
if(_2d1==null){
_2d6=this.buildBaseURL(src);
temp.baseUrl=_2d6;
}
temp.resourceFound=true;
break;
}
}
if(temp.baseUrl=="undefined"){
temp.baseUrl=(_2d6==_2d4)?_2d1:_2d6+_2d1;
}
return temp;
},getUrlParam:function(_2da){
var _2db=unescape(window.location);
if(_2db.indexOf(_2da)==-1){
return null;
}else{
var _2dc=_2db.substring(_2db.indexOf(_2da+"=")+_2da.length+1);
var _2dd=_2dc.indexOf("&");
if(_2dd!=-1){
_2dc=_2dc.substring(0,_2dd);
}
return _2dc;
}
},getProxifiedURL:function(url,_2df,_2e0){
for(var key in _2df){
var _2e2=new RegExp("@@@"+key+"@@@");
var val=_2df[key];
url=url.replace(_2e2,val);
}
url=this.appendAppChkSum(url);
if(this._haveProxy){
return this._proxyHelper.getProxifiedURL(url);
}
return url+"&callback="+_2e0;
},_timeout:10000,getBizCardData:function(url,_2e5,_2e6,_2e7,_2e8,_2e9,_2ea){
var url=this.getProxifiedURL(url,_2e5,_2e6);
if(this._haveProxy){
var _2eb=function(_2ec){
var data=dojo.fromJson(_2ec.replace(/^\s*while\(1\);/,""));
_2e8(true,data,_2e9);
};
var _2ee=function(_2ef){
_2e8(false,data,_2e9);
};
dojo.xhrGet({url:url,timeout:this._timeout,load:_2eb,error:_2ee});
}else{
_2e7.request(url,this._timeout,_2e8,_2e9,_2ea);
}
},out:function(){
this.buffer="";
this.write=function(str){
this.buffer+=str;
};
},hasRule:function(_2f1){
var _2f2=document.styleSheets;
if(_2f2&&_2f2.length){
for(var i=0;i<_2f2.length;i++){
var _2f4=_2f2[i];
var _2f5=_2f4.cssRules||_2f4.rules;
if(_2f5&&_2f5.length){
for(var j=0;j<_2f5.length;j++){
var rule=_2f5[j];
if(rule&&rule.selectorText==_2f1){
return true;
}
}
}
}
}
return false;
},loadCssIfNeeded:function(){
if(!this.hasRule(".lotusVCard")){
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcardRTL.css");
}else{
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcard.css");
}
this.loadCss(this.baseUrl+"/nav/common/styles/base/semanticTagStyles.css");
this.standaloneCSSloaded=true;
}
},getSinglePropertyValue:function(prop){
if(!prop){
return false;
}
var _2f9=prop.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
return _2f9;
},sortByOrder:function(a,b){
if(a.order>b.order){
return 1;
}else{
if(a.order<b.order){
return -1;
}else{
return 0;
}
}
},getElementsByClassName:function(_2fc,_2fd,_2fe,_2ff){
if(!_2fd){
_2fd=document.body;
}
if(!_2fe){
limit=0;
}
if(!_2ff){
_2ff=["*"];
}
var _300=new RegExp("(^|\\s)"+_2fc+"(\\s|$)");
if(_2fd&&_2fd.className&&_2fd.className.match(_300)){
return new Array(_2fd);
}
var _301=new Array();
for(var t=0;t<_2ff.length;t++){
var _303=_2fd.getElementsByTagName(_2ff[t]);
for(var i=0;i<_303.length;i++){
var _305=_303[i];
if(_305.className.match(_300)){
_301.push(_305);
}
if(0<_2fe&&_2fe==_301.length){
break;
}
}
}
return _301;
},getParentByClassName:function(_306,_307){
if(!_307){
return null;
}
var _308=new RegExp("(^|\\s)"+_306+"(\\s|$)");
if(_307.className&&_307.className.match(_308)){
return _307;
}
while(_307.parentNode){
_307=_307.parentNode;
if(_307.className&&_307.className.match(_308)){
return _307;
}
}
},addHover:function(elem,_30a,_30b,_30c){
while(typeof SemTagMenu==undefined){
alert("waiting...");
}
var _30d=elem.getAttribute(this.refcntAttr);
if(_30d){
elem.setAttribute(this.refcntAttr,parseInt(Number(_30d)+1));
if(SemTagMenu.staticHover){
var img=SemTagMenu.findHoverFromLiveElement(elem);
if(img){
dojo.connect(img,"onclick",_30b);
img.setAttribute("href","javascript:a11y()");
}else{
alert("couldn't find the hover for this element!");
}
}else{
dojo.connect(elem,"onmouseover",_30a);
dojo.connect(elem,"onfocus",_30a);
}
}else{
elem.setAttribute(this.refcntAttr,"1");
if(SemTagMenu.staticHover){
var img=this.createHoverImage();
dojo.connect(img,"onclick",_30b);
img.setAttribute("href","javascript:a11y()");
var _30f=elem.nextSibling;
if(_30f){
_30f.parentNode.insertBefore(img,_30f);
}else{
elem.parentNode.appendChild(img);
}
elem.setAttribute(this.hoverIdPrefix+"idx",parseInt(this.hoverIdx));
elem.id=this.liveElemPrefix+this.hoverIdx;
}else{
var _310=dojo.isFF?elem.getAttribute("class"):elem.className;
if(_310&&0<_310.length){
_310+=" hasHover";
}else{
_310="hasHover";
}
if(dojo.isFF){
elem.setAttribute("class",_310);
}else{
elem.className=_310;
}
dojo.connect(elem,"onmouseover",_30a);
dojo.connect(elem,"onfocus",_30a);
}
if(_30c!=null){
dojo.connect(elem,"onkeydown",_30c);
}
}
},createHoverImage:function(){
var img=document.createElement("img");
this.hoverIdx++;
img.id=this.hoverIdPrefix+this.hoverIdx;
img.className=SemTagMenu.iconName;
img.setAttribute("src",this.baseUrl+"/images/menu_selected_hover.gif");
img.setAttribute("border","0");
var link=document.createElement("a");
dojo.connect(link,"onfocus",SemTagMenu.activateHover);
dojo.connect(link,"onmouseover",SemTagMenu.activateHover);
dojo.connect(link,"onmouseout",SemTagMenu.deactivateHover);
link.appendChild(img);
return link;
},showHover:function(_313,_314){
try{
SemTagMenu.showHover(_313,_314);
}
catch(e){
console.log("Error in lconn.core.bizCard.bizCardUtils.showHover");
console.log(e);
}
},setMenuData:function(_315,_316,_317,_318,_319){
SemTagMenu.setMenuData(_315,_316,_317,_318,_319);
},getMenuItemJson:function(_31a,href,_31c,icon){
var o=_31c?_31c:0;
var i=icon?icon:"";
return {"label":_31a,"href":href,"order":o,"icon":i};
},getMenuHeaderJson:function(_320,_321){
return {"markup":_320,"order":_321};
},getMenuFooterJson:function(_322,_323){
return {"markup":_322,"order":_323};
},getElementFromEvent:function(_324){
return _324.target?_324.target:_324.srcElement;
},getLiveElementFromEvent:function(_325){
return SemTagMenu.findLiveElementFromEventSource(this.getElementFromEvent(_325));
},getEventAbsoluteX:function(e){
var x=0;
if(e.pageX){
x=e.pageX;
}else{
if(e.clientX){
x=e.clientX+document.body.scrollLeft;
}
}
return x;
},getEventAbsoluteY:function(e){
var y=0;
if(e.pageY){
y=e.pageY;
}else{
if(e.clientY){
y=e.clientY+document.body.scrollTop;
}
}
return y;
},findPosition:function(obj){
var _32b=0,posX=0,posY=0;
var _32e=1400*1;
if(obj.offsetParent){
if(obj.currentStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"paddingBottom"));
}else{
if(window.getComputedStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"padding-bottom"));
}
}
while(obj!=null){
if(obj.offsetLeft>=_32e&&SemTagSvcConfig.isBidiRTL){
posX+=obj.offsetLeft-250;
}else{
posX+=obj.offsetLeft;
}
posY+=obj.offsetTop;
obj=obj.offsetParent;
_32b++;
}
return [posX,posY];
}else{
return [obj.x,obj.y];
}
},getStyle:function(node,_330){
var _331;
if(window.getComputedStyle){
_331=document.defaultView.getComputedStyle(node,null).getPropertyValue(_330);
}else{
if(node.currentStyle){
_331=node.currentStyle[_330];
}
}
return _331;
},createGroupJson:function(ctx,exts){
return {"context":ctx,"extenders":exts};
},createActionJson:function(id,ctx,_336,desc,url,_339){
var o=parseInt(_339);
return {"id":id,"context":ctx,"label":_336,"description":desc,"url":url,"order":o};
},parseOrder:function(_33b){
if(_33b==null||_33b.length==0){
return 0;
}
if(_33b.charAt(0)=="-"){
return parseInt(_33b.substr(1))*-1;
}else{
return parseInt(_33b);
}
},_langParamValue:"",getLangParam:function(){
if(this._langParamValue==""){
if(window.djConfig!=null&&djConfig.locale!=null){
this._langParamValue=djConfig.locale;
return this._langParamValue;
}
var _33c="lcLang";
if(typeof (profilesData)!="undefined"&&typeof (profilesData.config)!="undefined"&&typeof (profilesData.config.langCookieName)!="undefined"){
_33c=profilesData.config.langCookieName;
}
var _33d=dojo.cookie(_33c);
if(_33d==null||_33d==""){
_33d=this.getUrlParam("lang");
}
if(_33d==null||_33d==""){
if(typeof (navigator.language)!="undefined"){
_33d=navigator.language;
}else{
if(typeof (navigator.browserLanguage)!="undefined"){
_33d=navigator.browserLanguage;
}
}
}
var _33e=/(\w\w){1}([\-_]\w\w){0,2}/i;
if(_33d!=null&&!_33d.match(_33e)){
_33d=null;
}
if(_33d==null||_33d==""){
_33d="en";
}
_33d=_33d.replace(/\-/g,"_");
_33d=_33d.toLowerCase();
this._langParamValue=_33d;
}
return this._langParamValue;
},getTextValue:function(elem){
if(!elem){
return "";
}
return elem.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
},getTypedValue:function(elem,_341){
if(!_341){
_341="def";
}
var _342=new Array();
var _343=this.getElementsByClassName("type",elem);
var _344=this.getElementsByClassName("value",elem);
var _345="";
if(_344.length<1){
_345=this.getTextValue(elem);
}
for(i=0;i<_344.length;i++){
_345+=this.getTextValue(_344[i]);
}
if(_343.length<1){
_342[_341]=_345;
}else{
for(j=0;j<_343.length;j++){
var _346=_343[j];
var type=_346.tagName.match(/^abbr$/i)?_346.getAttribute("title"):this.getTextValue(_346);
_342[type.toLowerCase()]=_345;
}
}
return _342;
},findNameElementInHcard:function(elem){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
var _349=this.getElementsByClassName("fn",elem)[0];
if(!_349){
_349=this.getElementsByClassName("n",elem)[0];
}
return _349;
},findElementByNameInHcard:function(elem,name){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
return this.getElementsByClassName(name,elem)[0];
},loadScript:function(_34c){
var _34d=this.getLangParam();
if(_34c.indexOf("lang=")!=-1&&_34d!=null){
_34c=_34c.substring(0,_34c.indexOf("lang"))+"lang="+_34d;
}else{
if(_34c.indexOf("resourcebundle")!=-1&&_34d!=null){
_34c=_34c+"&lang="+_34d;
}
if(_34c.indexOf("resourceStrings")!=-1&&_34d!=null){
_34c=_34c+"&lang="+_34d;
}
if(_34c.indexOf("js-resources.js")!=-1&&_34d!=null){
_34c=_34c+((_34c.indexOf("?")!=-1)?"&":"?")+"lang="+_34d;
}
}
_34c=this.appendAppChkSum(_34c);
if(!this.scripts[_34c]){
this.scripts[_34c]=true;
var _34e=document.createElement("script");
_34e.src=_34c;
document.body.insertBefore(_34e,document.body.firstChild);
}
},loadCss:function(css){
css=this.appendAppChkSum(css);
if(!this.css[css]){
var head=document.getElementsByTagName("head");
if(head[0]){
this.css[css]=true;
var _351=document.createElement("link");
_351.rel="stylesheet";
_351.href=css;
_351.type="text/css";
_351.media="screen";
head[0].appendChild(_351);
}
}
},toggleInlineCard:function(pDiv){
var _353=document.getElementById(pDiv+"_Pivot");
var _354=document.getElementById(pDiv+"_Details");
if(_353!=null&&_354!=null){
if(_353.className.indexOf("lotusPivotNavOpen")!=-1){
_353.className="lotusPivotNav";
_354.style.display="none";
}else{
_353.className="lotusPivotNav lotusPivotNavOpen";
_354.style.display="block";
}
}
}};
window.SemTagMenu={isDebug:false,staticHover:false,id:"semtagmenu",hideDelay:3000,showDelay:500,timeouts:new Array(),iconName:"menu_drop_icon",showing:false,currentElem:null,refCount:-1,tabOrderByDomNodeOrder:0,tabOrderByTabIndex:0,elemOrigTabIdx:null,elemTempTabIdx:1000,elemNext:null,svcHandlers:new Array(),items:new Array(),headers:new Array(),footers:new Array(),hoverIdRE:null,iconNameRE:new RegExp("(^|\\s)menu_drop_icon(\\s|$)"),initited:false,init:function(){
if(this.initited==false){
SemTagMenu.hoverIdRE=new RegExp(lconn.core.bizCard.bizCardUtils.hoverIdPrefix);
dojo.connect(document,"onclick",SemTagMenu.click);
dojo.connect(document,"onkeydown",SemTagMenu.catchEscape);
this.initited=true;
}
},activateFocus:function(_355){
lconn.core.bizCard.bizCardUtils.activateHover(_355);
},activateHover:function(_356){
var _357=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_356);
if(_357){
_357.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(SemTagMenu.findLiveElementFromEventSource(_357));
},deactivateHover:function(_358){
var _359=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_358);
if(_359){
_359.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(null);
},showHover:function(_35a,_35b){
try{
if(SemTagMenu.staticHover){
return;
}
var elem=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_35a);
SemTagMenu.elemOrigTabIdx=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&!SemTagMenu.elemOrigTabIdx){
SemTagMenu.elemNext=elem.nextSibling;
elem.setAttribute("tabIndex",parseInt(Number(SemTagMenu.elemTempTabIdx)));
}
var tag=SemTagMenu.getMenuTag(elem);
var _35e=0;
if(elem&&elem!=SemTagMenu.currentElem){
SemTagMenu.clearAllSvcHandlers(tag);
_35e=elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr);
if(_35e){
SemTagMenu.setCurrentElement(elem);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagMenu.showHover called for a DOM element with no refcnt attribute!");
}
SemTagMenu.setCurrentElement(null);
return;
}
}
SemTagMenu.addSvcHandler(tag,_35b);
SemTagMenu.setRefCount(_35e);
if(SemTagMenu.showing&&tag.style.display!="none"){
return;
}
SemTagMenu.showing=false;
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.writeHover(out,"ltr");
tag.innerHTML=out.buffer;
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_35a,pos[0]+SemTagMenu.hoverOffset[0],pos[1]+SemTagMenu.hoverOffset[1],SemTagMenu.hoverDimension[0],SemTagMenu.hoverDimension[1]);
}
catch(e){
console.log("Error in SemTagMenu.showHover");
console.log(e);
}
},addSvcHandler:function(tag,_362){
SemTagMenu.svcHandlers.push(dojo.connect(tag,"onclick",_362));
},clearAllSvcHandlers:function(tag){
while(0<SemTagMenu.svcHandlers.length){
var _364=SemTagMenu.svcHandlers.pop();
if(_364){
dojo.disconnect(_364);
}
}
},setCurrentElement:function(elem){
if(elem!=null){
SemTagMenu.currentElem=elem;
SemTagMenu.currentElemPosition=lconn.core.bizCard.bizCardUtils.findPosition(elem);
SemTagMenu.setRefCount(elem?Number(elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr)):0);
while(0<SemTagMenu.headers.length){
SemTagMenu.headers.pop();
}
while(0<SemTagMenu.items.length){
SemTagMenu.items.pop();
}
while(0<SemTagMenu.footers.length){
SemTagMenu.footers.pop();
}
}
},setRefCount:function(cnt){
SemTagMenu.refCount=cnt;
},setMenuData:function(_367,_368,_369,_36a,_36b){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Menu.setMenuData: items.length="+_368.length);
}
if(!SemTagMenu.staticHover&&SemTagMenu.refCount<0){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called when refCount="+SemTagMenu.refCount);
}
return;
}
var elem=SemTagMenu.findLiveElementFromEventSource(lconn.core.bizCard.bizCardUtils.getElementFromEvent(_367));
if(!elem){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called on a null live element");
}
return;
}
if(SemTagMenu.staticHover&&(elem!=SemTagMenu.currentElem||SemTagMenu.showing)){
SemTagMenu.setCurrentElement(elem);
}
for(var i=0;i<_368.length;i++){
SemTagMenu.items.push(_368[i]);
}
if(_369){
SemTagMenu.currentMenuCss=_369;
}
if(_36a){
SemTagMenu.headers.push(_36a);
}
if(_36b){
SemTagMenu.footers.push(_36b);
}
SemTagMenu.stopEvent(_367);
SemTagMenu.showMenu();
},getCurrentElement:function(){
return SemTagMenu.currentElem;
},showMenu:function(){
SemTagMenu.items.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
if(1<SemTagMenu.headers.length){
SemTagMenu.headers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
if(1<SemTagMenu.footers.length){
SemTagMenu.footers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.startMenu(out,"ltr");
if(0<SemTagMenu.headers.length){
SemTagMenu.writeHeader(out,SemTagMenu.headers[0],"ltr");
}
SemTagMenu.startActionSection(out,"ltr",SemTagMenu.currentMenuCss);
for(var i=0;i<SemTagMenu.items.length;i++){
SemTagMenu.writeMenuItem(out,SemTagMenu.items[i],"ltr");
}
SemTagMenu.endActionSection(out,"ltr");
if(0<SemTagMenu.footers.length){
SemTagMenu.writeFooter(out,SemTagMenu.footers[0],"ltr");
}
SemTagMenu.endMenu(out,"ltr");
var tag=SemTagMenu.getMenuTag();
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.offScreen(tag);
tag.innerHTML=out.buffer;
SemTagMenu.showing=true;
SemTagMenu.defaultCursor();
if(SemTagMenu.staticHover&&dojo.isFF){
var _371=tag.getElementsByTagName("a");
if(0<_371.length){
_371[0].focus();
}
}
var _372={"target":SemTagMenu.currentElem};
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_372,pos[0]+SemTagMenu.menuOffset[0],pos[1]+SemTagMenu.menuOffset[1],tag.offsetWidth,tag.offsetHeight);
},getMenuTag:function(elem){
var tag=document.getElementById(SemTagMenu.id);
if(!tag){
tag=document.createElement((SemTagMenu.tabOrderByDomNodeOrder?"div":"span"));
tag.setAttribute("id",SemTagMenu.id);
tag.style.position=(SemTagMenu.tabOrderByDomNodeOrder?"fixed":"absolute");
tag.style.display="none";
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _376=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&_376){
tag.setAttribute("tabIndex",parseInt(Number(_376)+1));
}
}
dojo.connect(tag,"onmouseout",SemTagMenu.mouseout);
dojo.connect(tag,"onmouseover",SemTagMenu.mouseover);
dojo.connect(tag,"onfocus",SemTagMenu.focus);
if(SemTagMenu.tabOrderByTabIndex){
dojo.connect(tag,"keydown",SemTagMenu.keydown);
}
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _376=elem.getAttribute("tabIndex");
if(_376){
tag.setAttribute("tabIndex",parseInt(Number(_376)+1));
}
}else{
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}
}
}
}
return tag;
},show:function(_377,e,xpos,ypos,_37b,_37c){
SemTagMenu.clearTimeouts();
var _37d=document.getElementById(_377);
if(_37b==null){
_37b=0;
}
if(_37c==null){
_37c=0;
}
var top,left;
if(xpos!=null&&ypos!=null){
var top=ypos;
var left=xpos;
}else{
var top=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(e);
var left=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(e);
}
var vSrc=(e.target)?e.target:e.srcElement;
var _381,_382,d=document;
if(typeof window.innerWidth!="undefined"){
_381=window.innerWidth;
_382=window.innerHeight;
}else{
if(d.documentElement&&typeof d.documentElement.clientWidth!="undefined"&&d.documentElement.clientWidth!=0){
_381=d.documentElement.clientWidth;
_382=d.documentElement.clientHeight;
}else{
if(d.body&&typeof d.body.clientWidth!="undefined"){
_381=d.body.clientWidth;
_382=d.body.clientHeight;
}
}
}
var _384=(document.body.scrollLeft>document.documentElement.scrollLeft)?document.body.scrollLeft:document.documentElement.scrollLeft;
if((left+_37b)>(_381+_384)){
var _385=(left+_37b)-_381-_384;
left-=_385;
}
var _386=(document.body.scrollTop>document.documentElement.scrollTop)?document.body.scrollTop:document.documentElement.scrollTop;
if((top+_37c)>(_382+_386)){
var _385=(top+_37c)-_382-_386;
top-=_385;
}
_37d.style.top=top+"px";
_37d.style.left=left+"px";
_37d.style.display="block";
var _387=document.getElementById("tempIframe");
if(_387==null){
_387=document.createElement("iframe");
_387.setAttribute("id","tempIframe");
_387.setAttribute("frameBorder","no");
_387.setAttribute("scrolling","no");
_387.setAttribute("src",lconn.core.bizCard.bizCardUtils.baseUrl+"/nav/blankIE.html");
_387.style.position="absolute";
_387.style.left=left+"px";
_387.style.top=top+"px";
_387.width=(_37d.offsetWidth).toString()+"px";
_387.height=(_37d.offsetHeight).toString()+"px";
_387.style.display="block";
_387.style.zIndex="899";
document.body.appendChild(_387);
}else{
_387.style.left=left+"px";
_387.style.top=top+"px";
_387.width=(_37d.offsetWidth).toString()+"px";
_387.height=(_37d.offsetHeight).toString()+"px";
_387.style.display="block";
}
var _388=document.getElementById("A11Yblank");
if(_388){
_388.focus();
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_377);
}
}
},hide:function(_389,e){
var tag=SemTagMenu.getMenuTag();
if(!tag){
return false;
}
tag.style.display="none";
SemTagMenu.showing=false;
SemTagMenu.setCurrentElement(null);
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.defaultCursor();
var elem=SemTagMenu.getCurrentElement();
if(SemTagMenu.tabOrderByTabIndex&&elem&&elem.getAttribute("tabIndex")){
tag.setAttribute("tabIndex",null);
elem.setAttribute("tabIndex",SemTagMenu.elemOrigTabIdx);
}
var _38d=document.getElementById("tempIframe");
if(_38d!=null){
_38d.style.display="none";
}
return true;
},offScreen:function(_38e){
_38e.style.top="-1000px";
_38e.style.left="-1000px";
_38e.style.display="block";
},findLiveElementFromEventSource:function(_38f){
if(SemTagMenu.staticHover){
var id=_38f.id;
if(!id.match(SemTagMenu.hoverIdRE)){
var _391=_38f.getElementsByTagName("img");
for(var i=0;i<_391.length;i++){
if(_391[i].id&&_391[i].id.match(SemTagMenu.hoverIdRE)){
id=_391[i].id;
break;
}
}
}
var idx=id.substr(lconn.core.bizCard.bizCardUtils.hoverIdPrefix.length);
return document.getElementById(lconn.core.bizCard.bizCardUtils.liveElemPrefix+idx);
}else{
var _394=SemTagMenu.getCurrentElement();
return _394?_394:_38f;
}
},findHoverFromLiveElement:function(_395){
var idx=_395.getAttribute(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+"idx");
return document.getElementById(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+idx);
},inMenu:function(_397,_398,_399,_39a){
if(!_397){
return false;
}
if(!SemTagMenu.showing){
return false;
}
if(!_399){
_399=0;
}
if(!_39a){
_39a=0;
}
var _39b=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(_398);
var _39c=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(_398);
var _39d=_397.style.left.replace(/px$/,"");
var _39e=_397.style.top.replace(/px$/,"");
var sumX=parseInt(_39d)+parseInt(_397.clientWidth);
var sumY=parseInt(_39e)+parseInt(_397.clientHeight);
if((_39b-1<=(_39d-_399))||(_39c-1<=(_39e-_39a))||(_39b>=(sumX+_399))||(_39c>=(sumY+_39a))){
return false;
}else{
return true;
}
},mouseout:function(_3a1){
var _3a2=SemTagMenu.id;
menuElem=document.getElementById(_3a2);
if(SemTagMenu.inMenu(menuElem,_3a1)){
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_3a2);
}
}
},mouseover:function(_3a3){
SemTagMenu.clearTimeouts();
},focus:function(_3a4){
SemTagMenu.mouseover(_3a4);
},unfocus:function(_3a5){
SemTagMenu.mouseout(_3a5);
},click:function(_3a6){
if(!_3a6){
return;
}
var _3a7=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_3a6);
if(_3a7.className!="javlinHover"){
menuElem=document.getElementById(SemTagMenu.id);
if(!SemTagMenu.inMenu(menuElem,_3a6)){
SemTagMenu.hide(SemTagMenu.id);
}
}
},keydown:function(_3a8){
SemTagMenu.catchEscape(_3a8);
SemTagMenu.catchTab(_3a8);
},catchEscape:function(_3a9){
if(_3a9.keyCode==27){
SemTagMenu.hide(SemTagMenu.id);
}
},catchTab:function(_3aa){
if(_3aa.keyCode==9){
if(SemTagMenu.elemNext&&typeof (SemTagMenu.elemNext.focus)!="undefined"){
SemTagMenu.elemNext.focus();
}
SemTagMenu.hide(SemTagMenu.id);
}
},simulateClick:function(_3ab){
if(_3ab.ctrlKey&&_3ab.keyCode==13){
if(_3ab.preventDefault){
_3ab.preventDefault();
}
var evt=null;
if(document.createEvent){
evt=document.createEvent("MouseEvents");
}
if(evt&&evt.initMouseEvent){
evt.initMouseEvent("click",true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);
}
var _3ad=document.getElementById(SemTagMenu.id);
if(_3ad.dispatchEvent){
_3ad.dispatchEvent(evt);
}else{
if(_3ad.fireEvent){
_3ad.fireEvent("onclick");
}
}
}
},stopEvent:function(_3ae){
if(!_3ae){
return;
}
if(dojo.isFF){
if(_3ae.preventDefault==null){
_3ae=_3ae.original;
}
_3ae.preventDefault();
_3ae.stopPropagation();
}else{
try{
if(_3ae.returnValue==null){
_3ae=_3ae.original;
}
_3ae.returnValue=false;
_3ae.cancelBubble=true;
}
catch(e){
}
}
},startHideTimer:function(_3af){
if(0<SemTagMenu.hideDelay){
SemTagMenu.timeouts.push(window.setTimeout("SemTagMenu.endHideTimer(\""+_3af+"\")",SemTagMenu.hideDelay));
}
},endHideTimer:function(_3b0){
menuElem=document.getElementById(_3b0);
SemTagMenu.hide(_3b0);
},clearTimeouts:function(){
for(i=0;i<SemTagMenu.timeouts.length;i++){
window.clearTimeout(SemTagMenu.timeouts[i]);
}
},defaultCursor:function(){
document.body.style.cursor="default";
},waitCursor:function(){
document.body.style.cursor="wait";
},clickCursor:function(){
document.body.style.cursor="pointer";
}};
SemTagMenu.defaultLoaded=true;
SemTagMenu.hoverDimension=[14,14];
SemTagMenu.hoverOffset=[15,3];
SemTagMenu.menuOffset=[15,0];
SemTagMenu.writeHover=function(out,bidi){
if(window.semtagrs!=null){
var _3b3="z-index: 900; opacity: 1;";
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
_3b3+="padding:2px 25px 2px 3px; background-position:96% center;";
}
out.write("<div class='javlinHover' "+" onmouseover='javascript:SemTagMenu.clickCursor();'"+" onmouseout='javascript:SemTagMenu.defaultCursor();'"+" style='"+_3b3+"' "+" title='"+semtagrs["label.semtag.hover"]+"' "+">"+semtagrs["label.semtag.hover"]+"</div>");
}else{
console.log("SemTagMenu.writeHover: semtagrs is null. Need for strings");
}
};
SemTagMenu.startMenu=function(out,bidi){
out.write("<div class='popupPersonCard' style='z-index: 900;'>");
};
SemTagMenu.writeHeader=function(out,_3b7,bidi){
out.write(_3b7.markup);
};
SemTagMenu.startActionSection=function(out,bidi,_3bb){
out.write("<a href='javascript:a11y()'><a>");
if(!_3bb){
_3bb="personMenuActions";
}
out.write("<div class='"+_3bb+"'>");
out.write("<ul>");
};
SemTagMenu.writeMenuItem=function(out,item,bidi){
out.write("<li><a href='"+item.href+"'>"+item.label+"</a></li>");
};
SemTagMenu.endActionSection=function(out,bidi){
out.write("</ul>");
out.write("</div>");
};
SemTagMenu.writeFooter=function(out,_3c2,bidi){
out.write(_3c2.markup);
};
SemTagMenu.endMenu=function(out,bidi){
out.write("</div>");
};
window.SemTagUtil={crossDomainRequest:function(){
var _3c6=new Array();
var _3c7=new Array();
var _3c8=new Array();
var self=this;
createTimeoutFunction=function(_3ca){
return function(){
self.cancelRequest(_3ca);
};
};
this.getScriptId=function(id){
return "_JVLN_"+id;
};
this.getScriptObject=function(id){
return document.getElementById(this.getScriptId(id));
};
this.cloneObject=function(obj){
var _3ce=new Object();
for(i in obj){
_3ce[i]=obj[i];
}
return _3ce;
};
this.request=function(url,_3d0,_3d1,_3d2,_3d3){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: started");
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: connectionId "+_3d3);
}
_3d3=_3d3.toLowerCase();
var _3d4=this.getScriptId(_3d3);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: objId "+_3d4);
}
if(_3d1!=null){
_3c6[_3d3]=_3d1;
}
if(_3d2!=null){
if(!dojo.isFF){
_3c7[_3d3]=this.cloneObject(_3d2);
}else{
_3c7[_3d3]=_3d2;
}
}
var _3d5=document.createElement("script");
_3d5.id=_3d4;
_3d5.type="text/javascript";
_3d5.defer=true;
try{
_3d5.src=url;
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: url: "+url);
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
try{
var body=document.getElementsByTagName("body");
if(body[0]){
body[0].appendChild(_3d5);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error getting body element to insert script:"+_3d5.id);
}
return false;
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: added script: "+_3d5.id);
}
if(_3d0){
var self=this;
_3c8[_3d3]=window.setTimeout(createTimeoutFunction(_3d3),_3d0);
}
};
this.cancelRequest=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest:  Request ["+id+"] took too long.  Cancelling request for id: "+_3c8[id]);
}
var _3d9=_3c6[id];
_3c6[id]=null;
var _3da=_3c7[id];
_3c7[id]=null;
if(_3d9!=null){
try{
if(_3d9){
_3d9(false,null,_3da);
}
this.removeScript(id);
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: Exception Caught: "+e);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: no callback for : "+id);
}
}
};
this.removeScript=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removing script element for: "+id);
}
if(id){
var _3dc=this.getScriptObject(id);
if(_3dc!=null){
var body=document.getElementsByTagName("body");
body[0].removeChild(_3dc);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removed script for id: "+id);
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: script is null for id: "+id);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: id is null");
}
}
};
this.dispatch=function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: id: "+id);
}
if(id!=null){
id=id.toLowerCase();
}
try{
if(id!=null&&typeof (_3c8[id])!="undefined"&&_3c8[id]!=null){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("request dispatched. removing timeout for id ["+id+"]  timeout id: "+_3c8[id]);
}
window.clearTimeout(_3c8[id]);
}
var _3e0=_3c6[id];
var _3e1=_3c7[id];
_3c7[id]=null;
if(_3e0!=null){
_3c6[id]=null;
_3e0(true,data,_3e1);
window.setTimeout(function(){
self.removeScript(id);
},1000);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: callback is null for id: "+id);
}
}
}
catch(e){
console.log("SemTagUtil.dispatch: Exception Caught: ");
console.log(e);
}
};
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCard"]){
dojo._hasResource["lconn.communities.bizCard.bizCard"]=true;
dojo.provide("lconn.communities.bizCard.bizCard");
lconn.communities.bizCard.bizCard={servletUrl:null,requestor:null,initited:false,init:function(){
this.servletUrl=lconn.core.bizCard.bizCardUtils.getBaseURL("hgroup")+"/service/json/communityview?communityUuid=@@@UUID@@@";
if(this.initited==false){
this.requestor=new SemTagUtil.crossDomainRequest();
this.initited=true;
}
},getIdMethod:function(_3e2){
return _3e2.uuid?_3e2.uuid:null;
},convMethod:function(_3e3){
return _3e3;
},customTrim:function(_3e4){
return _3e4.replace(/^\s+/,"").replace(/\s+$/,"");
},processTag:function(_3e5){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
this.processHcard(_3e5);
}
catch(e){
console.log(e);
}
},processHcard:function(_3e6){
var _3e7=this.getNameElement(_3e6);
if(!_3e7){
return;
}
if(this.isInline(_3e6)){
var _3e8={"target":_3e7};
this.getTagFromServer(_3e8);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_3e7,lconn.communities.bizCard.bizCard.showHover,lconn.communities.bizCard.bizCard.showMenu);
}
},isInline:function(_3e9){
return this.getHcardAttributeValue("X-community-display-inline",_3e9);
},loadHcardCommunity:function(_3ea){
var _3eb=new Object();
var _3ec=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3ea);
var _3ed=_3ec.getElementsByTagName("*");
for(i=0;i<_3ed.length;i++){
var _3ee=_3ed[i];
if(_3ee.className){
var _3ef=_3ee.className.split(" ");
for(j=0;j<_3ef.length;j++){
var c=_3ef[j];
var attr=this.getHcardAttributeValue(c,_3ec);
if(attr){
_3eb[c]=attr;
}
}
}
}
return _3eb;
},getHcardAttributeValue:function(_3f2,_3f3){
switch(_3f2){
case ("name"):
return this.getHcardTypedAttribute(_3f3,_3f2,"name");
case ("uuid"):
return this.getHcardTypedAttribute(_3f3,_3f2,"uuid");
case ("selectedWidgetId"):
return this.getHcardTypedAttribute(_3f3,_3f2,"selectedWidgetId");
}
var _3f4=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3f3);
var _3f5=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_3f2,_3f4,1);
if(_3f5.length>0&&_3f5[0].tagName.match(/^abbr$/i)){
return _3f5[0].getAttribute("title");
}
switch(_3f2){
case ("uuid"):
var uuid=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(uuid){
return uuid;
}else{
return this.getHcardAttributeValue("name",_3f3);
}
break;
case ("name"):
var name=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(name){
return name;
}
break;
case ("selectedWidgetId"):
var _3f8=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
if(_3f8){
return _3f8;
}
break;
case ("X-community-display-inline"):
if(_3f5.length>0){
return true;
}else{
return false;
}
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_3f5[0]);
break;
}
},getHcardTypedAttribute:function(_3f9,_3fa,_3fb){
var _3fc=new Object();
var _3fd=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_3f9);
var _3fe=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_3fa,_3fd);
for(i=0;i<_3fe.length;i++){
var _3ff=_3fe[i];
_3fc=lconn.core.bizCard.bizCardUtils.getTypedValue(_3ff,_3fb);
}
return _3fc;
},showHover:function(_400){
try{
lconn.core.bizCard.bizCardUtils.showHover(_400,lconn.communities.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.communities.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_401){
SemTagMenu.waitCursor();
lconn.communities.bizCard.bizCard.getTagFromServer(_401);
},getTagFromServer:function(_402){
var _403=null;
var _404=null;
if(_402!=null&&_402.target!=null&&_402.target.className=="name"){
_403=_402.target;
_404=_402;
SemTagMenu.currentElem=_403;
}else{
_403=SemTagMenu.currentElem;
_404={target:_403,original:_402};
if(_403==null&&_402!=null){
_404=_402;
_403=_402.target;
}
}
var _405=this.customTrim(this.getElementUuid(_403));
var _406={"UUID":_405};
var _407="lconn.communities.bizCard.bizCard.dispatch";
var _408=_405;
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.getTagFromServer sending request for: "+_405+")";
}
lconn.core.bizCard.bizCardUtils.getBizCardData(this.servletUrl+"&preventCache="+new Date().getTime(),_406,_407,this.requestor,this.requestReturn,_404,_408);
},requestReturn:function(_409,_40a,_40b){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.requestReturn: success="+_409;
}
var _40c=_409?lconn.communities.bizCard.bizCard.convMethod(_40a):{};
var _40d=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_40b);
lconn.communities.bizCard.bizCard.fillCommunityJsonMoreFromDom(_40c,_40d);
lconn.communities.bizCard.bizCard.update(_40c,_40d,_40b);
},fillCommunityJsonMoreFromDom:function(_40e,_40f){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.fillCommunityJsonMoreFromDom";
}
if(!_40e.name){
var _410=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_40f);
if(_410){
_40e.name=lconn.core.bizCard.bizCardUtils.getTextValue(_410);
}
}
if(!_40e.uuid){
var uuid=this.getElementUuid(_40f);
_40e.uuid=uuid;
}
},update:function(_412,_413,_414){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.update";
}
this.currentCommunity=_412;
var _415=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_413);
if(this.isInline(_415)){
var out=new lconn.core.bizCard.bizCardUtils.out();
var _417=this.getHcardAttributeValue("selectedWidgetId",_415).selectedWidgetId;
lconn.communities.bizCard.bizCardUI.getInlineMarkup(_412,"ltr",out,_417);
var prev=lconn.core.bizCard.bizCardUtils.getElementsByClassName("personinlinemenu",_415,1);
if(prev.length>0){
prev[0].innerHTML=out.buffer;
}else{
var span=document.createElement("span");
span.className="personinlinemenu";
span.innerHTML=out.buffer;
_415.appendChild(span);
}
}else{
var _41a=new Array();
var _41b="personMenuActions";
var _41c=new lconn.core.bizCard.bizCardUtils.out();
var _41d=new lconn.core.bizCard.bizCardUtils.out();
lconn.communities.bizCard.bizCardUI.getMenuData(_412,"ltr",_41a,_41b,_41c,_41d);
lconn.core.bizCard.bizCardUtils.setMenuData(_414,_41a,_41b,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_41c.buffer,-100));
}
},dispatch:function(data){
var _41f=this.getIdMethod(data);
this.requestor.dispatch(_41f,data);
},getElementUuid:function(elem){
var uuid;
var _422=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
if(_422!=null){
uuid=this.getHcardAttributeValue("uuid",_422);
uuid=uuid.uuid;
}
return uuid;
},getNameElement:function(elem){
if(elem.className!="vcomm"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
}
var _424=lconn.core.bizCard.bizCardUtils.getElementsByClassName("name",elem,1)[0];
return _424;
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCardUI"]){
dojo._hasResource["lconn.communities.bizCard.bizCardUI"]=true;
var showLinks=(dojo.cookie("community.inline.card.links")==1);
dojo.provide("lconn.communities.bizCard.bizCardUI");
lconn.communities.bizCard.bizCardUI={getMenuData:function(_425,bidi,_427,_428,_429,_42a){
var _42b=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_42b==null){
_42b=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
var _42c="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_42c=" lotusui";
}
_429.write("<div id='container' "+_42c+" style='width: 32em; height:12em;border: 1px solid #e0e0e0; -moz-border-radius:7px;background-color:#F5F8FF;padding:10px 0px 8px 10px;'>");
_429.write("  <div id='navigationLinks' style='clear:left; border-bottom:1px solid #e0e0e0;padding: 0px 0pt 5px 0px;margin:0;'>");
_429.write("      <a href='"+_425.homeUrl+"' title=\""+_42b+"\" class='action'>"+_42b+"</a>");
this.writeLinksforPopupCard(_429,_425);
_429.write("  </div><br/>");
if(_425.imageUrl!=null&&_425.imageUrl!=""){
_429.write("  <img src='"+_425.imageUrl+"' alt=\""+_425.name+"\" title=\""+_425.name+"\" height='95' width='95' style='float:left;margin: 0px 10px 10px 10px; padding:2px !important; border:1px solid #c2c2c2;background-color:#fff;'/>");
}
_429.write("  <div  style='height:9em;overflow:hidden;'>");
_429.write("  <h2 style='font-size:1.1em;margin:0;margin-right:20px;padding:0;'>"+_425.name+"<span id='membersCount' style='font-size:.9em;color:#999;font-weight:normal;'> ("+_425.membercount+" "+dojo.i18n.getLocalization("lc_default")["label.members.lowercase"]+")</span></h2>");
if(_425.tags!=null&&_425.tags!=""){
_429.write("  <div style='font-size:.9em;color:#999;padding:0;margin:0;'>"+dojo.i18n.getLocalization("lc_default")["label.tags"]+" "+_425.tags+"</div>");
}
if(_425.description!=null&&_425.description!=""){
_429.write("  <p id='communityDescription' style='font-size:.9em;padding:3px 5px 0 0;margin:0;'>");
_429.write("      "+_425.description);
_429.write("  </p>                        ");
}
_429.write("  </div>                      ");
_429.write("</div><!-- end container -->");
},getInlineMarkup:function(comm,bidi,_42f,_430){
var _431=_42f;
var _432=(dojo.cookie("community.inline.card.links")!=0);
var _433="lotusTwistyOpen";
if(_432){
_433="lotusTwistyOpen";
}else{
_433="lotusTwistyClosed";
}
var _434="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_434="lotusui";
}
_431.write("<div class=\"lotusMenu "+_434+"\">");
_431.write("<div class=\"lotusBottomCorner  lotusInlineMenu\">");
_431.write("<div class=\"lotusInner\">");
_431.write("<div class=\" lotusCenter lotusInlinePhoto\"><a href=\""+comm.homeUrl+"\"><img src=\""+comm.imageUrl+"\" width=\"155\" height=\"155\" alt=\""+comm.name+"\" /></a></div>");
_431.write("<div class=\"lotusLeft\"><a id=\""+comm.uuid+"_twisty\" class=\"lotusSprite lotusArrow "+_433+"\" href=\"javascript:lconn.communities.bizCard.bizCardUI.toggleSection('"+comm.uuid+"');\"></a></div>");
_431.write("<h2><a href=\""+comm.homeUrl+"\">"+comm.name+"</a></h2>");
_431.write("<div class=\"lotusMenuSeparator\"></div>");
this.writeLinks(_431,comm,_430,_432);
_431.write("</div>");
_431.write("</div>");
_431.write("</div>");
},writeLinksforPopupCard:function(_435,_436){
for(var i=0;_436.links!=null&&i<_436.links.length;i++){
_435.write("&nbsp;&nbsp;|&nbsp;<a href='"+_436.links[i].url+"' title='"+_436.links[i].label+"' class='action'>"+_436.links[i].label+"</a>");
}
},toggleSection:function(_438){
var _439=dojo.byId(_438+"_twisty");
var _43a=dojo.byId(_438+"_comm_appLinks");
if(_43a.style.display=="none"){
dojo.fx.wipeIn({node:_43a,duration:300}).play();
dojo.removeClass(_439,"lotusTwistyClosed");
dojo.addClass(_439,"lotusTwistyOpen");
dojo.cookie("community.inline.card.links",1);
}else{
dojo.fx.wipeOut({node:_43a,duration:300}).play();
dojo.removeClass(_439,"lotusTwistyOpen");
dojo.addClass(_439,"lotusTwistyClosed");
dojo.cookie("community.inline.card.links",0);
}
},writeLinks:function(_43b,_43c,_43d,_43e){
var _43f=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_43f==null){
_43f=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
if(_43e){
_43b.write("<ul id=\""+_43c.uuid+"_comm_appLinks\">");
}else{
_43b.write("<ul id=\""+_43c.uuid+"_comm_appLinks\" style=\"display: none\">");
}
_43b.write("<li>"+"<a href='"+_43c.homeUrl+"' title=\""+_43f+"\" class='action'>"+_43f+"</a>"+"</li>");
for(var i=0;_43c.links!=null&&i<_43c.links.length;i++){
_43b.write("<li id=\""+_43c.links[i].id+"navItem\"");
if(_43d==_43c.links[i].id){
_43b.write(" class=\"lotusSelected\" ");
}
_43b.write("><a href=\""+_43c.links[i].url+"\" title=\""+_43c.links[i].label+"\" class=\"action\">"+_43c.links[i].label+"</a></li>");
}
_43b.write("</ul>");
return;
}};
}
if(!dojo._hasResource["lconn.core.i18nOverrider"]){
dojo._hasResource["lconn.core.i18nOverrider"]=true;
dojo.provide("lconn.core.i18nOverrider");
if(lconn.core.i18nOverrider.originalFunction==null){
lconn.core.i18nOverrider.originalFunction=dojo.i18n.getLocalization;
}
dojo.i18n.getLocalization=function(_441,_442,_443){
if(_441=="dijit"||_441=="dojo"){
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
var _444=_442;
if(window[_441]!=null){
var _445=window[_441];
if(_445!=null&&_445!="undefined"){
return _445;
}else{
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
}else{
return lconn.core.i18nOverrider.originalFunction(_441,_442,_443);
}
};
lconn.core.i18nOverrider.getResourceString=function(_446){
return dojo.i18n.getLocalization("lc_default",_446);
};
lconn.core.i18nOverrider.loadResourceStringsInParams=function(_447,_448){
if(_447==null){
_447=new Array;
}
for(var i=0;_448!=null&&i<_448.length;i++){
var _44a=dojo.i18n.getLocalization("default",_448[i]);
var _44b=_44a.replace(/\'\'/g,"'");
if(_44b==null||_44b==""){
_447.push([_448[i],_448[i]+" resourceKey not found"]);
}else{
_447.push([_448[i],_44b]);
}
}
return _447;
};
lconn.core.i18nOverrider.replaceParams=function(_44c,_44d){
var _44e=_44c.indexOf("{");
if(_44e!=-1){
var _44f=_44c.indexOf("}");
if(_44f==-1){
return _44c;
}
var _450=_44c.substring(_44e+1,_44f);
var _451=_44d[_450];
return _44c.substring(0,_44e)+_451+lconn.core.i18nOverrider.replaceParams(_44c.substring(_44f+1),_44d);
}else{
return _44c;
}
};
}
if(!dojo._hasResource["lconn.core.utilities"]){
dojo._hasResource["lconn.core.utilities"]=true;
dojo.provide("lconn.core.utilities");
lconn.core.utilities.getURLParam=function(_452){
var _453=decodeURIComponent(window.location);
if(_453.indexOf(_452)==-1){
return null;
}else{
var _454=_453.substring(_453.indexOf(_452+"=")+_452.length+1);
var _455=_454.indexOf("&");
if(_455!=-1){
_454=_454.substring(0,_455);
}
return _454;
}
};
lconn.core.utilities.replacePlaceHolders=function(_456,_457){
var _458=new Object();
for(var i=0;_457!=null&&i<_457.length;i++){
_458["{"+i+"}"]=_457[i];
}
return lconn.core.i18nOverrider.replaceParams(_456,_458);
};
lconn.core.utilities.processUntilElementIsFound=function(_45a,_45b,_45c,_45d){
var _45e="";
var _45f=0;
_45e=window.setInterval(function(){
var _460=null;
if(_45c!=null){
_460=_45c.getElementById(_45a);
}else{
_460=dojo.byId(_45a);
}
_45f++;
if(_460!=null){
window.clearInterval(_45e);
_45b(_460,_45d);
}else{
if(_45f==20){
window.clearInterval(_45e);
}
}
},500);
};
lconn.core.utilities.processUntilAvailable=function(_461,test,_463){
var _464="";
var _465=0;
_464=window.setInterval(function(){
_465++;
if(eval(test)){
window.clearInterval(_464);
if(_463!=null){
_461(_463);
}else{
_461();
}
}else{
if(_465==20){
window.clearInterval(_464);
}
}
},500);
};
lconn.core.utilities.gotoURL=function(url,_467){
if(_467==null){
if(url.indexOf("?")!=-1){
url+="&ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}else{
url+="?ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}
}
if(dojo.isIE){
var _468=url;
setTimeout("window.location.href = SideBar_RedirectUrl",0);
}else{
window.location.assign(url);
}
};
lconn.core.utilities.toggleVisibility=function(_469,_46a){
var _46b=null;
if((typeof _469)=="string"){
_46b=dojo.byId(_469);
}else{
_46b=_469;
}
if(_46b){
if(_46b.style.visibility=="hidden"){
lconn.core.utilities.show(_46b,_46a);
}else{
lconn.core.utilities.hide(_46b,_46a);
}
}
return false;
};
lconn.core.utilities.hide=function(_46c,_46d,nofx,_46f){
var _470=null;
if((typeof _46c)=="string"){
_470=dojo.byId(_46c);
}else{
_470=_46c;
}
if(_470!=null){
var _471=function(){
_470.style.visibility="hidden";
if(!_46d){
_470.style.display="none";
}
if(_46f!=null){
_46f();
}
};
if(nofx==null||nofx==false){
var _472=dojo.fx.wipeOut({node:_470,duration:300,onEnd:_471});
_472.play();
}else{
_471();
}
}
return false;
};
lconn.core.utilities.show=function(_473,_474,_475,nofx,_477){
var _478=0;
var _479=null;
if((typeof _473)=="string"){
_479=dojo.byId(_473);
}else{
_479=_473;
}
if(_475&&_479==null){
var _47a="";
_47a=window.setInterval(function(){
_478++;
if((typeof _473)=="string"){
_479=dojo.byId(_473);
}else{
_479=_473;
}
if(_479!=null){
window.clearInterval(_47a);
lconn.core.utilities.show(_479,_474,false,nofx,_477);
}else{
if(_478==20){
window.clearInterval(_47a);
}
}
},300);
}else{
if(_479!=null){
var _47b=function(){
_479.style.visibility="visible";
if(!_474){
_479.style.display="block";
}
if(_477!=null){
_477();
}
};
if(nofx==null||nofx==false){
var _47c=dojo.fx.wipeIn({node:_479,duration:300});
_47c.play();
}else{
_47b();
}
}
}
return false;
};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCard"]){
dojo._hasResource["lconn.profiles.bizCard.bizCard"]=true;
dojo.provide("lconn.profiles.bizCard.bizCard");
if(!window.SemTagPerson){
window.SemTagPerson={services:[]};
}
lconn.profiles.bizCard.bizCard={applicationContext:null,servletUrlByUserId:null,servletUrlByEmail:null,requestor:null,services:[],initited:false,init:function(){
if(this.initited==false){
this.applicationContext=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
this.servletUrlByUserId2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&lang=@@@LANG@@@";
this.servletUrlByEmail2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&lang=@@@LANG@@@";
this.servletUrlByUserId=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByUserId&lang=@@@LANG@@@";
this.servletUrlByEmail=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByEmail&lang=@@@LANG@@@";
this.requestor=new SemTagUtil.crossDomainRequest();
if(window.generalrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/resources/js-resources.js");
}
this.initited=true;
}
},getIdMethod:function(_47d){
return (_47d.email&&_47d.email.internet)?_47d.email.internet:null;
},convMethod:function(_47e){
return _47e;
},dispatchByEmail:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByEmail: data: "+data);
}
var _480=(data.email&&data.email.internet)?data.email.internet:null;
this.dispatch(_480,data);
},dispatchByUserId:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByUserId: data: "+data);
}
var _482=data.X_lconn_userid?data.X_lconn_userid:null;
this.dispatch(_482,data);
},dispatchByConfig:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByConfig: data: "+data);
}
this.dispatch("configDataId",data);
},dispatch:function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatch: id:"+id+"  data: "+data);
}
this.requestor.dispatch(id,data);
},processTag:function(_486){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
this.processHcard(_486);
}
catch(e){
console.log(e);
}
},processHcard:function(_487){
var _488=this.getNameElement(_487);
if(!_488){
return;
}
if(this.isInline(_487)){
var _489={"target":_488};
this.getTagFromServer(_489);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_488,this.showHover,this.showMenu,this.keystrokeHandler);
}
},isInline:function(_48a){
return this.getHcardAttributeValue("X-person-display-inline",_48a);
},loadHcardPerson:function(_48b){
var _48c=new Object();
var _48d=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_48b);
var _48e=_48d.getElementsByTagName("*");
for(i=0;i<_48e.length;i++){
var _48f=_48e[i];
if(_48f.className){
var _490=_48f.className.split(" ");
for(j=0;j<_490.length;j++){
var c=_490[j];
var attr=this.getHcardAttributeValue(c,_48d);
if(attr){
_48c[c]=attr;
}
}
}
}
return _48c;
},getHcardAttributeValue:function(_493,_494){
switch(_493){
case ("email"):
return this.getHcardTypedAttribute(_494,_493,"internet");
case ("tel"):
return this.getHcardTypedAttribute(_494,_493,"voice");
case ("adr"):
return this.getHcardTypedAttribute(_494,_493,"intl");
}
var _495=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_494);
var _496=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_493,_495,1);
if(_496.length>0&&_496[0].tagName.match(/^abbr$/i)){
return _496[0].getAttribute("title");
}
switch(_493){
case ("fn"):
var fn=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_496[0]);
if(fn){
return fn;
}else{
return this.getHcardAttributeValue("n",_494);
}
break;
case ("n"):
if(_496.length>0){
var _498=_496[0];
var _499="";
var _49a=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"];
for(i=0;i<5;i++){
var n=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(lconn.core.bizCard.bizCardUtils.getElementsByClassName(_49a[i],_498,1)[0]);
if(n){
_499+=n+" ";
}
}
return _499;
}
return "";
break;
case ("photo"):
var _49c=_496[0];
if(_49c){
return _49c.getAttribute("src");
}else{
return;
}
break;
case ("X-sametime-status"):
var _49d=_496[0];
if(!_49d){
return "";
}
var _49e=_49d.getAttribute("value");
if(_49e){
return _49e;
}else{
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_49d);
}
break;
case ("X-person-display-inline"):
if(_496.length>0){
return true;
}else{
return false;
}
case ("street-address"):
case ("post-office-box"):
case ("extended-address"):
case ("locality"):
case ("region"):
case ("postal-code"):
case ("country-name"):
case ("title"):
case ("role"):
case ("org"):
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_496[0]);
break;
}
},getHcardTypedAttribute:function(_49f,_4a0,_4a1){
var _4a2=new Object();
var _4a3=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_49f);
var _4a4=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_4a0,_4a3);
for(i=0;i<_4a4.length;i++){
var _4a5=_4a4[i];
if(_4a0=="email"&&_4a5.nodeName.toLowerCase()=="a"&&_4a5.href.match(/^mailto:/)){
var _4a6=_4a5.href.indexOf("?");
if(_4a6>-1){
_4a2[_4a1]=_4a5.href.slice(7,_4a6);
}else{
_4a2[_4a1]=_4a5.href.slice(7);
}
continue;
}
_4a2=lconn.core.bizCard.bizCardUtils.getTypedValue(_4a5,_4a1);
}
return _4a2;
},showHover:function(_4a7){
try{
lconn.core.bizCard.bizCardUtils.showHover(_4a7,lconn.profiles.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.profiles.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_4a8){
SemTagMenu.waitCursor();
lconn.profiles.bizCard.bizCard.getTagFromServer(_4a8);
},keystrokeHandler:function(_4a9){
if(_4a9.ctrlKey&&(_4a9.keyCode==13)){
if(_4a9.preventDefault){
_4a9.preventDefault();
}
lconn.profiles.bizCard.bizCard.showMenu(_4a9);
}
},getSearchType:function(_4aa){
indexOf.lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
},getTagFromServer:function(_4ab){
var _4ac=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_4ab);
var _4ad=lconn.core.bizCard.bizCardUtils.getLangParam();
var _4ae={"LANG":lconn.core.bizCard.bizCardUtils.getLangParam()};
var url=null;
var _4b0=null;
var _4b1=null;
var _4b2=this.getElementUserId(_4ac);
if(_4b2){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for user id: "+_4b2);
}
_4ae["USERID"]=_4b2;
_4b0=_4b2;
url=this.servletUrlByUserId2;
_4b1="lconn.profiles.bizCard.bizCard.dispatchByUserId";
}else{
var _4b3=this.getElementEmail(_4ac);
if(_4b3){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for email: "+_4b3);
}
_4ae["EMAIL"]=_4b3;
_4b0=_4b3;
url=this.servletUrlByEmail2;
_4b1="lconn.profiles.bizCard.bizCard.dispatchByEmail";
}
}
if(_4b0!=null){
lconn.core.bizCard.bizCardUtils.getBizCardData(url,_4ae,_4b1,this.requestor,this.requestReturn,_4ab,_4b0);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sent");
}
}else{
this.noInformationProvided(_4ac,_4ab);
}
},noInformationProvided:function(_4b4,_4b5){
lconn.profiles.bizCard.bizCard.update(null,_4b4,_4b5);
},requestReturn:function(_4b6,_4b7,_4b8){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.requestReturn: success="+_4b6);
}
var _4b9=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_4b8);
var _4b7=_4b6?lconn.profiles.bizCard.bizCard.convMethod.call(null,_4b7):{};
lconn.profiles.bizCard.bizCard.fillPersonJsonMoreFromDom(_4b7,_4b9);
lconn.profiles.bizCard.bizCard.update(_4b7,_4b9,_4b8);
},fillPersonJsonMoreFromDom:function(_4ba,_4bb){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.fillPersonJsonMoreFromDom");
}
if(!_4ba.photo){
_4ba.photo=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/profileNoPhoto.gif";
}
if(!_4ba.fn){
var _4bc=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_4bb);
if(_4bc){
_4ba.fn=lconn.core.bizCard.bizCardUtils.getTextValue(_4bc);
}
}
if(!_4ba.email||!_4ba.email.internet){
var _4bd=this.getElementEmail(_4bb);
_4ba.email={"internet":_4bd};
}
if(!_4ba.tel||!_4ba.tel.voice){
var _4be=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_4bb,"tel");
if(_4be){
var tels=lconn.core.bizCard.bizCardUtils.getTypedValue(_4be,"voice");
_4ba.tel={"voice":tels["voice"]};
}
}
var _4c0=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_4bb,"adr");
var _4c1={};
if(_4c0){
_4c1=SemTagAddr.getAddressJson(_4c0);
_4ba.adr=_4c1;
}
},update:function(_4c2,_4c3,_4c4){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.update");
}
this.currentPerson=_4c2;
var _4c5=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_4c3);
if(this.isInline(_4c5)){
var out=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getInlineMarkup(_4c2,"ltr",out);
var span=document.createElement("span");
span.innerHTML=out.buffer;
_4c5.appendChild(span);
var _4c8=(dojo.cookie("card.inline.expanded")?false:true);
}else{
var _4c9=new Array();
var _4ca="personMenuActions";
var _4cb=new lconn.core.bizCard.bizCardUtils.out();
var _4cc=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_4c2,"ltr",_4c9,_4ca,_4cb,_4cc);
lconn.core.bizCard.bizCardUtils.setMenuData(_4c4,_4c9,_4ca,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_4cb.buffer,-100));
}
if(_4c2!=null){
if(_4c2.X_bizCardSTAwareness){
this.invokeSametimeAwareness(_4c2);
}
}
},invokeSametimeAwareness:function(_4cd){
if(this.attemptedToLoadSametime==null&&window.Status==null){
var _4ce="http://localhost:59449/stwebapi/";
lconn.core.bizCard.bizCardUtils.loadScript(_4ce+"getStatusNonDojo.js");
lconn.core.bizCard.bizCardUtils.loadCss(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/css/sametime/main.css");
this.attemptedToLoadSametime=true;
}
lconn.core.utilities.processUntilAvailable(this.invokeSametimeAwarenessForPerson,"window.Status != null",_4cd);
},invokeSametimeAwarenessForPerson:function(_4cf){
var _4d0="http://localhost:59449/stwebapi/";
var url=_4d0+"getstatus/";
url+=_4cf.email.internet+"?jsonp=lconn.profiles.bizCard.bizCard.sametimeCallBack&time="+new Date().getTime();
lconn.core.bizCard.bizCardUtils.loadScript(url);
},sametimeCallBack:function(_4d2){
if(_4d2.error!=null){
}else{
var _4d3=document.getElementById(_4d2.username+"vcardNameElem");
if(_4d3!=null&&typeof (Status)!="undefined"){
_4d3.className+=" awareness "+Status.getStyleForStatus(_4d2.status);
_4d3.setAttribute("userId",_4d2.username);
_4d3.onclick=function(){
var _4d4=this.getAttribute("userId");
sametime_invoke("chat",_4d4);
};
}
if(dojo.byId(_4d2.username+"ChatAction")!=null){
dojo.byId(_4d2.username+"ChatAction").style.display="inline";
}
if(dojo.byId(_4d2.username+"ChatActionMore")!=null){
dojo.byId(_4d2.username+"ChatActionMore").style.display="inline";
}
if(dojo.byId(_4d2.username+"CallActionMore")){
dojo.byId(_4d2.username+"CallActionMore").style.display="inline";
}
if(dojo.byId(_4d2.username+"vcardCommentElem")!=null){
if(_4d2.statusMessage!=null&&_4d2.statusMessage!=""){
dojo.byId(_4d2.username+"vcardCommentElem").style.display="block";
dojo.byId(_4d2.username+"vcardStStatusElem").innerHTML=_4d2.statusMessage;
}
}
}
},sametimeStart:function(_4d5,_4d6){
sametime_invoke(_4d5,_4d6);
},getElementEmail:function(elem){
var _4d8;
var _4d9=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_4d9){
_4d8=this.getHcardAttributeValue("email",_4d9);
_4d8=_4d8.internet;
}else{
if(elem.nodeName.toLowerCase()=="a"&&elem.href.match(/^mailto:/)){
_4d8=elem.href.replace(/^mailto:/,"");
}
}
return _4d8;
},getElementUserId:function(elem){
var _4db="";
var _4dc=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_4dc){
_4db=this.getHcardAttributeValue("x-lconn-userid",_4dc);
}
return _4db;
},getNameElement:function(elem){
if(elem.className!="vcard"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
}
var _4de=lconn.core.bizCard.bizCardUtils.getElementsByClassName("fn",elem,1)[0];
if(!_4de){
_4de=lconn.core.bizCard.bizCardUtils.getElementsByClassName("n",elem,1)[0];
}
return _4de;
},requestReturnMiniBizCard:function(_4df,_4e0,_4e1,_4e2){
var _4e0=_4df?lconn.profiles.bizCard.bizCard.convMethod.call(null,_4e0):{};
var _4e3=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_4e0,null,null,null,_4e3,null,true,(_4e2?true:false));
if(_4e1.target!=null){
_4e1.target.innerHTML=_4e3.buffer;
}else{
if(_4e1.callbackfn!=null){
_4e1.callbackfn(_4e3.buffer);
}
}
},renderMiniBizCard:function(_4e4,_4e5,_4e6){
this.init();
var _4e7={"target":_4e6,"callbackfn":_4e5};
var src=this.servletUrlByUserId.replace(/@@@USERID@@@/,_4e4);
this.requestor.request(src,10000,this.requestReturnMiniBizCard,_4e7,_4e4);
}};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]){
dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]=true;
dojo.provide("lconn.profiles.bizCard.bizCardUI");
lconn.profiles.bizCard.bizCardUI={isDebug:false,isSlim:false,isExpandable:true,isEmailEnabled:true,getMenuData:function(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4ef,_4f0){
var _4f1=dojo.cookie("card.popup.slim");
if(typeof (_4ef)!="undefined"&&_4ef!=null){
this.isSlim=_4ef;
}else{
if(_4f1!=null){
this.isSlim=(_4f1==1);
}
}
if(typeof (_4f0)!="undefined"){
this.isExpandable=_4f0;
}
if(_4e9!=null){
this.isEmailEnabled=(_4e9.email!=null&&_4e9.email.internet!=null);
}else{
this.isEmailEnabled=false;
}
if(this.isDebug){
SemTagSvc.debug("slim? "+this.isSlim);
SemTagSvc.debug("expandable? "+this.isExpandable);
SemTagSvc.debug("email? "+this.isEmailEnabled);
}
var _4f2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
_4ed.write("<div class=\"lotusui\">");
_4ed.write("<div id=\"cardDiv\" class=\"lotusVCard\" style=\"margin: 10px; position: static; opacity: 1;\">");
_4ed.write("<a id=\"A11Yblank\" href=\"javascript:void(0);\" ><img src=\""+_4f2+"/nav/common/styles/images/blank.gif\" alt=\"\" /></a>");
_4ed.write("<table id=\"cardTable\" class=\"lotusContainer\" cellspacing=\"0\">");
_4ed.write("<tbody>");
_4ed.write("<tr id=\"cardHeader\" "+((this.isSlim)?"style=\"display:none\"":"")+">"+"<td>"+"<table cellspacing=\"0\" width=\"100%\">");
if(_4e9!=null){
this.writeHeaderUIContent(_4ed,_4e9,false);
}
_4ed.write("</table>"+"</td></tr>");
_4ed.write("<tr id=\"cardBody\">");
_4ed.write("<td class=\"lotusDetails\" colspan=\"6\">");
this.writeBodyUIContent(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4f2);
_4ed.write("</td>");
_4ed.write("</tr>");
if(_4e9!=null){
this.writeFooterUIContent(_4e9,bidi,_4eb,_4ec,_4ed,_4ee,_4f2);
}
_4ed.write("</tbody></table></div></div>");
},writeHeaderUIContent:function(_4f3,_4f4,_4f5){
this.writeLinks(_4f3,_4f4,_4f5);
},writeBodyUIContent:function(_4f6,bidi,_4f8,_4f9,_4fa,_4fb,_4fc){
this.getSubUIContent(_4f6,bidi,_4f8,_4f9,_4fa,_4fb,_4fc);
},writeFooterUIContent:function(_4fd,bidi,_4ff,_500,_501,_502,_503){
_501.write("<tr id=\"cardFooter\""+((this.isSlim)?"style=\"display:none\"":"")+">");
_501.write("<td colspan=\"6\">");
if(_4fd.X_inDirectory){
_501.write("<div class=\"lotusPersonActions\">");
_501.write("<ul class=\"lotusInlinelist\">");
var _504=(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL);
if(_4fd.X_bizCardActions.length>0){
_501.write("<li class=\"lotusFirst\">"+this.getActionLink(_4fd,0,true)+"</li>");
if(_504){
_501.write("<li class=\"lotusFirst\"></li>");
}
}
if(this.isEmailEnabled&&_4fd.X_bizCardSTAwareness){
if(_4fd.X_STChatAction){
_501.write("<li id=\""+_4fd.email.internet+"ChatAction\" "+(_504?"class=\"lotusFirst\"":"")+" style=\"display:none;\">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_4fd.email.internet+"');\">"+"<img src=\""+_503+"/nav/common/styles/images/iconChat.gif\" alt=\"\" /> "+generalrs.personCardChat+"</a>"+"</li>");
}
if(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL){
_501.write("<li class=\"lotusFirst\"></li>");
}
}
if(_4fd.X_bizCardActions.length>1){
_501.write("<li "+(!this.isEmailEnabled||_504?"class=\"lotusFirst\"":"")+">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_4fd.key+"MoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">"+generalrs.personCardMoreActions+"<img src=\""+_503+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\" title=\""+generalrs.personCardMoreActionsAltText+"\">"+"</a>"+"</li>");
}
_501.write("</ul>"+"</div>");
if(_4fd.X_bizCardActions.length>1||(this.isEmailEnabled&&_4fd.X_bizCardSTAwareness)){
this.writeMoreActionsMenu(_501,_4fd,_503,false);
}
}
_501.write("</td></tr>");
},getActionLink:function(_505,_506,_507){
var _508=_505.X_bizCardActions[_506];
var icon="";
if(_507&&typeof (_508.icon)!="undefined"){
icon="<img src=\""+_508.icon.href+"\" alt=\""+_508.icon.alt+"\" /> ";
}
return "<a class=\"email\" href=\""+_508.urlPattern+"\">"+icon+_508.label+"</a>";
},getSubUIContent:function(_50a,bidi,_50c,_50d,_50e,_50f,_510){
if(this.isExpandable){
this.writeExpandoUIContent(_50e,_510);
}
if(_50a!=null){
if(_50a.X_bizCardShowPhoto){
_50e.write("<div class=\"lotusPhoto photo\"><img src=\""+_50a.photo+"\" alt=\""+_50a.fn+"\" title=\""+_50a.fn+"\" height=\"59\" width=\"59\"></div>");
}
_50e.write("<div class=\"lotusPersonInfo\">");
if(_50a.X_inDirectory!="true"){
var _511=generalrs["label.personcard.noprofilemsg"];
_50e.write("<h3 id='noProfileMsg'>"+_511+"</h3>");
}else{
_50e.write(_50a.X_bizCardMainHtml);
}
_50e.write("</div><!--end lotusInfo-->");
var _512=((this.isEmailEnabled)?_50a.email.internet:"");
_50e.write("<div id=\""+_512+"vcardCommentElem\" class=\"lotusComment\" style=\"display: none;\">");
_50e.write("<div class=\"lotusCommentHeader\">&nbsp;</div><!--end comment header-->");
_50e.write("<div class=\"lotusCommentBody\">\t");
if(_512!=""&&_50a.X_bizCardSTStatusMsg){
_50e.write("<p>Sametime: <span id=\""+_512+"vcardStStatusElem\"></span></p>");
}
_50e.write("</div><!--end commentBody-->");
_50e.write("</div><!--end comment-->");
}else{
var _511=dojo.i18n.getLocalization("lc_default")["label.personcard.noprofilemsg"];
_50e.write("<h3 id='noProfileMsg'>"+_511+"</h3>");
}
},writeExpandoUIContent:function(_513,_514){
_513.write("<div class=\"lotusRight\">");
_513.write("<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleSlimCard(this,'"+_514+"');"+"event.cancelBubble=true;\""+"href=\"javascript:void(0);\">");
_513.write(" <img id=\"slimTwisty\" src=\""+_514+"/nav/common/styles/images/"+(this.isSlim?"iconShow.gif":"iconHide.gif")+"\" alt=\"\" title=\"\"/>");
_513.write("</a>");
_513.write("</div>");
},getInlineMarkup:function(_515,bidi,_517){
var _518=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var _519=_517;
if(_515!=null){
var _51a="";
if(this.isEmailEnabled){
_51a=_515.email.internet;
}
_519.write("<div class=\"lotusui\">");
_519.write("<div id=\""+_515.key+"\" class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_519.write("  <div class=\"lotusContainer\">");
_519.write("    <div id=\""+_515.key+"_Pivot\" class=\"lotusPivotNav\">");
_519.write("      <div class=\"lotusPivotNavToggle\">");
_519.write("        <a href=\"javascript:void(0);\" title=\"\" onclick=\"lconn.core.bizCard.bizCardUtils.toggleInlineCard('"+_515.key+"')\">"+"&nbsp;"+"</a>");
_519.write("      </div>");
if(_515.X_bizCardShowPhoto){
_519.write("      <div class=\"lotusPhoto photo\">");
_519.write("        <img id=\"photo\" src=\""+_515.photo+"\" alt=\""+_515.fn+"\" title=\""+_515.fn+"\" height=\"35\" width=\"35\" />");
_519.write("      </div>");
}
_519.write("      <div class=\"lotusPersonInfo\">");
_519.write("        <h2 class=\"fn\" id=\""+_51a+"vcardNameElem\" class=\"fn\">"+_515.fn+"</h2>");
_519.write("      </div>");
_519.write("    </div>");
_519.write("    <div id=\""+_515.key+"_Details\" class=\"lotusInlineVCardDetails\">");
if(_515.X_bizCardActions.length>0){
_519.write("<div class=\"lotusEmail\">");
_519.write(this.getActionLink(_515,0,true));
_519.write("</div>");
}
this.writeLinks(_519,_515,true);
if(_515.X_bizCardActions.length>1){
_519.write("<div class=\"lotusPersonActions\">");
_519.write("  <ul class=\"lotusInlinelist\">");
_519.write("    <li class=\"lotusFirst\">");
_519.write("      <a href=\"javascript:;\"");
_519.write("        onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_515.key+"InlineMoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">");
_519.write(generalrs.personCardMoreActions);
_519.write("        <img src=\""+_518+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\"");
_519.write("          title=\""+generalrs.personCardMoreActionsAltText+"\" />");
_519.write("      </a>");
_519.write("    </li>");
_519.write("  </ul>");
_519.write("</div>");
this.writeMoreActionsMenu(_519,_515,_518,true);
}
_519.write("    </div>");
_519.write("  </div>");
_519.write("</div>");
_519.write("</div>");
}else{
_519.write("<div class=\"lotusui\">");
_519.write("<div class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_519.write("  <div class=\"lotusContainer\">");
_519.write("    </div>");
_519.write("    </div>");
_519.write("    </div>");
}
},writeLinks:function(_51b,_51c,_51d){
try{
var _51e=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
if(!_51c.X_bizCardServiceLinks){
_51c.X_bizCardServiceLinks=[];
}
if(!_51c.X_concatSemPersonSvc&&SemTagPerson.services&&SemTagPerson.services.length>0){
_51c.X_bizCardServiceLinks=_51c.X_bizCardServiceLinks.concat(SemTagPerson.services);
_51c.X_concatSemPersonSvc=true;
}
if(_51c.X_bizCardServiceLinks&&_51c.X_bizCardServiceLinks.length>0){
_51b.write((_51d)?"<ul id=\"appLinks1\" class=\"lotusAppLinks\">":"<tr id=\"appLinks1\" class=\"lotusAppLinks\">");
var _51f=false;
var _520=false;
for(var k=0;k<_51c.X_bizCardServiceLinks.length;k++){
var _522=false;
var _523=_51c.X_bizCardServiceLinks[k];
if(_523==null||_523.name==null||_523.name==""){
continue;
}
var _524="";
var _525=false;
if(typeof (_523.href)!="undefined"&&_523.href!=null){
_524=_523.href;
}else{
if(typeof (_523.url_pattern)!="undefined"&&_523.url_pattern!=null&&_523.url_pattern!=""){
_524=_523.url_pattern;
if(_524.indexOf("{email}")!=-1&&(_51c.email!=null&&_51c.email.internet!=null)){
_524=_524.replace(/{email}/g,_51c.email.internet);
}
if(_524.indexOf("{uid}")!=-1&&(_51c.uid!=null)){
_524=_524.replace(/{uid}/g,_51c.uid);
}
if(_524.indexOf("{key}")!=-1&&(_51c.key!=null)){
_524=_524.replace(/{key}/g,_51c.key);
}
if(_524.indexOf("{fn}")!=-1&&(_51c.fn!=null)){
_524=_524.replace(/{fn}/g,_51c.fn);
}
if(_524.indexOf("{displayName}")!=-1&&(_51c.fn!=null)){
_524=_524.replace(/{displayName}/g,_51c.fn);
}
if(_524.indexOf("{workPhoneNumber}")!=-1&&(_51c.adr!=null&&_51c.adr.work!=null)){
_524=_524.replace(/{workPhoneNumber}/g,_51c.adr.work);
}
if(_524.indexOf("{userid}")!=-1&&(_51c.X_lconn_userid!=null)){
_524=_524.replace(/{userid}/g,_51c.X_lconn_userid);
}
if(typeof (_523.location)!="undefined"&&_523.location!=null){
_524=_523.location+_524;
}
}else{
continue;
}
}
if((_51d==false)&&k==4&&_51c.X_bizCardServiceLinks.length>=6&&!_51f){
_51b.write("<td>"+"<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleMoreApps('appLinks2',this); event.cancelBubble=true;\""+" href=\"javascript:void(0);\" "+" class=\"lotusMore lotusMoreExpanded\">&nbsp;"+"<span class=\"lotusAltText\">+</span>"+"</a>"+"</td>");
_51b.write("</tr>");
_51b.write("<tr id=\"appLinks2\" class=\"lotusAppLinks\">");
_51f=true;
_520=true;
}
_51b.write((_51d)?"<li ":"<td ");
if(k==0||_520==true){
_51b.write("class=\"lotusFirst\"");
}
_520=false;
var _526="";
if(typeof (_523.js_eval)!="undefined"&&_523.js_eval!=null&&_523.js_eval.indexOf("generalrs.")==0){
var key=_523.js_eval.substr("generalrs.".length);
if(typeof (generalrs[key])=="undefined"){
key=key.replace(/\_/g,".");
}
_526=generalrs[key];
}else{
if(_523.js_eval){
try{
if(_51c.X_allowEvalLabel){
_526=dojo.eval(_523.js_eval);
}else{
_526=new String(_523.js_eval);
}
}
catch(exception2){
_526="!error.eval!";
}
}else{
if(_523.label){
_526=new String(_523.label);
}else{
_526="???";
}
}
}
if(_523.name=="blogs"&&_51c.X_blogUrl!=null&&_51c.X_blogUrl!=""){
_51b.write("><a class=\"url\" href=\""+_51c.X_blogUrl+"\">"+_526+"</a>");
}else{
_51b.write("><a class=\"url\" href=\""+_524+"\">"+_526+"</a>");
}
_51b.write((_51d)?"</li>":"</td>");
}
if(_51f){
_51b.write("<td colspan=\""+(11-_51c.X_bizCardServiceLinks.length)+"\">&nbsp;</td>");
}
_51b.write((_51d)?"</ul>":"</tr>");
}
}
catch(exception2){
alert(exception2.message);
}
},writeMoreActionsMenu:function(_528,_529,_52a,_52b){
try{
_528.write("<ul class=\"lotusActionMenu\" id=\""+_529.key);
if(_52b){
_528.write("Inline");
}
_528.write("MoreActionMenu\">");
if(_529.X_bizCardActions.length>0&&!_52b){
_528.write("<li class=\""+_529.X_bizCardActions[0].liClass+"\">"+this.getActionLink(_529,0,false)+"</li>");
}
if(this.isEmailEnabled&&_529.X_bizCardSTAwareness&&_529.email.internet!=""){
if(_529.X_STChatAction){
_528.write("<li id=\""+_529.email.internet+"ChatActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_529.email.internet+"');\"> "+generalrs.personCardChat+" </a></li>");
}
if(_529.X_STCallAction){
_528.write("<li id=\""+_529.email.internet+"CallActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('call', '"+_529.email.internet+"');\"> "+generalrs.personCardCall+" </a></li>");
}
}
if(_529.X_bizCardActions.length>1){
for(var i=1;i<_529.X_bizCardActions.length;i++){
_528.write("<li class=\""+_529.X_bizCardActions[i].liClass+"\">"+this.getActionLink(_529,i,false)+"</li>");
}
}
_528.write("</ul>");
}
catch(exception2){
alert(exception2.message);
}
},displayMore:function(_52d,_52e){
_52e.style.display="none";
document.getElementById(_52d).style.display="block";
},convertQuickrEmail:function(_52f){
_52f=_52f.replace(/@/g,"_at_");
_52f=_52f.replace(/\./g,"_");
return _52f;
},toggleMoreApps:function(pDiv,_531){
var _532=document.getElementById(pDiv);
if(_531.className.indexOf("lotusMoreExpanded")!=-1){
_531.className="lotusMore";
_532.style.display="none";
}else{
_531.className+=" lotusMoreExpanded";
_532.style.display="";
}
},toggleSlimCard:function(_533,_534){
var _535=document.getElementById("slimTwisty");
if(_535.src.indexOf("iconHide.gif")!=-1){
this.slimCard(_534);
dojo.cookie("card.popup.slim",1);
}else{
this.expandCard(_534);
dojo.cookie("card.popup.slim",0);
}
},slimCard:function(_536){
var _537=document.getElementById("slimTwisty");
var _538=document.getElementById("cardHeader");
var _539=document.getElementById("cardFooter");
if(_537){
_537.src=_536+"/nav/common/styles/images/iconShow.gif";
}
_538.style.display="none";
_539.style.display="none";
},expandCard:function(_53a){
var _53b=document.getElementById("slimTwisty");
var _53c=document.getElementById("cardHeader");
var _53d=document.getElementById("cardFooter");
if(_53b){
_53b.src=_53a+"/nav/common/styles/images/iconHide.gif";
}
_53c.style.display="";
_53d.style.display="";
},resizeObj:function(obj,_53f,_540){
if(typeof (obj.style.height)=="undefined"||obj.style.height<=0){
obj.style.height=obj.height;
}
if(typeof (obj.style.width)=="undefined"||obj.style.width<=0){
obj.style.width=obj.width;
}
obj.style.height=(_53f)?obj.style.height=_540+"%":obj.style.height;
obj.style.width=(_53f)?obj.style.width=_540+"%":obj.style.width;
},openVCardDialog:function(key,_542){
this._createVCardDialog(key,_542);
},_createVCardDialog:function(key,_544){
window.open(this._getVCardDownloadUrl(key,_544),"vcarddl","status=0,toolbar=0,scrollbars=0,resizable=0,height=350,width=550");
},_getVCardDownloadUrl:function(key,_546){
var base=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var lang=lconn.core.bizCard.bizCardUtils.getLangParam();
return base+"/html/exportVCardDialog.do?key="+key+"&lastMod="+_546+"&lang="+lang;
}};
}
if(!dojo._hasResource["lconn.core.TextBox"]){
dojo._hasResource["lconn.core.TextBox"]=true;
dojo.provide("lconn.core.TextBox");
dojo.declare("lconn.core.TextBox",[dijit._Widget,dijit._Templated],{shadowText:"",shadowTextOn:true,name:"",textBoxClass:"",templateString:"<span><input type=\"text\" class=\"${textBoxClass}\" dojoAttachPoint=\"textbox\" /><input type=\"hidden\" value=\"\" dojoAttachPoint=\"hiddenbox\" /></span>",postCreate:function(){
this.textbox.onfocus=dojo.hitch(this,"textBoxFocus");
this.textbox.onblur=dojo.hitch(this,"textBoxBlur");
this.textbox.name=this.id+"_textbox";
if(this.value){
this.textbox.value=this.value;
this.hiddenbox.value=this.value;
this.shadowTextOn=false;
}else{
dojo.addClass(this.textbox,"lotusInactive");
this.textbox.value=this.shadowText;
}
if(this.name){
this.hiddenbox.name=this.name;
}
if(this.title){
this.textbox.title=this.title;
}
},textBoxBlur:function(){
if(this.textbox.value.length==0){
dojo.addClass(this.textbox,"lotusInactive");
this.shadowTextOn=true;
this.textbox.value=this.shadowText;
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
this.shadowTextOn=false;
}
},textBoxFocus:function(){
if(this.shadowTextOn){
this.shadowTextOn=false;
this.textbox.value="";
this.hiddenbox.value="";
dojo.removeClass(this.textbox,"lotusInactive");
this.textbox.focus();
}
},setHiddenValue:function(){
if(this.shadowTextOn){
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
}
},focus:function(){
this.textbox.focus();
},getValue:function(){
return this.hiddenbox.value;
}});
}
if(!dojo._hasResource["lconn.core.SearchBar"]){
dojo._hasResource["lconn.core.SearchBar"]=true;
dojo.provide("lconn.core.SearchBar");
dojo.declare("lconn.core.SearchBar",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lotusSearch\"><form dojoAttachPoint=\"formNode\" method=\"POST\" dojoAttachEvent=\"onsubmit:formSubmitted\">","<input name=\"scope\" value=\"\" dojoAttachPoint=\"scopeInputNode\" type=\"hidden\" />","<input name=\"component\" value=\"\" dojoAttachPoint=\"featureInputNode\" type=\"hidden\" />","<table class=\"lotusLayout\" role=\"presentation\" summary=\"\"><tbody><tr>","<td><span id=\"${id}searchLbl\" class=\"lotusHidden\">${lblSelectScope}</span>","<a href=\"javascript:;\" title=\"${lblSelectScope}\" aria-labelledby=\"${id}searchLbl\" aria-describedby=\"${id}searchOpt\" wairole=\"menu\" role=\"menu\" class=\"lotusScope\" dojoAttachPoint=\"scopeNode\" dojoAttachEvent=\"onclick:openMenu\">","<img class=\"lotusIcon\" alt=\"\" src=\"${_blankGif}\" dojoAttachPoint=\"currScopeIconNode\" role=\"presentation\"/>","<span id=\"${id}searchOpt\" dojoAttachPoint=\"currScopeLabelNode\"> </span>","<span class=\"lotusAltText\" role=\"presentation\">&#9660;</span>","</a></td>","<td>","<label class=\"lotusHidden\" for=\"${id}searchInput\">${lblSearch}</label>","<input id=\"${id}searchInput\" dojoAttachPoint=\"textNode\" class=\"lotusText lotusInactive\" type=\"text\" name=\"query\" title=\"${lblSearch}\"/>","</td>","<td>","<span class=\"lotusBtnImg\">","<input dojoAttachPoint=\"onclick:submitForm\" class=\"lotusSearchButton\" type=\"image\" src=\"${_blankGif}\" alt=\"${lblSearch}\"/>","<a href=\"javascript:;\" alt=\"${lblSearch}\" dojoAttachEvent=\"onclick:submitForm\" class=\"lotusAltText\">${lblSearch}</a>","</span>","</td>","</tr></tbody></table>","</form></div>"].join(""),localOptions:[],globalOptions:[],localAction:"",searchContextPath:"",lblSearch:"",lblSelectScope:"",lblAllConnections:"",lblAdvanced:"",menuItems:[],featureIcons:{allareas:"lconnSprite lconnSprite-iconConnections16",activities:"lconnSprite lconnSprite-iconActivities16",blogs:"lconnSprite lconnSprite-iconBlogs16",communities:"lconnSprite lconnSprite-iconCommunities16",dogear:"lconnSprite lconnSprite-iconDogear16",files:"lconnSprite lconnSprite-iconFiles16",profiles:"lconnSprite lconnSprite-iconProfiles16",wikis:"lconnSprite lconnSprite-iconWikis16"},selectedOption:null,textBox:null,globalAction:"",advancedSearchUrl:"",SEARCH_ADVANCED:"searchAdvancedIdentifier",SEARCH_POST_PATH:"/web/search",SEARCH_ADVANCED_PATH:"/web/jsp/advancedSearch.jsp",postCreate:function(){
if(this.searchContextPath){
this.globalAction=this.searchContextPath+this.SEARCH_POST_PATH;
this.advancedSearchUrl=this.searchContextPath+this.SEARCH_ADVANCED_PATH;
}
this.showDefaultOption();
this.textBox=new lconn.core.TextBox({shadowText:this.lblSearch,textBoxClass:"lotusText",name:"query",title:this.lblSearch},this.textNode);
if(this.globalOptions&&this.globalOptions.length>0){
this.globalOptions.splice(0,0,{label:this.lblAllConnections,feature:"allareas",iconClass:"lconnSprite lconnSprite-iconConnections16"});
}
},changeLocalOptions:function(_549){
this.localOptions=_549;
if(this.scopeMenu){
this.scopeMenu.destroyRecursive();
this.scopeMenu=null;
this.menuItems=[];
}
this.showDefaultOption();
},showDefaultOption:function(){
for(var i in this.localOptions){
if(this.localOptions[i].defaultOption){
this.selectOption(this.localOptions[i],false);
return;
}
}
if(this.globalOptions&&this.globalOptions.length>0){
this.selectOption(this.globalOptions[0],false);
}
},getScopeMenu:function(){
if(!this.scopeMenu){
this.scopeMenu=new dijit.Menu({onItemClick:dojo.hitch(this,"selectOption")});
this.connect(this.scopeMenu,"_onBlur","closeMenu");
this.menuItems=[];
var _54b=this.localOptions;
for(var i in _54b){
_54b[i].parentMenu=this.scopeMenu;
this.menuItems.push(new dijit.MenuItem(_54b[i]));
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
}
_54b=this.globalOptions;
for(var i in _54b){
if(_54b[i].feature&&this.featureIcons[_54b[i].feature]){
_54b[i].parentMenu=this.scopeMenu;
_54b[i].iconClass=this.featureIcons[_54b[i].feature];
this.menuItems.push(new dijit.MenuItem(_54b[i]));
}
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
this.menuItems.push(new dijit.MenuItem({label:this.lblAdvanced,feature:this.SEARCH_ADVANCED}));
}
for(var i in this.menuItems){
this.scopeMenu.addChild(this.menuItems[i]);
}
}
return this.scopeMenu;
},openMenu:function(evt){
var menu=this.getScopeMenu();
dijit.popup.open({popup:menu,around:this.scopeNode,orient:(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),onExecute:function(){
},onCancel:dojo.hitch(this,function(){
dijit.popup.close(menu);
dijit.focus(this.scopeNode);
}),onClose:function(){
}});
menu.focus();
dojo.stopEvent(evt);
},closeMenu:function(){
if(this.scopeMenu){
dijit.popup.close(this.scopeMenu);
}
},onSelectOption:function(item,evt){
this.selectOption(item,true);
},selectOption:function(item,_552){
this.closeMenu();
this.selectedOption=item;
if(item.feature&&item.feature==this.SEARCH_ADVANCED){
location.href=this.advancedSearchUrl;
return;
}
this.currScopeLabelNode.innerHTML=item.label;
this.currScopeIconNode.className="lotusIcon";
if(item.iconClass){
dojo.addClass(this.currScopeIconNode,item.iconClass);
}
if(item.scope){
this.scopeInputNode.value=item.scope;
this.featureInputNode.value="";
}else{
if(item.feature){
if(item.feature=="allareas"){
this.featureInputNode.value="";
}else{
this.featureInputNode.value=item.feature;
}
this.scopeInputNode.value="";
}
}
if(item.action){
this.formNode.action=item.action;
}else{
if(item.feature){
this.formNode.action=this.globalAction;
}else{
this.formNode.action=this.localAction;
}
}
if(_552){
this.textBox.focus();
}
},submitForm:function(evt){
this.textBox.setHiddenValue();
if(this.onSubmit()){
this.formNode.submit();
}
if(evt){
dojo.stopEvent(evt);
}
return false;
},getValue:function(){
return this.textBox.getValue();
},formSubmitted:function(evt){
this.submitForm();
dojo.stopEvent(evt);
},onSubmit:function(){
}});
}
dojo.i18n._preloadLocalizations("lconn.dogear.nls.dogear",["da","es","hu","de","pt-br","pl","pt","ca","sv","ar","pt-pt","fi","zh","ru","xx","fr","zh-tw","it","th","cs","he","nl","el","no","ko","tr","en","ROOT","ja"]);

