
;if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]){
dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]=true;
dojo.provide("com.ibm.mm.enabler.aggregation.javascript");
function com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_1){
eval.call(self,_1);
};
dojo.declare("com.ibm.mm.enabler.aggregation.javascript.Filter",null,{doFilter:function(_2){
},evalGlobal:function(_3){
if(window.execScript){
window.execScript(this._stripHTMLComments(_3),"JavaScript");
}else{
com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_3);
}
},_stripHTMLComments:function(_4){
com.ibm.mm.enabler.debug.entry("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",_4);
var _5="";
var _6=_4.indexOf("<!--");
if(_6!=-1){
_5=_4.substring(0,_6);
}else{
_5=_4;
}
while(_6>=0){
var _7=_4.indexOf("-->");
if(_7<0){
throw new Error("Unclosed HTML comment found!!");
}
_5+=_4.substring(_7+3);
com.ibm.mm.enabler.debug.log("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments","result str = "+_5);
_6=_4.indexOf("<!--",_7+3);
}
com.ibm.mm.enabler.debug.exit("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",_5);
return _5;
},prepareDocumentWrite:function(_8){
com.ibm.mm.enabler.debug.entry("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");
var me=this;
document.write=function(){
me._documentWrite(_8,document.write.arguments);
};
document.writeln=function(_9){
me._documentWrite(_8,document.writeln.arguments);
};
com.ibm.mm.enabler.debug.exit("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");
},_documentWrite:function(_a,_b){
for(var i=0;i<_b.length;i++){
_a.content+=_b[i];
}
},applyDocumentWrite:function(_c,_d){
com.ibm.mm.enabler.debug.entry("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite",_c,_d.content);
var _e=_d.content;
var id=_c.getAttribute("id");
var _f=document.getElementById(id);
if(_e!=null&&_e.length>0){
var div=document.createElement("DIV");
div.innerHTML=_e;
var _10=div.childNodes;
if(_10!=null&&_10.length>0){
var _11=_f;
for(var i=0;i<_10.length;){
var _12=_10[_10.length-1];
dojo.dom.insertBefore(_12,_11);
_11=_12;
}
}
dojo.dom.destroyNode(div);
}
com.ibm.mm.enabler.debug.exit("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite");
}});
dojo.declare("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_13){
var url=this._getScriptUrl(_13);
var _14=false;
if(url){
var _15=com.ibm.mm.enabler.services.CONFIG_SERVICE.getValue(com.ibm.mm.enabler.services.CONFIG_SERVICE.PROXY_URL);
if(_15!=null){
_15+="/";
url=this._rewriteURL(url,_15);
}
var _16={content:""};
this.prepareDocumentWrite(_16);
this._loadExternalScript(url);
this.applyDocumentWrite(_13,_16);
_14=true;
}
return _14;
},_getScriptUrl:function(_17){
var url=null;
if(_17.getAttribute){
url=_17.getAttribute("src");
}else{
var _18=_17.toLowerCase().indexOf("<script");
var end=_17.toLowerCase().indexOf(">");
var _19=_17.substring(_18,end);
var _1a=_19.toLowerCase().indexOf("src");
if(_1a!=-1){
var _1b=_19.indexOf("'",_1a);
var _1c=_19.indexOf("\"",_1a);
var _1d="\"";
var _1e=_1c;
if(_1c==-1||(_1b!=-1&&_1b<_1c)){
_1d="'";
_1e=_1b;
}
var _1f=_19.indexOf(_1d,_1e+1);
url=_19.substring(_1e+1,_1f);
}
}
return url;
},_loadExternalScript:function(url){
var me=this;
dojo.xhrGet({url:url,load:function(_20,_21){
com.ibm.mm.enabler.debug.log("com.ibm.mm.enabler.aggregation.javascript.Filter._loadExternalScript","Retrieved JS file: ",_20);
me.evalGlobal(_20);
},sync:true,handleAs:"text"});
},_rewriteURL:function(_22,_23){
var _24=_23;
var _25=window.location.host;
var _26=window.location.protocol;
if(_22.indexOf("://")<0||_22.indexOf(_26)==0&&_22.indexOf(_25)==_26.length+2){
return _22;
}
var _27=(new com.ibm.mm.enabler.iw.services.loadService)._getExtension(_22);
if(_27!==null&&_27==="css"){
return _22;
}
if(_22.indexOf("https")==0){
_24+="https/";
}else{
_24+="http/";
}
_24+=_22.substr(_22.indexOf("://")+3);
return _24;
}});
dojo.declare("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_28){
var _29=false,_2a="";
if(!dojo.isString(_28)){
_2a=_28.innerHTML;
}else{
var _2b=_2c.indexOf(">");
var _2d=_2c.lastIndexOf("<");
var _2c=_28;
_2a=_2c.substring(_2b+1,_2d);
}
com.ibm.mm.enabler.debug.log("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter.doFilter","Stripped HTML tags out: "+_2a,"processScriptArray");
if(_2a){
var _2e={content:""};
this.prepareDocumentWrite(_2e);
this.evalGlobal(_2a);
_29=true;
this.applyDocumentWrite(_28,_2e);
}
return _29;
}});
dojo.declare("com.ibm.mm.enabler.aggregation.javascript.FilterChain",null,{constructor:function(){
this._filters=new Array();
},addFilter:function(_2f){
if(!this._filters){
this._filters=new Array();
}
this._filters.push(_2f);
},applyFilters:function(_30){
var i=0;
var _31=false;
while(i<this._filters.length&&!_31){
_31=this._filters[i].doFilter(_30);
i=i+1;
}
return _31;
}});
dojo.declare("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler",null,{constructor:function(){
this.filterChain=new com.ibm.mm.enabler.aggregation.javascript.FilterChain();
},handle:function(_32){
com.ibm.mm.enabler.debug.entry("WidgetJavascriptHandler.handle",_32);
var val=this.filterChain.applyFilters(_32);
com.ibm.mm.enabler.debug.exit("WidgetJavascriptHandler.handle");
}});
com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER=new com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler();
com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter());
com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter());
}


;if(!dojo._hasResource["dojox.data.dom"]){
dojo._hasResource["dojox.data.dom"]=true;
dojo.provide("dojox.data.dom");
dojo.require("dojox.xml.parser");
dojo.deprecated("dojox.data.dom","Use dojox.xml.parser instead.","2.0");
dojox.data.dom.createDocument=function(_1,_2){
dojo.deprecated("dojox.data.dom.createDocument()","Use dojox.xml.parser.parse() instead.","2.0");
try{
return dojox.xml.parser.parse(_1,_2);
}
catch(e){
return null;
}
};
dojox.data.dom.textContent=function(_3,_4){
dojo.deprecated("dojox.data.dom.textContent()","Use dojox.xml.parser.textContent() instead.","2.0");
if(arguments.length>1){
return dojox.xml.parser.textContent(_3,_4);
}else{
return dojox.xml.parser.textContent(_3);
}
};
dojox.data.dom.replaceChildren=function(_5,_6){
dojo.deprecated("dojox.data.dom.replaceChildren()","Use dojox.xml.parser.replaceChildren() instead.","2.0");
dojox.xml.parser.replaceChildren(_5,_6);
};
dojox.data.dom.removeChildren=function(_7){
dojo.deprecated("dojox.data.dom.removeChildren()","Use dojox.xml.parser.removeChildren() instead.","2.0");
return dojox.xml.parser.removeChildren(_7);
};
dojox.data.dom.innerXML=function(_8){
dojo.deprecated("dojox.data.dom.innerXML()","Use dojox.xml.parser.innerXML() instead.","2.0");
return dojox.xml.parser.innerXML(_8);
};
}


;if(!dojo._hasResource["com.ibm.mm.enabler.utilities"]){
dojo._hasResource["com.ibm.mm.enabler.utilities"]=true;
dojo.provide("com.ibm.mm.enabler.utilities");
dojo.provide("com.ibm.mm.enabler.ArrayMap");
dojo.require("dojox.data.dom");
com.ibm.mm.enabler.utilities={rewriteURL:function(_1){
var _2=new com.ibm.mm.enabler.utilities.HttpUrl(_1);
return _2.toProxifiedString();
},inStringArray:function(_3,_4){
var rc=false;
for(var i in _4){
var _5=_4[i];
if(_5==_3){
rc=true;
break;
}
}
return rc;
},getLocale:function(_6,_7,_8){
if(typeof _6=="undefined"||_6===null){
return null;
}
var _9=_6.getLocales();
if(typeof _9=="undefined"||_9===null||!dojo.isArray(_9)){
return null;
}
if(_9.length===0){
return null;
}
var _a=null;
if(_9.length===1){
_a=_9[0];
}
var _b={};
for(var i in _9){
var _c=_9[i];
_b[_c]=_c;
}
if(_a===null){
if(typeof _7!="undefined"&&_7!==null){
_a=this.findMatchLocale(_b,_7);
if(_a===null){
var _d=_7.split(/-|_/);
if(_d.length==2){
var _e=_d[0];
if(typeof _b[_e]!="undefined"&&_b[_e]!==null){
_a=_e;
}
}
}
}
}
if(_a===null){
var _f=(dojo.isIE?navigator.userLanguage:navigator.language).toLowerCase();
if(typeof ibmConfig!="undefined"&&ibmConfig!=null&&typeof (ibmConfig.locale)!="undefined"&&ibmConfig.locale!=null){
_f=ibmConfig.locale;
}
if(_f!==null){
_a=this.findMatchLocale(_b,_f);
if(_a===null){
var _d=_f.split(/-|_/);
if(_d.length==2){
var _10=_d[0];
if(typeof _b[_10]!="undefined"&&_b[_10]!==null){
_a=_10;
}
}
}
}
}
if(_a===null){
if(typeof _8!="undefined"&&_8!=null){
_a=_8;
}
}
if(_a===null){
if(typeof _b["en"]!="undefined"&&_b["en"]!==null){
_a="en";
}
}
if(_a===null){
_a=_9[0];
}
return _a;
},findMatchLocale:function(arr,_11){
var _12=null;
if(typeof arr[_11]!="undefined"&&arr[_11]!=null){
_12=_11;
}
var _13=this.toServerLocale(_11);
if(_12===null&&(typeof arr[_13]!="undefined"&&arr[_13]!=null)){
_12=_13;
}
var _14=_13.toLowerCase();
if(_12===null&&(typeof arr[_14]!="undefined"&&arr[_14]!=null)){
_12=_14;
}
return _12;
},toServerLocale:function(_15){
if(typeof _15=="undefined"||_15==null){
return null;
}
if(_15.indexOf("-")<0){
return _15;
}
_15=_15.replace(/-/,"_");
var _16=_15.split("_");
var _17=_16[0];
var _18=_16[1].toUpperCase();
var _19=_17+"_"+_18;
return _19;
},encodeModelID4Uri:function(uri){
var pos=uri.indexOf(":");
if(pos!=-1){
var _1a=uri.slice(0,pos+1);
var end=uri.slice(pos+1);
uri=_1a+encodeURIComponent(end);
}
return encodeURIComponent(uri);
},preloadImage:function(_1b,_1c,_1d){
var _1e;
if(_1c&&_1d){
_1e=new Image(_1c,_1d);
}else{
_1e=new Image();
}
_1e.src=_1b;
return _1e;
}};
com.ibm.mm.enabler.dom={textContent:function(_1f,_20){
if(_1f==null){
return "";
}
if(arguments.length>1){
var doc=_1f.ownerDocument;
var _21=doc.createTextNode(_20);
this.replaceChildren(_1f,_21);
return;
}else{
if(_1f.textContent!="undefined"&&_1f.textContent!=null){
return _1f.textContent;
}
var _22="";
for(var i=0;i<_1f.childNodes.length;i++){
switch(_1f.childNodes[i].nodeType){
case 1:
case 3:
_22+=_1f.childNodes[i].nodeValue;
break;
case 2:
case 4:
_22+=_1f.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _22;
}
},createElement:function(dom,_23,ns){
var _24;
if(dojo.isIE){
if(typeof ns!="undefined"&&ns!=null){
_24=dom.createNode(1,_23,ns);
}else{
_24=dom.createElement(_23);
}
}else{
_24=dom.createElementNS(ns,_23);
}
return _24;
},destroyNode:function(_25){
if(_25&&_25.parentNode){
return _25.parentNode.removeChild(_25);
}
if(_25.nodeType!=3){
if(dojo.isIE){
_25.outerHTML="";
}
}
},createDocument:function(str,_26){
return dojox.data.dom.createDocument(str,_26);
},replaceChildren:function(_27,_28){
return dojox.data.dom.replaceChildren(_27,_28);
},innerXML:function(_29){
return dojox.data.dom.innerXML(_29);
},removeChildren:function(_2a){
return dojox.data.dom.removeChildren(_2a);
},copyChildren:function(_2b,_2c,_2d){
var _2e=_2b.cloneNode(true);
return this.moveChildren(_2e,_2c,_2d);
},moveChildren:function(_2f,_30,_31){
var _32=0;
if(_31){
while(_2f.hasChildNodes()&&_2f.firstChild.nodeType==3){
_2f.removeChild(_2f.firstChild);
}
while(_2f.hasChildNodes()&&_2f.lastChild.nodeType==3){
_2f.removeChild(_2f.lastChild);
}
}
while(_2f.hasChildNodes()){
_30.appendChild(_2f.firstChild);
_32++;
}
return _32;
}};
dojo.declare("com.ibm.mm.enabler.utilities.HttpUrl",null,{constructor:function(_33){
this.scheme=this._extractScheme(_33);
this.server=this._extractServer(_33);
this.port=this._extractPort(_33);
this.path=this._extractPath(_33);
this.query=this._extractQuery(_33);
this.anchor=this._extractAnchor(_33);
},addParameter:function(_34,_35){
this.query+=((this.query!=null&&this.query!="")?"&":"")+_34+"="+_35;
},toProxifiedString:function(){
if(typeof ibmConfig=="undefined"){
return this.toString();
}
var _36=com.ibm.mm.enabler.services.CONFIG_SERVICE.getValue(com.ibm.mm.enabler.services.CONFIG_SERVICE.PROXY_URL);
if(_36==null){
return this.toString();
}
_36+="/";
if(window.location.protocol==this.scheme&&window.location.hostname==this.server){
if(window.location.port==this.port||this.port==""){
return this.toString();
}else{
if(this.scheme=="http:"&&window.location.port==""&&this.port=="80"){
return this.toString();
}else{
if(this.scheme=="https:"&&window.location.port==""&&this.port=="443"){
return this.toString();
}
}
}
}
var _37=(new com.ibm.mm.enabler.iw.services.loadService)._getExtension(this.toString());
if(_37!==null&&_37==="css"){
return this.toString();
}
if(this.scheme=="https:"){
_36+="https/"+this.server+((this.port!="443"&&this.port!="")?"%3A"+this.port:"");
}else{
_36+="http/"+this.server+((this.port!="80"&&this.port!="")?"%3A"+this.port:"");
}
if(this.path!=""){
_36+="/"+this.path;
}
if(this.query!=""){
_36+="?"+this.query;
}
if(this.anchor!=""){
_36+="#"+this.anchor;
}
return _36;
},toString:function(){
var str="";
if(this.server!=""){
str+=this.scheme+"//"+this.server;
if(this.port!=""){
if(this.scheme=="http:"&&this.port=="80"){
str+="";
}else{
if(this.scheme=="https:"&&this.port=="443"){
str+="";
}else{
str+=":"+this.port;
}
}
}
}
if(this.path!=""){
str+="/"+this.path;
}
if(this.query!=""){
str+="?"+this.query;
}
if(this.anchor!=""){
str+="#"+this.anchor;
}
return str;
},_extractScheme:function(_38){
var _39=_38.indexOf("://");
if(_39==-1){
return window.location.protocol;
}
return _38.substring(0,_39+1);
},_extractServer:function(_3a){
var _3b=_3a.indexOf(this.scheme);
var _3c="";
if(_3b==0){
var _3d=_3a.indexOf("/",_3b+this.scheme.length+2);
if(_3d!=-1){
var _3e=_3a.substring(_3b+this.scheme.length+2,_3d);
}else{
var _3e=_3a.substring(_3b+this.scheme.length+2);
}
_3c=_3e.split(":")[0];
}else{
_3c=window.location.hostname;
}
return _3c;
},_extractPort:function(_3f){
var _40=_3f.indexOf(this.server);
var _41="";
if(_40>=0){
var _42=_3f.indexOf("/",_40);
if(_42!=-1){
var _43=_3f.substring(_40,_42);
}else{
var _43=_3f.substring(_40);
}
var _44=_43.split(":");
if(_44.length>1){
_41=_44[1];
}
}
if(_41==""){
if(_3f.indexOf("/")==0){
_41=window.location.port;
}else{
_41="";
}
}
return _41;
},_extractPath:function(_45){
var _46=_45.indexOf(this.scheme);
var _47=0;
if(_46==0){
_47=this.scheme.length+2;
}
var _48="";
var _49=_45.indexOf("/",_47);
var _4a=_45.indexOf("?");
var _4b=_45.lastIndexOf("#");
if(_4a>=0){
_48=_45.substring(_49+1,_4a);
}else{
if(_4b>=0&&_49!=-1){
_48=_45.substring(_49+1,_4b);
}else{
if(_49!=-1){
_48=_45.substring(_49+1);
}
}
}
return _48;
},_extractQuery:function(_4c){
var _4d="";
var _4e=_4c.split("?");
if(_4e.length>1){
_4d=_4e[1].split("#")[0];
}
return _4d;
},_extractAnchor:function(_4f){
var _50="";
var _51=_4f.split("#");
if(_51.length>1){
_50=_51[_51.length-1];
}
return _50;
}});
dojo.declare("com.ibm.mm.enabler.ArrayMap",null,{constructor:function(){
this.entries=[];
this.keys={};
},values:function(){
return this.entries;
},put:function(key,_52){
var _53=this.keys[key];
if(typeof _53!="undefined"&&_53!=null){
this.entries[_53]=_52;
}else{
_53=this.entries.length;
this.entries.push(_52);
this.keys[key]=_53;
}
},getKey:function(_54){
if(_54<this.entries.length){
for(var key in this.keys){
var _55=this.keys[key];
if(_55!=null&&_55==_54){
return _55;
}
}
}else{
return null;
}
},getValue:function(_56){
if(_56<this.entries.length){
return this.entries[_56];
}else{
return null;
}
},get:function(key){
var _57=this.keys[key];
if(typeof _57!="undefined"&&_57!=null){
var _58=this.entries[_57];
return _58;
}
return null;
},remove:function(key){
var _59=this.keys[key];
if(typeof _59!="undefined"&&_59!=null){
this.entries.splice(_59,1);
this.keys[key]=null;
}
return _59;
},size:function(){
return this.entries.length;
},keySet:function(){
var arr=[];
for(var key in this.keys){
arr.push(key);
}
return arr;
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.ItemSet"]){
dojo._hasResource["com.ibm.mm.enabler.iw.ItemSet"]=true;
dojo.provide("com.ibm.mm.enabler.iw.ItemSet");
dojo.declare("com.ibm.mm.enabler.iw.ItemSet",null,{constructor:function(){
},setItemValue:function(_1,_2,_3){
return this;
},getItemValue:function(_4){
return null;
},getAllNames:function(){
return null;
},removeItem:function(_5){
return null;
},clone:function(){
return null;
},isReadOnly:function(_6){
return null;
},getItemSetDescription:function(){
return null;
}});
dojo.declare("com.ibm.mm.enabler.iw.ManagedItemSet",com.ibm.mm.enabler.iw.ItemSet,{constructor:function(){
},save:function(_7){
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.payloadDef"]){
dojo._hasResource["com.ibm.mm.enabler.iw.payloadDef"]=true;
dojo.provide("com.ibm.mm.enabler.iw.payloadDef");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.declare("com.ibm.mm.enabler.iw.payloadDef",null,{constructor:function(_1,_2,_3,_4,_5){
this.name=_1;
this.attributes=_5;
if(typeof (this.attributes)=="undefined"||this.attributes==null){
this.attributes={};
}
if(typeof _2!="undefined"&&_2!=null){
this.attributes["type"]=_2;
}
if(typeof _3!="undefined"&&_3!=null){
this.attributes["defaultValue"]=_3;
}
if(typeof _4!="undefined"&&_4!=null){
this.attributes["description"]=_4;
}
this.attributeNames=[];
this.attributeNames.push("type");
this.attributeNames.push("defaultValue");
this.attributeNames.push("description");
var _6;
for(_6 in _5){
this.attributeNames.push(_6);
}
this.children=new com.ibm.mm.enabler.ArrayMap();
},setAttribute:function(_7,_8){
this.attributes[_7]=_8;
if(typeof (this.attributeNames[_7])!="undefined"){
this.attributeNames.push(_7);
}
},getAttribute:function(_9){
var _a=this.attributes[_9];
if(typeof _a=="undefined"){
_a=null;
}
return _a;
},getAttributeNames:function(){
this.attributeNames;
},getChildren:function(){
return this.children.values();
},getChild:function(_b){
return this.children.get(_b);
},setChild:function(_c,_d){
this.children.put(_c,_d);
},getChildrenNames:function(){
this.children.keySet();
},getName:function(){
return this.name;
},getType:function(){
return this.attributes["type"];
},getDefaultValue:function(){
return this.attributes["defaultValue"];
},getDescription:function(){
return this.attributes["description"];
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.utils"]){
dojo._hasResource["com.ibm.mm.enabler.iw.utils"]=true;
dojo.provide("com.ibm.mm.enabler.iw.utils");
dojo.require("com.ibm.mm.enabler.iw.payloadDef");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.declare("com.ibm.mm.enabler.iw.utils",null,{widgetClassRE:new RegExp("(mm:|mm_|iw-)iWidget"),findElementByAttribute:function(_1,_2,_3,_4,_5){
var _6=_3;
if(!_3.childNodes||_3.childNodes==null){
return false;
}
var _7=_6.childNodes;
for(var i=0;i<_7.length;i++){
var _8=_7[i];
if(_8.nodeType==1){
var _9=_8.className;
if(_9.match(this.widgetClassRE)){
return false;
}
var _a=_8.getAttribute(_1);
if(_1=="class"){
_a=_8.className;
}
if(_2==_a){
_4.push(_8);
if(!_5){
return true;
}
}
var rc=this.findElementByAttribute(_1,_2,_8,_4,_5);
if(!_5&&rc){
return rc;
}
}
}
if(_4.length!=0){
return true;
}
return false;
},getClass:function(_b){
var _c=_b.getAttribute("class");
_c=_c?_c:_b.getAttribute("className");
return _c;
},checkParentElement:function(_d,_e){
if(_d){
var _f=_d.parentNode;
if(_f){
if(_f.className){
if(_f.className.match(_e)){
return _f.id;
}
}
return this.checkParentElement(_f,_e);
}
}
return null;
},getWidgetParent:function(id,_10){
if(id==null){
return null;
}
if(!_10){
_10=this.widgetClassRE;
}
return this.checkParentElement(dojo.byId(id),_10);
},getParents:function(_11,arr){
var _12=_11.getParent();
if(typeof _12!="undefined"&&_12!=null){
arr.push(_12);
this.getParents(_12,arr);
}
return;
},getPayloadDef:function(_13){
var _14=_13.getAttribute("name");
var _15=new com.ibm.mm.enabler.iw.payloadDef(_14);
var _16=_13.attributes;
for(var i=0;i<_16.length;i++){
var _17=_16[i];
if(_17.name!="name"){
_15.setAttribute(_17.name,_17.value);
}
}
var _18=_13.childNodes;
for(var j=0;j<_18.length;j++){
var _19=_18[j];
if(_19.nodeType==1){
var _1a=this.getPayloadDef(_19);
_15.setChild(_1a.name,_1a);
}
}
return _15;
}});
com.ibm.mm.enabler.iw.utils=new com.ibm.mm.enabler.iw.utils();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.event"]){
dojo._hasResource["com.ibm.mm.enabler.iw.event"]=true;
dojo.provide("com.ibm.mm.enabler.iw.event");
dojo.declare("com.ibm.mm.enabler.iw.iEvent",null,{constructor:function(){
},name:"",type:"",payload:null,source:""});
dojo.declare("com.ibm.mm.enabler.iw.iEventDescription",null,{constructor:function(){
},name:"",type:"",aliases:null,handlingFn:"",getDescription:function(_1){
return null;
},setOnRemoveWire:function(_2){
},getOnRemoveWire:function(){
return null;
},setOnNewWire:function(_3){
},getOnNewWire:function(){
return null;
}});
dojo.declare("com.ibm.mm.enabler.iw.iEvents",null,{constructor:function(){
},publishEvent:function(_4,_5,_6){
},fireEvent:function(_7,_8,_9){
}});
dojo.declare("com.ibm.mm.enabler.iw.iEventsConstants",null,{constructor:function(){
},onLoad:"onLoad",onUnLoad:"onUnload",onModeChanged:"onModeChanged",onItemSetChanged:"onItemSetChanged",unloadWidget:"/enabler/unloadWidget",unSubscribeWire:"/enabler/unSubscribeWire",modeChanged:"modeChanged"});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.status"]){
dojo._hasResource["com.ibm.mm.enabler.status"]=true;
dojo.provide("com.ibm.mm.enabler.status");
dojo.declare("com.ibm.mm.enabler.status.StatusType",null,{constructor:function(id,_1,_2,_3){
this._id=id;
this._styleClass=_1;
this._iconPath=_2;
this._color=_3;
}});
dojo.declare("com.ibm.mm.enabler.status.StatusMessage",null,{constructor:function(_4,_5,_6){
this._type=_4;
this._message=_5;
this._details=_6;
},render:function(_7){
var _8=com.ibm.mm.enabler.status.statusTypesMap[this._type];
var _9=document.createElement("div");
_9.className=_8._styleClass;
var _a=document.createElement("h5");
var _b=document.createElement("div");
_b.className="statusHeaderLHS";
var _c=document.createElement("img");
_c.src=_8._iconPath;
_b.appendChild(_c);
_b.appendChild(document.createTextNode(this._message));
_a.appendChild(_b);
_9.appendChild(_a);
var _d=document.createElement("div");
_d.className="details";
_d.appendChild(document.createTextNode(this._details));
_9.appendChild(_d);
_7.appendChild(_9);
}});
dojo.declare("com.ibm.mm.enabler.status.StatusTypesMap",null,{constructor:function(){
this._baseURL=new dojo.moduleUrl("com.ibm.mm.enabler","iw/");
this.error=new com.ibm.mm.enabler.status.StatusType(0,"error",this._baseURL+"error.gif","#FF0000");
this.warn=new com.ibm.mm.enabler.status.StatusType(1,"warning",this._baseURL+"warning.gif","FFFF00");
this.info=new com.ibm.mm.enabler.status.StatusType(2,"info",this._baseURL+"info.gif","#0077FF");
this.constants={"ERROR":"error","WARN":"warn","INFO":"info"};
}});
com.ibm.mm.enabler.status.statusTypesMap=new com.ibm.mm.enabler.status.StatusTypesMap();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.debug"]){
dojo._hasResource["com.ibm.mm.enabler.debug"]=true;
dojo.provide("com.ibm.mm.enabler.debug");
dojo.require("com.ibm.mm.enabler.status");
com.ibm.mm.enabler.debug.Constants={MMLogging:"/mm/logging",MMStatusMsg:"/mm/statusMsg",MMTracing:"/mm/tracing",LOG:"log",INFO:"info",WARN:"warn",ERROR:"error"};
com.ibm.mm.enabler.debug.log=function(_1){
if(com.ibm.mm.enabler.debug.isLogging){
if(arguments.length>1){
arguments[0]=_1+" --> ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
com.ibm.mm.enabler.debug._publishTracing(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
}
};
com.ibm.mm.enabler.debug.entry=function(_2){
if(com.ibm.mm.enabler.debug.isLogging){
if(arguments.length>1){
arguments[0]=_2+" --> Entry ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
com.ibm.mm.enabler.debug._publishTracing(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
}
};
com.ibm.mm.enabler.debug.exit=function(_3){
if(com.ibm.mm.enabler.debug.isLogging){
if(arguments.length>1){
arguments[0]=_3+" --> Exit ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
com.ibm.mm.enabler.debug._publishTracing(com.ibm.mm.enabler.debug.Constants.LOG,arguments);
}
};
com.ibm.mm.enabler.debug.escapeXmlForHTMLDisplay=function(_4){
_4=_4.replace(/</g,"&lt;");
_4=_4.replace(/>/g,"&gt;");
return _4;
};
com.ibm.mm.enabler.debug.info=function(_5){
try{
if(arguments.length>1){
arguments[0]=_5+" --> ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.INFO,arguments);
com.ibm.mm.enabler.debug._publishLogging(com.ibm.mm.enabler.debug.Constants.INFO,arguments);
}
catch(e){
}
};
com.ibm.mm.enabler.debug.warn=function(_6){
if(arguments.length>1){
arguments[0]=_6+" --> ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.WARN,arguments);
com.ibm.mm.enabler.debug._publishLogging(com.ibm.mm.enabler.debug.Constants.WARN,arguments);
};
com.ibm.mm.enabler.debug.error=function(_7){
if(arguments.length>1){
arguments[0]=_7+" --> ";
}
com.ibm.mm.enabler.debug._log(com.ibm.mm.enabler.debug.Constants.ERROR,arguments);
com.ibm.mm.enabler.debug._publishLogging(com.ibm.mm.enabler.debug.Constants.ERROR,arguments);
};
com.ibm.mm.enabler.debug._log=function(_8,_9){
if(com.ibm.mm.enabler.debug.isLogging){
if(_9.length>=2&&dojo.isString(_9[1])){
var _a=[];
_a.push(_9[0]+_9[1]);
for(var i=2;i<_9.length;i++){
_a.push(_9[i]);
}
console[_8].apply(window.console,_a);
}else{
console[_8].apply(window.console,_9);
}
}
};
com.ibm.mm.enabler.debug._publishTracing=function(_b,_c){
if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishTracing===true){
var _d={};
_d.type=_b;
_d.args=_c;
var _e=[];
_e[0]=_d;
dojo.publish(com.ibm.mm.enabler.debug.Constants.MMTracing,_e);
}
};
com.ibm.mm.enabler.debug._publishLogging=function(_f,_10){
if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishLogging===true){
var _11={};
_11.type=_f;
_11.args=_10;
var _12=[];
_12[0]=_11;
dojo.publish(com.ibm.mm.enabler.debug.Constants.MMLogging,_12);
}
};
if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.isDebug===true){
com.ibm.mm.enabler.debug.isLogging=true;
}else{
com.ibm.mm.enabler.debug.isLogging=false;
}
com.ibm.mm.enabler.debug.logInlineMessage=function(_13,_14,_15,_16,_17){
var _18=new com.ibm.mm.enabler.status.StatusMessage(_14,_15,_16);
if(_13){
_18.render(_13);
}
com.ibm.mm.enabler.debug._publishStatusMsg(_14,_15,_16,_17);
};
com.ibm.mm.enabler.debug._publishStatusMsg=function(_19,_1a,_1b,_1c,_1d){
if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishStatusMsg===true){
var _1e={};
_1e.type=_19;
_1e.args=_1c;
_1e.message=_1a;
_1e.details=_1b;
_1e.component=_1d;
var _1f=[];
_1f[0]=_1e;
dojo.publish(com.ibm.mm.enabler.debug.Constants.MMStatusMsg,_1f);
}
};
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.io"]){
dojo._hasResource["com.ibm.mm.enabler.iw.io"]=true;
dojo.provide("com.ibm.mm.enabler.iw.io");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.require("com.ibm.mm.enabler.debug");
dojo.declare("com.ibm.mm.enabler.iw.io",null,{constructor:function(id){
this.id=id;
var _1=iWidgetContainer.getWidgetById(this.id);
var _2=_1.getWidgetInstance().widgetXMLUrl;
this.widgetBaseUri=_2.substring(0,_2.lastIndexOf("/")+1);
this.widgetBaseUriXhr=com.ibm.mm.enabler.utilities.rewriteURL(this.widgetBaseUri);
if(this.widgetBaseUri.indexOf("://")!=-1){
var _3=this.widgetBaseUri.indexOf("://");
var _4=this.widgetBaseUri.indexOf("/",_3+3);
this.serverRoot=this.widgetBaseUri.substring(0,_4);
this.serverRootXhr=com.ibm.mm.enabler.utilities.rewriteURL(this.serverRoot);
}
},rewriteURI:function(_5,_6){
com.ibm.mm.enabler.debug.entry("com.ibm.mm.enabler.iw.io.rewriteURI",_5+" isXhr:"+_6);
if(typeof _6=="undefined"){
_6=true;
}
var _7=_5;
if(_6){
if(_5.indexOf("://")!=-1){
_7=com.ibm.mm.enabler.utilities.rewriteURL(_5);
}else{
if(_5.indexOf("/")==0){
if(typeof (this.serverRootXhr)!="undefined"){
_7=this.serverRootXhr+_5;
}
}else{
if(typeof (this.widgetBaseUriXhr)!="undefined"){
_7=this.widgetBaseUriXhr+_5;
}
}
}
}else{
if(_5.indexOf("://")==-1){
if(_5.indexOf("/")==0){
if(typeof (this.serverRootXhr)!="undefined"){
_7=this.serverRoot+_5;
}
}else{
if(typeof (this.widgetBaseUri)!="undefined"){
_7=this.widgetBaseUri+_5;
}
}
}
}
com.ibm.mm.enabler.debug.exit("com.ibm.mm.enabler.iw.io.rewriteURI",_7);
return _7;
},getWebAppRootPath:function(){
var _8="/";
if(typeof (this.widgetBaseUri)!="undefined"){
_8=this.widgetBaseUri;
if(_8.length>0){
if(_8.indexOf("://")>0){
var _9=_8.split("/");
if(_9.length>=4){
_8=_9[0]+"//"+_9[2]+"/"+_9[3]+"/";
}else{
_8="/";
}
}
}
}
return _8;
},request:function(_a,_b,_c,_d,_e){
var _f=dojo._xhrObj();
var _10=this.rewriteURI(_b);
var _11=false;
if(_c){
_f.onreadystatechange=_c;
_11=true;
}
var _12=_a;
if(typeof _a=="undefined"||_a==null){
_12=this.httpmethods.GET;
}
if(typeof _a!="undefined"&&_a!=null){
if(!this.httpmethods[_a]){
_12=this.httpmethods.GET;
}
}
_f.open(_12,_10,_11);
console.debug(_12+" "+_10);
var _13="application/x-www-form-urlencoded";
if(_e){
for(var i=0;i<_e.length;i++){
var _14=_e[i];
var _15=_14[_15];
var _16=_14[_16];
if(_15=="Content-Type"){
var _17=_16;
}else{
_f.setRequestHeader(_15,_16);
}
}
}
_f.setRequestHeader("Content-Type",(_17||_13));
if(_12==this.httpmethods.PUT||_12==this.httpmethods.POST){
if(_d){
_f.send(_d);
}
}else{
_f.send(null);
}
return _f;
},httpmethods:{GET:"GET",PUT:"PUT",POST:"POST",DELETE:"DELETE",HEAD:"HEAD",OPTIONS:"OPTIONS"}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.iContext"]){
dojo._hasResource["com.ibm.mm.enabler.iw.iContext"]=true;
dojo.provide("com.ibm.mm.enabler.iw.iContext");
dojo.declare("com.ibm.mm.enabler.iw.iContext",null,{constructor:function(){
},constants:{mode:{VIEW:"view",EDIT:"edit",HELP:"help"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",keys:{SHIFT:1,ALT:2,CTRL:4,META:8,CAPSLOCK:16}},getRootElement:function(){
return null;
},getElementById:function(id,_1){
return null;
},getiWidgetAttributes:function(){
return {};
},getItemSet:function(_2,_3){
return null;
},requires:function(_4,_5,_6,cb,_7){
},iScope:function(){
return null;
},processMarkup:function(_8){
return null;
},processiWidgets:function(_9){
},getElementByClass:function(_a,_b){
return null;
},getUserProfile:function(){
return null;
},getiDescriptor:function(){
return null;
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.iContextImpl"]){
dojo._hasResource["com.ibm.mm.enabler.iw.iContextImpl"]=true;
dojo.provide("com.ibm.mm.enabler.iw.iContextImpl");
dojo.require("com.ibm.mm.enabler.iw.ItemSet");
dojo.require("com.ibm.mm.enabler.iw.utils");
dojo.require("com.ibm.mm.enabler.iw.event");
dojo.require("com.ibm.mm.enabler.iw.io");
dojo.require("com.ibm.mm.enabler.iw.iContext");
dojo.declare("com.ibm.mm.enabler.iw.iContextImpl",com.ibm.mm.enabler.iw.iContext,{constructor:function(id){
this.widgetId=id;
this.scope={};
this.iEvents=new com.ibm.mm.enabler.iw.iEventsImpl(this.widgetId);
this.io=new com.ibm.mm.enabler.iw.io(this.widgetId);
this.rootElement=document.getElementById(id);
this.ns=this.rootElement.className.substr(0,3);
this._mm=new com.ibm.mm.enabler.iw.iContextImpl.mmExtension(this.widgetId);
},getRootElement:function(){
return this.rootElement;
},getElementById:function(id,_1){
com.ibm.mm.enabler.debug.entry("iContext.getElementById ","id:"+id+" root:"+_1);
if(!_1){
_1=this._getContentRoot();
}
var _2=[];
var rc=com.ibm.mm.enabler.iw.utils.findElementByAttribute("id",id,_1,_2,false);
com.ibm.mm.enabler.debug.log("iContext.getElementById","found:"+rc);
if(rc){
return _2[0];
}else{
return null;
}
},getiWidgetAttributes:function(){
var _3=iWidgetContainer.getWidgetById(this.widgetId);
var _4=_3.getWidgetAttributes();
return _4;
},getItemSet:function(_5){
com.ibm.mm.enabler.debug.entry("iContext.getItemSet","name:"+_5);
if(typeof _5=="undefined"||_5==null){
return null;
}
if(_5==iwConstants.ATTRIBUTES){
return this.getiWidgetAttributes();
}
if(_5==iwConstants.USERPROFILE){
return this.getUserProfile();
}
if(_5==iwConstants.IDESCRIPTOR){
return this.getiDescriptor();
}
var _6=iWidgetContainer.getWidgetById(this.widgetId);
var _7=_6.getWidgetItemSet(_5);
if(typeof _7=="undefined"||_7==null){
_7=new com.ibm.mm.enabler.iw.DefaultItemSetImpl();
}
com.ibm.mm.enabler.debug.exit("iContext.getItemSet","object:"+_7);
return _7;
},requires:function(_8,_9,_a,cb,_b){
if(typeof _b=="undefined"||_b==null){
_b="text/plain";
}
if(typeof _a!="undefined"&&_a!=null){
serviceManager.getService("loadService").loadResource(this.widgetId,_8,_a,cb,_b);
}
},iScope:function(){
return this.scope;
},processMarkup:function(_c){
var _d=_c.replace(/_IWID_/g,"_"+this.widgetId+"_");
var _e=_d.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.widgetId+"_iContext");
return _e;
},processiWidgets:function(_f){
dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[_f,true]);
},getElementByClass:function(_10,_11){
if(!_11){
_11=this._getContentRoot();
}
var _12=[];
var rc=com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",_10,_11,_12,true);
com.ibm.mm.enabler.debug.log("iContext.getElementByClass","found:"+rc);
if(rc){
return _12;
}else{
return null;
}
},_getWidgetBaseUri:function(){
var _13=iWidgetContainer.getWidgetById(this.widgetId);
var _14=_13.getWidgetInstance().widgetXMLUrl;
return _14.substring(0,_14.lastIndexOf("/")+1);
},_getContentRoot:function(){
var _15=this.rootElement;
var _16=iWidgetContainer.getWidgetById(this.widgetId);
if(_16){
var _17=_16.currentMode;
}
if(!_17){
_17="view";
}
var _18=_16.windowManager[_17];
if(typeof _18!="undefined"&&_18!=null){
var _19=_18.root;
if(typeof _19!="undefined"||_19!=null){
_15=_19;
}
}
com.ibm.mm.enabler.debug.exit("iContext._getContentRoot",_15);
return _15;
},getUserProfile:function(){
var _1a=com.ibm.mashups.enabler.model.Factory.getUserModel();
var _1b=_1a.findCurrentUser();
var _1c=null;
if(typeof _1b!="undefined"&&_1b!=null){
_1c=new com.ibm.mm.enabler.iw.UserProfile(this.widgetId,_1b);
}
return _1c;
},getiDescriptor:function(){
var _1d=iWidgetContainer.getWidgetById(this.widgetId);
var _1e=_1d.getIDescriptor();
return _1e;
}});
dojo.declare("com.ibm.mm.enabler.iw.iContextImpl.mmExtension",null,{constructor:function(id){
this.widgetId=id;
},getSupportedModes:function(){
var _1f=iWidgetContainer.getWidgetById(this.widgetId);
var _20=_1f.widgetDef.getSupportedModes();
return _20;
},getPayloadDef:function(_21){
if(typeof this.widget=="undefined"||this.widget==null){
this.widget=iWidgetContainer.getWidgetById(this.widgetId);
}
var _22=this.widget.widgetDef.payloadDefs;
var _23=_22[_21];
if(typeof _23=="undefined"){
return null;
}
return _23;
},getPayloadDefNames:function(){
if(typeof this.widget=="undefined"||this.widget==null){
this.widget=iWidgetContainer.getWidgetById(this.widgetId);
}
var _24=this.widget.widgetDef.payloadDefs;
var arr=[];
var a;
for(a in _24){
arr.push(a);
}
return arr;
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.ItemSetImpl"]){
dojo._hasResource["com.ibm.mm.enabler.iw.ItemSetImpl"]=true;
dojo.provide("com.ibm.mm.enabler.iw.ItemSetImpl");
dojo.require("com.ibm.mm.enabler.iw.ItemSet");
dojo.declare("com.ibm.mm.enabler.iw.Item",null,{constructor:function(_1,_2,_3,_4){
this.name=_1;
this.value=_2;
this.descriptionId=_4;
if(typeof _3=="undefined"||_3==null){
this.isReadOnly=false;
}else{
this.isReadOnly=_3;
}
}});
dojo.declare("com.ibm.mm.enabler.iw.DefaultItemSetImpl",com.ibm.mm.enabler.iw.ItemSet,{constructor:function(_5,_6,_7,_8,_9){
if(_5){
this.parent=_5.id;
this.scope=_5.iScope;
}
this.name=_6;
this.onItemSetChanged=_7;
this.description=_8;
this.isPrivate=_9;
this.items={};
this.listeners={};
if(_7){
this.listeners[_7]=_7;
}
this._debug=com.ibm.mm.enabler.debug;
},addListener:function(fn){
this.listeners[fn.toString()]=fn;
},removeListener:function(fn){
if(this.listeners[fn.toString()]){
this.listeners[fn.toString()]=null;
}
},setItemValue:function(_a,_b,_c){
this._debug.log("ItemSet.setItemValue ","itemName:"+_a,"value:"+_b,"readOnly:"+_c);
if(typeof _b=="undefined"){
return null;
}
var _d=false;
if(!(typeof _c=="undefined"||_c==null)){
_d=_c;
}
this._debug.log("ManagedItemSet.setItemValue","creating new Item ("+"itemName:"+_a+" value:"+_b+" readOnly:"+_c+")");
var _e=new com.ibm.mm.enabler.iw.Item(_a,_b,_d);
if(this.items[_a]){
this._debug.log("ManagedItemSet.setItemValue","Itemset readOnly is "+this.items[_a].isReadOnly);
if(this.items[_a].isReadOnly=="true"){
return null;
}else{
var _f={itemSetName:this.name,changeType:"changedValue"};
_f.old=this.items[_a].value;
_f["new"]=_b;
var _10=new com.ibm.mm.enabler.iw.iEventImpl("onItemSetChanged",null,_f);
this.items[_a]=_e;
this._handleOnItemSetChanged(_10);
}
}else{
var _f={itemSetName:this.name,changeType:"newItem"};
_f["new"]=_b;
var _10=new com.ibm.mm.enabler.iw.iEventImpl("onItemSetChanged",null,_f);
this.items[_a]=_e;
this._handleOnItemSetChanged(_10);
}
return this;
},getItemValue:function(_11){
var _12=this.items[_11];
if(typeof _12=="undefined"||_12==null){
return null;
}
var _13=this.items[_11].value;
if(typeof _13=="undefined"||_13==null){
return null;
}
return _13;
},getAllNames:function(){
if(typeof this.items=="undefined"||this.items==null){
return null;
}
var _14=new Array();
var _15;
var i=0;
for(_15 in this.items){
_14.push(_15);
i=i+1;
}
if(i==0){
return null;
}
return _14;
},removeItem:function(_16){
if(this.items[_16]){
if(this.items[_16].isReadOnly&&this.items[_16].isReadOnly=="true"){
return null;
}else{
if(this.items[_16]==null){
return null;
}
}
}
var _17={itemSetName:this.name,changeType:"removedItem"};
_17.old=this.items[_16].value;
var _18=new com.ibm.mm.enabler.iw.iEventImpl("onItemSetChanged",null,_17);
this.items[_16]=null;
this._handleOnItemSetChanged(_18);
return this;
},clone:function(){
var _19=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(null,this.name);
var arr=this.items;
var _1a;
for(_1a in arr){
var _1b=new com.ibm.mm.enabler.iw.Item();
_1b=dojo.mixin(_1b,this.items[_1a]);
_19.items[_1b.name]=_1b;
}
return _19;
},isReadOnly:function(_1c){
this._debug.entry("ManagedItemSet.isReadOnly","itemName:"+_1c);
var _1d=this.items[_1c];
if(typeof _1d=="undefined"||_1d==null){
return false;
}
return _1d.isReadOnly;
},getItemSetDescription:function(){
return null;
},_handleOnItemSetChanged:function(_1e){
for(var i=0;i<this.listeners;i++){
var fn=this.listeners[i];
if(fn!=null&&this.scope){
dojo.hitch(this.scope,fn)(_1e);
}
}
}});
dojo.declare("com.ibm.mm.enabler.iw.iDescriptor",com.ibm.mm.enabler.iw.ManagedItemSet,{constructor:function(_1f,_20,_21){
this.widgetId=_1f;
this.defiDescriptorItems=_20;
this.instanceiDescriptorItems=_21;
},getItemValue:function(_22){
var _23=null;
if(typeof _22!="undefined"&&_22!=null&&_22==iwConstants.iDescriptorItems.mode){
var _24=this._getWidgetWrapper();
if(_24!=null){
_23=_24.currentMode;
}
}else{
_23=this._getItemValue(_22);
}
return _23;
},_getItemValue:function(_25){
if(this.defiDescriptorItems!=null){
var _26=this.defiDescriptorItems[_25];
}
if(this.instanceiDescriptorItems!=null){
var _27=this.instanceiDescriptorItems[_25].defaultValue;
}
if(typeof _27!="undefined"||_27!=null){
return _27;
}
if(typeof _26=="undefined"){
_26=null;
}
return _26;
},setItemValue:function(_28,_29,_2a){
return null;
},isReadOnly:function(_2b){
return true;
},_getWidgetWrapper:function(){
if(this.widgetId){
var _2c=iWidgetContainer.widgetArr[this.widgetId];
if(_2c&&_2c!=null){
return _2c;
}
}
return null;
},removeItem:function(_2d){
return null;
},getAllNames:function(){
var arr={};
if(this.defiDescriptorItems!=null){
for(var i in this.defiDescriptorItems){
arr[i]=true;
}
}
if(this.instanceiDescriptorItems!=null){
for(var j in this.instanceiDescriptorItems){
arr[j]=true;
}
}
var _2e=[];
for(var _2f in arr){
_2e.push(_2f);
}
return _2e;
},save:function(cb){
return null;
},getItemSetDescription:function(){
return null;
}});
dojo.declare("com.ibm.mm.enabler.iw.InternalPersistentAttributesToPreferenceModelAdapter",com.ibm.mm.enabler.iw.ManagedItemSet,{constructor:function(_30,_31){
this.xmlItems={};
this.microformatItems={};
this.serverless=(_31==true);
this.modes=com.ibm.mm.enabler.iw.ItemSet._internalIbmModes;
this.widget=_30;
},setItemValue:function(_32,_33,_34,_35){
_33=_33?_33:"";
_33=""+_33;
if(typeof _34=="string"){
_34=(_34.toLowerCase()=="true");
}else{
_34=(_34==true);
}
if(this.serverless){
var _36=this._getMode(_35);
if(_36!=this.modes.xml&&_36!=this.modes.microformat){
return null;
}
var _37=this.xmlItems[_32];
if(_37&&_37.readOnly){
return null;
}
if(_36==this.modes.xml){
this.xmlItems[_32]={value:_33,readOnly:_34};
return this;
}
var _38=this.microformatItems[_32];
if(_38&&_38.readOnly){
return null;
}
this.microformatItems[_32]={value:_33,readOnly:_34};
return (this);
}
return null;
},getItemValue:function(_39,_3a,_3b){
if(this.serverless){
var _3c=this._getMode(_3a);
if(_3c!=this.modes.xml&&_3c!=this.modes.microformat){
return null;
}
if(_3b==undefined){
_3b=true;
}
var _3d=this.xmlItems[_39];
var _3e=this.microformatItems[_39];
if(_3c==this.modes.xml){
if(!_3d){
return null;
}
return _3d.value;
}
if(_3b&&_3d&&(_3d.readOnly||(!_3e))){
return _3d.value;
}
if(!_3e){
return null;
}
var _3f=_3e.value;
return _3f;
}
return null;
},getAllNames:function(_40,_41){
if(this.serverless){
var _42=this._getMode(_40);
if(_42!=this.modes.xml&&_42!=this.modes.microformat){
return null;
}
if(_41==undefined){
_41=true;
}
if(!_41){
if(_42==this.modes.xml){
return this._getNamesArray(this.xmlItems);
}
return this._getNamesArray(this.microformatItems);
}
var _43={};
var _44;
for(_44 in this.xmlItems){
_43[_44]=true;
}
for(_44 in this.microformatItems){
_43[_44]=true;
}
return this._getNamesArray(_43);
}
return null;
},removeItem:function(_45,_46){
if(this.serverless){
var _47=this._getMode(_46);
if(_47!=this.modes.microformat){
return null;
}
if(this.microformatItems[_45]){
delete this.microformatItems[_45];
}
return this;
}
return null;
},clone:function(){
return null;
},isReadOnly:function(_48,_49,_4a){
if(this.serverless){
var _4b=this._getMode(_49);
if(_4b!=this.modes.xml&&_4b!=this.modes.microformat){
return false;
}
if(_4a==undefined){
_4a=true;
}
var _4c=this.xmlItems[_48];
var _4d=this.microformatItems[_48];
if(_4b==this.mode.xml){
if(!_4c){
return false;
}
return _4c.readOnly;
}
if(_4a&&_4c&&(_4c.readOnly||(!_4d))){
return _4c.readOnly;
}
if(!_4d){
return false;
}
return _4d.readOnly;
}
return null;
},save:function(_4e){
if(this.serverless){
this._saveMicroformat();
}else{
return null;
}
this.reload();
if(_4e){
_4e();
}
return (this);
},reload:function(){
if(this.serverless){
return this;
}
return null;
},_getNamesArray:function(_4f){
var i=0;
var _50=new Array();
var _51;
for(_51 in _4f){
_50.push(_51);
i++;
}
if(i==0){
return null;
}
return _50;
},_saveMicroformat:function(){
var _52;
var i;
var ns=this.widget.ns;
var _53=this.widget.rootElement;
_52=dojo.query("span."+ns+"ItemSet[title=\""+iwConstants.ATTRIBUTES+"\"]",_53);
for(i=0;i<_52.length;i++){
var _54=_52[i];
if(_53==_54.parentNode){
_53.removeChild(_54);
}
}
var _55=document.createElement("span");
_55.className=ns+"ItemSet";
_55.title=iwConstants.ATTRIBUTES;
_55.style.display="none";
_55.style.visibility="hidden";
_53.appendChild(_55);
var _56=this.getAllNames(this.modes.microformat,false);
if(!_56){
return;
}
for(i=0;i<_56.length;i++){
var _57=_56[i];
var _58=this.getItemValue(_57,this.modes.microformat,false);
var _59=document.createElement("a");
_59.className=ns+"Item";
_59.style.visibility="hidden";
_59.style.display="none";
_59.href="#"+_57;
_59.appendChild(document.createTextNode(_58));
_55.appendChild(_59);
}
},_setMode:function(_5a){
this._mode=_5a;
},_getMode:function(_5b){
if(_5b){
return _5b;
}
if(!this._mode){
this._mode=this.modes.microformat;
}
return this._mode;
}});
dojo.declare("com.ibm.mm.enabler.iw.PersistentAttributes",com.ibm.mm.enabler.iw.ManagedItemSet,{constructor:function(_5c,_5d,_5e){
this._internalPersistentAttributesToPreferenceModelAdapter=new com.ibm.mm.enabler.iw.InternalPersistentAttributesToPreferenceModelAdapter(_5c,_5d,_5e);
},setItemValue:function(_5f,_60,_61){
return this._internal().setItemValue(_5f,_60,_61);
},getItemValue:function(_62){
return this._internal().getItemValue(_62);
},getAllNames:function(){
return this._internal().getAllNames();
},removeItem:function(_63){
return this._internal().removeItem(_63);
},clone:function(){
return this._internal().clone();
},isReadOnly:function(_64,_65,_66){
return this._internal().isReadOnly(_64);
},save:function(_67){
return this._internal().save(_67);
},_internal:function(){
return this._internalPersistentAttributesToPreferenceModelAdapter;
}});
com.ibm.mm.enabler.iw.ItemSet._internalIbmModes={view:"view",edit:"edit",edit_default:"edit_default",microformat:"com.ibm.microformat",configure:"configure",xml:"com.ibm.xml",help:"help"};
dojo.declare("com.ibm.mm.enabler.iw.UserProfile",com.ibm.mm.enabler.iw.ManagedItemSet,{constructor:function(_68,_69){
this.widgetId=_68;
this.user=_69;
},getItemValue:function(_6a){
var _6b=this.user.getAttribute(_6a);
if(typeof _6b=="undefined"){
_6b=null;
}
return _6b;
},setItemValue:function(_6c,_6d,_6e){
return null;
},isReadOnly:function(_6f){
return true;
},removeItem:function(_70){
return null;
},getAllNames:function(){
return this.user.getAttributeNames();
},save:function(cb){
return null;
},getItemSetDescription:function(){
return null;
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.eventImpl"]){
dojo._hasResource["com.ibm.mm.enabler.iw.eventImpl"]=true;
dojo.provide("com.ibm.mm.enabler.iw.eventImpl");
dojo.require("com.ibm.mm.enabler.iw.event");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.declare("com.ibm.mm.enabler.iw.iEventImpl",com.ibm.mm.enabler.iw.iEvent,{constructor:function(_1,_2,_3,_4){
this.name=_1;
if(typeof _2!="undefined"){
this.type=_2;
}else{
this.type=null;
}
if(typeof _3!="undefined"){
this.payload=_3;
}else{
this.payload=null;
}
if(typeof _4!="undefined"){
this.source=_4;
}else{
this.source=null;
}
this.source=_4;
}});
dojo.declare("com.ibm.mm.enabler.iw.iEventDescriptionImpl",com.ibm.mm.enabler.iw.iEventDescription,{constructor:function(_5,_6,_7,_8,_9,_a,_b){
this.name=_5;
if(typeof _7!="undefined"){
this.type=_7;
}else{
this.type=null;
}
if(typeof _8!="undefined"){
this.description=_8;
}else{
this.description=null;
}
if(typeof _9!="undefined"){
this.aliases=_9;
}else{
this.aliases=null;
}
if(typeof _6!="undefined"){
this.handlingFn=_6;
}else{
this.handlingFn=null;
}
this.lang=_a;
this.descriptions=_b;
},getDescription:function(_c){
return this._getLocalizedAttribute("description",_c);
},getTitle:function(_d){
return this._getLocalizedAttribute("title",_d);
},_getLocalizedAttribute:function(_e,_f){
var _10=null,_11=null;
var _12=com.ibm.mm.enabler.utilities.getLocale(this,_f,this.lang);
if(typeof this.descriptions!="undefined"&&this.descriptions!=null){
_11=this.descriptions[_12];
if(typeof _11!="undefined"&&_11!=null){
_10=_11[_e];
}
}
if(typeof _10=="undefined"||_10==null){
_10=this[_e];
}
if(typeof _10=="undefined"){
_10=null;
}
return _10;
},setOnRemoveWire:function(_13){
if(typeof _13=="undefined"||_13===null){
_13="onRemoveWire";
}
this.onRemoveWire=_13;
},getOnRemoveWire:function(){
if(this.onRemoveWire){
return this.onRemoveWire;
}
return null;
},setOnNewWire:function(_14){
if(typeof _14=="undefined"||_14===null){
_14="onNewWire";
}
this.onNewWire=_14;
},getOnNewWire:function(){
if(this.onNewWire){
return this.onNewWire;
}
return null;
},getLocales:function(){
var _15=[];
if(typeof this.descriptions!="undefined"&&this.descriptions!=null){
for(var i in this.descriptions){
_15.push(i);
}
}
return _15;
}});
dojo.declare("com.ibm.mm.enabler.iw.iEventsImpl",com.ibm.mm.enabler.iw.iEvents,{constructor:function(id){
this.id=id;
},publishEvent:function(_16,_17,_18){
var _19=iWidgetContainer.getWidgetById(this.id);
var _1a=new com.ibm.mm.enabler.iw.iEventImpl(_16,_18,_17,null);
var _1b=_19.handleEvent(_16,_1a);
if(!_1b){
iWidgetContainer.eventService.publishWire(this.id,_16,_17,_18);
}
},fireEvent:function(_1c,_1d,_1e){
var _1f=iWidgetContainer.getWidgetById(this.id);
var _20=new com.ibm.mm.enabler.iw.iEventImpl(_1c,_1d,_1e,null);
var _21=_1f.handleEvent(_1c,_20);
if(!_21){
serviceManager.getService("eventService").publishWire(this.id,_1c,_1e,_1d);
}
},addWire:function(_22,_23,_24){
iWidgetContainer.eventService.addWire(this.id,_22,_23,_24);
}});
dojo.declare("com.ibm.mm.enabler.iw.eventHolder",null,{constructor:function(id,_25){
this.targetId=id;
this.data=_25;
},handleLoaded:function(){
if(this.handler){
dojo.unsubscribe(this.handler);
}
dojo.publish("/enabler/eventService/"+this.targetId,this.data);
}});
com.ibm.mm.enabler.iw.iEvents.Constants=new com.ibm.mm.enabler.iw.iEventsConstants();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigService"]){
dojo._hasResource["com.ibm.mm.enabler.services.ConfigService"]=true;
dojo.provide("com.ibm.mm.enabler.services.ConfigService");
dojo.require("com.ibm.mm.enabler.debug");
dojo.declare("com.ibm.mm.enabler.services.ConfigService",null,{PROXY_URL:"com.ibm.mashups.proxy.url",HUB_URL:"com.ibm.mashups.hub.url",CONTEXT_ROOT_MAIN:"com.ibm.mashups.contextroot",CONTEXT_ROOT_THEME_TEMP:"com.ibm.mashups.contextroot.theme.temp",CONTEXT_ROOT_BUILDER:"com.ibm.mashups.contextroot.builder",CONTEXT_ROOT_ENABLER:"com.ibm.mashups.contextroot.enabler",CONTENTHANDLER_PUBLIC:"com.ibm.mashups.contenthandler.public",CONTENTHANDLER_PRIVATE:"com.ibm.mashups.contenthandler.private",THEMES_FEEDS_EXPIRATION:"themes.feed.expiration",AVAILABLE_LOCALES:"available.locales",TUNNEL_MODE:"tunnel.mode",CLIENT_IS_DEBUG:"isDebug",CLIENT_ALLOW_PUBLISH_LOGGING:"allowPublishLogging",CLIENT_ALLOW_PUBLISH_TRACING:"allowPublishTracing",CLIENT_LOAD_SERVICES:"loadServices",CLIENT_POPUP_CONSOLE:"popupConsole",CLIENT_DEFAULT_THEME_ID:"com.ibm.mashups.theme.defaultThemeId",CLIENT_PAGE_SOURCE_READ_ONLY:"pageSourceReadOnly",CLIENT_AUTO_ACCEPT_SHARED_GROUPNAME:"autoAcceptSharedGroupName",CLIENT_USER_ID_KEY:"userIdKey",CLIENT_GROUP_CN_KEY:"groupCNKey",getPreferenceValue:function(_1){
return this.getValue(_1);
},getValue:function(_2){
com.ibm.mm.enabler.debug.entry("ConfigService.getValue",_2);
var _3=ibmConfig[_2];
com.ibm.mm.enabler.debug.exit("ConfigService.getValue",_3);
return _3;
}});
com.ibm.mm.enabler.services.CONFIG_SERVICE=new com.ibm.mm.enabler.services.ConfigService();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.widget"]){
dojo._hasResource["com.ibm.mm.enabler.iw.widget"]=true;
dojo.provide("com.ibm.mm.enabler.iw.widget");
dojo.declare("com.ibm.mm.enabler.iw.iWidgetWrapper",null,{constructor:function(id){
},getiWidgetMetadata:function(){
},getInstanceAttributes:function(){
}});
dojo.declare("com.ibm.mm.enabler.iw.iWidgetMetadata",null,{CONSTANTS:{"title":"title","icon":"icon"},constructor:function(id){
},getItemValue:function(_1){
},setItemValue:function(_2,_3){
},save:function(){
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.widgetImpl"]){
dojo._hasResource["com.ibm.mm.enabler.iw.widgetImpl"]=true;
dojo.provide("com.ibm.mm.enabler.iw.widgetImpl");
dojo.require("com.ibm.mm.enabler.iw.widget");
dojo.declare("com.ibm.mm.enabler.iw.iWidgetWrapperImpl",com.ibm.mm.enabler.iw.iWidgetWrapper,{constructor:function(id){
this.id=id;
},getiWidgetMetadata:function(){
return new com.ibm.mm.enabler.iw.iWidgetMetadataImpl(this.id);
},getInstanceAttributes:function(){
var _1=iWidgetContainer.getWidgetById(this.id);
if(typeof _1=="undefined"||_1===null){
return null;
}
_1.getWidgetInstance().loadItemSets();
var _2=_1.getWidgetInstance().getWidgetAttributes();
var _3=new com.ibm.mm.enabler.iw.DefaultItemSetImpl();
for(var j in _2){
var _4=j;
var _5=_2[_4]["defaultValue"];
_3.setItemValue(_4,_5,false);
}
return _3;
}});
dojo.declare("com.ibm.mm.enabler.iw.iWidgetMetadataImpl",com.ibm.mm.enabler.iw.iWidgetMetadata,{constructor:function(id){
this._id=id;
this._items={};
this._debug=com.ibm.mm.enabler.debug;
},getItemValue:function(_6){
if(typeof _6=="undefined"||_6===null){
return null;
}
if(!this.CONSTANTS[_6]){
return null;
}
var _7=this._getInternalIWidgetWrapper();
if(_7===null){
return null;
}
var _8=this._items[_6];
if(typeof _8=="undefined"||_8===null){
if(!this._loadData(_6)){
return null;
}
_8=this._items[_6];
}
if(_8["detail"]!="undefined"&&_8["detail"]!=null&&_8["detail"]["defaultValue"]!="undefined"&&_8["detail"]["defaultValue"]!=null){
return _8.detail.defaultValue;
}else{
return null;
}
},setItemValue:function(_9,_a){
if(typeof _9=="undefined"||_9==null||typeof _a=="undefined"||_a===null){
return null;
}
if(!this.CONSTANTS[_9]){
return null;
}
var _b=this._items[_9];
if(typeof _b=="undefined"||_b===null){
this._loadData(_9);
}
this._items[_9].isDirty=true;
this._items[_9].detail.defaultValue=_a;
},save:function(){
var _c=this._getInternalIWidgetWrapper().getWidgetInstance().getiDescriptor();
for(var _d in this._items){
var _e=this._items[_d];
if(_e.isDirty||_e.isDirty==true){
_e.isDirty=false;
this._updateMarkup(_e.detail);
}
}
},_getInternalIWidgetWrapper:function(){
if(typeof (this._internalWidgetWrapper)=="undefined"||this._internalWidgetWrapper===null){
var _f=iWidgetContainer.getWidgetById(this._id);
if(typeof _f=="undefined"||_f===null){
return null;
}
this._internalWidgetWrapper=_f;
}
return this._internalWidgetWrapper;
},_loadData:function(_10){
var rc=false;
var _11={};
var _12=this._getInternalIWidgetWrapper().getWidgetInstance().getiDescriptor();
if(_12!=null&&typeof (_12[_10])!="undefined"&&_12[_10]!=null){
var _13=dojo.toJson(_12[_10]);
_11.isDirty=true;
_11.detail=dojo.fromJson(_13);
rc=true;
}else{
_11.detail={};
_11.detail.itemName=_10;
_11.isDirty=false;
}
this._items[_10]=_11;
return rc;
},_updateMarkup:function(_14){
var _15=_14.itemName;
var _16=_14.defaultValue;
var _17=serviceManager.getService("iWidgetFragmentService");
var _18=_17.getItemSet(this._id,iwConstants.IDESCRIPTOR);
if(_18==null){
var _19=_17.createItemSet(iwConstants.IDESCRIPTOR);
var _1a=dojo.byId(this._id);
_1a.insertBefore(_19,_1a.firstChild.nextSibling);
_18=_17.getItemSet(this._id,iwConstants.IDESCRIPTOR);
}
var _1b=_17.getItem(_18,_15);
if(_1b==null){
var _19=_17.createItem(_15,_16);
_18.appendChild(_19);
}else{
_1b.innerHTML=_16;
}
this._getInternalIWidgetWrapper().getWidgetInstance().loadItemSets();
}});
dojo.declare("com.ibm.mm.enabler.iw.WidgetStub",null,{constructor:function(_1c){
this.id=_1c.id;
this.wires=_1c.getWires();
this.publishedEvents=_1c.getPublishedEvents();
this.handledEvents=_1c.getHandledEvents();
this.payloadDefs=_1c.widgetDef.getPayloadDefs();
this.supportedModes=_1c.widgetDef.getSupportedModes();
},getPublishedEventsNames:function(){
if(!this.publishedEvents){
return null;
}
var _1d=[];
var _1e;
for(_1e in this.publishedEvents){
_1d.push(_1e);
}
if(_1d.length==0){
return null;
}
return _1d;
},getHandledEventsNames:function(){
if(!this.handledEvents){
return null;
}
var _1f=[];
var _20;
for(_20 in this.handledEvents){
_1f.push(_20);
}
if(_1f.length==0){
return null;
}
return _1f;
},getPublishedEvent:function(_21){
if(!this.publishedEvents){
return null;
}
return this.publishedEvents[_21];
},getHandledEvent:function(_22){
if(!this.handledEvents){
return null;
}
return this.handledEvents[_22];
},getPayloadDefs:function(){
return this.payloadDefs;
},getPayloadDef:function(_23){
var _24=this.payloadDefs[_23];
if(typeof _24=="undefined"){
return null;
}
return _24;
},getPayloadDefNames:function(){
var arr=[];
var a;
for(a in this.payloadDefs){
arr.push(a);
}
if(arr.length==0){
return null;
}
return arr;
},getWires:function(){
var arr=this.wires;
if(typeof arr=="undefined"){
arr=null;
}else{
if(arr.length&&arr.length==0){
arr=null;
}
}
return arr;
},getSupportedModes:function(){
return this.supportedModes;
}});
dojo.declare("com.ibm.mm.enabler.iw.WidgetDefinition",null,{constructor:function(_25,_26,_27,_28,_29,uri,_2a,_2b,_2c,_2d,_2e,_2f){
var _30=_25;
if(dojo.isString(_30)){
this.name=_25;
this.markup=_26;
this.iScope=_27;
this.itemSetsArr=_28;
this.uri=uri;
this.widgetEvents=_29;
this.publishedEvents=_2b;
this.handledEvents=_2c;
this.supportedModes=_2a;
this.resources=_2d;
this.payloadDefs=_2e;
this.iDescriptor=_2f;
}else{
this.name=_30["name"];
this.markup=_30["markup"];
this.metaData=_30["metaData"];
this.events=_30["events"];
this.itemSets=_30["itemSets"];
this.resources=_30["resources"];
this.payloadDefs=_30["payloadDefs"];
this.iScope=this.metaData["iScope"];
this.supportedModes=this.metaData["supportedModes"];
this.uri=this.metaData["contentURI"];
var _31;
this.widgetEvents={};
for(_31 in this.metaData){
if(_31.indexOf("on")==0){
this.widgetEvents[_31]=this.metaData[_31];
}
}
var _32=_30["events"]["publishedEvents"];
this.publishedEvents={};
this.handledEvents={};
var _33;
for(_33 in _32){
var _31=_32[_33];
var _34=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_31.eventName,_31.payloadType,_31.description,_31.onEvent);
if(!this.publishedEvents[_33]){
this.publishedEvents[_33]=[];
}
this.publishedEvents[_33].push(_34);
}
var _35=_30["events"]["handledEvents"];
for(_33 in _35){
var _31=_35[_33];
var _34=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_31.eventName,_31.payloadType,_31.description,_31.onEvent);
if(!this.handledEvents[_33]){
this.handledEvents[_33]=[];
}
this.handledEvents[_33].push(_34);
}
var _36;
this.itemSetsArr={};
for(_36 in _30["itemSets"]){
var _37=_30["itemSets"][_36];
if(_36=="attributes"){
var _38=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(_37.name,_37.onItemSetChanged);
}else{
var _38=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(_37.name,_37.onItemSetChanged);
}
_38["itemLists"]["items"]=_37["itemLists"];
this.itemSetsArr[_36]=_38;
}
}
},getPublishedEvents:function(){
return this.publishedEvents;
},getHandledEvents:function(){
return this.handledEvents;
},getAttributes:function(){
var _39=this.itemSetsArr["attributes"];
if(typeof _39=="undefined"||_39==null){
_39={name:"attributes",items:{}};
}
if(typeof (this.uri)!="undefined"&&_39!=null){
_39.items["contentURI"]={id:"contentURI",value:this.uri,readOnly:false};
}
if(typeof (this.supportedModes)!="undefined"&&_39!=null){
_39.items["supportedModes"]={id:"supportedModes",value:this.uri,readOnly:false};
}
return _39;
},getAllItemSetNames:function(){
var _3a=new Array();
if(typeof (this.itemSetsArr)=="undefined"||this.itemSetsArr==null){
return _3a;
}
var i=0;
for(itemName in this.itemSetsArr){
var _3b=this.itemSetsArr[itemName];
if(typeof (_3b)!="undefined"){
_3a[i]=_3b.name;
}
i++;
}
return _3a;
},getItemSet:function(_3c){
if(_3c=="attributes"){
return this.getAttributes();
}
var _3d=this.itemSetsArr[_3c];
if(typeof (_3d)!="undefined"){
return _3d;
}
return null;
},getPublishedEventsNames:function(){
if(!this.publishedEvents){
return null;
}
var _3e=[];
var _3f;
for(_3f in this.publishedEvents){
_3e.push(_3f);
}
return _3e;
},getHandledEventsNames:function(){
if(!this.handledEvents){
return null;
}
var _40=[];
var _41;
for(_41 in this.handledEvents){
_40.push(_41);
}
return _40;
},getPublishedEvent:function(_42){
if(!this.publishedEvents){
return null;
}
return this.publishedEvents[_42];
},getHandledEvent:function(_43){
if(!this.handledEvents){
return null;
}
return this.handledEvents[_43];
},getWidgetName:function(){
return this.name;
},getPayloadDefs:function(){
return this.payloadDefs;
},getPayloadDef:function(_44){
var _45=this.payloadDefs[_44];
if(typeof _45=="undefined"){
return null;
}
return _45;
},getPayloadDefNames:function(){
var arr=[];
var a;
for(a in this.payloadDefs){
arr.push(a);
}
return arr;
},getSupportedModes:function(){
var _46=this.supportedModes;
if(typeof _46=="undefined"||_46==null){
return null;
}
var arr=_46.split(" ");
return arr;
},getiDescriptor:function(){
return null;
},getMarkupByMode:function(_47){
return this.markup;
},getWidgetEvents:function(){
return this.widgetEvents;
},getIScope:function(){
return this.iScope;
},getResources:function(){
return this.resources;
},getDefaultLanguage:function(){
return "en";
},getMarkup:function(){
return this.markup;
},getAllowInstanceContent:function(){
return false;
}});
dojo.declare("com.ibm.mm.enabler.iw.standardWidgetDefinition",null,{constructor:function(_48){
this.widgetDef=_48;
},getAllowInstanceContent:function(){
return this.widgetDef.allowInstanceContent;
},getResources:function(){
return this.widgetDef.resources;
},getIScope:function(){
return this.widgetDef.iScope;
},getWidgetEvents:function(){
return this.widgetDef.widgetEvents;
},getMarkupByMode:function(_49){
if(typeof this.widgetDef.markup!="undefined"&&this.widgetDef.markup!=null){
if(!_49){
_49="view";
}
var _4a=this.widgetDef.markup[_49];
return _4a;
}else{
return null;
}
},getAttributes:function(){
var _4b=this.widgetDef.itemSetsArr[iwConstants.ATTRIBUTES];
if(typeof _4b=="undefined"||_4b==null){
_4b={name:iwConstants.ATTRIBUTES};
_4b.items={};
}
_4b.isPrivate=true;
var _4c=this.widgetDef.simpleAttributes;
if(typeof _4c!="undefined"&&_4c!=null){
for(var i in _4c){
var _4d=_4c[i];
if(typeof _4d!="undefined"&&_4d!=null){
if(!_4b.items[i]){
_4b.items[i]={id:i,value:_4d,readOnly:false};
}
}
}
}
return _4b;
},getAllItemSetNames:function(){
var _4e=new Array();
if(typeof (this.widgetDef.itemSetsArr)=="undefined"||this.widgetDef.itemSetsArr==null){
return _4e;
}
var i=0;
for(itemName in this.widgetDef.itemSetsArr){
var _4f=this.widgetDef.itemSetsArr[itemName];
if(typeof (_4f)!="undefined"&&itemName!=iwConstants.ATTRIBUTES){
_4e[i]=_4f.name;
i++;
}
}
return _4e;
},getItemSet:function(_50){
if(_50=="attributes"){
return this.getAttributes();
}
var _51=this.widgetDef.itemSetsArr[_50];
if(typeof _51=="undefined"||_51==null){
return null;
}
return _51;
},getPublishedEventsNames:function(){
if(!this.widgetDef.publishedEvents){
return [];
}
var _52=[];
var _53;
for(_53 in this.widgetDef.publishedEvents){
_52.push(_53);
}
return _52;
},getHandledEventsNames:function(){
if(!this.widgetDef.handledEvents){
return [];
}
var _54=[];
var _55;
for(_55 in this.widgetDef.handledEvents){
_54.push(_55);
}
return _54;
},getPublishedEvent:function(_56){
if(!this.widgetDef.publishedEvents){
return null;
}
var _57=this.widgetDef.publishedEvents[_56];
var _58=null;
if(typeof _57!="undefined"||_57!=null){
var _59=_57.description;
var _5a=null;
if(typeof _59!="undefined"&&_59!=null){
_5a=this._getEventDescription(_59);
if(_5a!=null){
var _5b=_5a.lang;
if(typeof _5b=="undefined"||_5b==null){
_5b=this.getDefaultLanguage();
if(typeof _5b=="undefined"||_5b==null){
_5b="en";
}
}
}
}
if(_5a!=null){
_58=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_56,_57.onEvent,_5a.payloadType,_5a.description,_5a.aliases,_5b,_5a.descriptions);
}else{
_58=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_56,_57.onEvent);
}
if(_57.onRemoveWire){
_58.setOnRemoveWire(_57.onRemoveWire);
}
if(_57.onNewWire){
_58.setOnNewWire(_57.onNewWire);
}
}
return _58;
},getHandledEvent:function(_5c){
if(!this.widgetDef.handledEvents){
return null;
}
var _5d=this.widgetDef.handledEvents[_5c];
var _5e=null;
if(typeof _5d!="undefined"||_5d!=null){
var _5f=_5d.description;
var _60=null;
if(typeof _5f!="undefined"&&_5f!=null){
_60=this._getEventDescription(_5f);
if(_60!=null){
var _61=_60.lang;
if(typeof _61=="undefined"||_61==null){
_61=this.getDefaultLanguage();
if(typeof _61=="undefined"||_61==null){
_61="en";
}
}
}
}
if(_60!=null){
_5e=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_5c,_5d.onEvent,_60.payloadType,_60.description,_60.aliases,_61,_60.descriptions);
}else{
_5e=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_5c,_5d.onEvent);
}
if(_5d.onRemoveWire){
_5e.setOnRemoveWire(_5d.onRemoveWire);
}
if(_5d.onNewWire){
_5e.setOnNewWire(_5d.onNewWire);
}
}
return _5e;
},getWidgetId:function(){
return this.widgetDef.id;
},getWidgetName:function(){
return this.widgetDef.id;
},getPayloadDefs:function(){
return this.widgetDef.payloadDefs;
},getPayloadDef:function(_62){
var _63=this.widgetDef.payloadDefs[_62];
if(typeof _63=="undefined"){
return null;
}
return _63;
},getPayloadDefNames:function(){
var arr=[];
var a;
for(a in this.widgetDef.payloadDefs){
arr.push(a);
}
return arr;
},getSupportedModes:function(){
var _64=this.widgetDef.supportedModes;
if(typeof _64=="undefined"||_64==null){
return null;
}
var arr=_64.split(" ");
return arr;
},getiDescriptor:function(){
return this.widgetDef.iDescriptor;
},_getEventDescription:function(id){
var _65=null;
if(typeof this.widgetDef.eventDescriptions!="undefined"||this.widgetDef.eventDescriptions!=null){
_65=this.widgetDef.eventDescriptions[id];
}
return _65;
},getPublishedEvents:function(){
var _66={};
var _67=this.getPublishedEventsNames();
for(var i=0;i<_67.length;i++){
var _68=_67[i];
var _69=this.getPublishedEvent(_68);
if(_69!=null){
_66[_68]=[_69];
}
}
return _66;
},getHandledEvents:function(){
var _6a={};
var _6b=this.getHandledEventsNames();
for(var i=0;i<_6b.length;i++){
var _6c=_6b[i];
var _6d=this.getHandledEvent(_6c);
if(_6d!=null){
_6a[_6c]=[_6d];
}
}
return _6a;
},getDefaultLanguage:function(){
return this.widgetDef.lang;
},getMarkup:function(){
return this.widgetDef.markup;
}});
}


;if(!dojo._hasResource["dojox.uuid.Uuid"]){
dojo._hasResource["dojox.uuid.Uuid"]=true;
dojo.provide("dojox.uuid.Uuid");
dojo.require("dojox.uuid");
dojox.uuid.Uuid=function(_1){
this._uuidString=dojox.uuid.NIL_UUID;
if(_1){
dojox.uuid.assert(dojo.isString(_1));
this._uuidString=_1.toLowerCase();
dojox.uuid.assert(this.isValid());
}else{
var _2=dojox.uuid.Uuid.getGenerator();
if(_2){
this._uuidString=_2();
dojox.uuid.assert(this.isValid());
}
}
};
dojox.uuid.Uuid.compare=function(_3,_4){
var _5=_3.toString();
var _6=_4.toString();
if(_5>_6){
return 1;
}
if(_5<_6){
return -1;
}
return 0;
};
dojox.uuid.Uuid.setGenerator=function(_7){
dojox.uuid.assert(!_7||dojo.isFunction(_7));
dojox.uuid.Uuid._ourGenerator=_7;
};
dojox.uuid.Uuid.getGenerator=function(){
return dojox.uuid.Uuid._ourGenerator;
};
dojox.uuid.Uuid.prototype.toString=function(){
return this._uuidString;
};
dojox.uuid.Uuid.prototype.compare=function(_8){
return dojox.uuid.Uuid.compare(this,_8);
};
dojox.uuid.Uuid.prototype.isEqual=function(_9){
return (this.compare(_9)==0);
};
dojox.uuid.Uuid.prototype.isValid=function(){
return dojox.uuid.isValid(this);
};
dojox.uuid.Uuid.prototype.getVariant=function(){
return dojox.uuid.getVariant(this);
};
dojox.uuid.Uuid.prototype.getVersion=function(){
if(!this._versionNumber){
this._versionNumber=dojox.uuid.getVersion(this);
}
return this._versionNumber;
};
dojox.uuid.Uuid.prototype.getNode=function(){
if(!this._nodeString){
this._nodeString=dojox.uuid.getNode(this);
}
return this._nodeString;
};
dojox.uuid.Uuid.prototype.getTimestamp=function(_a){
if(!_a){
_a=null;
}
switch(_a){
case "string":
case String:
return this.getTimestamp(Date).toUTCString();
break;
case "hex":
if(!this._timestampAsHexString){
this._timestampAsHexString=dojox.uuid.getTimestamp(this,"hex");
}
return this._timestampAsHexString;
break;
case null:
case "date":
case Date:
if(!this._timestampAsDate){
this._timestampAsDate=dojox.uuid.getTimestamp(this,Date);
}
return this._timestampAsDate;
break;
default:
dojox.uuid.assert(false,"The getTimestamp() method dojox.uuid.Uuid was passed a bogus returnType: "+_a);
break;
}
};
}


;if(!dojo._hasResource["com.ibm.mm.enabler.xpath"]){
dojo._hasResource["com.ibm.mm.enabler.xpath"]=true;
dojo.provide("com.ibm.mm.enabler.xpath");
com.ibm.mm.enabler.xpath.evaluateXPath=function(_1,_2,_3){
if(navigator.userAgent.toLowerCase().indexOf("safari")!=-1){
return com.ibm.mm.enabler.xpath.safari.evaluateXPath(_1,_2,_3);
}else{
if(typeof ActiveXObject!="undefined"){
return com.ibm.mm.enabler.xpath.ie.evaluateXPath(_1,_2,_3);
}else{
return com.ibm.mm.enabler.xpath.gecko.evaluateXPath(_1,_2,_3);
}
}
};
dojo.provide("com.ibm.mm.enabler.xpath.safari");
com.ibm.mm.enabler.xpath.safari.evaluateXPath=function(_4,_5,_6){
var _7;
if(typeof XPathResult!="undefined"){
var _8=document.evaluate(_4,_5,function(_9){
return _6[_9]||null;
},XPathResult.ANY_TYPE,null);
var _a;
_7=[];
var _b=0;
do{
_a=_8.iterateNext();
if(_a){
_7[_b]=_a;
_b++;
}
}while(_a);
}else{
if(_5.selectNodes){
_7=_5.selectNodes(_4);
}
}
return _7;
};
dojo.provide("com.ibm.mm.enabler.xpath.ie");
com.ibm.mm.enabler.xpath.ie.evaluateXPath=function(_c,_d,_e){
if(_e){
var ns="";
for(var _f in _e){
if(_f!="xml"){
ns+="xmlns:"+_f+"='"+_e[_f]+"' ";
}
}
if(_d.ownerDocument){
_d.ownerDocument.setProperty("SelectionNamespaces",ns);
_d.ownerDocument.setProperty("SelectionLanguage","XPath");
}else{
_d.setProperty("SelectionNamespaces",ns);
_d.setProperty("SelectionLanguage","XPath");
}
}
var _10=_d.selectNodes(_c);
var _11;
var _12=[];
var len=0;
for(var i=0;i<_10.length;i++){
_11=_10[i];
if(_11){
_12[len]=_11;
len++;
}
}
return _12;
};
dojo.provide("com.ibm.mm.enabler.xpath.gecko");
com.ibm.mm.enabler.xpath.gecko.evaluateXPath=function(_13,doc,_14){
var _15;
try{
var _16=doc;
if(doc.nodeType!=9){
_16=doc.ownerDocument;
}
_15=_16.evaluate(_13,doc,function(_17){
return _14[_17]||null;
},XPathResult.ANY_TYPE,null);
}
catch(exc){
throw new Error("Error with xpath expression"+exc);
}
var _18;
var _19=[];
var len=0;
do{
_18=_15.iterateNext();
if(_18){
_19[len]=_18;
len++;
}
}while(_18);
return _19;
};
}


;if(!dojo._hasResource["com.ibm.mm.enabler.xslt"]){
dojo._hasResource["com.ibm.mm.enabler.xslt"]=true;
dojo.provide("com.ibm.mm.enabler.xslt");
com.ibm.mm.enabler.xslt.ie={};
com.ibm.mm.enabler.xslt.gecko={};
com.ibm.mm.enabler.xslt.getXmlHttpRequest=function(){
var _1=null;
if(typeof ActiveXObject!="undefined"){
_1=new ActiveXObject("Microsoft.XMLHTTP");
}else{
_1=new XMLHttpRequest();
}
return _1;
};
com.ibm.mm.enabler.xslt.loadXml=function(_2){
if(typeof ActiveXObject!="undefined"){
return com.ibm.mm.enabler.xslt.ie.loadXml(_2);
}else{
return com.ibm.mm.enabler.xslt.gecko.loadXml(_2);
}
};
com.ibm.mm.enabler.xslt.loadXmlString=function(_3){
if(typeof ActiveXObject!="undefined"){
return com.ibm.mm.enabler.xslt.ie.loadXmlString(_3);
}else{
var _4=new DOMParser();
return com.ibm.mm.enabler.xslt.gecko.loadXmlString(_3);
}
};
com.ibm.mm.enabler.xslt.loadXsl=function(_5){
if(typeof ActiveXObject!="undefined"){
return com.ibm.mm.enabler.xslt.ie.loadXsl(_5);
}else{
return com.ibm.mm.enabler.xslt.gecko.loadXsl(_5);
}
};
com.ibm.mm.enabler.xslt.transform=function(_6,_7,_8,_9,_a){
com.ibm.mm.enabler.debug.entry("xslt.transform",_6,_7,_8,_9,_a);
if(typeof ActiveXObject!="undefined"){
return com.ibm.mm.enabler.xslt.ie.transform(_6,_7,_8,_9,_a);
}else{
return com.ibm.mm.enabler.xslt.gecko.transform(_6,_7,_8,_9,_a);
}
};
com.ibm.mm.enabler.xslt.transformAndUpdate=function(_b,_c,_d,_e,_f){
com.ibm.mm.enabler.debug.entry("xslt.transformAndUpdate",_b,_c,_d,_e,_f);
if(typeof ActiveXObject!="undefined"){
var _10=com.ibm.mm.enabler.xslt.ie.transform(_c,_d,_e,_f,true);
com.ibm.mm.enabler.debug.log("xslt.transformAndUpdate","XSLT result: "+_10);
_b.innerHTML+=_10;
}else{
_10=com.ibm.mm.enabler.xslt.gecko.transform(_c,_d,_e,_f,false);
com.ibm.mm.enabler.debug.log("xslt.transformAndUpdate","XSLT result: "+(new XMLSerializer()).serializeToString(_10),"com.ibm.mm.enabler.xslt.transformAndUpdate");
var _11=_10.documentElement;
if(_10.documentElement.tagName=="transformiix:result"){
_11=_10.documentElement.childNodes;
com.ibm.mm.enabler.dom.copyChildren(_10.documentElement,_b,true);
}else{
com.ibm.mm.enabler.debug.log("xslt.transformAndUpdate","Appending2: "+(new XMLSerializer()).serializeToString(_11),"com.ibm.mm.enabler.xslt.transformAndUpdate");
_b.appendChild(_11);
}
}
com.ibm.mm.enabler.debug.exit("xslt.transformAndUpdate");
};
com.ibm.mm.enabler.xslt.ie.loadXml=function(_12){
var _13=new ActiveXObject("MSXML2.DOMDocument");
_13.async=0;
_13.resolveExternals=0;
if(!_13.load(_12)){
throw new Error("Error loading xml file "+_12);
}
return _13;
};
com.ibm.mm.enabler.xslt.ie.loadXmlString=function(_14){
var _15=new ActiveXObject("MSXML2.DOMDocument");
_15.async=0;
_15.resolveExternals=0;
if(!_15.loadXML(_14)){
throw new Error("Error loading xml string "+_14);
}
return _15;
};
com.ibm.mm.enabler.xslt.ie.loadXsl=function(_16){
var _17=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
_17.async=0;
_17.resolveExternals=0;
if(!_17.load(_16)){
throw new Error("Error loading xsl file "+_16);
}
return _17;
};
com.ibm.mm.enabler.xslt.ie.transform=function(_18,xsl,_19,_1a,_1b){
var _1c=_18;
var _1d=xsl;
try{
if(!_1d.documentElement){
_1d=this.loadXsl(xsl);
}
}
catch(e){
var _1e=e.message;
throw new Error(""+_1e,""+_1e);
}
var _1f=new ActiveXObject("Msxml2.XSLTemplate");
_1f.stylesheet=_1d;
var _20=_1f.createProcessor();
_20.input=_1c;
if(_1a){
for(var p in _1a){
_20.addParameter(p,_1a[p]);
}
}
if(_19){
_20.addParameter("mode",_19);
}
if(_1b){
if(!_20.transform()){
throw new Error("Error transforming xml doc "+_1c);
}
return _20.output;
}else{
var _21=new ActiveXObject("MSXML2.DOMDocument");
_21.async=0;
_21.validateOnParse=1;
_1c.transformNodeToObject(_1d,_21);
return _21;
}
};
com.ibm.mm.enabler.xslt.gecko.loadXml=function(_22){
};
com.ibm.mm.enabler.xslt.gecko.loadXmlString=function(_23){
var _24=new DOMParser();
try{
oXmlDoc=_24.parseFromString(_23,"text/xml");
}
catch(exc){
throw new Error("Error loading xml string "+_23);
}
return oXmlDoc;
};
com.ibm.mm.enabler.xslt.gecko.loadXsl=function(_25){
var _26=document.implementation.createDocument("","",null);
_26.async=0;
_26.load(_25);
return _26;
};
com.ibm.mm.enabler.xslt.gecko.transform=function(_27,xsl,_28,_29,_2a){
try{
var _2b=xsl;
if(!_2b.documentElement){
_2b=this.loadXsl(xsl);
}
var _2c=new XSLTProcessor();
_2c.importStylesheet(_2b);
if(_29){
for(var p in _29){
_2c.setParameter(null,p,_29[p]);
}
}
if(_28){
_2c.setParameter(null,"mode",_28);
}
var _2d=_2c.transformToDocument(_27);
if(!_2a){
return _2d;
}
resultStr=_2d.documentElement.childNodes[0].textContent;
}
catch(exc){
throw new Error("Error transforming xml doc "+exc);
}
return resultStr;
};
com.ibm.mm.enabler.xslt.setLayerContentByXml=function(_2e,xml,xsl,_2f,_30){
var _31=com.ibm.mm.enabler.xslt.transform(xml,xsl,null,_2f,_30);
if(_2e.innerHTML){
_2e.innerHTML=_31;
}else{
var obj=document.getElementById(_2e);
obj.innerHTML=_31;
}
};
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.parserImpl"]){
dojo._hasResource["com.ibm.mm.enabler.iw.parserImpl"]=true;
dojo.provide("com.ibm.mm.enabler.iw.parserImpl");
dojo.require("com.ibm.mm.enabler.xslt");
dojo.declare("com.ibm.mm.enabler.iw.parser.WidgetParser",null,{parseWidgetDefinition:function(){
return null;
}});
dojo.declare("com.ibm.mm.enabler.iw.parser.legacyXMLParser",com.ibm.mm.enabler.iw.parser.WidgetParser,{constructor:function(_1){
this.xmlStr=_1;
},namespaces:{"iw":"http://www.ibm.com/iWidget"},parseWidgetDefinition:function(){
var _2=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);
var _3=this.readMarkup(_2);
var _4=this.readItemSets(_2);
var _5=this.readContentURI(_2);
var _6=this.readWidgetEvents(_2);
var _7=this.readName(_2);
var _8=this.readiScope(_2);
var _9=this.readSupportedModes(_2);
var _a=this.readPublicEvents(_2,"iw:handledEvents");
var _b=this.readPublicEvents(_2,"iw:publishedEvents");
var _c=this.readResources(_2);
var _d=this.readPayloadDefs(_2);
var _e=this.readIDescriptor(_2);
return new com.ibm.mm.enabler.iw.WidgetDefinition(_7,_3,_8,_4,_6,_5,_9,_b,_a,_c,_d,_e);
},readMarkup:function(_f){
com.ibm.mm.enabler.debug.entry("legacyXMLParser.readMarkup",_f.text);
var _10="/iw:iwidget/iw:content";
var _11=com.ibm.mm.enabler.xpath.evaluateXPath(_10,_f,this.namespaces);
var _12="";
if(_11!=null&&_11.length>0){
var _13=_11[0];
var _14=_13.childNodes;
for(var j=0;j<_14.length;j++){
var _15=_14[j];
if(_15.nodeType==4){
_12=_12.concat(_15.nodeValue);
}else{
if(_15.nodeType==3){
_12=_12.concat(_15.nodeValue);
}
}
}
}
com.ibm.mm.enabler.debug.exit("legacyXMLParser.readMarkup",_12);
return _12;
},readSupportedModes:function(_16){
var _17=_16.documentElement;
var _18=_17.getAttribute("supportedModes");
if(typeof _18=="undefined"||_18==null){
return null;
}
return _18;
},readItemSets:function(_19){
com.ibm.mm.enabler.debug.entry("legacyXMLParser.readItemSets");
var _1a={};
var _1b="/iw:iwidget/iw:itemSet";
var _1c=com.ibm.mm.enabler.xpath.evaluateXPath(_1b,_19,this.namespaces);
for(var i=0;i<_1c.length;i++){
var _1d=_1c[i];
var _1e=_1d.getAttribute("name");
var _1f=_1d.getAttribute("onItemSetChanged");
var _20={name:_1e,onItemSetChanged:_1f};
_20.items={};
var _21=_1d.childNodes;
for(var j=0;j<_21.length;j++){
var _22=_21[j];
if(_22.nodeType==1){
var _23=_22.getAttribute("readOnly");
com.ibm.mm.enabler.debug.entry("legacyXMLParser.readItemSets found attribute name:"+_22.getAttribute("name")+" value:"+_22.getAttribute("value"));
var _24={id:_22.getAttribute("name"),value:_22.getAttribute("value"),readOnly:_23};
_20.items[_24.id]=_24;
}
}
_1a[_1e]=_20;
}
com.ibm.mm.enabler.debug.exit("legacyXMLParser.readItemSets");
return _1a;
},readPayloadDefs:function(_25){
com.ibm.mm.enabler.debug.entry("legacyXMLParser.readPayloadDefs");
var _26={};
var _27="/iw:iwidget/iw:payloadDef";
var _28=com.ibm.mm.enabler.xpath.evaluateXPath(_27,_25,this.namespaces);
for(var i=0;i<_28.length;i++){
var _29=_28[i];
var _2a=com.ibm.mm.enabler.iw.utils.getPayloadDef(_29);
_26[_2a.name]=_2a;
}
com.ibm.mm.enabler.debug.exit("legacyXMLParser.readPayloadDef ",_28.length+" payloadDefs are saved ");
return _26;
},readName:function(_2b){
var _2c=_2b.documentElement;
var _2d=_2c.getAttribute("name");
if(typeof _2d=="undefined"||_2d==null){
return null;
}
return _2d;
},readContentURI:function(_2e){
var _2f=_2e.documentElement;
var uri=_2f.getAttribute("contentURI");
if(typeof uri=="undefined"||uri==null){
return null;
}
return uri;
},readiScope:function(_30){
var _31=_30.documentElement;
var _32=_31.getAttribute("iScope");
if(typeof _32=="undefined"||_32==null){
return null;
}
return _32;
},readWidgetEvents:function(_33){
var _34=_33.documentElement;
var _35={};
var _36=_34.attributes;
for(var i=0;i<_36.length;i++){
var _37=_36[i];
if(_37.name.indexOf("on")==0){
var _38=_37.value;
if(typeof _38!="undefined"&&_38!=null){
_35[_37.name]=_38;
}
}
}
return _35;
},readPublicEvents:function(_39,_3a){
var _3b="/iw:iwidget/"+_3a;
var _3c=com.ibm.mm.enabler.xpath.evaluateXPath(_3b,_39,this.namespaces);
if(typeof _3c!="undefined"&&_3c!=null&&_3c.length!=0){
var _3d={};
var _3e=_3c[0];
var _3f=_3e.childNodes;
for(var j=0;j<_3f.length;j++){
var _40=_3f[j];
if(_40.nodeType==1){
var _41=new com.ibm.mm.enabler.iw.iEventDescriptionImpl(_40.getAttribute("eventName"),_40.getAttribute("onEvent"),_40.getAttribute("payloadType"),_40.getAttribute("description"));
if(!_3d[_40.getAttribute("eventName")]){
_3d[_40.getAttribute("eventName")]=[];
}
_3d[_40.getAttribute("eventName")].push(_41);
}
}
}
if(!_3d){
return null;
}
return _3d;
},readResources:function(_42){
var _43="/iw:iwidget/iw:resource";
var _44=[];
var _45=com.ibm.mm.enabler.xpath.evaluateXPath(_43,_42,this.namespaces);
if(typeof _45!="undefined"&&_45!=null&&_45.length!=0){
for(var i=0;i<_45.length;i++){
var _46=_45[i];
var _47={};
_47["name"]=_46.getAttribute("resourceName");
_47["src"]=_46.getAttribute("uri");
_47["version"]=_46.getAttribute("version");
_47["callback"]=_46.getAttribute("callback");
_47["mimetype"]=_46.getAttribute("mimetype");
_44[i]=_47;
}
}
return _44;
},readIDescriptor:function(_48){
return null;
}});
dojo.declare("com.ibm.mm.enabler.iw.parser.standardXMLParser",com.ibm.mm.enabler.iw.parser.WidgetParser,{constructor:function(_49){
this.xmlStr=_49;
},namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"language","xmlns:iw":"xmlns:iw"},parseWidgetDefinition:function(){
var _4a=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);
var _4b=this.readRootElement(_4a);
_4b.markup=this.readMarkup(_4a);
_4b.itemSetsArr=this.readItemSets(_4a);
_4b.handledEvents=this.readPublicEvents(_4a,"handled");
_4b.publishedEvents=this.readPublicEvents(_4a,"published");
_4b.resources=this.readResources(_4a);
_4b.payloadDefs=this.readPayloadDefs(_4a);
_4b.eventDescriptions=this.readEventDescriptions(_4a);
return new com.ibm.mm.enabler.iw.standardWidgetDefinition(_4b);
},readRootElement:function(_4c){
var _4d={};
var _4e=_4c.documentElement;
var _4f=_4e.getAttribute("supportedModes");
if(typeof _4f=="undefined"||_4f==null){
_4f="view";
}
_4d.supportedModes=_4f;
var _50=_4e.getAttribute("id");
if(typeof _50=="undefined"||_50==null){
_50=null;
}
_4d.id=_50;
_4d.name=_50;
var _51=_4e.getAttribute("allowInstanceContent");
var _52=false;
if(typeof _51!="undefined"&&_51!=null&&_51=="true"){
_52=true;
}
_4d.allowInstanceContent=_52;
var _53=_4e.getAttribute("language");
if(typeof _53=="undefined"||_53==null){
_53="en";
}
_4d.lang=_53;
var _54={};
var _55=_4e.attributes;
for(var i=0;i<_55.length;i++){
var _56=_55[i];
if(_56.name.indexOf("on")==0){
var _57=_56.value;
if(typeof _57!="undefined"&&_57!=null){
_54[_56.name]=_57;
}
}
}
_4d.widgetEvents=_54;
var _58=_4e.getAttribute("iScope");
if(typeof _58=="undefined"||_58==null){
_58=null;
}
_4d.iScope=_58;
var _59=iwConstants.iDescriptorItems;
var _5a={};
for(var i in _59){
var _50=_59[i];
var _5b=_4e.getAttribute(_50);
_5a[_50]=_5b;
}
_4d.iDescriptor=_5a;
var _5c={};
var _55=_4e.attributes;
for(var i=0;i<_55.length;i++){
var att=_55[i];
if(att.name.indexOf("on")!=0&&!iwConstants.iDescriptorItems[att.name]&&!this.reservedAttributes[att.name]){
var _5b=att.value;
if(typeof _5b!="undefined"&&_5b!=null){
_5c[att.name]=_5b;
}
}
}
_4d.simpleAttributes=_5c;
return _4d;
},readMarkup:function(_5d){
com.ibm.mm.enabler.debug.entry("standardXMLParser.readMarkup",_5d.text);
var _5e="/iw:iwidget/iw:content";
var _5f=com.ibm.mm.enabler.xpath.evaluateXPath(_5e,_5d,this.namespaces);
var _60={};
var _61="";
var _62=null;
if(_5f!=null&&_5f.length>0){
for(var i=0;i<_5f.length;i++){
var _63=_5f[i];
var _64=_63.childNodes;
for(var j=0;j<_64.length;j++){
var _65=_64[j];
if(_65.nodeType==4){
_61=_61.concat(_65.nodeValue);
}else{
if(_65.nodeType==3){
_61=_61.concat(_65.nodeValue);
}
}
}
_62=_63.getAttribute("mode");
if(typeof _62=="undefined"||_62==null){
_62="view";
break;
}
_60[_62]=_61;
_61="";
}
}
com.ibm.mm.enabler.debug.exit("standardXMLParser.readMarkup",_60);
return _60;
},readItemSets:function(_66){
com.ibm.mm.enabler.debug.entry("standardXMLParser.readItemSets");
var _67={};
var _68="/iw:iwidget/iw:itemSet";
var _69=com.ibm.mm.enabler.xpath.evaluateXPath(_68,_66,this.namespaces);
for(var i=0;i<_69.length;i++){
var _6a=_69[i];
var _6b=_6a.getAttribute("id");
var _6c=_6a.getAttribute("onItemSetChanged");
var _6d=_6a.getAttribute("private");
var _6e=false;
if(typeof _6d!="undefined"&&_6d!=null&&_6d=="true"){
_6e=true;
}
var _6f=_6a.getAttribute("description");
var _70={name:_6b,onItemSetChanged:_6c,isPrivate:_6e};
_70.items={};
var _71=_6a.childNodes;
for(var j=0;j<_71.length;j++){
var _72=_71[j];
if(_72.nodeType==1){
var _73=_72.getAttribute("readOnly");
com.ibm.mm.enabler.debug.entry("standardXMLParser.readItemSets found attribute name:"+_72.getAttribute("name")+" value:"+_72.getAttribute("value"));
if(typeof _73!="undefined"&&_73!=null&&_73=="true"){
_73=true;
}else{
_73=false;
}
var id=_72.getAttribute("id");
var _74=_72.getAttribute("value");
var _75={id:id,value:_74,readOnly:_73};
_70.items[id]=_75;
}
}
_67[_6b]=_70;
}
com.ibm.mm.enabler.debug.exit("standardXMLParser.readItemSets");
return _67;
},readPayloadDefs:function(_76){
com.ibm.mm.enabler.debug.entry("standardXMLParser.readPayloadDefs");
var _77={};
var _78="/iw:iwidget/iw:payloadDef";
var _79=com.ibm.mm.enabler.xpath.evaluateXPath(_78,_76,this.namespaces);
for(var i=0;i<_79.length;i++){
var _7a=_79[i];
var _7b=com.ibm.mm.enabler.iw.utils.getPayloadDef(_7a);
_77[_7b.name]=_7b;
}
com.ibm.mm.enabler.debug.exit("standardXMLParser.readPayloadDef ",_79.length+" payloadDefs are saved ");
return _77;
},readPublicEvents:function(_7c,_7d){
var _7e="/iw:iwidget/iw:event[@"+_7d+"]";
var _7f=com.ibm.mm.enabler.xpath.evaluateXPath(_7e,_7c,this.namespaces);
if(typeof _7f!="undefined"&&_7f!=null&&_7f.length!=0){
var _80={};
for(var j=0;j<_7f.length;j++){
var _81=_7f[j];
if(_81.nodeType==1){
var _82={};
_82.id=_81.getAttribute("id");
var _83=_81.getAttribute("eventDescName");
if(typeof _83=="undefined"||_83==null){
_83=_81.getAttribute("description");
}
_82.description=_83;
_82.onEvent=_81.getAttribute("onEvent");
_82.onNewWire=_81.getAttribute("onNewWire");
_82.onRemoveWire=_81.getAttribute("onRemoveWire");
_80[_82.id]=_82;
}
}
}
if(!_80){
return {};
}
return _80;
},readResources:function(_84){
var _85="/iw:iwidget/iw:resource";
var _86=[];
var _87=com.ibm.mm.enabler.xpath.evaluateXPath(_85,_84,this.namespaces);
if(typeof _87!="undefined"&&_87!=null&&_87.length!=0){
for(var i=0;i<_87.length;i++){
var _88=_87[i];
var _89={};
_89[iwConstants.RESOURCE.id]=_88.getAttribute("id");
var src=_88.getAttribute("src");
if(typeof src=="undefined"||src==null){
src=_88.getAttribute("uri");
}
_89[iwConstants.RESOURCE.src]=src;
_89[iwConstants.RESOURCE.version]=_88.getAttribute("version");
_89[iwConstants.RESOURCE.callback]=_88.getAttribute("callback");
_89[iwConstants.RESOURCE.mimetype]=_88.getAttribute("mimeType");
_86[i]=_89;
}
}
return _86;
},readEventDescriptions:function(_8a){
var _8b="iw:iwidget/iw:eventDescription";
var _8c={};
var _8d=com.ibm.mm.enabler.xpath.evaluateXPath(_8b,_8a,this.namespaces);
if(typeof _8d!="undefined"&&_8d!=null&&_8d.length!=0){
for(var i=0;i<_8d.length;i++){
var _8e=_8d[i];
var _8f={};
var id=_8e.getAttribute("id");
_8f["id"]=id;
_8f["payloadType"]=_8e.getAttribute("payloadType");
_8f["description"]=_8e.getAttribute("description");
_8f["descriptionURI"]=_8e.getAttribute("descriptionURI");
_8f["lang"]=_8e.getAttribute("lang");
_8f["aliases"]=_8e.getAttribute("aliases");
_8f["descriptions"]={};
var _90=_8e.childNodes;
for(var j=0;j<_90.length;j++){
var _91=_90[j];
if(_91.nodeType==1){
var _92={};
_92["lang"]=_91.getAttribute("lang");
_92["description"]=_91.getAttribute("description");
_92["title"]=_91.getAttribute("title");
_92["descriptionURI"]=_91.getAttribute("descriptionURI");
_8f["descriptions"][_91.getAttribute("lang")]=_92;
}
}
_8c[id]=_8f;
}
}
return _8c;
}});
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.parser"]){
dojo._hasResource["com.ibm.mm.enabler.iw.parser"]=true;
dojo.provide("com.ibm.mm.enabler.iw.parser");
dojo.require("com.ibm.mm.enabler.iw.parserImpl");
dojo.declare("com.ibm.mm.enabler.iw.parser.WidgetParserFactory",null,{getWidgetParser:function(_1){
var _2=_1.replace(/^\s+/,"").replace(/\s+$/,"");
var _3=this._isXML(_2);
var _4=this._isLegacy(_2);
if(_3&&_4){
return new com.ibm.mm.enabler.iw.parser.legacyXMLParser(_2);
}else{
if(_3&&!_4){
return new com.ibm.mm.enabler.iw.parser.standardXMLParser(_2);
}
}
return null;
},_isXML:function(_5){
var _6=true;
var _7=_5.indexOf("=\"http://www.w3.org/1999/xhtml\"");
if(_7!=-1){
_6=false;
}
com.ibm.mm.enabler.debug.log("parser._isXML",_6);
return _6;
},_isLegacy:function(_8){
var _9=true;
var _a=_8.indexOf("=\"http://www.ibm.com/xmlns/prod/iWidget\"");
if(_a!=-1){
_9=false;
}
com.ibm.mm.enabler.debug.log("parser._isLegacy",_9);
return _9;
}});
com.ibm.mm.enabler.iw.parser.WidgetParserFactory=new com.ibm.mm.enabler.iw.parser.WidgetParserFactory();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.services"]){
dojo._hasResource["com.ibm.mm.enabler.iw.services"]=true;
dojo.provide("com.ibm.mm.enabler.iw.services");
dojo.require("com.ibm.mm.enabler.services.ConfigService");
dojo.require("com.ibm.mm.enabler.iw.event");
dojo.require("com.ibm.mm.enabler.iw.widgetImpl");
dojo.require("dojox.uuid.Uuid");
dojo.require("dojox.uuid.generateTimeBasedUuid");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.require("com.ibm.mm.enabler.xpath");
dojo.require("com.ibm.mm.enabler.iw.parser");
dojo.require("dojo.string");
dojo.declare("com.ibm.mm.enabler.iw.services.iWidgetFragmentService",null,{createItem:function(_1,_2,_3,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var _4=document.createElement("a");
dojo.addClass(_4,ns+iwConstants.CSSCLASS_INSTANCE.iwItem);
dojo.style(_4,"visibility","hidden");
dojo.style(_4,"display","none");
_4.setAttribute("href","#"+_1);
if(_3){
_4.setAttribute("lang",_3);
}
if(_2&&!_3){
_4.innerHTML=_2;
}
return _4;
},createItemSet:function(_5,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var _6=document.createElement("span");
dojo.addClass(_6,ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet);
_6.setAttribute("title",_5);
dojo.style(_6,"visibility","hidden");
dojo.style(_6,"display","none");
return _6;
},createWidgetDefRef:function(_7,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var _8=document.createElement("a");
dojo.addClass(_8,ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition);
_8.setAttribute("href",_7);
dojo.style(_8,"visibility","hidden");
dojo.style(_8,"display","none");
return _8;
},getItemSet:function(_9,_a,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var rc=null;
var _b=dojo.byId(_9);
var _c=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet,_b);
for(var i=0;i<_c.length;i++){
var _d=_c[i];
var _e=_d.getAttribute("title");
if(_a==_e){
rc=_d;
break;
}
}
return rc;
},getItem:function(_f,_10,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var rc=null;
var _11=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_f);
for(var i=0;i<_11.length;i++){
var _12=_11[i];
var _13=this.getKeyFromHref(_12);
if(_13!=null&&_13==_10){
rc=_12;
break;
}
}
return rc;
},getItems:function(_14,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var _15=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_14);
if(typeof _15=="undefined"||_15==null||_15.length==0){
_15=null;
}
return _15;
},getWidgetDefRef:function(_16,ns){
if(typeof ns=="undefined"||ns==null){
ns="mm_";
}
var rc=null;
var _17=dojo.byId(_16);
var def=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition,_17)[0];
var ref=def.getAttribute("href");
if(typeof ref!="undefined"&&ref!=null){
rc=ref;
}
return rc;
},getKeyFromHref:function(_18){
var _19=_18.getAttribute("href");
if(_19==null){
return null;
}
var pos=_19.indexOf("#");
if(pos<0){
return null;
}
return _19.substring(pos+1);
}});
dojo.declare("com.ibm.mm.enabler.iw.services.persistentAttributesFactoryService",null,{createPersistentAttributes:function(_1a){
return new com.ibm.mm.enabler.iw.PersistentAttributes(_1a,true);
}});
dojo.declare("com.ibm.mm.enabler.iw.services.eventService",null,{constructor:function(){
this.wires={};
},subscribeWire:function(_1b,_1c,_1d,_1e){
com.ibm.mm.enabler.debug.entry("eventService.subscribeWire","source:"+_1b+" sourceEvent:"+_1c+" targetWidget:"+_1d+" targetEvent:"+_1e);
if(typeof _1b=="undefined"||_1b===null){
return false;
}
if(typeof _1c=="undefined"||_1c===null){
return false;
}
if(typeof _1d=="undefined"||_1d===null){
return false;
}
if(typeof _1e=="undefined"||_1e===null){
return false;
}
var rc=true;
if(typeof (this.wires[_1b])=="undefined"||this.wires[_1b]===null){
this.wires[_1b]={};
}
if(typeof (this.wires[_1b][_1c])=="undefined"||this.wires[_1b][_1c]===null){
this.wires[_1b][_1c]={};
}
var _1f=this.wires[_1b][_1c][_1d];
if(typeof _1f=="undefined"||_1f===null){
this.wires[_1b][_1c][_1d]=[];
}else{
if(com.ibm.mm.enabler.utilities.inStringArray(_1e,_1f)){
rc=false;
}
}
if(rc){
this.wires[_1b][_1c][_1d].push(_1e);
}
var _20={};
_20.targetWidget=_1d;
_20.sourceEvent=_1c;
_20.sourceWidget=_1b;
_20.targetEvent=_1e;
serviceManager.getService("eventService").fireEvent(_1b,"onNewWire",_20);
com.ibm.mm.enabler.debug.exit("eventService.subscribeWire","wire is added "+this.wires[_1b][_1c][_1d].length);
return rc;
},publishWire:function(_21,_22,_23,_24){
com.ibm.mm.enabler.debug.entry("eventService.publishWire","source:"+_21+" sourceEvent:"+_22+" payload:"+_23+" payloadType:"+_24);
if(typeof _21=="undefined"||_21===null){
return false;
}
if(typeof _22=="undefined"||_22===null){
return false;
}
var _25=this.wires[_21];
if(typeof (_25)=="undefined"||_25===null){
return false;
}
var _26=_25[_22];
if(typeof (_26)=="undefined"||_26===null){
return false;
}
var _27;
for(_27 in _26){
com.ibm.mm.enabler.debug.log("eventService.publishWire targetWidget:"+_27);
var _28=_26[_27];
for(var i=0;i<_28.length;i++){
this.fireEvent(_27,_28[i],_23,_24,_21);
}
}
return true;
},unSubscribeWidgetWires:function(_29){
if(typeof this.wires[_29]!="undefined"){
var _2a=this.wires[_29];
}
if(typeof (_2a)=="undefined"||_2a===null){
return false;
}
var arr=[];
for(var _2b in _2a){
var _2c=_2a[_2b];
if(typeof _2c!="undefined"&&_2c!==null){
for(var _2d in _2c){
var _2e=_2c[_2d];
if(typeof _2e!="undefined"&&_2e!==null){
for(var i in _2e){
var _2f={sourceWidget:_29,sourceEvent:_2b,targetWidget:_2d,targetEvent:_2e[i]};
arr.push(_2f);
serviceManager.getService("eventService").fireEvent(_2d,"onRemoveWire",_2f);
}
}
}
}
}
if(arr.length!==0){
this.publishEvent(com.ibm.mm.enabler.iw.iEvents.Constants.unSubscribeWire,{wires:arr});
}
this.wires[_29]=null;
},unSubscribeWire:function(_30,_31,_32,_33){
if(typeof _30=="undefined"||_30===null){
return false;
}
if(typeof _31=="undefined"||_31===null){
return false;
}
if(typeof _32=="undefined"||_32===null){
return false;
}
if(typeof _33=="undefined"||_33===null){
return false;
}
var _34=this.wires[_30];
if(typeof (_34)=="undefined"||_34===null){
return false;
}
if(_34[_31]){
var _35=_34[_31];
}else{
return false;
}
var _36=this.wires[_30][_31][_32];
if(typeof _36!="undefined"&&_36!==null){
for(var i=0;i<_36.length;i++){
if(_33==_36[i]){
_36.splice(i,1);
var _37={};
_37.targetWidget=_32;
_37.targetEvent=_33;
_37.sourceWidget=_30;
_37.sourceEvent=_31;
serviceManager.getService("eventService").fireEvent(_32,"onRemoveWire",_37);
this.publishEvent(com.ibm.mm.enabler.iw.iEvents.Constants.unSubscribeWire,{wires:[_37]});
}
}
return true;
}else{
return false;
}
},addWire:function(_38,_39,_3a,_3b){
com.ibm.mm.enabler.debug.entry("eventService.addWire","source:"+_38+" sourceEvent:"+_39+" targetWidget:"+_3a+" targetEvent:"+_3b);
if(typeof _38=="undefined"||_38===null){
return false;
}
if(typeof _39=="undefined"||_39===null){
return false;
}
if(typeof _3a=="undefined"||_3a===null){
return false;
}
if(typeof _3b=="undefined"||_3b===null){
return false;
}
var rc=this.subscribeWire(_38,_39,_3a,_3b);
if(rc){
var _3c=iWidgetContainer.getWidgetById(_3a);
if(typeof _3c!="undefined"&&_3c!==null){
var _3d={};
_3d.SourceWidget=_38;
_3d.SourceEvent=_39;
_3d.TargetEvent=_3b;
if(typeof _3c.wires=="undefined"){
_3c.wires=[];
}
_3c.wires.push(_3d);
}
}
return rc;
},removeWire:function(_3e,_3f,_40,_41){
com.ibm.mm.enabler.debug.entry("eventService.removeWire","source:"+_3e+" sourceEvent:"+_3f+" targetWidget:"+_40+" targetEvent:"+_41);
if(typeof _3e=="undefined"||_3e===null){
return false;
}
if(typeof _3f=="undefined"||_3f===null){
return false;
}
if(typeof _40=="undefined"||_40===null){
return false;
}
if(typeof _41=="undefined"||_41===null){
return false;
}
var rc=this.unSubscribeWire(_3e,_3f,_40,_41);
if(rc){
var _42=iWidgetContainer.getWidgetById(_40);
if(typeof _42!="undefined"&&_42!==null){
var arr=_42.wires;
if(typeof arr!="undefined"&&arr!==null){
for(var i=0;i<arr.length;i++){
var _43=arr[i];
if(_43.SourceWidget==_3e&&_43.SourceEvent==_3f&&_43.TargetEvent==_41){
arr.splice(i,1);
rc=true;
break;
}
}
}
}
}
return rc;
},fireEvent:function(_44,_45,_46,_47,_48){
com.ibm.mm.enabler.debug.entry("eventService.fireEvent","sourceWidget:"+_48+" targetWidget:"+_44+" targetEvent:"+_45+" payload:"+_46+" payloadType:"+_47);
var _49=new com.ibm.mm.enabler.iw.iEventImpl(_45,_47,_46,_48);
var _4a=[];
_4a[0]=_45;
_4a[1]=_49;
var _4b=iWidgetContainer.getWidgetById(_44);
if(typeof _4b!="undefined"&&_4b!==null&&typeof _4b.loaded!="undefined"&&_4b.loaded==true){
com.ibm.mm.enabler.debug.log("eventService.fireEvent","targetWidget is loaded");
dojo.publish("/enabler/eventService/"+_44,_4a);
}else{
com.ibm.mm.enabler.debug.log("eventService.fireEvent","targetWidget is not loaded");
var _4c=new com.ibm.mm.enabler.iw.eventHolder(_44,_4a);
_4c.handler=dojo.subscribe("/enabler/widgetLoaded/"+_44,_4c,"handleLoaded");
}
},publishEvent:function(_4d,_4e){
com.ibm.mm.enabler.debug.entry("eventService.publishEvent"," sourceEvent:"+_4d);
if(typeof _4d=="undefined"||_4d===null){
return;
}
if(typeof _4e=="undefined"||_4e===null){
dojo.publish(_4d);
}
var _4f=[];
if(dojo.isArray(_4e)){
_4f=_4e;
}else{
_4f.push(_4e);
}
dojo.publish(_4d,_4f);
},subscribeEvent:function(_50,_51,_52){
dojo.subscribe(_50,_51,_52);
}});
dojo.declare("com.ibm.mm.enabler.iw.services.queryService",null,{getiWidgetWrapperById:function(id){
var _53=iWidgetContainer.getWidgetById(id);
if(typeof _53=="undefined"||_53===null){
return null;
}
return new com.ibm.mm.enabler.iw.iWidgetWrapperImpl(id);
},getWidgetById:function(id,obj,cb){
com.ibm.mm.enabler.debug.entry("queryService.getWidgetById","id:",id,"obj:",obj,"cb",cb);
var _54=iWidgetContainer.getWidgetById(id);
if(typeof _54=="undefined"||_54===null){
return null;
}
if(_54.loaded){
com.ibm.mm.enabler.debug.log("queryService.getWidgetById","widget is loaded");
if(typeof obj!="undefined"&&typeof cb!="undefined"){
obj[cb](new com.ibm.mm.enabler.iw.WidgetStub(_54));
}else{
return new com.ibm.mm.enabler.iw.WidgetStub(_54);
}
}else{
com.ibm.mm.enabler.debug.log("queryService.getWidgetById","widget is  not loaded");
if(typeof obj!="undefined"&&typeof cb!="undefined"){
var _55={};
_55.widget=_54;
_55.obj=obj;
_55.cb=cb;
_55.handleLoaded=function(){
this.obj[this.cb](new com.ibm.mm.enabler.iw.WidgetStub(this.widget));
};
dojo.subscribe("/enabler/widgetLoaded/"+id,_55,"handleLoaded");
}else{
return null;
}
}
},getWidgetsByDefUrl:function(url){
com.ibm.mm.enabler.debug.entry("queryService.getWidgetsByDefUrl","url:",url);
var arr=[];
for(id in iWidgetContainer.widgetArr){
var _56=iWidgetContainer.widgetArr[id];
if(_56&&_56!==null){
var _57=_56.getWidgetInstance().widgetXMLUrl;
if(typeof _57!="undefined"&&_57!==null&&url==_57){
arr.push(id);
}
}
}
com.ibm.mm.enabler.debug.exit("queryService.getWidgetsByDefUrl",arr);
return arr;
}});
dojo.declare("com.ibm.mm.enabler.iw.services.ServiceManager",null,{constructor:function(){
this.serviceEntries={};
this.services={};
var _58;
if(com.ibm.mm.enabler.services.CONFIG_SERVICE){
_58=com.ibm.mm.enabler.services.CONFIG_SERVICE.getPreferenceValue(com.ibm.mm.enabler.services.CONFIG_SERVICE.CONTEXT_ROOT_ENABLER);
}
if(typeof _58=="undefined"||_58===null){
_58="/mashupmaker";
}
this.serviceEntries["eventService"]=_58+"/js/com/ibm/enabler/iw/services.js";
this.serviceEntries["queryService"]=_58+"/js/com/ibm/enabler/iw/services.js";
this.serviceEntries["persistentAttributesFactoryService"]=_58+"/js/com/ibm/enabler/iw/services.js";
this.serviceEntries["iwidgetFragmentService"]=_58+"/js/com/ibm/enabler/iw/services.js";
if(typeof ibmConfig!="undefined"&&ibmConfig!=null&&typeof ibmConfig.loadServices!="undefined"&&ibmConfig.loadServices!=null&&ibmConfig.loadServices==true){
_58=_58+this.serviceEntriesConfig;
var me=this;
var _59={url:_58,load:function(_5a,_5b){
var _5c=dojo.fromJson(_5a);
var _5d;
var i=0;
for(_5d in _5c){
me.serviceEntries[_5d]=_5c[_5d];
i++;
}
},error:function(_5e,_5f){
com.ibm.mm.enabler.debug.error("com.ibm.mm.enabler.iw.services.ServiceManager","error loading data",_5e);
}};
dojo.xhrGet(_59);
}
},serviceEntriesConfig:"/js/com/ibm/enabler/iw/serviceEntries.json",serviceNS:"com.ibm.mm.enabler.iw.services.",setService:function(_60,_61){
this.serviceEntries[_60]=_61;
},removeService:function(_62){
var _63=this.services[_62];
var _64=this.serviceEntries[_62];
if(typeof _63!="undefined"||_63!==null){
this.services[_62]=null;
}
if(typeof _64!="undefined"||_64!==null){
this.serviceEntries[_62]=null;
}
},getService:function(_65){
var _66=this.services[_65];
var _67=this.serviceEntries[_65];
if(typeof _66=="undefined"||_66===null){
_66=this._createService(_65);
if(typeof _66=="undefined"||_66===null){
if(typeof _67!="undefined"&&_67!==null){
this._loadScript(_67);
_66=this._createService(_65);
if(typeof _66!="undefined"&&_66!==null){
this.services[_65]=_66;
}
}
}else{
this.services[_65]=_66;
}
}
return this.services[_65];
},_loadScript:function(_68){
var _69=document.createElement("script");
_69.src=_68;
document.body.insertBefore(_69,document.body.firstChild);
},_createService:function(_6a){
var _6b;
try{
_6b=eval("new "+this.serviceNS+_6a+"();");
}
catch(err){
com.ibm.mm.enabler.debug.log("services.getService"," failed to create service error detail: "+err.description);
}
return _6b;
}});
window.serviceManager=new com.ibm.mm.enabler.iw.services.ServiceManager();
}


;if(!dojo._hasResource["com.ibm.mm.enabler.iw.internalservices"]){
dojo._hasResource["com.ibm.mm.enabler.iw.internalservices"]=true;
dojo.provide("com.ibm.mm.enabler.iw.internalservices");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.require("com.ibm.mm.enabler.xpath");
dojo.require("com.ibm.mm.enabler.iw.parser");
dojo.require("dojo.string");
dojo.require("dojo.i18n");
dojo.declare("com.ibm.mm.enabler.iw.services.loadService",null,{constructor:function(){
this.modules={};
},loadResource:function(_1,_2,_3,cb,_4){
com.ibm.mm.enabler.debug.entry("loadService.loadResource","uri:"+_3+" mimetype:"+_4+" widgetId:"+_1);
var _5;
if(typeof _2=="undefined"||_2===null){
_2=_3;
}
if(typeof _2!="undefined"&&_2!==null){
var _6=this.modules[_2];
if(typeof _6!="undefined"&&_6!==null){
_5=true;
}
}
if(_5){
return;
}
_6={};
_6.id=_2;
_6.src=_3;
_6.callback=cb;
_6.mimetype=_4;
path=this._rewriteUrl(_3,_1);
var _7=this._getExtension(_3);
if(_7!==null&&_7=="css"){
return this._loadCSS(path);
}
var _8=dojo._xhrObj();
var me=this;
_8.open("GET",path,false);
try{
_8.send(null);
if(_8.status==200){
var _9=_8.responseText;
var _a=_9.replace(/_IWID_/g,"_"+_1+"_");
if(cb){
}
}
}
catch(e){
return false;
}
if(!_a){
return false;
}
if(_7==="js"||_4=="text/javascript"){
var _b=dojo.eval(_a);
}
this.modules[_2]=_6;
return true;
},_rewriteUrl:function(_c,id){
var _d=iWidgetContainer.getWidgetById(id);
var _e=_d.getWidgetInstance().widgetXMLUrl;
var _f=_e.substring(0,_e.lastIndexOf("/")+1);
if(_f.indexOf("://")!=-1){
var _10=_c.indexOf("://");
var _11=_c.indexOf("/",_10+1);
var _12=_c.substring(0,_11);
}
var _13=_c;
if(_c.indexOf("://")==-1){
if(_c.indexOf("/")===0){
if(typeof (_12)!="undefined"){
_13=_12+_c;
}
}else{
if(typeof (_f)!="undefined"){
_13=_f+_c;
}
}
}
if(_13.indexOf("http")===0){
_13=com.ibm.mm.enabler.utilities.rewriteURL(_13);
}
return _13;
},_getExtension:function(uri){
return uri.substring(uri.lastIndexOf(".")+1,uri.length);
},_loadCSS:function(_14){
var _15=document.createElement("link");
_15.setAttribute("rel","stylesheet");
_15.setAttribute("type","text/css");
_15.setAttribute("href",_14);
document.getElementsByTagName("head")[0].appendChild(_15);
}});
dojo.declare("com.ibm.mm.enabler.iw.services.widgetLoadService",null,{getWidgetXML:function(_16,_17){
com.ibm.mm.enabler.debug.entry("widgetLoadService.getWidgetXML","widgetUrl:"+_16+" widgetId:"+_17);
this.widgetId=_17;
var me=this;
var _18=_16;
if(_18.indexOf("http")===0){
_18=com.ibm.mm.enabler.utilities.rewriteURL(_18);
}
var _19={url:_18,load:function(_1a,_1b){
me.handleLoad(_1a,_1b.xhr);
},error:function(_1c,_1d){
com.ibm.mm.enabler.debug.error("widgetLoadService.getWidgetXML","Error widgetLoadService.getWidgetXML error loading!"+_1c);
var _1e=[];
_1e.push("error");
var _1f=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");
_1e.push(dojo.string.substitute(_1f.E_IWIDGETDEF_NOTAVAILABLE_1,[_18]));
_1e.push(_1c.message);
dojo.publish("/enabler/inlineMessage/"+me.widgetId,_1e);
},handleAs:"text"};
dojo.xhrGet(_19);
},handleLoad:function(_20,xhr){
var _21=com.ibm.mm.enabler.iw.parser.WidgetParserFactory.getWidgetParser(xhr.responseText);
var _22=_21.parseWidgetDefinition();
this._fireEvents(_22);
},_fireEvents:function(_23){
this._fireIndividualWidgetStateChange(_23);
},_fireIndividualWidgetStateChange:function(_24){
var _25=[];
_25.push(_24);
dojo.publish("/enabler/widgetXmlRetrieved/"+this.widgetId,_25);
}});
}

dojo.provide("com.ibm.mm.enabler.nls.iwStr")._built=true;
dojo.provide("com.ibm.mm.enabler.nls.iwStr.en");
com.ibm.mm.enabler.nls.iwStr.en={"LOAD":"Loading....."};
dojo.provide("com.ibm.mm.enabler.nls.iwMessages")._built=true;
dojo.provide("com.ibm.mm.enabler.nls.iwMessages.en");
com.ibm.mm.enabler.nls.iwMessages.en={"E_IWIDGETDEF_CONTENTNOTAVAILABLE_1":"BMWIW0002E:Unable to find content for mode -- ${0}.","E_IWIDGETDEF_NOTAVAILABLE_1":"BMWIW0001E:Unable to load iWidget ${0}."};

;if(!dojo._hasResource["com.ibm.mm.enabler.iw"]){
dojo._hasResource["com.ibm.mm.enabler.iw"]=true;
dojo.provide("com.ibm.mm.enabler.iw");
dojo.require("com.ibm.mm.enabler.aggregation.javascript");
dojo.require("com.ibm.mm.enabler.utilities");
dojo.require("com.ibm.mm.enabler.iw.iContextImpl");
dojo.require("com.ibm.mm.enabler.iw.ItemSetImpl");
dojo.require("com.ibm.mm.enabler.iw.eventImpl");
dojo.require("com.ibm.mm.enabler.iw.services");
dojo.require("com.ibm.mm.enabler.iw.internalservices");
dojo.require("com.ibm.mm.enabler.iw.utils");
dojo.require("com.ibm.mm.enabler.iw.payloadDef");
dojo.require("dojo.i18n");
dojo.requireLocalization("com.ibm.mm.enabler","iwStr",null,"de,en,es,fr,it,ROOT,ja,ko,pt-br,zh,zh-tw");
dojo.requireLocalization("com.ibm.mm.enabler","iwMessages",null,"de,en,es,fr,it,ROOT,ja,ko,pt-br,zh,zh-tw");
dojo.declare("com.ibm.mm.enabler.iWidgetWrapperDefaultImpl",null,{constructor:function(_1,id){
this._internalIbmModes=com.ibm.mm.enabler.iw.ItemSet._internalIbmModes;
this.rootElement=_1;
if(typeof (id)!="undefined"&&id!=null){
this.id=id;
}else{
this.id=_1.getAttribute("id");
}
this.simpleWidgetEvents={};
this.loaded=false;
this.widgetAttributes=null;
this.widgetItemSets=null;
this.xmlRetrievedHandler=dojo.subscribe("/enabler/widgetXmlRetrieved/"+this.id,this,"handleWidgetInfoRetrieved");
this.eventServiceHandler=dojo.subscribe("/enabler/eventService/"+this.id,this,"handleEvent");
this.ns=_1.className.substr(0,3);
this.inlineMessageHandler=dojo.subscribe("/enabler/inlineMessage/"+this.id,this,"_handleInlineMessage");
this.windowManager={};
this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");
this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");
},getWidgetInstance:function(){
if(typeof this.widgetInstance!="undefined"||this.widgetInstance!=null){
return this.widgetInstance;
}
this.widgetInstance=new com.ibm.mm.enabler.iWidgetInstanceStandard(this.rootElement,this.id);
return this.widgetInstance;
},_resourceBaseURL:new dojo.moduleUrl("com.ibm.mm.enabler","iw/"),_jsHandler:com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER,_setLoading:function(){
var _2=document.createElement("div");
_2.className=this.ns+"content";
if(ibmConfig&&ibmConfig.loadingHTML){
_2.innerHTML=ibmConfig.loadingHTML;
}else{
_2.innerHTML="<img src='"+dijit._Widget.prototype._blankGif+"'"+" class='lotusLoading' alt='"+this.iwStr.LOAD+"' />&nbsp;"+this.iwStr.LOAD;
}
this.rootElement.appendChild(_2);
},_handleInlineMessage:function(_3,_4,_5){
var _6=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",this.ns+"content",this.rootElement,_6,false);
var _7=_6[0];
_7.innerHTML="";
com.ibm.mm.enabler.debug.logInlineMessage(_7,_3,_4,_5);
},loadWidgetDefinition:function(){
com.ibm.mm.enabler.debug.entry("iWidget.loadWidgetDefinition");
var _8=this.rootElement;
if(this.loaded){
return false;
}
this._setLoading();
if(this.getWidgetInstance().widgetXMLUrl!==null){
var _9=new com.ibm.mm.enabler.iw.services.widgetLoadService();
_9.getWidgetXML(this.getWidgetInstance().widgetXMLUrl,this.id);
}else{
return false;
}
com.ibm.mm.enabler.debug.entry("iWidget.loadWidgetDefinition",true);
return true;
},render:function(){
com.ibm.mm.enabler.debug.entry("iWidget.render");
this.prepare();
this.loadWidgetDefinition();
com.ibm.mm.enabler.debug.exit("iWidget.render");
},prepare:function(){
com.ibm.mm.enabler.debug.entry("iWidget.prepare");
variableName="_"+this.id+"_"+"iContext";
dojo.global[variableName]=new com.ibm.mm.enabler.iw.iContextImpl(this.id,this.ns);
com.ibm.mm.enabler.debug.exit("iWidget.prepare");
},_updateMarkup:function(_a,_b){
com.ibm.mm.enabler.debug.entry("iWidget._updateMarkup");
var _c=this.widgetDef;
var _d=_c.getMarkupByMode(_a);
if(_a==iwConstants.mode_view){
if(this.widgetDef.getAllowInstanceContent()){
var _e=this.getWidgetInstance().getDefaultViewContent();
if(_e&&_e!==null){
_d=_e;
}
}
}
if(typeof _d=="undefined"||_d===null){
var _f=dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_CONTENTNOTAVAILABLE_1,[_a]);
com.ibm.mm.enabler.debug.info("iWidget._updateMarkup",_f);
return false;
}
var _10=this._prepareMarkup(_d);
var _11=document.createElement("DIV");
_11.innerHTML=_10;
var _12=_11.getElementsByTagName("script");
if(_12!==null){
for(var i=0;i<_12.length;i++){
var _13=_12[i];
var id=_13.getAttribute("id");
if(id===null||id==""){
_13.setAttribute("id","_scr#"+i);
}
}
}
dojo.addClass(_b,_a);
_b.innerHTML=_11.innerHTML;
com.ibm.mm.enabler.dom.destroyNode(_11);
com.ibm.mm.enabler.debug.exit("iWidget._updateMarkup");
return true;
},_prepareMarkup:function(_14){
com.ibm.mm.enabler.debug.entry("iWidget._prepareMarkup");
var _15=_14.replace(/_IWID_/g,"_"+this.id+"_");
var _16=_15.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.id+"_iContext");
com.ibm.mm.enabler.debug.exit("iWidget._updateMarkup",_16);
return _16;
},destroy:function(){
dojo.unsubscribe(this.xmlRetrievedHandler);
dojo.unsubscribe(this.eventServiceHandler);
dojo.unsubscribe(this.inlineMessageHandler);
dojo.global["_"+this.id+"_"+"iContext"]=null;
var arr=this.wires;
var _17=serviceManager.getService("eventService");
if(typeof arr!="undefined"&&arr!=null){
for(var i=0;i<arr.length;i++){
var _18=arr[i];
_17.unSubscribeWire(_18["SourceWidget"],_18["SourceEvent"],this.id,_18["TargetEvent"]);
}
}
_17.unSubscribeWidgetWires(this.id);
},handleWidgetInfoRetrieved:function(_19){
com.ibm.mm.enabler.debug.entry("iWidget.handleWidgetInfoRetrieved");
this.widgetDef=_19;
this.update();
this.onLoad();
com.ibm.mm.enabler.debug.exit("iWidget.handleWidgetInfoRetrieved",this.id);
},update:function(){
this._initialize();
var _1a=this.rootElement.lastChild;
this._updateMarkup(this.currentMode,_1a);
this._loadWidgetSharedResource();
this._createiScope();
this._evalScripts(_1a);
this.windowManager[this.currentMode]={id:this.currentMode,root:_1a,active:true,external:false};
},_initialize:function(){
com.ibm.mm.enabler.debug.entry("iWidget._initialize");
var _1b=this.widgetDef.getDefaultLanguage();
if(typeof _1b!="undefined"&&_1b!=null){
this.defaultLanguage=_1b;
}else{
this.defaultLanguage="en";
}
var _1c=this._getDefaultMode();
if(_1c==null){
_1c=iwConstants.mode_view;
}
this.currentMode=_1c;
this.getPublishedEvents();
this.getHandledEvents();
this.getWires();
com.ibm.mm.enabler.debug.exit("iWidget._initialize");
},_evalScripts:function(_1d){
var _1e=_1d.getElementsByTagName("script");
for(var i=0;i<_1e.length;i++){
this._jsHandler.handle(_1e[i]);
}
},onLoad:function(){
this._handleEventInternal(com.ibm.mm.enabler.iw.iEvents.Constants.onLoad);
this._handleEventInternal("on"+this.currentMode);
this.loaded=true;
dojo.publish("/enabler/widgetLoaded/"+this.id);
},_getSimpleEventHandler:function(_1f){
com.ibm.mm.enabler.debug.entry("iWidget._getSimpleEventHandler",_1f);
if(this.simpleWidgetEvents&&this.simpleWidgetEvents[_1f]){
return this.simpleWidgetEvents[_1f];
}
var _20=this.widgetDef.getWidgetEvents()[_1f];
if(_20==null){
_20=_1f;
}
var _21=this._getHandlerScope(_20);
var _22=null;
if(_21!=null){
_22=dojo.hitch(_21,_20);
this.simpleWidgetEvents[_1f]=_22;
}else{
if(_20.indexOf("on")==0){
var _23="on"+_20.substr(2,1).toUpperCase()+_20.substr(3);
if(_23!=_20){
_21=this._getHandlerScope(_23);
if(_21!=null){
_22=dojo.hitch(_21,_23);
this.simpleWidgetEvents[_1f]=_22;
}
}
}
}
com.ibm.mm.enabler.debug.exit("iWidget._getSimpleEventHandler",_22);
return _22;
},_getHandlerScope:function(_24){
com.ibm.mm.enabler.debug.entry("iWidget._getHandlerScope",_24);
var fn=dojo.global["_"+this.id+"_"+_24];
if(typeof (fn)=="undefined"){
widgetScope=dojo.global["_"+this.id+"_iContext"].iScope();
if(widgetScope&&widgetScope[_24]){
fn=widgetScope;
}
}
if(typeof fn=="undefined"||fn==null){
fn=dojo.global[_24];
}
if(typeof fn=="undefined"||fn==null){
return null;
}else{
com.ibm.mm.enabler.debug.exit("iWidget._getHandlerScope",fn);
return fn;
}
},handleEvent:function(_25,_26){
if(typeof _25=="undefined"||_25==null){
return false;
}
if(_25==com.ibm.mm.enabler.iw.iEvents.Constants.onModeChanged){
return this._handleModeChange(_26);
}
if(_25=="onNewWire"){
return this._handleNewWire(_26);
}
if(_25=="onRemoveWire"){
return this._handleRemoveWire(_26);
}
return this._handleEventInternal(_25,_26);
},_handleNewWire:function(_27){
var _28=_27.payload;
var _29=_28.sourceEvent;
var _2a=this.publishedEvents[_29];
if(typeof _2a!="undefined"&&_2a!=null){
var _2b=_2a[0].getOnNewWire();
if(_2b!=null){
var _2c=this._getHandlerScope(_2b);
if(_2c!=null&&dojo.isFunction(_2c)){
_2c(_27);
}else{
if(_2c!=null&&dojo.isObject(_2c)){
_2c[_2b](_27);
}
}
return true;
}
}
return false;
},_handleRemoveWire:function(_2d){
var _2e=_2d.payload;
var _2f=_2e.targetEvent;
var _30=this.handledEvents[_2f];
if(typeof _30!="undefined"&&_30!=null){
var _31=_30[0].getOnRemoveWire();
if(_31!=null){
var _32=this._getHandlerScope(_31);
if(_32!=null&&dojo.isFunction(_32)){
_32(_2d);
}else{
if(_32!=null&&dojo.isObject(_32)){
_32[_31](_2d);
}
}
return true;
}
}
return false;
},_handleModeChange:function(_33){
var _34=false;
var _35=this.currentMode;
var _36=_33.payload;
if(typeof _36=="undefined"||_36==null){
return false;
}
if(dojo.isString(_36)){
_36=dojo.fromJson(_36);
}
if(typeof _36=="undefined"||_36==null){
return false;
}
var _37=_36.newMode;
if(typeof _37=="undefined"){
_37=null;
}
var _38=_36.rootElementId;
if(typeof _38=="undefined"){
_38=null;
}
if(_37!=null&&_37==this.currentMode){
return false;
}
if(_37==null){
return false;
}
var _39=false;
if(_38!=null){
_39=true;
}
var _3a=_38;
var _3b=this.windowManager[_37];
var _3c=false;
if(typeof _3b!="undefined"&&_3b!==null){
var _3d=_3b.root;
if(!_3b.external&&_3d!=null&&_38===null){
_3a=_3d;
_3c=true;
_34=true;
dojo.style(_3d,"display","");
}
}
if(!_3c){
if(_3a===null){
var _3e=document.createElement("div");
_3e.className=this.ns+"content";
this.rootElement.appendChild(_3e);
_3a=this.rootElement.lastChild;
}
_34=this._updateMarkup(_37,_3a);
}
if(_34){
var _3f=this.windowManager[this.currentMode];
var _40=_3f.root;
if(_3f.external){
dojo.style(_40,"display","none");
this.windowManager[this.currentMode]=null;
}else{
if(_38!=null){
_3f.active=false;
}else{
_3f.active=false;
dojo.style(_40,"display","none");
}
}
this.currentMode=_37;
this.windowManager[_37]={id:_37,root:_3a,active:true,external:_39};
if(!_3c){
this._evalScripts(_3a);
}
this._handleOnModeEvent(_37);
}
if(_34){
serviceManager.getService("eventService").publishEvent(com.ibm.mm.enabler.iw.iEvents.Constants.modeChanged,[this.id,_35,_37]);
}
return _34;
},_handleOnModeEvent:function(_41){
var _42=false;
var _43="on"+_41;
var _44=this._getSimpleEventHandler(_43);
if(_44!==null){
_44();
_42=true;
}
return _42;
},_handleEventInternal:function(_45,_46){
com.ibm.mm.enabler.debug.entry("iWidget._handleEventInternal",_45,_46);
if(typeof _45=="undefined"||_45===null){
return false;
}
var _47=false;
var _48=null;
if(_45.indexOf("on")===0){
var _49=this._getSimpleEventHandler(_45);
if(_49!==null){
_48=_49;
}
}
if(_48===null){
_48=this.getPublicEventHandler(_45);
}
if(_48!==null){
com.ibm.mm.enabler.debug.log("iWidget._handleEventInternal","handlerFn:",_48);
if(_46!="undefined"&&_46!==null){
_48(_46);
}else{
_48();
}
_47=true;
}
com.ibm.mm.enabler.debug.exit("iWidget._handleEventInternal",_47);
return _47;
},getPublicEventHandler:function(_4a){
com.ibm.mm.enabler.debug.entry("iWidget.getPublicEventHandler",_4a);
if(this.getHandledEvents()==null){
return null;
}
var _4b=this.getHandledEvents()[_4a];
if(!_4b){
return null;
}
var _4c=_4b[0].handlingFn;
if(_4c!=null){
var _4d=this._getHandlerScope(_4c);
var _4e=null;
if(_4d!=null){
_4e=dojo.hitch(_4d,_4c);
}
}
com.ibm.mm.enabler.debug.exit("iWidget._getPublicEventHandler",_4e);
return _4e;
},getParent:function(){
if(!this.parent){
this.parent=com.ibm.mm.enabler.iw.utils.getWidgetParent(this.id);
}
return this.parent;
},getWidgetAttributes:function(){
if(typeof (this.widgetAttributes)=="undefined"||this.widgetAttributes==null){
var _4f=serviceManager.getService("persistentAttributesFactoryService");
this.widgetAttributes=_4f.createPersistentAttributes(this);
this._loadWidgetAttributes();
}
return this.widgetAttributes;
},_loadDefWidgetAttributes:function(){
com.ibm.mm.enabler.debug.entry("iWidget:_loadDefWidgetAttributes");
if(typeof (this.widgetDef)!="undefined"){
var _50=this.widgetDef.getAttributes();
if(typeof _50!="undefined"&&_50!=null){
var _51=_50.items;
if(typeof _51!="undefined"&&_51!=null){
for(var i in _51){
var _52=_51[i];
if(typeof _52!="undefined"&&_52!=null){
var _53=_52.id;
var _54=_52.value;
var _55=_52.readOnly;
this.widgetAttributes._internal().setItemValue(_53,_54,_55,this._internalIbmModes.xml);
}
}
}
}
}
com.ibm.mm.enabler.debug.exit("iWidget:_loadDefWidgetAttributes");
},_loadWidgetInstanceAttributesFromRootElement:function(){
com.ibm.mm.enabler.debug.entry("iWidget._loadWidgetInstanceAttributesFromRootElement");
var _56=this.rootElement.attributes;
for(var i=0;i<_56.length;i++){
var att=_56[i];
var _57=this.rootElement.getAttribute(att.name);
if(typeof _57!="undefined"&&_57!=null&&_57!=""){
this.widgetAttributes._internal().setItemValue(att.name,_57,false,this._internalIbmModes.microformat);
com.ibm.mm.enabler.debug.log("iWidget._loadWidgetInstanceAttributesFromRootElement","name:"+att.name+" value:"+_57);
}
}
com.ibm.mm.enabler.debug.exit("iWidget._loadWidgetInstanceAttributesFromRootElement");
},getWidgetItemSet:function(_58){
if(typeof (this.widgetItemSets)=="undefined"||this.widgetItemSets==null){
this._loadItemSets();
}
var _59=this.widgetItemSets[_58];
if(typeof _59=="undefined"){
_59=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(parent,_58);
this.widgetItemSets[_58]=_59;
}
return _59;
},_loadWidgetDefItemSets:function(){
com.ibm.mm.enabler.debug.entry("iWidget._loadWidgetDefItemSets");
if(typeof (this.widgetDef)!="undefined"){
var _5a=this.widgetDef.getAllItemSetNames();
for(var i=0;i<_5a.length;i++){
var _5b=_5a[i];
var _5c=this.widgetDef.getItemSet(_5b);
var _5d=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(parent,_5c.name,_5c.onItemSetChanged,null,_5c.isPrivate);
var _5e=_5c.items;
for(var j in _5e){
var _5f=_5e[j];
_5d.setItemValue(_5f.id,_5f.value,_5f.isReadOnly);
}
this.widgetItemSets[_5b]=_5d;
}
}
com.ibm.mm.enabler.debug.exit("iWidget._loadWidgetDefItemSets");
},_loadWidgetSharedResource:function(){
var _60=this.widgetDef.getResources();
com.ibm.mm.enabler.debug.entry("iWidget._loadWidgetSharedResource",_60);
if(typeof _60!="undefined"&&_60!=null){
for(var i in _60){
var _61=_60[i];
var _62=_61[iwConstants.RESOURCE.id];
var uri=_61[iwConstants.RESOURCE.src];
var _63=_61[iwConstants.RESOURCE.mimetype];
var _64=_61[iwConstants.RESOURCE.callback];
if(typeof _63=="undefined"||_63==null){
_63="text/plain";
}
if(typeof uri!="undefined"&&uri!=null){
serviceManager.getService("loadService").loadResource(this.id,null,uri,_64,_63);
}
}
}
com.ibm.mm.enabler.debug.exit("iWidget._loadWidgetSharedResource");
},_createiScope:function(){
var _65=this.widgetDef.getIScope();
com.ibm.mm.enabler.debug.entry("iWidget._createiScope",_65);
if(typeof _65!=undefined&&_65!=null){
try{
this.iScope=eval("new "+_65+"();");
}
catch(err){
com.ibm.mm.enabler.debug.log("iWidget._createiScope","iScope"+_65,"Error",err);
}
}
if(typeof this.iScope=="undefined"||this.iScope==null){
this.iScope={};
}
dojo.global["_"+this.id+"_iContext"].scope=this.iScope;
this.iScope.iContext=dojo.global["_"+this.id+"_iContext"];
},getIDescriptor:function(){
if(this.iDescriptor){
return this.iDescriptor;
}
this.iDescriptor=new com.ibm.mm.enabler.iw.iDescriptor(this.id,this.widgetDef.getiDescriptor(),this.getWidgetInstance().getiDescriptor());
return this.iDescriptor;
},getPublishedEvents:function(){
com.ibm.mm.enabler.debug.entry("com.ibm.mm.enabler.iWidgetWrapperStandardImpl.getPublishedEvents");
if(!this.publishedEvents){
this.publishedEvents=this.widgetDef.getPublishedEvents();
}
com.ibm.mm.enabler.debug.exit("iWidget.getPublishedEvents",this.publishedEvents);
return this.publishedEvents;
},getHandledEvents:function(){
com.ibm.mm.enabler.debug.entry("iWidget.getHandledEvents");
if(!this.handledEvents){
this.handledEvents=this.widgetDef.getHandledEvents();
}
com.ibm.mm.enabler.debug.exit("iWidget.getHandledEvents",this.handledEvents);
return this.handledEvents;
},_loadWidgetAttributes:function(){
com.ibm.mm.enabler.debug.entry("iWidget:_loadWidgetAttributes");
this._loadDefWidgetAttributes();
var _66=this.getWidgetInstance().getWidgetAttributes();
if(_66!=null){
for(var i in _66){
var _67=i;
var _68=_66[_67].defaultValue;
_68=_68.replace(/&lt;/gi,"<");
_68=_68.replace(/&gt;/gi,">");
_68=_68.replace(/&amp;/gi,"&");
this.widgetAttributes._internal().setItemValue(_67,_68,false,this._internalIbmModes.microformat);
}
}
com.ibm.mm.enabler.debug.exit("iWidget:_loadWidgetAttributes");
},_loadItemSets:function(){
com.ibm.mm.enabler.debug.entry("iWidget._loadItemSets");
this.widgetItemSets={};
this._loadWidgetDefItemSets();
var _69=this.getWidgetInstance().getItemSets();
if(_69!=null){
for(var i in _69){
if(i==iwConstants.ATTRIBUTES||i==iwConstants.USERPROFILE||i==iwConstants.IDESCRIPTOR){
continue;
}
var _6a=_69[i];
var _6b=this.widgetItemSets[i];
if(typeof _6b=="undefined"||_6b==null){
_6b=new com.ibm.mm.enabler.iw.DefaultItemSetImpl(this,i);
this.widgetItemSets[i]=_6b;
}
for(var j in _6a){
var _6c=j;
var _6d=_6a[_6c]["defaultValue"];
this.widgetItemSets[i].setItemValue(_6c,_6d,false);
}
}
}
com.ibm.mm.enabler.debug.exit("iWidget._loadItemSets");
},_getDefaultMode:function(){
var _6e=this.getWidgetInstance().getiDescriptor();
if(typeof _6e!="undefined"&&_6e!=null){
var _6f=_6e[iwConstants.iDescriptorItems.mode];
if(typeof _6f!="undefined"||_6f!=null){
return _6f.defaultValue;
}
}
var _70=this.widgetDef.getiDescriptor();
var _71=null;
if(typeof _70!="undefined"&&_70!=null){
_71=_70[iwConstants.iDescriptorItems.mode];
if(typeof _71=="undefined"){
_71=null;
}
}
return _71;
},getWires:function(){
if(typeof (this.wires)=="undefined"||this.wires===null){
this.wires=this.getWidgetInstance().getWires();
for(var i=0;i<this.wires.length;i++){
var _72=this.wires[i];
serviceManager.getService("eventService").subscribeWire(_72.SourceWidget,_72.SourceEvent,this.id,_72.TargetEvent);
}
}
return this.wires;
}});
dojo.declare("com.ibm.mm.enabler.iWidgetContainer",null,{constructor:function(){
this.widgetArr={};
this.eventService=serviceManager.getService("eventService");
this.queryService=serviceManager.getService("queryService");
dojo.subscribe("/enabler/pageChanged",this,"_unloadWidgets");
dojo.subscribe("/enabler/widgetDeleted",this,"_unloadWidgets");
dojo.subscribe("/enabler/unloadWidget",this,"_unloadWidgets");
var img=document.createElement("img");
img.src=dijit._Widget.prototype._blankGif;
img.className="lotusLoading";
this.processAnim=img;
},createWidget:function(_73){
com.ibm.mm.enabler.debug.entry("iWidgetContainer.createWidget",_73);
var id=_73.getAttribute("id");
if(typeof (id)=="undefined"){
return;
}
var _74=this.widgetArr[id];
if(typeof _74!="undefined"&&_74!==null){
var _75=_74.rootElement;
if(_75==_73){
return _74;
}else{
this._unloadWidget(id);
}
}
var _76=new com.ibm.mm.enabler.iWidgetWrapperDefaultImpl(_73,id);
this.widgetArr[id]=_76;
com.ibm.mm.enabler.debug.exit("iWidgetContainer.createWidget",_76);
return _76;
},renderWidget:function(_77){
if(typeof _77=="undefined"){
return;
}
if(_77.loaded&&_77.loaded==true){
return;
}
_77.render();
},getWidgetById:function(id){
com.ibm.mm.enabler.debug.entry("iWidgetContainer.getWidgetById",id);
var _78=this.widgetArr[id];
if(typeof _78!="undefined"){
com.ibm.mm.enabler.debug.exit("iWidgetContainer.getWidgetById",_78);
return _78;
}
return null;
},_unloadWidgets:function(arr){
com.ibm.mm.enabler.debug.entry("iWidgetContainer._unloadWidgets");
var _79;
if(typeof arr!="undefined"||arr!==null){
if(dojo.isArray(arr)){
for(var i in arr){
_79=arr[i];
this._unloadWidget(_79);
}
dojo.publish("/enabler/widgetsUnloaded");
}else{
if(dojo.isString(arr)){
this._unloadWidget(arr);
}
}
}
},_unloadWidget:function(_7a){
if(typeof this.widgetArr[_7a]!="undefined"&&this.widgetArr[_7a]!==null){
var _7b=this.widgetArr[_7a];
if(_7b.loaded){
_7b.handleEvent(com.ibm.mm.enabler.iw.iEvents.Constants.onUnLoad);
_7b.destroy();
delete this.widgetArr[_7a];
}else{
_7b.destroy();
delete this.widgetArr[_7a];
}
}
}});
iWidgetContainer=new com.ibm.mm.enabler.iWidgetContainer();
dojo.declare("com.ibm.mm.enabler.iWidgetInstanceStandard",null,{constructor:function(_7c,id){
this.rootElement=_7c;
this.id=id;
this.ns=_7c.className.substr(0,3);
var _7d=[];
className=this.ns+"Definition";
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",className,this.rootElement,_7d,false);
var _7e=_7d[0];
var url=_7e.getAttribute("href");
if(typeof (url)!="undefined"&&url!==null){
this.widgetXMLUrl=url;
}
},getDefaultViewContent:function(){
if(this.defaultViewContent){
return this.defaultViewContent;
}
var _7f=this.ns+"Content";
var _80=dojo.query("span."+_7f,this.rootElement);
if(typeof _80!="undefined"&&_80!==null){
var _81=_80[0];
}
if(_81){
this.defaultViewContent=_81.innerHTML;
return this.defaultViewContent;
}else{
return null;
}
},getWidgetEvents:function(){
if(this.widgetEvents){
return this.widgetEvents;
}
var _82={};
var _83=this.rootElement.attributes;
for(var i=0;i<_83.length;i++){
var _84=_83[i];
if(_84.name!==null&&_84.name.indexOf("on")===0){
var _85=this.rootElement.getAttribute(_84.name);
if(typeof _85!="undefined"&&_85!==null){
_82[_84.name]=_85;
com.ibm.mm.enabler.debug.log("iWidgetInstance.getWidgetEvents","eventName:"+_84.name+" handler:"+_82[_84.name]);
}
}
}
this.widgetEvents=_82;
return this.widgetEvents;
},getWires:function(){
var _86=[];
var ns=this.ns;
var _87="ReceivedEvent";
var _88=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",ns+_87,this.rootElement,_88,true);
var _89=["SourceWidget","SourceEvent","TargetEvent"];
var _8a=["SourceEvent","TargetEvent"];
for(var i=0;i<_88.length;i++){
var _8b=_88[i];
var _8c={};
var _8d=true;
for(var j=0;j<2;j++){
var _8e=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",ns+_8a[j],_8b,_8e,false);
if(_8e.length==0){
_8d=false;
}else{
if(j==0){
var _8f=_8e[0].getAttribute("href");
if(typeof _8f!="undefined"||_8f!=null){
var _90=_8f.indexOf("#");
if(_90!=-1){
_8f=_8f.substring(_90+1);
}
_8c[_89[0]]=_8f;
_8c[_89[1]]=_8e[0].innerHTML;
}
}else{
_8c[_89[2]]=_8e[0].innerHTML;
}
}
}
if(_8d){
_86.push(_8c);
}
}
return _86;
},getWidgetAttributes:function(){
var _91=this.getItemSets()[iwConstants.ATTRIBUTES];
if(typeof _91=="undefined"){
_91=null;
}
return _91;
},getiDescriptor:function(){
var _92=this.getItemSets()[iwConstants.IDESCRIPTOR];
if(typeof _92=="undefined"){
_92=null;
}
return _92;
},getItemSets:function(){
if(this.itemSets){
return this.itemSets;
}
this.loadItemSets();
return this.itemSets;
},loadItemSets:function(){
delete this.itemSets;
this.itemSets={};
var _93=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",this.ns+"ItemSet",this.rootElement,_93,true);
if(_93.length>0){
for(var i=0;i<_93.length;i++){
var _94=_93[i];
var _95=_94.getAttribute("title");
if(typeof (_95)!="undefined"){
aItemSet=this.itemSets[_95];
if(typeof aItemSet=="undefined"||aItemSet===null){
this.itemSets[_95]={};
}
var _96=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",this.ns+"Item",_94,_96,true);
if(_96.length!=0){
for(var j=0;j<_96.length;j++){
var _97=_96[j];
var _98=this._loadLocalizedItem(_97);
var _99=_98.itemName;
this.itemSets[_95][_99]=_98;
}
}
}
}
}
},_loadLocalizedItem:function(_9a){
var _9b={};
var _9c=_9a.getAttribute("href");
var _9d=_9c.indexOf("#");
if(_9d!=-1){
_9c=_9c.substring(_9d+1);
}
_9b.itemName=_9c;
var _9e=_9a.getAttribute("lang");
if(typeof _9e=="undefined"){
_9e=null;
}
if(_9e!=null){
_9b.defaultLang=_9e;
}
var _9f=_9a.innerHTML;
if(typeof _9f!="undefined"||_9f!=null){
_9b.defaultValue=_9f;
}
com.ibm.mm.enabler.debug.exit("com.ibm.mm.enabler.iWidgetInstanceStandard._loadLocalizedItem","item:"+_9b);
return _9b;
}});
iwConstants={mode_view:"view",mode_edit:"edit",mode_help:"help",ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",iDescriptorItems:{title:"title",name:"name",description:"description",defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",locales:"locales",mode:"mode",size:"size",author:"author",email:"email",website:"website",version:"version",globalAttributes:"globalAttributes",icon:"icon"},CSSCLASS_INSTANCE:{iwiWidget:"iWidget",iwDefinition:"Definition",iwHandler:"Handler",iwItemDescription:"ItemDescription",iwReadOnly:"ReadOnly",iwItemSet:"ItemSet",iwItemSetDescRef:"ItemSetDescRef",iwResource:"Resource",iwSrc:"iwSrc",iwmime:"mime",iwversion:"version",iwcallback:"callback",iwContent:"Content",iwAllowInstanceContent:"AllowInstanceContent",iwReceivedEvent:"ReceivedEvent",iwSourceEvent:"SourceEvent",iwTargetEvent:"TargetEvent",iwItem:"Item",iwValue:"Value"},RESOURCE:{src:"src",id:"id",mimetype:"mimetype",callback:"callback",version:"version"}};
}


;if(!dojo._hasResource["com.ibm.mm.livetext.widgets"]){
dojo._hasResource["com.ibm.mm.livetext.widgets"]=true;
dojo.provide("com.ibm.mm.livetext.widgets");
dojo.provide("tagservices.widgets");
dojo.require("com.ibm.mm.enabler.debug");
dojo.declare("tagservices.widgets",null,{processTag:function(_1){
com.ibm.mm.enabler.debug.entry("tagservices.widgets.processTag","Tag:"+_1);
com.ibm.mm.enabler.debug.log("tagservices.widgets.processTag","widgets:process IWidget");
var _2=iWidgetContainer.createWidget(_1);
if(_2){
iWidgetContainer.renderWidget(_2);
}
}});
}


;if(!dojo._hasResource["lconn.core.dynamiciwidget"]){
dojo._hasResource["lconn.core.dynamiciwidget"]=true;
(function(){
dojo.provide("lconn.core.dynamiciwidget");
dojo.require("net.jazz.ajax.xdloader");
function _1(_2){
_2.src=dijit._Widget.prototype._blankGif;
};
lconn.core.dynamiciwidget.create=function(_3,_4){
var _5=dojo.getObject(_3);
if(!_5){
_5=dojo.declare(_3,null,{onLoad:function(){
var _6=this.iContext;
var _7=_6.getRootElement();
dojo.query("img.lotusLoading",_7).forEach(_1);
var _8=_6.getiWidgetAttributes();
var _9=_4||_3+"Impl";
net.jazz.ajax.xdloader.load_async(_9,dojo.hitch(this,"_onModuleLoaded",this.onLoad));
},_onModuleLoaded:function(_a){
if(!this._isUnloaded&&_a!=this.onLoad){
this.onLoad();
}
},onUnload:function(){
this._isUnloaded=true;
}});
}
return _5;
};
})();
}


;if(!dojo._hasResource["lconn.core.mumOverride"]){
dojo._hasResource["lconn.core.mumOverride"]=true;
dojo.provide("lconn.core.mumOverride");
dojo.require("com.ibm.mm.enabler.iw");
dojo.require("com.ibm.mm.enabler.services.ConfigService");
dojo.require("com.ibm.mm.livetext.serviceImpl");
dojo.require("com.ibm.mm.livetext.widgets");
dojo.require("lconn.core.dynamiciwidget");
var url=ibmConfig.proxyURL;
ibmConfig["com.ibm.mashups.proxy.url"]=url.replace(/\/$/,"");
com.ibm.mm.enabler.iw.InternalPersistentAttributesToPreferenceModelAdapter.prototype.save=function(_1){
if(this.serverless){
this._saveMicroformat();
}else{
return null;
}
this.reload();
var _2=null;
if(_1){
_2=function(_3,_4){
if(_1){
_1();
}
};
}
lconn.core.mumOverride.saveAttributes(this.widget,this.microformatItems,_2);
return (this);
};
com.ibm.mm.enabler.iw.iContextImpl.prototype.getUserProfile=function(){
var _5=new com.ibm.mm.enabler.iw.ManagedItemSetImpl();
if(window.widgetUserInfo!=null){
_5.setUserInfo(widgetUserInfo);
}else{
if(WidgetPlacementConfig.userInfoXML==null){
var _6=function(_7,_8){
WidgetPlacementConfig.userInfoXML=_7;
_5.setXmlDoc(_7);
};
var _9={url:WidgetPlacementConfig.userInfoUrl,handleAs:"xml",load:_6,sync:true,error:lconn.core.errorhandling.DefaultXHRErrorHandler};
dojo.xhrGet(_9);
}else{
_5.setXmlDoc(WidgetPlacementConfig.userInfoXML);
}
}
return _5;
};
dojo.declare("com.ibm.mm.enabler.iw.ManagedItemSetImpl",com.ibm.mm.enabler.iw.ManagedItemSet,{constructor:function(){
},getItemValue:function(_a){
if(this.widgetUserInfo!=null){
return this.widgetUserInfo[_a];
}else{
if(this.xmlDoc!=null){
return this.xmlDoc.documentElement.getAttribute(_a);
}else{
return null;
}
}
},setXmlDoc:function(_b){
this.xmlDoc=_b;
},setUserInfo:function(_c){
this.widgetUserInfo=_c;
}});
com.ibm.mm.enabler.iWidgetWrapperDefaultImpl.prototype.update=function(){
this._initialize();
var _d;
var _e=dojo.query("div.mm_content",this.rootElement);
if(_e.length>0){
_d=_e[0];
}else{
_d=this.rootElement.lastChild;
}
this._updateMarkup(this.currentMode,_d);
this._loadWidgetSharedResource();
this._createiScope();
this._evalScripts(_d);
this.windowManager[this.currentMode]={id:this.currentMode,root:_d,active:true,external:false};
};
com.ibm.mm.enabler.iWidgetWrapperDefaultImpl.prototype.handleEvent=function(_f,_10){
if(typeof _f=="undefined"||_f==null){
return false;
}
if(_f==com.ibm.mm.enabler.iw.iEvents.Constants.onModeChanged){
if(WidgetPlacementConfig.isTabbedFullPageWidgetRendering){
handleModeExit();
}else{
if(_10.payload!=null&&_10.payload.indexOf("fullpage")!=-1){
changeHash("fullpageWidgetId="+this.id);
}
return this._handleModeChange(_10);
}
}
if(_f=="onNewWire"){
return this._handleNewWire(_10);
}
if(_f=="onRemoveWire"){
return this._handleRemoveWire(_10);
}
return this._handleEventInternal(_f,_10);
};
com.ibm.mm.enabler.iWidgetWrapperDefaultImpl.prototype._handleInlineMessage=function(_11,_12,_13){
var _14=[];
com.ibm.mm.enabler.iw.utils.findElementByAttribute("class",this.ns+"content",this.rootElement,_14,false);
var _15=_14[0];
if(_15!=null){
_15.innerHTML="";
_15.style.padding="5px";
lconn.core.errorhandling.DefaultErrorHandler(_12,_13,{htmlContainerElemId:_15});
}
};
com.ibm.mm.enabler.iw.services.widgetLoadService.prototype.getWidgetXML=function(_16,_17){
com.ibm.mm.enabler.debug.entry("widgetLoadService.getWidgetXML","widgetUrl:"+_16+" widgetId:"+_17);
this.widgetId=_17;
var me=this;
var _18=_16;
if(_18.indexOf("http")===0){
_18=com.ibm.mm.enabler.utilities.rewriteURL(_18);
}
var _19={url:_18,load:function(_1a,_1b){
me.handleLoad(_1a,_1b.xhr);
},error:function(_1c,_1d){
com.ibm.mm.enabler.debug.error("widgetLoadService.getWidgetXML","Error widgetLoadService.getWidgetXML error loading!"+_1c);
var _1e=[];
_1e.push("error");
var _1f=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");
_1e.push(dojo.string.substitute(_1f.E_IWIDGETDEF_NOTAVAILABLE_1,[_18]));
_1e.push(_1c.message);
dojo.publish("/enabler/inlineMessage/"+me.widgetId,_1e);
},handleAs:"text",expectedContentType:"xml"};
dojo.xhrGet(_19);
};
lconn.core.mumOverride.registerLoadedResource=function(_20){
var res={};
res[iwConstants.RESOURCE.src]=_20;
serviceManager.getService("loadService").modules[_20]=res;
};
lconn.core.mumOverride.destroyWidget=function(_21){
eval("if(window._"+_21+"_iContext != null && _"+_21+"_iContext.iScope().onDestroyWidget != null) _"+_21+"_iContext.iScope().onDestroyWidget();");
serviceManager.getService("eventService").publishEvent("/enabler/unloadWidget",[_21]);
window["_"+_21+"_iContext"]=null;
};
lconn.core.mumOverride.renderSingleWidget=function(_22){
if(lconn.core.WidgetPlacement.URLChangeCallBack==null){
lconn.core.WidgetPlacement.URLChangeCallBack=[lconn.core.WidgetPlacement.URLChange];
registerBackButtonSupport();
}
var _23=dojo.byId(_22);
if(_23!=null){
var _24=iWidgetContainer.createWidget(_23);
if(_24){
iWidgetContainer.renderWidget(_24);
}
}
};
lconn.core.mumOverride.saveAttributes=function(_25,_26,_27){
var _28=_25.id;
if(_25.iScope.iContext.getUserProfile().getItemValue("canPersonalize")=="true"){
var _29="";
var _2a=[];
var _2b="/tns:widgets/tns:layout/tns:page/tns:widgetInstance[@instanceId = '"+_28+"']";
var _2c=lconn.core.xpath.selectSingleNode(_2b,WidgetPlacementConfig.widgetConfigXMLDocument);
var _2d=null;
if(_2c!=null){
_2d=_2c.getAttribute("defIdRef");
}else{
_2d=instanceId;
}
var _2e="/tns:widgets/tns:layout/tns:page/tns:widgetInstance[@instanceId = '"+_28+"']/tns:itemSet/tns:item";
var _2f=lconn.core.xpath.selectNodes(_2e,WidgetPlacementConfig.widgetConfigXMLDocument);
for(var i=0;_2f.length!=null&&i<_2f.length;i++){
var _30=_2f[i].getAttribute("name");
var _31=_26[_30];
var _32=_2f[i].getAttribute("value");
_32=lconn.core.i18nOverrider.replaceParams(_32,WidgetPlacementConfig.params);
_2a.push({entryName:_2f[i].getAttribute("name"),entryValue:_32});
if(_31!=null&&_30!="resourceId"&&_30!="resourceType"){
_2f[i].setAttribute("value",_31.value);
}
}
for(_30 in _26){
var _33=_26[_30];
var _34=true;
if(_34){
_29+=_30+"=_="+_33.value+",_,";
}
}
if(WidgetPlacementConfig.debug){
console.log("lconn.core.mumOverride.saveAttributes: putContent: "+_29);
}
var url=WidgetPlacementConfig.applicationContext+"/saveWidgetPreferences.do?resourceId="+WidgetPlacementConfig.resourceId;
url+="&widgetInstanceId="+_28;
var _35=new Date().getTime();
WidgetPlacementConfig.lastMod=_35+"saveAttributes";
lconn.core.mumOverride.saveAttributes.callback=_27;
var _36=function(){
WidgetPlacementConfig.widgetConfigXMLDocument=null;
var _37=function(_38,_39){
WidgetPlacementConfig.widgetConfigXMLDocument=_38;
if(lconn.core.mumOverride.saveAttributes.callback!=null){
lconn.core.mumOverride.saveAttributes.callback();
}
};
dojo.xhrGet({url:WidgetPlacementConfig.layoutInfoUrl+"&lastMod="+WidgetPlacementConfig.lastMod,error:lconn.core.errorhandling.DefaultXHRErrorHandler,handleAs:"xml",sync:true,load:_37});
};
dojo.rawXhrPut({url:url,putData:_29,load:_36,error:lconn.core.errorhandling.DefaultXHRErrorHandler,sync:true});
}else{
throw new Error("user cannot edit preferences");
}
};
function getUserProfileOverrideProperty(_3a){
if(WidgetPlacementConfig.userLoggedIn==false||WidgetPlacementConfig.userLoggedIn==null){
return null;
}else{
var _3b=null;
if(window.widgetUserInfo!=null){
var _3c=widgetUserInfo[_3a];
if(_3c==undefined||_3c=="undefined"||_3c==null){
_3b=null;
}else{
_3b=_3c;
}
}else{
if(WidgetPlacementConfig.userInfoXML==null){
var _3d=function(res,_3e){
WidgetPlacementConfig.userInfoXML=res;
var _3f=res.documentElement.getAttribute(_3a);
if(_3f==undefined||_3f=="undefined"||_3f==null){
_3b=null;
}else{
_3b=_3f;
}
};
var _40={url:WidgetPlacementConfig.userInfoUrl,handleAs:"xml",load:_3d,sync:true,error:lconn.core.errorhandling.DefaultXHRErrorHandler};
dojo.xhrGet(_40);
}else{
_3b=WidgetPlacementConfig.userInfoXML.documentElement.getAttribute(_3a);
}
}
return _3b;
}
};
var handleModeExit=function(_41){
WidgetPlacementConfig.handleModeExitExe=true;
if(WidgetPlacementConfig.cancelCallBack!=null&&_41!=true){
WidgetPlacementConfig.cancelCallBack();
}
if(WidgetPlacementConfig.hideElements!=null){
for(var i=0;WidgetPlacementConfig.hideElements!=null&&i<WidgetPlacementConfig.hideElements.length;i++){
lconn.core.utilities.show(WidgetPlacementConfig.hideElements[i],false,false,true);
}
}
if(WidgetPlacementConfig.TabContainerDomId!=null){
var _42=document.getElementById(WidgetPlacementConfig.TabContainerDomId);
var _43=_42.childNodes;
var _44=new Array;
for(var i=0;_43.length!=null&&i<_43.length;i++){
var _45=_43[i];
var _46=_45.id;
if(typeof _46!="undefined"&&_46!=null&&_46.indexOf("_TabItem")!=-1&&!dojo.hasClass(_45,"noRemove")){
_44.push(_46);
}
}
for(var i=0;_44.length!=null&&i<_44.length;i++){
var _46=_44[i];
var _45=dojo.byId(_46);
_45.parentNode.removeChild(_45);
}
}
if(WidgetPlacementConfig.TempWidgetContainerDomId!=null){
destroyWidgetContainer(WidgetPlacementConfig.TempWidgetContainerDomId);
}
for(var i=0;lconn.core.WidgetPlacement.loadOrder!=null&&i<lconn.core.WidgetPlacement.loadOrder.length;i++){
var _47=lconn.core.WidgetPlacement.loadOrder[i];
if(_47!=null){
lconn.core.WidgetPlacement.refresh(_47.instanceId);
}
}
for(uiLocation in lconn.core.WidgetPlacement.uiLocations){
lconn.core.utilities.show("widget-container-"+uiLocation,false,false,true);
}
WidgetPlacementConfig.handleModeExitExe=null;
WidgetPlacementConfig.firstWidget=null;
WidgetPlacementConfig.isFullPageWidgetRendering=null;
WidgetPlacementConfig.TempWidgetContainerDomId=null;
WidgetPlacementConfig.TabContainerDomId=null;
WidgetPlacementConfig.isTabbedFullPageWidgetRendering=null;
highlightOverviewLink();
};
}


;if(!dojo._hasResource["lconn.core.AdditionalInfo"]){
dojo._hasResource["lconn.core.AdditionalInfo"]=true;
dojo.provide("lconn.core.AdditionalInfo");
dojo.require("lconn.core.xslt");
dojo.require("lconn.core.utilities");
dojo.require("lconn.core.formutilities");
dojo.require("lconn.core.errorhandling");
lconn.core.AdditionalInfo=function(){
this.onLoad=function(){
var _1=this.iContext.getiWidgetAttributes();
this.resourceId=_1.getItemValue("resourceId");
var _2=_1.getItemValue("extensionIds");
var _3=WidgetPlacementConfig.applicationContext+"/atom2/extension?resourceId="+this.resourceId+"&extensionIds="+_2;
if(_2!=null){
var _4={xmlDocUrl:_3,xsltUrl:WidgetPlacementConfig.applicationContext+"/widgets/widgets/additionalInfo/additionalInfo.xsl",htmlContainerElemId:this.iContext.getElementById("additionalInfowidgetContainer"),aXslParams:null,dojoErrorHandler:lconn.core.errorhandling.DefaultXHRErrorHandler,exceptionHandler:lconn.core.errorhandling.DefaultErrorHandler};
lconn.core.xslt.transformAndRender(_4);
}else{
this.iContext.getElementById("additionalInfowidgetContainer").innerHTML="No information has been added.<br/>";
}
this.iContext.getElementById("lotusFeeds").href=_3;
};
this.addValue=function(_5){
var _6=findParentForm(_5);
var _7=_6.newItem.value;
addSelectionControlVal(_6.listOfItems,_7,_7);
_6.newItem.value=null;
};
this.removeAll=function(_8){
var _9=this.iContext.getiWidgetAttributes();
this.resourceId=_9.getItemValue("resourceId");
var _a=_9.getItemValue("extensionIds");
var _b=WidgetPlacementConfig.applicationContext+"/extension.do?resourceId="+this.resourceId+"&extensionIds="+_a;
var _c=this;
dojo.xhrDelete({url:_b,handleAs:"text",load:function(_d){
var _e=_c.iContext.getiWidgetAttributes();
_e.removeItem("extensionIds");
_e.save();
_c.closeNewItemsUI(_8);
_c.onLoad();
}});
};
this.showListOfItem=function(){
lconn.core.utilities.hide(this.iContext.getElementById("textItemUI"));
lconn.core.utilities.show(this.iContext.getElementById("listOfItemsUI"));
};
this.showTextBox=function(){
lconn.core.utilities.hide(this.iContext.getElementById("listOfItemsUI"));
lconn.core.utilities.show(this.iContext.getElementById("textItemUI"));
};
this.clearAllFields=function(_f){
var _10=findParentForm(_f);
_10.label.value=null;
_10.textContent.value=null;
_10.newItem.value=null;
removeAllSelectionControlOption(_10.listOfItems);
};
this.showNewItemsUI=function(_11){
lconn.core.utilities.show(this.iContext.getElementById("newItemsUI"));
};
this.closeNewItemsUI=function(_12){
this.clearAllFields(_12);
this.switchToMode(this.iContext.constants.mode.VIEW);
};
this.switchToMode=function(_13){
this.iContext.iEvents.fireEvent("onModeChanged","","{'newMode': '"+_13+"'}");
};
this.saveAttribute=function(_14){
var _15=findParentForm(_14);
var _16=new Date();
var _17="attrId."+_16.getTime();
var _18=this.iContext.getUserProfile().getItemValue("userid");
var _19=getRadioGroupCheckedValue(_15,"datatype");
var _1a="<?xml version=\"1.0\" ?>";
_1a+="<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:snx=\"http://www.ibm.com/prod/xmlns/snx/extensions\">";
_1a+="<category scheme=\"http://www.ibm.com/prod/xmlns/snx/extensions/type\" term=\""+_19+"\"></category>";
_1a+="<id>"+_17+"</id>";
_1a+="<title>"+_15.label.value+"</title>";
_1a+="<contributor><snx:userid>"+_18+"</snx:userid></contributor>";
if(_19=="simple"){
_1a+="<content type=\"text\">";
_1a+=_15.textContent.value;
_1a+="</content>";
}else{
if(_19=="multivalue"){
var _1b=getAllSelectionControlValues(_15.listOfItems);
for(var i=0;i<_1b.length;i++){
_1a+="<snx:field position=\""+(i+1)+"\" type=\"text\" value=\""+_1b[i]+"\"></snx:field>";
}
}
}
_1a+="</entry>";
var _1c=new Object();
_1c["Content-Type"]="application/atom+xml";
var _1d=WidgetPlacementConfig.applicationContext+"/extension.do?resourceId="+this.resourceId;
var _1e=this;
var _1f=function(_20,_21){
var _22=_1e.iContext.getiWidgetAttributes();
var _23=_22.getItemValue("extensionIds");
if(_23==null){
_23=_17+",";
}else{
_23+=_17+",";
}
_22.setItemValue("extensionIds",_23);
_22.save();
_1e.closeNewItemsUI(_14);
_1e.onLoad();
};
dojo.rawXhrPost({url:_1d,postData:_1a,load:_1f,headers:_1c});
};
};
}


;dojo.cache("lconn.core", "paletteOneUI/templates/PaletteList.html", "<div class=\"lotusMenu\"> <ul dojoAttachPoint=\"itemListNode\" role=\"tablist\"> </ul></div>");

;if(!dojo._hasResource["lconn.core.paletteOneUI.PaletteList"]){
dojo._hasResource["lconn.core.paletteOneUI.PaletteList"]=true;
dojo.provide("lconn.core.paletteOneUI.PaletteList");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("lconn.core.aria.TabPanel");
dojo.require("dojo.parser");
dojo.declare("lconn.core.paletteOneUI.PaletteList",[dijit._Widget,dijit._Templated,dijit._Container],{CATEGORY_SELECTED_EVENT:"/lconn/core/palette/categorySelected",WIDGET_CATEGORY:"widgetCategory",store:null,query:null,itemListNode:null,_currentSelectedNode:null,_lastSelectedCategoryId:null,templatePath:dojo.moduleUrl("lconn.core","paletteOneUI/templates/PaletteList.html"),postCreate:function(){
this.inherited("postCreate",arguments);
this._fetchCategoryList();
},setStoreQuery:function(_1,_2){
this.story=_1;
this.query=_2;
this._fetchCategoryList();
},_fetchCategoryList:function(){
var _3=this;
if((this.store!=null)&&(this.query!=null)){
var _4={query:_3.query,onComplete:dojo.hitch(_3,"_onFetchComplete")};
this.store.fetch(_4);
}
},_onFetchComplete:function(_5,_6){
var _7=true;
dojo.forEach(_5,function(_8){
var _9=this._buildItemMarkup(_8,_7);
_7=false;
this.itemListNode.appendChild(_9);
},this);
if(_5.length>1){
console.log(this._parent);
console.log(_5.length);
this._parent.showShelf();
}else{
this._parent.hideShelf();
}
new lconn.core.aria.TabPanel(this.itemListNode);
},setParent:function(_a){
this._parent=_a;
},_buildItemMarkup:function(_b,_c){
var _d=dojo.doc.createElement("li");
dojo.attr(_d,"role","presentation");
var _e=dojo.doc.createElement("a");
dojo.attr(_e,"href","javascript:;");
dojo.attr(_e,"categoryId",_b.id);
dojo.attr(_e,"role","tab");
dojo.attr(_e,"aria-selected","false");
_e.innerHTML=_b.name[0];
dojo.connect(_e,"onclick",dojo.hitch(this,"_onClickCategoryItem",_b));
_d.appendChild(_e);
if(_c==true){
dojo.attr(_e,"aria-selected","true");
this._selectCategoryItem(_b,_d);
}
return _d;
},_onClickCategoryItem:function(_f,evt){
this._selectCategoryItem(_f,evt.currentTarget.parentNode);
dojo.stopEvent(evt);
},_selectCategoryItem:function(_10,_11){
if(this._currentSelectedNode!=null){
dojo.removeClass(this._currentSelectedNode,"lotusSelected");
}
dojo.addClass(_11,"lotusSelected");
this._currentSelectedNode=_11;
this._lastSelectedCategoryId=_10.id[0];
dojo.publish(this.CATEGORY_SELECTED_EVENT,[_10]);
},getLastCategoryId:function(){
return this._lastSelectedCategoryId;
}});
}


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


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


;if(!dojo._hasResource["lconn.core.paletteOneUI.PaletteDataStoreBuilder"]){
dojo._hasResource["lconn.core.paletteOneUI.PaletteDataStoreBuilder"]=true;
dojo.provide("lconn.core.paletteOneUI.PaletteDataStoreBuilder");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.declare("lconn.core.paletteOneUI.PaletteDataStoreBuilder",null,{buildDataStore:function(_1,_2){
var _3=null;
var _4=new dojo.Deferred();
if(_1!=null){
var _5=this;
var _6=function(_7){
try{
_7=dojo.isString(_7)?dojo.fromJson(_7):_7;
var _8=_5._connectionsFormat2DojoTreeFormat(_7);
var _9=new dojo.data.ItemFileWriteStore({data:_8});
_4.callback(_9);
}
catch(e){
_4.errback(e);
}
};
if(_2){
this._fetchJsonString(_1).addCallback(_6);
}else{
_6(_1);
}
}else{
_4.errback(new Error("Invalid paletteJson argument supplied to buildDataStore",_1));
}
return _4;
},_connectionsFormat2DojoTreeFormat:function(_a){
var _b={label:"name",identifier:"id"};
var _c=[];
if((_a!=null)&&(_a.categories!=null)){
var _d=dojo.map(_a.categories,dojo.hitch(this,"_handleCategory"));
dojo.forEach(_d,function(_e){
dojo.forEach(_e,function(_f){
_c.push(_f);
});
});
}
_b.items=_c;
return _b;
},_handleCategory:function(_10){
var _11=[];
var _12=dojo.map(_10.widgets,dojo.hitch(this,"_buildWidgetItemFromWidgetObj"));
dojo.forEach(_12,function(_13){
_11.push(_13);
});
_11.push(this._buildCategoryItem(_10.id,_10.name,_10.css,_11));
return _11;
},_fetchJsonString:function(url){
return dojo.xhrGet({url:url,handleAs:"json"});
},_buildCategoryItem:function(id,_14,css,_15){
var _16={id:id,name:_14,type:"widgetCategory",css:css,children:[]};
dojo.forEach(_15,function(_17){
_16.children.push({_reference:_17.id});
});
return _16;
},_buildWidgetItemFromWidgetObj:function(_18){
return this._buildWidgetItem(_18);
},_buildWidgetItem:function(_19){
var _1a={};
for(var key in _19){
if(key.charAt(0)!="_"){
_1a[key]=_19[key];
}
}
_1a.type="widget";
return _1a;
}});
}

dojo.provide("lconn.core.paletteOneUI.nls.WidgetButton")._built=true;
dojo.provide("lconn.core.paletteOneUI.nls.WidgetButton.en");
lconn.core.paletteOneUI.nls.WidgetButton.en={"ADD_INFO_3":"Add widget to your page","WIDGET_THIS_LAYOUT":"Page using this layout","ADD_INFO_4":"Add widget ${0} to your page","ADDING_WIDGET":"Adding widget","NO_MORE":"Already open on your page","ADDED_WIDGET":"Added to your page","ICON_ALT":"Widget icon","WIDGET_ADDED":"${0} added","WIDGET_LAYOUT_ADDED":"Page set to ${0} layout","ADDED_WIDGET_COMMUNITIES":"Added to your community","ADD_INFO":"Add widget to the page","ADD_INFO_2":"Add widget ${0} to the page"};

;dojo.cache("lconn.core", "paletteOneUI/templates/WidgetButton.html", "<div class=\"lotusPaletteWidget\" tabindex=\"0\" role=\"button\"> <div class=\"lotusInner\"> <div class=\"lotusIcon\" dojoAttachPoint=\"widgetIconNode\"> </div> <div class=\"lotusWidgetTitle\"> <h4 class=\"lotusTitle\" role=\"alert\" dojoAttachPoint=\"titleContainerNode\"> <a href=\"javascript:;\" dojoAttachPoint=\"titleNode\" role=\"button\" tabindex=\"-1\"></a> <span dojoAttachPoint=\"titleNodeSpan\" class=\"lotusHidden\"></span> </h4> </div> <a class=\"lotusIcon\" href=\"javascript:;\" alt=\"${_resourceBundle.ADD_INFO}\" role=\"button\" dojoAttachPoint=\"plusIconNode\" tabindex=\"-1\"><img dojoAttachPoint=\"blankImageNode\" alt=\"${_resourceBundle.ADD_INFO}\" width=\"16\" height=\"16\"/><span class=\"lotusAltText\">+</span></a> </div></div>");

;if(!dojo._hasResource["lconn.core.paletteOneUI.WidgetButton"]){
dojo._hasResource["lconn.core.paletteOneUI.WidgetButton"]=true;
dojo.provide("lconn.core.paletteOneUI.WidgetButton");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojo.parser");
dojo.requireLocalization("lconn.core.paletteOneUI","WidgetButton");
dojo.declare("lconn.core.paletteOneUI.WidgetButton",[dijit._Widget,dijit._Templated,dijit._Contained],{widgetItem:null,widgetIconNode:null,ADD_WIDGET_EVENT:"/lconn/core/palette/addWidget",_onClickHandler:null,_onKeyDownHandler:null,initialStatus:null,plusIconNode:null,titleNodeSpan:null,titleContainerNode:null,title:null,_addingWidget:false,_isEnabled:false,_resourceBundle:null,imageContextRoot:"",templatePath:dojo.moduleUrl("lconn.core","paletteOneUI/templates/WidgetButton.html"),postCreate:function(){
this.inherited("postCreate",arguments);
if((this.widgetItem!=null)&&(typeof this.widgetItem.iconUrl!="undefined")&&(typeof this.widgetItem.iconUrl[0]!="undefined")){
this._buildIconNode(this.widgetItem.iconUrl,this._resourceBundle.ICON_ALT);
}
this.blankImageNode.src=this.imageContextRoot+"/blank.gif";
this._updateTitle();
this._updateDescription();
this._isEnabled=!this.initialStatus;
if(this.initialStatus){
this.enableButton();
}else{
this.disableButton();
}
},postMixInProperties:function(){
this._resourceBundle=dojo.i18n.getLocalization("lconn.core.paletteOneUI","WidgetButton");
},disableButton:function(){
if(this._isEnabled){
dojo.disconnect(this._onClickHandler);
this._onClickHandler=null;
dojo.disconnect(this._onKeyDownHandler);
this._onKeyDownHandler=null;
dojo.addClass(this.titleContainerNode,"lotusAdded");
dojo.addClass(this.titleContainerNode,"lotusDisabled");
this.plusIconNode.style.display="none";
dojo.addClass(this.titleNode,"lotusHidden");
dojo.removeClass(this.titleNodeSpan,"lotusHidden");
var _1=dojo.string.substitute(this._resourceBundle.WIDGET_ADDED,[this.title]);
this.titleNodeSpan.innerHTML=_1;
dojo.addClass(this.domNode,"lotusPaletteDisabledBtn");
dojo.attr(this.domNode,"aria-label",_1);
dojo.attr(this.domNode,"aria-disabled","true");
this._isEnabled=false;
}
},enableButton:function(){
if(!this._isEnabled){
if(this._onClickHandler==null){
this._onClickHandler=dojo.connect(this.domNode,"onclick",this,"onClick");
}
if(this._onKeyDownHandler==null){
this._onKeyDownHandler=dojo.connect(this.domNode,"onkeydown",this,"onKeyDown");
}
this.plusIconNode.style.display="";
dojo.addClass(this.titleNodeSpan,"lotusHidden");
dojo.removeClass(this.titleNode,"lotusHidden");
dojo.removeClass(this.titleContainerNode,"lotusDisabled");
this.titleNode.innerHTML=this.title;
dojo.removeClass(this.titleContainerNode,"lotusAdded");
dojo.removeClass(this.domNode,"lotusPaletteDisabledBtn");
this._isEnabled=true;
}
},_buildIconNode:function(_2,_3){
var _4=dojo.doc.createElement("span");
var _5=dojo.doc.createElement("img");
dojo.attr(_5,"src",_2);
dojo.attr(_5,"alt",_3);
_4.appendChild(_5);
this.widgetIconNode.appendChild(_4);
},_updateTitle:function(){
if(this.widgetItem!=null){
this.title=this.widgetItem.name[0];
this.titleNode.innerHTML=this.title;
dojo.attr(this.titleNode,"title",this.title);
var _6=dojo.string.substitute(this._resourceBundle.WIDGET_ADDED,[this.title]);
dojo.attr(this.titleNodeSpan,"title",_6);
var _7=dojo.string.substitute(this._resourceBundle.ADD_INFO_2,[this.title]);
dojo.attr(this.domNode,"aria-label",_7);
}
},_cropTitle:function(_8){
var _9="";
var _a;
if((dojo.config!=null)&&(dojo.config.locale.indexOf("ja")!=-1)){
_a=9;
}else{
_a=20;
}
if(_8!=null&&_8.length>_a){
_9=_8.substr(0,_a-2);
_9+="...";
}else{
_9=_8;
}
return _9;
},_updateDescription:function(){
if((this.widgetItem!=null)&&(this.widgetItem.desc!=null)){
dojo.attr(this.domNode,"title",this.widgetItem.desc[0]);
}
},onKeyDown:function(_b){
var _c=_b&&(_b.keyCode||_b.which);
if(_c===13||_c===32){
this.onClick();
}
},onClick:function(_d){
if(!this._addingWidget){
this._addingWidget=true;
try{
if(this.widgetItem!=null){
dojo.publish(this.ADD_WIDGET_EVENT,[this.widgetItem]);
dojo.removeClass(this.titleContainerNode,"lotusDisabled");
dojo.addClass(this.titleContainerNode,"lotusAdded");
}
}
catch(e){
}
finally{
this._addingWidget=false;
}
}
}});
}

dojo.provide("lconn.core.paletteOneUI.nls.PaletteContentPanel")._built=true;
dojo.provide("lconn.core.paletteOneUI.nls.PaletteContentPanel.en");
lconn.core.paletteOneUI.nls.PaletteContentPanel.en={"NO_WIDGET":"There are no widgets available in the selected category","NEXT":"Next","PAGING_STATUS":"${begin} - ${end} widgets of ${total}","PREVIOUS":"Previous","NO_WIDGET_NO_SHELF":"There are no widgets available"};

;dojo.cache("lconn.core", "paletteOneUI/templates/PaletteContentPanel.html", "<div class=\"lotusPaletteContent\"><div dojoAttachPoint=\"noWidgetNode\" aria-live=\"assertive\" aria-relevant=\"additions text\" aria-atomic=\"true\" class=\"lotusHidden lotusPaging\" style=\"width: auto; text-align: justify;\">${_resourceBundle.NO_WIDGET_NO_SHELF}</div><div dojoAttachPoint=\"containerNode\"></div><div class=\"lotusPaging lotusHidden\" dojoAttachPoint=\"pagerContainerNode\"><div class=\"lotusLeft\" dojoAttachPoint=\"pagerNode\" aria-live=\"polite\" aria-atomic=\"true\" aria-relevant=\"additions text\"></div><ul class=\"lotusRight lotusInlinelist lotusHidden\" dojoAttachPoint=\"scrollControlNode\"> <li class=\"lotusFirst\" dojoAttachEvent=\"onclick: onPrevious\" dojoAttachPoint=\"previousNode\">${_resourceBundle.PREVIOUS}</li> <li dojoAttachEvent=\"onclick: onNext\" dojoAttachPoint=\"nextNode\"> <a role=\"button\" href=\"javascript:;\">${_resourceBundle.NEXT}</a></li></ul></div></div>");

;if(!dojo._hasResource["lconn.core.paletteOneUI.PaletteContentPanel"]){
dojo._hasResource["lconn.core.paletteOneUI.PaletteContentPanel"]=true;
dojo.provide("lconn.core.paletteOneUI.PaletteContentPanel");
dojo.require("lconn.core.paletteOneUI.WidgetButton");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojo.parser");
dojo.requireLocalization("lconn.core.paletteOneUI","PaletteContentPanel");
dojo.declare("lconn.core.paletteOneUI.PaletteContentPanel",[dijit._Widget,dijit._Templated,dijit._Container],{templatePath:dojo.moduleUrl("lconn.core","paletteOneUI/templates/PaletteContentPanel.html"),pagerNode:null,_items:null,_currentPageNumber:0,_resourceBundle:null,nextNode:null,previousNode:null,pagerContainerNode:null,noWidgetNode:null,scrollControlNode:null,AMOUNT_WIDGET_PER_PAGE:12,imageContextRoot:"",postMixInProperties:function(){
this._resourceBundle=dojo.i18n.getLocalization("lconn.core.paletteOneUI","PaletteContentPanel");
},postCreate:function(){
this.inherited("postCreate",arguments);
},_addPaletteButton:function(_1,_2){
var _3=this.imageContextRoot;
var _4=new lconn.core.paletteOneUI.WidgetButton({widgetItem:_1,imageContextRoot:_3,initialStatus:_2});
this.addChild(_4);
},_removeAllButtons:function(){
var _5=this.getChildren();
dojo.forEach(_5,function(_6){
this.removeChild(_6);
},this);
},_removeButtonNotInSet:function(_7){
var _8=this.getChildren();
dojo.forEach(_8,function(_9){
var _a=_9.widgetItem.id;
var _b=dojo.some(_7,function(id){
return id==_a;
});
if(!_b){
this.removeChild(_9);
}
},this);
},goToFirstPage:function(){
this._currentPageNumber=0;
},setItems:function(_c){
this._items=_c;
this._showWidgetButtons();
this._updatePaging();
this._togglePagingButtons();
},_updatePaletteButton:function(_d,_e){
if(_e){
_d.enableButton();
}else{
_d.disableButton();
}
},_showWidgetButtons:function(){
var _f=this._currentPageNumber;
if(this._getTotalNumberWidgets()==0){
this._removeAllButtons();
this._showNoWidgetMsg();
}else{
this._hideNoWidgetMsg();
if((_f>=0)&&(this._items!=null)){
var _10=this._getFirstWidgetIndex();
var end=this._getLastWidgetIndex();
var ids=[];
for(var i=_10;i<=end;i++){
ids.push(this._items[i].item.id);
}
this._removeButtonNotInSet(ids);
var _11=this.getChildren();
for(var i=_10;i<=end;i++){
var _12=this._items[i].item;
var _13=this._items[i].enabled;
var _14=false;
var j=0;
while(!_14&&(j<_11.length)){
if(_11[j].widgetItem.id==_12.id){
_14=true;
}else{
j++;
}
}
if(!_14){
this._addPaletteButton(_12,_13);
}else{
this._updatePaletteButton(_11[j],_13);
}
}
this._currentPageNumber=_f;
}
}
},_showNoWidgetMsg:function(){
this.noWidgetNode.innerHTML=this._resourceBundle.NO_WIDGET_NO_SHELF;
dojo.removeClass(this.noWidgetNode,"lotusHidden");
},_hideNoWidgetMsg:function(){
dojo.addClass(this.noWidgetNode,"lotusHidden");
},_updatePaging:function(){
var _15=this._items.length;
var _16=this._getTotalNumberWidgets();
if(_16!=0){
var end=this._getLastWidgetIndex()+1;
var _17=Math.min(_16,this._getFirstWidgetIndex()+1);
var str=dojo.string.substitute(this._resourceBundle.PAGING_STATUS,{begin:_17,end:end,total:_16});
dojo.removeClass(this.pagerNode,"lotusHidden");
this.pagerNode.innerHTML=str;
}else{
dojo.addClass(this.pagerNode,"lotusHidden");
}
dojo.removeClass(this.pagerContainerNode,"lotusHidden");
},onPrevious:function(evt){
if(!this._isFirstPage()){
this._currentPageNumber--;
this._showWidgetButtons(this._currentPageNumber);
this._updatePaging();
this._togglePagingButtons();
this._focusToFirstWidgetButton("previous");
}
dojo.stopEvent(evt);
},onNext:function(evt){
if(!this._isLastPage()){
this._currentPageNumber++;
this._showWidgetButtons(this._currentPageNumber);
this._updatePaging();
this._togglePagingButtons();
this._focusToFirstWidgetButton("next");
}
dojo.stopEvent(evt);
},_focusToFirstWidgetButton:function(_18){
var _19=dojo.query(".lotusPaletteWidget");
var _1a=null;
for(var i=0;i<_19.length;i++){
if(!dojo.hasClass(_19[i],"lotusPaletteDisabledBtn")){
_1a=dijit.byNode(_19[i]);
dijit.focus(_1a.domNode);
break;
}
}
if(!_1a){
if(_18=="next"){
this._isLastPage()?dijit.focus(this.previousNode.childNodes[0]):dijit.focus(this.nextNode.childNodes[0]);
}else{
if(_18=="previous"){
this._isFirstPage()?dijit.focus(this.nextNode.childNodes[0]):dijit.focus(this.previousNode.childNodes[0]);
}
}
}
},_togglePagingButtons:function(){
if(this._isFirstPage()&&this._isLastPage()){
dojo.addClass(this.scrollControlNode,"lotusHidden");
}else{
dojo.removeClass(this.scrollControlNode,"lotusHidden");
this._toggleNextButton();
this._togglePreviousButton();
}
},_toggleNextButton:function(){
var _1b=this._resourceBundle.NEXT;
if(this._isLastPage()){
this.nextNode.innerHTML=_1b;
}else{
this.nextNode.innerHTML="";
dojo.create("a",{href:"javascript:;",role:"button",innerHTML:_1b},this.nextNode);
}
},_togglePreviousButton:function(){
var _1c=this._resourceBundle.PREVIOUS;
if(this._isFirstPage()){
this.previousNode.innerHTML=_1c;
}else{
this.previousNode.innerHTML="";
dojo.create("a",{href:"javascript:;",role:"button",innerHTML:_1c},this.previousNode);
}
},_getFirstWidgetIndex:function(){
return this.AMOUNT_WIDGET_PER_PAGE*this._currentPageNumber;
},_getLastWidgetIndex:function(){
return Math.min(this.AMOUNT_WIDGET_PER_PAGE*(this._currentPageNumber+1),this._getTotalNumberWidgets())-1;
},_getTotalNumberWidgets:function(){
var _1d=0;
if(this._items!=null){
_1d=this._items.length;
}
return _1d;
},_isLastPage:function(){
return (((this._currentPageNumber+1)*this.AMOUNT_WIDGET_PER_PAGE)>=this._items.length);
},_isFirstPage:function(){
return this._currentPageNumber==0;
}});
}

dojo.provide("lconn.core.paletteOneUI.nls.AddContentPane")._built=true;
dojo.provide("lconn.core.paletteOneUI.nls.AddContentPane.en");
lconn.core.paletteOneUI.nls.AddContentPane.en={"BROWSE_CONTENT":"Choose:","CLOSE_PALETTE":"Close palette","ADD_CONTENT":"Add content","LOADING":"Loading..."};

;dojo.cache("lconn.core", "paletteOneUI/templates/AddContentPane.html", "<div class=\"lotusPaletteBody\"> <div class=\"lotusPaletteNav\" dojoAttachPoint=\"shelfNode\"> <div class=\"lotusHidden\" style=\"margin: 15px 10px 15px 10px\" dojoAttachPoint=\"loadingNode\"></div> <h3 class=\"lotusHidden\" dojoAttachPoint=\"browseLabelNode\">${_resourceBundle.BROWSE_CONTENT}</h3> <div dojoAttachPoint=\"listNode\"></div> </div> <div dojoAttachPoint=\"contentAreaNode\"></div></div>");

;if(!dojo._hasResource["lconn.core.paletteOneUI.AddContentPane"]){
dojo._hasResource["lconn.core.paletteOneUI.AddContentPane"]=true;
dojo.provide("lconn.core.paletteOneUI.AddContentPane");
dojo.require("lconn.core.paletteOneUI.PaletteList");
dojo.require("lconn.core.paletteOneUI.PaletteDataStoreBuilder");
dojo.require("lconn.core.paletteOneUI.PaletteContentPanel");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.requireLocalization("lconn.core.paletteOneUI","AddContentPane");
dojo.declare("lconn.core.paletteOneUI.AddContentPane",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{PRIMARY_WIDGET:"primary",SECONDARY_WIDGET:"secondary",_WIDGET_TYPES:[],_topics:[],_jsonSourceUrl:null,_jsonData:null,_storeBuilder:null,_contentArea:null,listNode:null,contentAreaNode:null,_contentAreaItems:null,addWidgetButtonNode:null,shelfNode:null,_canAddWidgetHandler:null,_isVisibleWidgetHandler:null,_resourceBundle:null,_layoutImages:null,_currentStore:null,_listWidget:null,imageContextRoot:"",browseLabelNode:null,loadingNode:null,templatePath:dojo.moduleUrl("lconn.core","paletteOneUI/templates/AddContentPane.html"),postMixInProperties:function(){
this._resourceBundle=dojo.i18n.getLocalization("lconn.core.paletteOneUI","AddContentPane");
},postCreate:function(){
this.inherited("postCreate",arguments);
this._createLoadingNode();
this._setLoading();
var _1=this.imageContextRoot;
this._contentArea=new lconn.core.paletteOneUI.PaletteContentPanel({imageContextRoot:_1});
this.contentAreaNode.appendChild(this._contentArea.domNode);
this._storeBuilder=new lconn.core.paletteOneUI.PaletteDataStoreBuilder();
this._registerDefaultCanAddWidgetFct();
this._registerDefaultIsVisibleWidgetFct();
},setJsonSourceUrl:function(_2){
this._jsonSourceUrl=_2;
},getJsonSourceUrl:function(){
return this._jsonSourceUrl;
},setJsonData:function(_3){
this._jsonData=dojo.isString(_3)?dojo.fromJson(_3):_3;
},getJsonData:function(){
return this._jsonData;
},populatePalette:function(_4){
this._setLoading();
var _5;
if(_4){
_5=this._storeBuilder.buildDataStore(this._jsonSourceUrl,true);
}else{
_5=this._storeBuilder.buildDataStore(this._jsonData,false);
}
var _6=this;
_5.addCallback(dojo.hitch(this,"_setupList"));
_5.addErrback(dojo.hitch(this,"_handleError"));
_5.addErrback(function(){
_6._hideLoading();
});
},_createLoadingNode:function(){
this.loadingNode.innerHTML="";
this.loadingNode.innerHTML="<div>"+this._resourceBundle.LOADING+"</div>";
dojo.addClass(this.loadingNode,"lotusMeta");
},_setLoading:function(){
dojo.removeClass(this.loadingNode,"lotusHidden");
},_removeLoading:function(){
dojo.addClass(this.loadingNode,"lotusHidden");
},_setupList:function(_7){
this._removeLoading();
this._currentStore=_7;
this._loadList();
},_loadList:function(){
if(this._currentStore!=null){
var _8=this._currentStore;
if(this._listWidget!=null){
this._listWidget.destroy();
}
this._listWidget=new lconn.core.paletteOneUI.PaletteList({store:_8,query:{type:"widgetCategory"},_parent:this});
this.listNode.innerHTML="";
this.listNode.appendChild(this._listWidget.domNode);
dojo.removeClass(this.browseLabelNode,"lotusHidden");
}
},showShelf:function(){
dojo.removeClass(this.shelfNode,"lotusHidden");
dojo.removeClass(this.shelfNode.parentNode,"lotusPaletteNoShelf");
},hideShelf:function(){
dojo.addClass(this.shelfNode,"lotusHidden");
dojo.addClass(this.shelfNode.parentNode,"lotusPaletteNoShelf");
},removeItem:function(_9){
var _a=this._currentStore;
var _b=this;
if(_a!=null){
var _c=_a.fetch({query:{id:_9},onComplete:function(_d){
if(_d.length==1){
_a.deleteItem(_d[0]);
_b._updateContentArea();
}else{
}
}});
}
},_updateContentArea:function(){
var _e=this._listWidget.getLastCategoryId();
if(_e!=null){
this._currentStore.fetch({query:{id:_e},onComplete:function(_f){
if(_f.length==1){
dojo.publish("/lconn/core/palette/categorySelected",[_f[0]]);
}else{
}
}});
}
},_initWidgetTypes:function(){
this._WIDGET_TYPES.push(this.PRIMARY_WIDGET);
this._WIDGET_TYPES.push(this.SECONDARY_WIDGET);
},_registerDefaultLayoutImages:function(){
var _10=dojo.moduleUrl("lconn.core.paletteOneUI","images/primary_widget.png").toString();
this.setLayoutImage(this.PRIMARY_WIDGET,_10);
this.setLayoutImage(this.SECONDARY_WIDGET,_10);
},registerIsVisibleButton:function(_11){
if(dojo.isFunction(_11)){
this._isVisibleWidgetHandler=_11;
}
},_handleError:function(){
console.log("error in palette");
console.log(arguments[0]);
},_populateContentArea:function(_12){
if(this._contentAreaItems!=null){
var _13=[];
dojo.forEach(this._contentAreaItems,function(_14){
if(this._isVisibleWidgetHandler(_14)){
if(this._canAddWidgetHandler(_14)){
_13.push({enabled:true,item:_14});
}else{
_13.push({enabled:false,item:_14});
}
}
},this);
if((_12!=null)&&(_12==true)){
this._contentArea.goToFirstPage();
}
this._contentArea.setItems(_13);
}
},onCategorySelected:function(_15){
this._contentAreaItems=_15.children;
this._populateContentArea(true);
},_runCanAddWidgetHandler:function(_16){
},setLayoutImage:function(_17,url){
dojo.deprecated("setLayoutImage");
},getLayoutImage:function(_18){
dojo.deprecated("getLayoutImage");
return null;
},_disableAddWidgetButton:function(){
this.addWidgetButtonNode.disabled=true;
dojo.addClass(this.addWidgetButtonNode,this.DISABLED_BUTTON_CSS);
},_enabledAddWidgetButton:function(){
this.addWidgetButtonNode.disabled=false;
dojo.removeClass(this.addWidgetButtonNode,this.DISABLED_BUTTON_CSS);
},registerCanAddWidgetFct:function(_19){
if(dojo.isFunction(_19)){
this._canAddWidgetHandler=_19;
}
},_registerDefaultCanAddWidgetFct:function(){
if(this._canAddWidgetHandler==null){
this._canAddWidgetHandler=function(_1a){
return true;
};
}
},_registerDefaultIsVisibleWidgetFct:function(){
if(this._isVisibleWidgetHandler==null){
this._isVisibleWidgetHandler=function(_1b){
return true;
};
}
},destroy:function(){
dojo.forEach(this._topics,function(_1c){
dojo.unsubscribe(_1c);
});
}});
}

dojo.provide("lconn.core.paletteOneUI.nls.Palette")._built=true;
dojo.provide("lconn.core.paletteOneUI.nls.Palette.en");
lconn.core.paletteOneUI.nls.Palette.en={"ITEMS_ADDED":"${0} item added","ALL":"All","HIDE":"Hide widget","REMOVE":"Remove widget from your page","BROWSE_CONTENT":"Choose: ","SHELF":"Category shelf","REMOVE_COMMUNITY":"Remove widget from your community","OTHER":"Other","ITEM_ADDED":"${0} items added","BUTTON_ENABLED_ARIA":"Button enabled","CLOSE_PALETTE":"Close palette","ADD_CONTENT":"Add Content","LOADING":"Loading...","BUTTON_DISABLED_ARIA":"Button disabled"};

;dojo.cache("lconn.core", "paletteOneUI/templates/Palette.html", "<div class=\"lotusPalette\"><div class=\"lotusPaletteHeader\"><ul class=\"lotusTabs\" dojoAttachPoint=\"tabsContainerNode\" role=\"toolbar\"></ul><a id=\"closePalette\" role=\"button\" href=\"javascript:;\" aria-label=\"${_resourceBundle.CLOSE_PALETTE}\" class=\"lotusRight lotusPaletteClose\" dojoAttachEvent=\"onclick: onClosePalette\"> <img role=\"presentation\" alt=\"${_resourceBundle.CLOSE_PALETTE}\" dojoAttachPoint=\"closeImageNode\" /> <span class=\"lotusAltText\">X</span> </a><span class=\"lotusRight lotusHidden\" aria-live=\"assertive\" aria-relevant=\"additions text\" aria-atomic=\"true\" dojoAttachPoint=\"itemAddedNode\"> <span dojoAttachPoint=\"itemAddedTextHolder\">${itemAddedStr} </span></span></div><div dojoAttachPoint=\"containerNode\"></div></div>");

;if(!dojo._hasResource["lconn.core.paletteOneUI.Palette"]){
dojo._hasResource["lconn.core.paletteOneUI.Palette"]=true;
dojo.provide("lconn.core.paletteOneUI.Palette");
dojo.require("lconn.core.paletteOneUI.AddContentPane");
dojo.require("lconn.core.paletteOneUI.PaletteList");
dojo.require("lconn.core.paletteOneUI.PaletteDataStoreBuilder");
dojo.require("lconn.core.paletteOneUI.PaletteContentPanel");
dojo.require("lconn.core.aria.Toolbar");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.requireLocalization("lconn.core.paletteOneUI","Palette");
dojo.declare("lconn.core.paletteOneUI.Palette",[dijit._Widget,dijit._Templated,dijit._Container],{ADD_WIDGET_EVENT:"/lconn/core/palette/addWidget",CLOSE_PALETTE_EVENT:"/lconn/core/palette/closePalette",RESET_COUNTER_EVENT:"lconn/core/palette/resetCounter",RECHECK_CAN_ADD_WIDGET_HANDLER_EVENT:"/lconn/core/palette/recheck",PRIMARY_WIDGET:"primary",SECONDARY_WIDGET:"secondary",_WIDGET_TYPES:[],_topics:[],_addWidgetTopic:null,_contentArea:null,listNode:null,contentAreaNode:null,closeImageNode:null,addWidgetButtonNode:null,_canAddWidgetHandler:null,_resourceBundle:null,_itemAddedCount:null,itemAddedStr:null,imageContextRoot:"",_tabPanels:null,_currentTab:null,tabsContainerNode:null,templatePath:dojo.moduleUrl("lconn.core","paletteOneUI/templates/Palette.html"),postMixInProperties:function(){
this._resourceBundle=dojo.i18n.getLocalization("lconn.core.paletteOneUI","Palette");
this._itemAddedCount=0;
this.itemAddedStr=dojo.string.substitute(this._resourceBundle.ITEM_ADDED,[this._itemAddedCount]);
},postCreate:function(){
this.inherited("postCreate",arguments);
this._tabPanels=[];
this._registerDefaultPanel();
this.closeImageNode.src=djConfig.blankGif;
this.closeImageNode.className="otherFramework16 otherFramework16-CloseHover14";
if(dojo.isIE==6){
dojo.style(this.closeImageNode,"height","19px");
dojo.style(this.closeImageNode,"width","19px");
}
this._topics.push(dojo.subscribe(lconn.core.paletteOneUI.PaletteList.prototype.CATEGORY_SELECTED_EVENT,dojo.hitch(this,"_handleEventsControler","category")));
this._topics.push(dojo.subscribe(this.RECHECK_CAN_ADD_WIDGET_HANDLER_EVENT,dojo.hitch(this,"_handleEventsControler","recheck")));
this._topics.push(dojo.subscribe(this.RESET_COUNTER_EVENT,dojo.hitch(this,"_resetItemCount")));
},_registerDefaultPanel:function(){
var _1=this.imageContextRoot;
this._contentArea=new lconn.core.paletteOneUI.AddContentPane({imageContextRoot:_1});
this.addTabPane("widgetAddId",this._resourceBundle.ADD_CONTENT,this._contentArea,true);
var _2=this._tabPanels["widgetAddId"];
this.addChild(_2);
},_handleEventsControler:function(_3){
if(this._currentTab!=null){
var id=this._currentTab.id;
var _4=this._tabPanels[id];
if(_4 instanceof lconn.core.paletteOneUI.AddContentPane){
if(_3=="category"){
_4.onCategorySelected(arguments[1]);
}else{
if(_3=="recheck"){
_4._populateContentArea();
}
}
}
}
},setJsonSourceUrl:function(_5){
this._contentArea.setJsonSourceUrl(_5);
},getJsonSourceUrl:function(){
return this._contentArea.getJsonSourceUrl();
},setJsonData:function(_6){
this._contentArea.setJsonData(_6);
},getJsonData:function(){
return this._contentArea.getJsonData();
},populatePalette:function(_7){
this._contentArea.populatePalette(_7);
},removeItem:function(_8){
this._contentArea.removeItem(_8);
},onClosePalette:function(_9){
dojo.publish(this.CLOSE_PALETTE_EVENT);
dojo.stopEvent(_9);
},setLayoutImage:function(_a,_b){
this._contentArea.setLayoutImage(_a,_b);
},getLayoutImage:function(_c){
return this._contentArea.getLayoutImage(_c);
},addTabPane:function(id,_d,_e,_f){
var _10=null;
if(typeof _e.domNode!="undefined"){
_10=this._buildTabHeaderNode(id,_d,_f);
this.tabsContainerNode.appendChild(_10);
this._tabPanels[id]=_e;
if((typeof _f!="undefined")&&(_f==true)){
dojo.addClass(_10,"lotusSelected");
this._currentTab=_10;
}
new lconn.core.aria.Toolbar(this.tabsContainerNode);
}
},_buildTabHeaderNode:function(id,_11,_12){
var _13=dojo.doc.createElement("li");
_13.setAttribute("role","presentation");
_13.id=id;
dojo.connect(_13,"onclick",dojo.hitch(this,"_switchToTab",id));
var _14=_12?true:false;
_13.innerHTML="<a href='javascript:;' role='button' aria-pressed='"+_14+"' id='"+id+"Link'>"+"<strong>"+_11+"</strong></a>";
return _13;
},_switchToTab:function(id,evt){
if(this._currentTab!=null){
dojo.removeClass(this._currentTab,"lotusSelected");
dojo.attr(dojo.byId(this._currentTab.id+"Link"),"aria-pressed","false");
}
var _15=evt.currentTarget;
dojo.addClass(_15,"lotusSelected");
dojo.attr(dojo.byId(id+"Link"),"aria-pressed","true");
dojo.removeAttr(dojo.byId(id+"Link"),"tabindex");
this._currentTab=_15;
var _16=this._tabPanels[id];
var _17=this.getChildren();
var _18=this;
dojo.forEach(_17,function(_19){
_18.removeChild(_19);
});
this.addChild(_16);
},registerCanAddWidgetFct:function(_1a){
this._contentArea.registerCanAddWidgetFct(_1a);
},registerIsVisibleButton:function(_1b){
this._contentArea.registerIsVisibleButton(_1b);
},enableItemCounter:function(){
dojo.removeClass(this.itemAddedNode,"lotusHidden");
},disableItemCounter:function(){
dojo.addClass(this.itemAddedNode,"lotusHidden");
},_incAddedItemCount:function(){
this._itemAddedCount++;
if(this._itemAddedCount>0){
dojo.addClass(this.itemAddedNode,"lotusAdded");
}else{
dojo.removeClass(this.itemAddedNode,"lotusAdded");
}
this.itemAddedTextHolder.innerHTML=dojo.string.substitute(this._resourceBundle.ITEM_ADDED,[this._itemAddedCount]);
},_resetItemCount:function(){
this._itemAddedCount=0;
dojo.removeClass(this.itemAddedNode,"lotusAdded");
this.itemAddedTextHolder.innerHTML=dojo.string.substitute(this._resourceBundle.ITEM_ADDED,[this._itemAddedCount]);
},incCounter:function(){
this._incAddedItemCount();
},enabledAutoCounter:function(){
this._addWidgetTopic=dojo.subscribe(this.ADD_WIDGET_EVENT,dojo.hitch(this,"_incAddedItemCount"));
},disabledAutoCounter:function(){
if(this._addWidgetTopic!=null){
dojo.unsubscribe(this._addWidgetTopic);
}
},destroy:function(){
dojo.forEach(this._topics,function(_1c){
dojo.unsubscribe(_1c);
});
this._contentArea.destroy();
this.inherited("destroy",arguments);
}});
}


;if(!dojo._hasResource["lconn.core.applicationPalette"]){
dojo._hasResource["lconn.core.applicationPalette"]=true;
dojo.provide("lconn.core.applicationPalette");
dojo.require("lconn.core.xslt");
dojo.require("lconn.core.utilities");
dojo.require("lconn.core.formutilities");
dojo.require("lconn.core.errorhandling");
dojo.require("lconn.core.paletteOneUI.Palette");
dojo.requireLocalization("lconn.core","widgets");
lconn.core.applicationPalette=function(){
this.onLoad=function(){
try{
var _1=null;
_1=this.iContext.getElementById("applicationPalettewidgetContainer");
lconn.core.applicationPalette.palette=new lconn.core.paletteOneUI.Palette({id:"communityPalette",imageContextRoot:WidgetPlacementConfig.applicationContext+"/nav/common/styles/images"});
lconn.core.applicationPalette.palette.setLayoutImage("primary",WidgetPlacementConfig.applicationContext+"/nav/common/styles/images/3col_primary.jpg");
lconn.core.applicationPalette.palette.setLayoutImage("secondary",WidgetPlacementConfig.applicationContext+"/nav/common/styles/images/2secondary_cols.jpg");
lconn.core.applicationPalette.palette.setJsonData(lconn.core.applicationPalette.getjsonData());
lconn.core.applicationPalette.palette.populatePalette(false);
lconn.core.applicationPalette.palette.registerCanAddWidgetFct(lconn.core.applicationPalette.canAdd);
lconn.core.applicationPalette.palette.enableItemCounter();
dojo.subscribe(lconn.core.paletteOneUI.Palette.prototype.ADD_WIDGET_EVENT,lconn.core.applicationPalette.addWidget);
dojo.subscribe(lconn.core.paletteOneUI.Palette.prototype.CLOSE_PALETTE_EVENT,lconn.core.applicationPalette.hidePalette);
_1.appendChild(lconn.core.applicationPalette.palette.domNode);
lconn.core.applicationPalette.contentLoaded=true;
dojo.attr(_1,"role","region");
dojo.attr(_1,"aria-label",lconn.core.applicationPalette.messages["label.theme.customize"]);
}
catch(e){
console.error("Unable to load application palette",e);
}
};
};
lconn.core.applicationPalette.messages=dojo.i18n.getLocalization("lconn.core","widgets");
lconn.core.applicationPalette.hidePalette=function(){
var _2=function(){
var _3=dijit.byId("communityPalette");
if(_3!=null){
_3.destroy();
}
destroyWidget("widgetPalette");
lconn.core.applicationPalette.palette=null;
lconn.core.applicationPalette.contentLoaded=null;
dojo.byId("widget-container-palette").innerHTML="";
var _4=dojo.byId("displayActionsBtn");
if(_4!=null){
_4.focus();
}
};
lconn.core.utilities.hide("communityPalette",false,false,_2);
return false;
};
lconn.core.applicationPalette.showPalette=function(){
dojo.byId("widget-container-palette").style.display="none";
closeOtherViews();
registerCloseViewFunction(lconn.core.applicationPalette.hidePalette);
lconn.core.WidgetPlacement.addWidgetInProgress=false;
if(lconn.core.applicationPalette.contentLoaded==null){
lconn.core.WidgetPlacement.getWidgetDocAndRenderWidget("widgetPalette",null,null,"palette",null,"skinless",null,false);
}else{
lconn.core.applicationPalette.palette.setJsonData(lconn.core.applicationPalette.getjsonData());
lconn.core.applicationPalette.palette.populatePalette(false);
}
var _5=function(){
lconn.core.utilities.show("widget-container-palette",false,true,false);
var _6=dojo.query("#widgetAddId a");
if(_6!=null){
_6[0].focus();
}
};
lconn.core.utilities.processUntilAvailable(_5,"dojo.byId('communityPalette') != null");
return false;
};
lconn.core.applicationPalette.addWidget=function(_7){
var _8=lconn.core.applicationPalette.canAdd(_7);
console.log("addWidget: canAdd="+_8+" for: "+_7.id);
if(_8&&lconn.core.WidgetPlacement.addWidgetInProgress==false){
lconn.core.WidgetPlacement.addWidgetInProgress=true;
var _9=null;
if(_7.widgetType=="primary"){
_9="col2";
}else{
_9="col3";
}
lconn.core.WidgetPlacement.addWidgetToServerAndRender(_7.widgetId,_9,_7.hidden,_7.instanceId);
if(_7.category=="hidden"&&_7.hidden=="true"){
_7.hasAlreadyBeenUnhidden="true";
}
console.log("addWidget: completed for: "+_7.id);
throw "Err1";
}
};
var createCatItem=function(_a,_b,_c,_d){
if(_c==null){
_c="";
}
var _e=_a.getAttribute("iconUrl");
var _f=null;
if(_e!=null&&_e!=""){
_f=lconn.core.i18nOverrider.replaceParams(_e,WidgetPlacementConfig.params);
}
var _10={id:_c+"_"+_a.getAttribute("defId"),widgetId:_a.getAttribute("defId"),name:getResourcedStringForItem(_a,"defId"),desc:getResourcedStringForItem(_a,"description"),uniqueInstance:(_a.getAttribute("uniqueInstance")=="true").toString(),hidden:_b,widgetType:"primary"};
if(_a.getAttribute("primaryWidget")=="false"){
_10.widgetType="secondary";
}
if(_b=="true"){
_10.category="hidden";
_10.instanceId=_d;
_10.id=_c+"_"+_a.getAttribute("defId")+"_"+_d;
}
if(_f!=null&&_f!=""){
_10.iconUrl=_f;
}
return _10;
};
var addToList=function(_11,_12,_13){
var _14=_11.getAttribute("category");
if(_14!=null&&_14!=""){
var _15=null;
for(var i=0;_13.categories!=null&&i<_13.categories.length;i++){
var _16=_13.categories[i];
if(_16.id==_14){
_15=_16;
break;
}
}
if(_15==null){
_15={name:getResourcedStringForItem(_11,"category"),id:_14,widgets:[]};
_13.categories.push(_15);
}
_15.widgets.push(createCatItem(_11,"false",_14));
}
_12.push(_11);
};
lconn.core.applicationPalette.getjsonData=function(){
var _17={categories:[{name:this.messages["widgetCat_AllWidgets"],id:"allWidgetsCat",widgets:[]}]};
var _18="/tns:widgets/tns:definitions/tns:widgetDef";
var _19=lconn.core.xpath.selectNodes(_18,WidgetPlacementConfig.widgetConfigXMLDocument);
var _1a=new Array;
var _1b=new Array;
for(var i=0;_19.length!=null&&i<_19.length;i++){
var _1c=_19[i];
if(_1c.getAttribute("showInPalette")=="false"){
continue;
}
if(!canAddWidget(_1c,WidgetPlacementConfig,true)){
continue;
}
var _1d="/tns:widgets/tns:layout/tns:page[@pageId='"+WidgetPlacementConfig.defaultPageId+"']/tns:widgetInstance[@defIdRef='"+_1c.getAttribute("defId")+"']";
var _1e=lconn.core.xpath.selectNodes(_1d,WidgetPlacementConfig.widgetConfigXMLDocument);
if(_1e==null||_1e.length==0){
addToList(_1c,_1a,_17);
}else{
if(_1e.length>0){
for(var x=0;x<_1e.length;x++){
if(_1e[x].getAttribute("enabled")=="false"){
var _1f=_1e[x].getAttribute("instanceId");
_1b.push(createCatItem(_1c,"true","hidden",_1f));
}
}
if(_1c.getAttribute("uniqueInstance")==null||_1c.getAttribute("uniqueInstance")=="false"){
addToList(_1c,_1a,_17);
}
}
}
}
for(var i=0;_1a.length!=null&&i<_1a.length;i++){
var _1c=_1a[i];
_17.categories[0].widgets.push(createCatItem(_1c,"false","aval"));
}
if(_1b.length>0){
var _20={name:this.messages["widgetCat_hidden"],id:"hiddenCat",widgets:[]};
_17.categories.push(_20);
for(var i=0;i<_1b.length;i++){
_20.widgets.push(_1b[i]);
}
}
return _17;
};
lconn.core.applicationPalette.canAdd=function(_21){
var _22=false;
if(_21.hasAlreadyBeenUnhidden=="true"){
_22=false;
}else{
if(_21.category=="hidden"&&_21.hidden=="true"){
_22=true;
}else{
var _23="/tns:widgets/tns:layout/tns:page[@pageId='"+WidgetPlacementConfig.defaultPageId+"']/tns:widgetInstance[@defIdRef='"+_21.widgetId+"']";
var _24=lconn.core.xpath.selectNodes(_23,WidgetPlacementConfig.widgetConfigXMLDocument);
if(_24.length==0){
_22=true;
}else{
if(_21.uniqueInstance=="false"){
_22=true;
}else{
_22=false;
}
}
}
}
console.log("returnValue: "+_22+" for id: "+_21.id+" other: "+typeof (_21.uniqueInstance));
return _22;
};
}

dojo.provide("lconn.core.paletteOneUI.nls.dndAvatar")._built=true;
dojo.provide("lconn.core.paletteOneUI.nls.dndAvatar.en");
lconn.core.paletteOneUI.nls.dndAvatar.en={"TITLE_CREATE_WIDGET":"Creating widget","MOVE_WIDGET":"Release mouse to drop widget","ADD_WIDGET":"Release mouse to add widget to the page","CANNOT_DROP_WIDGET":"Widget cannot be dropped here","TITLE_MOVE_WIDGET":"Moving widget","CANNOT_ADD_WIDGET":"Widget cannot be added here"};

;if(!dojo._hasResource["lconn.core.paletteOneUI.dnd.avatar"]){
dojo._hasResource["lconn.core.paletteOneUI.dnd.avatar"]=true;
dojo.provide("lconn.core.paletteOneUI.dnd.avatar");
dojo.provide("lconn.dboard.dnd.avatar");
dojo.require("dojo.dnd.Avatar");
dojo.require("dojo.dnd.common");
dojo.requireLocalization("lconn.core.paletteOneUI","dndAvatar");
dojo.declare("lconn.dboard.dnd.avatar",dojo.dnd.Avatar,{_bodyNode:null,_titleNode:null,_draggedWidgetData:null,_isPaletteItem:null,_resourceBundle:null,construct:function(){
this._resourceBundle=dojo.i18n.getLocalization("lconn.core.paletteOneUI","dndAvatar");
if(this.manager.nodes.length){
this._isPaletteItem=dojo.hasClass(this.manager.nodes[0],"paletteItem");
var _1=this.manager.source;
this._draggedWidgetData=_1.getItem(this.manager.nodes[0].id).data;
this.node=dojo.doc.createElement("div");
dojo.addClass(this.node,"idbc");
this._titleNode=dojo.doc.createElement("div");
dojo.addClass(this._titleNode,"idbt");
if(this._isPaletteItem){
this._titleNode.innerHTML=dojo.string.substitute(this._resourceBundle.TITLE_CREATE_WIDGET,[this._draggedWidgetData]);
}else{
this._titleNode.innerHTML=dojo.string.substitute(this._resourceBundle.TITLE_MOVE_WIDGET,[this._draggedWidgetData]);
}
this._bodyNode=dojo.doc.createElement("div");
dojo.addClass(this._bodyNode,"idbi");
this.node.appendChild(this._titleNode);
this.node.appendChild(this._bodyNode);
this.node.style.position="absolute";
this.node.style.zIndex=1999;
this.update();
}
},update:function(){
var _2=dojo.moduleUrl("lconn.core","paletteOneUI/dnd/cannotDrop.gif").toString();
var _3=dojo.moduleUrl("lconn.core","paletteOneUI/dnd/okDrop.gif").toString();
if(this._isPaletteItem){
if(this.manager.canDropFlag){
var _4="<img src='"+_3+"'></img>";
this._bodyNode.innerHTML=_4+" "+dojo.string.substitute(this._resourceBundle.ADD_WIDGET,[this._draggedWidgetData]);
}else{
var _4="<img src='"+_2+"'></img>";
this._bodyNode.innerHTML=_4+" "+dojo.string.substitute(this._resourceBundle.CANNOT_ADD_WIDGET,[this._draggedWidgetData]);
}
}else{
if(this.manager.canDropFlag){
var _4="<img src='"+_3+"'></img>";
this._bodyNode.innerHTML=_4+" "+dojo.string.substitute(this._resourceBundle.MOVE_WIDGET,[this._draggedWidgetData]);
}else{
var _4="<img src='"+_2+"'></img>";
this._bodyNode.innerHTML=_4+" "+dojo.string.substitute(this._resourceBundle.CANNOT_DROP_WIDGET,[this._draggedWidgetData]);
}
}
}});
}


;if(!dojo._hasResource["dojo.dnd.Container"]){
dojo._hasResource["dojo.dnd.Container"]=true;
dojo.provide("dojo.dnd.Container");
dojo.require("dojo.dnd.common");
dojo.require("dojo.parser");
dojo.declare("dojo.dnd.Container",null,{skipForm:false,constructor:function(_1,_2){
this.node=dojo.byId(_1);
if(!_2){
_2={};
}
this.creator=_2.creator||null;
this.skipForm=_2.skipForm;
this.parent=_2.dropParent&&dojo.byId(_2.dropParent);
this.map={};
this.current=null;
this.containerState="";
dojo.addClass(this.node,"dojoDndContainer");
if(!(_2&&_2._skipStartup)){
this.startup();
}
this.events=[dojo.connect(this.node,"onmouseover",this,"onMouseOver"),dojo.connect(this.node,"onmouseout",this,"onMouseOut"),dojo.connect(this.node,"ondragstart",this,"onSelectStart"),dojo.connect(this.node,"onselectstart",this,"onSelectStart")];
},creator:function(){
},getItem:function(_3){
return this.map[_3];
},setItem:function(_4,_5){
this.map[_4]=_5;
},delItem:function(_6){
delete this.map[_6];
},forInItems:function(f,o){
o=o||dojo.global;
var m=this.map,e=dojo.dnd._empty;
for(var i in m){
if(i in e){
continue;
}
f.call(o,m[i],i,this);
}
return o;
},clearItems:function(){
this.map={};
},getAllNodes:function(){
return dojo.query("> .dojoDndItem",this.parent);
},sync:function(){
var _7={};
this.getAllNodes().forEach(function(_8){
if(_8.id){
var _9=this.getItem(_8.id);
if(_9){
_7[_8.id]=_9;
return;
}
}else{
_8.id=dojo.dnd.getUniqueId();
}
var _a=_8.getAttribute("dndType"),_b=_8.getAttribute("dndData");
_7[_8.id]={data:_b||_8.innerHTML,type:_a?_a.split(/\s*,\s*/):["text"]};
},this);
this.map=_7;
return this;
},insertNodes:function(_c,_d,_e){
if(!this.parent.firstChild){
_e=null;
}else{
if(_d){
if(!_e){
_e=this.parent.firstChild;
}
}else{
if(_e){
_e=_e.nextSibling;
}
}
}
if(_e){
for(var i=0;i<_c.length;++i){
var t=this._normalizedCreator(_c[i]);
this.setItem(t.node.id,{data:t.data,type:t.type});
this.parent.insertBefore(t.node,_e);
}
}else{
for(var i=0;i<_c.length;++i){
var t=this._normalizedCreator(_c[i]);
this.setItem(t.node.id,{data:t.data,type:t.type});
this.parent.appendChild(t.node);
}
}
return this;
},destroy:function(){
dojo.forEach(this.events,dojo.disconnect);
this.clearItems();
this.node=this.parent=this.current=null;
},markupFactory:function(_f,_10){
_f._skipStartup=true;
return new dojo.dnd.Container(_10,_f);
},startup:function(){
if(!this.parent){
this.parent=this.node;
if(this.parent.tagName.toLowerCase()=="table"){
var c=this.parent.getElementsByTagName("tbody");
if(c&&c.length){
this.parent=c[0];
}
}
}
this.defaultCreator=dojo.dnd._defaultCreator(this.parent);
this.sync();
},onMouseOver:function(e){
var n=e.relatedTarget;
while(n){
if(n==this.node){
break;
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
if(!n){
this._changeState("Container","Over");
this.onOverEvent();
}
n=this._getChildByEvent(e);
if(this.current==n){
return;
}
if(this.current){
this._removeItemClass(this.current,"Over");
}
if(n){
this._addItemClass(n,"Over");
}
this.current=n;
},onMouseOut:function(e){
for(var n=e.relatedTarget;n;){
if(n==this.node){
return;
}
try{
n=n.parentNode;
}
catch(x){
n=null;
}
}
if(this.current){
this._removeItemClass(this.current,"Over");
this.current=null;
}
this._changeState("Container","");
this.onOutEvent();
},onSelectStart:function(e){
if(!this.skipForm||!dojo.dnd.isFormElement(e)){
dojo.stopEvent(e);
}
},onOverEvent:function(){
},onOutEvent:function(){
},_changeState:function(_11,_12){
var _13="dojoDnd"+_11;
var _14=_11.toLowerCase()+"State";
dojo.removeClass(this.node,_13+this[_14]);
dojo.addClass(this.node,_13+_12);
this[_14]=_12;
},_addItemClass:function(_15,_16){
dojo.addClass(_15,"dojoDndItem"+_16);
},_removeItemClass:function(_17,_18){
dojo.removeClass(_17,"dojoDndItem"+_18);
},_getChildByEvent:function(e){
var _19=e.target;
if(_19){
for(var _1a=_19.parentNode;_1a;_19=_1a,_1a=_19.parentNode){
if(_1a==this.parent&&dojo.hasClass(_19,"dojoDndItem")){
return _19;
}
}
}
return null;
},_normalizedCreator:function(_1b,_1c){
var t=(this.creator||this.defaultCreator).call(this,_1b,_1c);
if(!dojo.isArray(t.type)){
t.type=["text"];
}
if(!t.node.id){
t.node.id=dojo.dnd.getUniqueId();
}
dojo.addClass(t.node,"dojoDndItem");
return t;
}});
dojo.dnd._createNode=function(tag){
if(!tag){
return dojo.dnd._createSpan;
}
return function(_1d){
return dojo.create(tag,{innerHTML:_1d});
};
};
dojo.dnd._createTrTd=function(_1e){
var tr=dojo.create("tr");
dojo.create("td",{innerHTML:_1e},tr);
return tr;
};
dojo.dnd._createSpan=function(_1f){
return dojo.create("span",{innerHTML:_1f});
};
dojo.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};
dojo.dnd._defaultCreator=function(_20){
var tag=_20.tagName.toLowerCase();
var c=tag=="tbody"||tag=="thead"?dojo.dnd._createTrTd:dojo.dnd._createNode(dojo.dnd._defaultCreatorNodes[tag]);
return function(_21,_22){
var _23=_21&&dojo.isObject(_21),_24,_25,n;
if(_23&&_21.tagName&&_21.nodeType&&_21.getAttribute){
_24=_21.getAttribute("dndData")||_21.innerHTML;
_25=_21.getAttribute("dndType");
_25=_25?_25.split(/\s*,\s*/):["text"];
n=_21;
}else{
_24=(_23&&_21.data)?_21.data:_21;
_25=(_23&&_21.type)?_21.type:["text"];
n=(_22=="avatar"?dojo.dnd._createSpan:c)(String(_24));
}
n.id=dojo.dnd.getUniqueId();
return {node:n,data:_24,type:_25};
};
};
}


;if(!dojo._hasResource["dojo.dnd.Selector"]){
dojo._hasResource["dojo.dnd.Selector"]=true;
dojo.provide("dojo.dnd.Selector");
dojo.require("dojo.dnd.common");
dojo.require("dojo.dnd.Container");
dojo.declare("dojo.dnd.Selector",dojo.dnd.Container,{constructor:function(_1,_2){
if(!_2){
_2={};
}
this.singular=_2.singular;
this.autoSync=_2.autoSync;
this.selection={};
this.anchor=null;
this.simpleSelection=false;
this.events.push(dojo.connect(this.node,"onmousedown",this,"onMouseDown"),dojo.connect(this.node,"onmouseup",this,"onMouseUp"));
},singular:false,getSelectedNodes:function(){
var t=new dojo.NodeList();
var e=dojo.dnd._empty;
for(var i in this.selection){
if(i in e){
continue;
}
t.push(dojo.byId(i));
}
return t;
},selectNone:function(){
return this._removeSelection()._removeAnchor();
},selectAll:function(){
this.forInItems(function(_3,id){
this._addItemClass(dojo.byId(id),"Selected");
this.selection[id]=1;
},this);
return this._removeAnchor();
},deleteSelectedNodes:function(){
var e=dojo.dnd._empty;
for(var i in this.selection){
if(i in e){
continue;
}
var n=dojo.byId(i);
this.delItem(i);
dojo.destroy(n);
}
this.anchor=null;
this.selection={};
return this;
},forInSelectedItems:function(f,o){
o=o||dojo.global;
var s=this.selection,e=dojo.dnd._empty;
for(var i in s){
if(i in e){
continue;
}
f.call(o,this.getItem(i),i,this);
}
},sync:function(){
dojo.dnd.Selector.superclass.sync.call(this);
if(this.anchor){
if(!this.getItem(this.anchor.id)){
this.anchor=null;
}
}
var t=[],e=dojo.dnd._empty;
for(var i in this.selection){
if(i in e){
continue;
}
if(!this.getItem(i)){
t.push(i);
}
}
dojo.forEach(t,function(i){
delete this.selection[i];
},this);
return this;
},insertNodes:function(_4,_5,_6,_7){
var _8=this._normalizedCreator;
this._normalizedCreator=function(_9,_a){
var t=_8.call(this,_9,_a);
if(_4){
if(!this.anchor){
this.anchor=t.node;
this._removeItemClass(t.node,"Selected");
this._addItemClass(this.anchor,"Anchor");
}else{
if(this.anchor!=t.node){
this._removeItemClass(t.node,"Anchor");
this._addItemClass(t.node,"Selected");
}
}
this.selection[t.node.id]=1;
}else{
this._removeItemClass(t.node,"Selected");
this._removeItemClass(t.node,"Anchor");
}
return t;
};
dojo.dnd.Selector.superclass.insertNodes.call(this,_5,_6,_7);
this._normalizedCreator=_8;
return this;
},destroy:function(){
dojo.dnd.Selector.superclass.destroy.call(this);
this.selection=this.anchor=null;
},markupFactory:function(_b,_c){
_b._skipStartup=true;
return new dojo.dnd.Selector(_c,_b);
},onMouseDown:function(e){
if(this.autoSync){
this.sync();
}
if(!this.current){
return;
}
if(!this.singular&&!dojo.isCopyKey(e)&&!e.shiftKey&&(this.current.id in this.selection)){
this.simpleSelection=true;
if(e.button===dojo.mouseButtons.LEFT){
dojo.stopEvent(e);
}
return;
}
if(!this.singular&&e.shiftKey){
if(!dojo.isCopyKey(e)){
this._removeSelection();
}
var c=this.getAllNodes();
if(c.length){
if(!this.anchor){
this.anchor=c[0];
this._addItemClass(this.anchor,"Anchor");
}
this.selection[this.anchor.id]=1;
if(this.anchor!=this.current){
var i=0;
for(;i<c.length;++i){
var _d=c[i];
if(_d==this.anchor||_d==this.current){
break;
}
}
for(++i;i<c.length;++i){
var _d=c[i];
if(_d==this.anchor||_d==this.current){
break;
}
this._addItemClass(_d,"Selected");
this.selection[_d.id]=1;
}
this._addItemClass(this.current,"Selected");
this.selection[this.current.id]=1;
}
}
}else{
if(this.singular){
if(this.anchor==this.current){
if(dojo.isCopyKey(e)){
this.selectNone();
}
}else{
this.selectNone();
this.anchor=this.current;
this._addItemClass(this.anchor,"Anchor");
this.selection[this.current.id]=1;
}
}else{
if(dojo.isCopyKey(e)){
if(this.anchor==this.current){
delete this.selection[this.anchor.id];
this._removeAnchor();
}else{
if(this.current.id in this.selection){
this._removeItemClass(this.current,"Selected");
delete this.selection[this.current.id];
}else{
if(this.anchor){
this._removeItemClass(this.anchor,"Anchor");
this._addItemClass(this.anchor,"Selected");
}
this.anchor=this.current;
this._addItemClass(this.current,"Anchor");
this.selection[this.current.id]=1;
}
}
}else{
if(!(this.current.id in this.selection)){
this.selectNone();
this.anchor=this.current;
this._addItemClass(this.current,"Anchor");
this.selection[this.current.id]=1;
}
}
}
}
dojo.stopEvent(e);
},onMouseUp:function(e){
if(!this.simpleSelection){
return;
}
this.simpleSelection=false;
this.selectNone();
if(this.current){
this.anchor=this.current;
this._addItemClass(this.anchor,"Anchor");
this.selection[this.current.id]=1;
}
},onMouseMove:function(e){
this.simpleSelection=false;
},onOverEvent:function(){
this.onmousemoveEvent=dojo.connect(this.node,"onmousemove",this,"onMouseMove");
},onOutEvent:function(){
dojo.disconnect(this.onmousemoveEvent);
delete this.onmousemoveEvent;
},_removeSelection:function(){
var e=dojo.dnd._empty;
for(var i in this.selection){
if(i in e){
continue;
}
var _e=dojo.byId(i);
if(_e){
this._removeItemClass(_e,"Selected");
}
}
this.selection={};
return this;
},_removeAnchor:function(){
if(this.anchor){
this._removeItemClass(this.anchor,"Anchor");
this.anchor=null;
}
return this;
}});
}


;if(!dojo._hasResource["dojo.dnd.Source"]){
dojo._hasResource["dojo.dnd.Source"]=true;
dojo.provide("dojo.dnd.Source");
dojo.require("dojo.dnd.Selector");
dojo.require("dojo.dnd.Manager");
dojo.declare("dojo.dnd.Source",dojo.dnd.Selector,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(_1,_2){
dojo.mixin(this,dojo.mixin({},_2));
var _3=this.accept;
if(_3.length){
this.accept={};
for(var i=0;i<_3.length;++i){
this.accept[_3[i]]=1;
}
}
this.isDragging=false;
this.mouseDown=false;
this.targetAnchor=null;
this.targetBox=null;
this.before=true;
this._lastX=0;
this._lastY=0;
this.sourceState="";
if(this.isSource){
dojo.addClass(this.node,"dojoDndSource");
}
this.targetState="";
if(this.accept){
dojo.addClass(this.node,"dojoDndTarget");
}
if(this.horizontal){
dojo.addClass(this.node,"dojoDndHorizontal");
}
this.topics=[dojo.subscribe("/dnd/source/over",this,"onDndSourceOver"),dojo.subscribe("/dnd/start",this,"onDndStart"),dojo.subscribe("/dnd/drop",this,"onDndDrop"),dojo.subscribe("/dnd/cancel",this,"onDndCancel")];
},checkAcceptance:function(_4,_5){
if(this==_4){
return !this.copyOnly||this.selfAccept;
}
for(var i=0;i<_5.length;++i){
var _6=_4.getItem(_5[i].id).type;
var _7=false;
for(var j=0;j<_6.length;++j){
if(_6[j] in this.accept){
_7=true;
break;
}
}
if(!_7){
return false;
}
}
return true;
},copyState:function(_8,_9){
if(_8){
return true;
}
if(arguments.length<2){
_9=this==dojo.dnd.manager().target;
}
if(_9){
if(this.copyOnly){
return this.selfCopy;
}
}else{
return this.copyOnly;
}
return false;
},destroy:function(){
dojo.dnd.Source.superclass.destroy.call(this);
dojo.forEach(this.topics,dojo.unsubscribe);
this.targetAnchor=null;
},markupFactory:function(_a,_b){
_a._skipStartup=true;
return new dojo.dnd.Source(_b,_a);
},onMouseMove:function(e){
if(this.isDragging&&this.targetState=="Disabled"){
return;
}
dojo.dnd.Source.superclass.onMouseMove.call(this,e);
var m=dojo.dnd.manager();
if(!this.isDragging){
if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){
var _c=this.getSelectedNodes();
if(_c.length){
m.startDrag(this,_c,this.copyState(dojo.isCopyKey(e),true));
}
}
}
if(this.isDragging){
var _d=false;
if(this.current){
if(!this.targetBox||this.targetAnchor!=this.current){
this.targetBox=dojo.position(this.current,true);
}
if(this.horizontal){
_d=(e.pageX-this.targetBox.x)<(this.targetBox.w/2);
}else{
_d=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);
}
}
if(this.current!=this.targetAnchor||_d!=this.before){
this._markTargetAnchor(_d);
m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));
}
}
},onMouseDown:function(e){
if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dojo.dnd.isFormElement(e))){
this.mouseDown=true;
this._lastX=e.pageX;
this._lastY=e.pageY;
dojo.dnd.Source.superclass.onMouseDown.call(this,e);
}
},onMouseUp:function(e){
if(this.mouseDown){
this.mouseDown=false;
dojo.dnd.Source.superclass.onMouseUp.call(this,e);
}
},onDndSourceOver:function(_e){
if(this!=_e){
this.mouseDown=false;
if(this.targetAnchor){
this._unmarkTargetAnchor();
}
}else{
if(this.isDragging){
var m=dojo.dnd.manager();
m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));
}
}
},onDndStart:function(_f,_10,_11){
if(this.autoSync){
this.sync();
}
if(this.isSource){
this._changeState("Source",this==_f?(_11?"Copied":"Moved"):"");
}
var _12=this.accept&&this.checkAcceptance(_f,_10);
this._changeState("Target",_12?"":"Disabled");
if(this==_f){
dojo.dnd.manager().overSource(this);
}
this.isDragging=true;
},onDndDrop:function(_13,_14,_15,_16){
if(this==_16){
this.onDrop(_13,_14,_15);
}
this.onDndCancel();
},onDndCancel:function(){
if(this.targetAnchor){
this._unmarkTargetAnchor();
this.targetAnchor=null;
}
this.before=true;
this.isDragging=false;
this.mouseDown=false;
this._changeState("Source","");
this._changeState("Target","");
},onDrop:function(_17,_18,_19){
if(this!=_17){
this.onDropExternal(_17,_18,_19);
}else{
this.onDropInternal(_18,_19);
}
},onDropExternal:function(_1a,_1b,_1c){
var _1d=this._normalizedCreator;
if(this.creator){
this._normalizedCreator=function(_1e,_1f){
return _1d.call(this,_1a.getItem(_1e.id).data,_1f);
};
}else{
if(_1c){
this._normalizedCreator=function(_20,_21){
var t=_1a.getItem(_20.id);
var n=_20.cloneNode(true);
n.id=dojo.dnd.getUniqueId();
return {node:n,data:t.data,type:t.type};
};
}else{
this._normalizedCreator=function(_22,_23){
var t=_1a.getItem(_22.id);
_1a.delItem(_22.id);
return {node:_22,data:t.data,type:t.type};
};
}
}
this.selectNone();
if(!_1c&&!this.creator){
_1a.selectNone();
}
this.insertNodes(true,_1b,this.before,this.current);
if(!_1c&&this.creator){
_1a.deleteSelectedNodes();
}
this._normalizedCreator=_1d;
},onDropInternal:function(_24,_25){
var _26=this._normalizedCreator;
if(this.current&&this.current.id in this.selection){
return;
}
if(_25){
if(this.creator){
this._normalizedCreator=function(_27,_28){
return _26.call(this,this.getItem(_27.id).data,_28);
};
}else{
this._normalizedCreator=function(_29,_2a){
var t=this.getItem(_29.id);
var n=_29.cloneNode(true);
n.id=dojo.dnd.getUniqueId();
return {node:n,data:t.data,type:t.type};
};
}
}else{
if(!this.current){
return;
}
this._normalizedCreator=function(_2b,_2c){
var t=this.getItem(_2b.id);
return {node:_2b,data:t.data,type:t.type};
};
}
this._removeSelection();
this.insertNodes(true,_24,this.before,this.current);
this._normalizedCreator=_26;
},onDraggingOver:function(){
},onDraggingOut:function(){
},onOverEvent:function(){
dojo.dnd.Source.superclass.onOverEvent.call(this);
dojo.dnd.manager().overSource(this);
if(this.isDragging&&this.targetState!="Disabled"){
this.onDraggingOver();
}
},onOutEvent:function(){
dojo.dnd.Source.superclass.onOutEvent.call(this);
dojo.dnd.manager().outSource(this);
if(this.isDragging&&this.targetState!="Disabled"){
this.onDraggingOut();
}
},_markTargetAnchor:function(_2d){
if(this.current==this.targetAnchor&&this.before==_2d){
return;
}
if(this.targetAnchor){
this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
}
this.targetAnchor=this.current;
this.targetBox=null;
this.before=_2d;
if(this.targetAnchor){
this._addItemClass(this.targetAnchor,this.before?"Before":"After");
}
},_unmarkTargetAnchor:function(){
if(!this.targetAnchor){
return;
}
this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
this.targetAnchor=null;
this.targetBox=null;
this.before=true;
},_markDndStatus:function(_2e){
this._changeState("Source",_2e?"Copied":"Moved");
},_legalMouseDown:function(e){
if(!dojo.mouseButtons.isLeft(e)){
return false;
}
if(!this.withHandles){
return true;
}
for(var _2f=e.target;_2f&&_2f!==this.node;_2f=_2f.parentNode){
if(dojo.hasClass(_2f,"dojoDndHandle")){
return true;
}
if(dojo.hasClass(_2f,"dojoDndItem")||dojo.hasClass(_2f,"dojoDndIgnore")){
break;
}
}
return false;
}});
dojo.declare("dojo.dnd.Target",dojo.dnd.Source,{constructor:function(_30,_31){
this.isSource=false;
dojo.removeClass(this.node,"dojoDndSource");
},markupFactory:function(_32,_33){
_32._skipStartup=true;
return new dojo.dnd.Target(_33,_32);
}});
dojo.declare("dojo.dnd.AutoSource",dojo.dnd.Source,{constructor:function(_34,_35){
this.autoSync=true;
},markupFactory:function(_36,_37){
_36._skipStartup=true;
return new dojo.dnd.AutoSource(_37,_36);
}});
}


;if(!dojo._hasResource["lconn.core.dnd.Source"]){
dojo._hasResource["lconn.core.dnd.Source"]=true;
dojo.provide("lconn.core.dnd.Source");
dojo.require("dojo.dnd.Source");
dojo.declare("lconn.core.dnd.Source",dojo.dnd.Source,{isCursorNorthNode:function(_1,_2){
var _3=dojo.coords(_1,true);
var _4=_1.offsetHeight;
return ((_2.pageY-_3.y)<(_4/2));
},_children:null,_changeState:function(_5,_6){
var _7=_5.toLowerCase()+"State";
this[_7]=_6;
},_addItemClass:function(_8,_9){
},_removeItemClass:function(_a,_b){
},getInsertPosition:function(e){
var _c=-1;
var _d=false;
var _e=[];
for(var i=0;i<this._children.length;i++){
if(this._children[i].style.display!="none"){
_e.push(this._children[i]);
}
}
var _f=_e.length-1;
if(_e.length>0){
if(this.isCursorNorthNode(_e[0],e)){
_c=0;
_d=true;
}else{
if(!this.isCursorNorthNode(_e[_f],e)){
_c=_f;
_d=false;
}else{
for(var i=0;i<_f;i++){
if(!this.isCursorNorthNode(_e[i],e)&&this.isCursorNorthNode(_e[i+1],e)){
_c=i;
_d=false;
break;
}
}
}
}
return [_e[_c],_d];
}else{
return [null,false];
}
},placeIndicator:function(_10,_11){
if(this.dropIndicator&&this.dropIndicator.parentNode){
this.dropIndicator.parentNode.removeChild(this.dropIndicator);
}
if(_10==null){
this.node.appendChild(this.dropIndicator);
}else{
if(_11){
_10.parentNode.insertBefore(this.dropIndicator,_10);
}else{
if(_10.parentNode.lastChild==_10){
this.node.appendChild(this.dropIndicator);
}else{
_10.parentNode.insertBefore(this.dropIndicator,_10.nextSibling);
}
}
}
},createDropIndicator:function(){
var _12=7;
this.dropIndicator=document.createElement("div");
this.dropIndicator.style.borderWidth="2px";
this.dropIndicator.style.borderColor="gray";
this.dropIndicator.style.borderStyle="dashed";
this.dropIndicator.style.cursor="default";
this.dropIndicator.style.height=dojo.marginBox(dojo.dnd.manager().avatar.node).h+"px";
this.dropIndicator.style.width=dojo.marginBox(this.node).w-_12+"px";
},onDndStart:function(_13,_14,_15){
dojo.body().onselectstart=function(){
return false;
};
dojo.body().unselectable="on";
lconn.core.dnd.Source.superclass.onDndStart.apply(this,arguments);
this._children=dojo.query("> .dojoDndItem",this.parent);
this.threshold=5;
_14[0].style.display="none";
},onMouseDown:function(e){
if(!this.current){
return;
}
var _16=dojo.query(".ibmDndDragHandle",this.current);
if(_16.length){
if(e.target!=_16[0]){
dojo.publish("/dnd/cancel");
return;
}
}
lconn.core.dnd.Source.superclass.onMouseDown.apply(this,arguments);
},onMouseOver:function(e){
lconn.core.dnd.Source.superclass.onMouseOver.apply(this,arguments);
if(!this.isDragging){
var _17=dojo.query(".ibmDndDragHandle",this.current);
if(_17.length){
if(e.target==_17[0]){
dojo.addClass(e.target,"ibmDndDragHandleOver");
}
}
}
},onMouseOut:function(e){
lconn.core.dnd.Source.superclass.onMouseOut.apply(this,arguments);
var _18=dojo.query(".ibmDndDragHandle",this.current);
if(_18.length){
if(e.target==_18[0]){
dojo.removeClass(e.target,"ibmDndDragHandleOver");
}
}
},onDndDrop:function(_19,_1a,_1b){
var _1c=this.current;
this.current=this.dropIndicator;
lconn.core.dnd.Source.superclass.onDndDrop.apply(this,arguments);
this.current=_1c;
if(this.containerState=="Over"){
dojo.publish("/lconn/core/dnd/drop",[_19.node,this.node,_1a[0]]);
}
dojo.body().onselectstart=null;
dojo.body().unselectable="off";
dojo.dnd.manager().canDropFlag=false;
},insertNodes:function(_1d,_1e,_1f,_20){
if(_1e.length){
for(var i=0;i<_1e.length;i++){
_1e[i].style.display="";
}
}
lconn.core.dnd.Source.superclass.insertNodes.apply(this,arguments);
},deleteDropIndicator:function(){
if(this.dropIndicator&&this.dropIndicator.parentNode){
this.dropIndicator.parentNode.removeChild(this.dropIndicator);
this.dropIndicator=null;
}
this.pos=null;
},onDndCancel:function(){
this.deleteDropIndicator();
if(!this.flagNotHide){
var m=dojo.dnd.manager();
for(var i=0;i<m.nodes.length;i++){
m.nodes[i].style.display="block";
}
}
dojo.dnd.manager().canDropFlag=false;
lconn.core.dnd.Source.superclass.onDndCancel.call(this);
},onOutEvent:function(){
this.deleteDropIndicator();
this.flag=true;
lconn.core.dnd.Source.superclass.onOutEvent.call(this);
},pos:null,threshold:null,mutex:0,onMouseMove:function(e){
if(this.mutex!=0){
return;
}
if(this.isDragging&&this.targetState=="Disabled"){
return;
}
dojo.dnd.Source.superclass.onMouseMove.call(this,e);
var m=dojo.dnd.manager();
if(!this.isDragging){
if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){
var _21=this.getSelectedNodes();
if(_21.length){
m.startDrag(this,_21,this.copyState(dojo.isCopyKey(e),true));
this.flag=true;
}
}
}
if(this.isDragging){
this.threshold++;
if(this.threshold>=5){
try{
this.mutex++;
var _22=false;
if(this.current){
if(!this.targetBox||this.targetAnchor!=this.current){
this.targetBox={xy:dojo.coords(this.current,true),w:this.current.offsetWidth,h:this.current.offsetHeight,id:this.current.id};
}
if(this.horizontal){
_22=(e.pageX-this.targetBox.xy.x)<(this.targetBox.w/2);
}else{
_22=(e.pageY-this.targetBox.xy.y)<(this.targetBox.h/2);
}
}
if((e.target!=this.dropIndicator)){
var pos=this.getInsertPosition(e);
if(!this.pos||pos[0]!=this.pos[0]||pos[1]!=this.pos[1]){
this.deleteDropIndicator();
this.createDropIndicator();
this.placeIndicator(pos[0],pos[1]);
this.pos=pos;
}
}
if(this.current!=this.targetAnchor||_22!=this.before){
this._markTargetAnchor(_22);
m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));
}
}
catch(e){
}
finally{
this.threshold=0;
this.mutex--;
}
}
}
}});
}


;if(!dojo._hasResource["lconn.core.paletteOneUI.dnd.Source"]){
dojo._hasResource["lconn.core.paletteOneUI.dnd.Source"]=true;
dojo.provide("lconn.core.paletteOneUI.dnd.Source");
dojo.provide("lconn.dboard.dnd.Source");
dojo.require("lconn.core.dnd.Source");
dojo.declare("lconn.dboard.dnd.Source",lconn.core.dnd.Source,{flagNotHide:false,isPalette:false,checkAcceptance:function(_1,_2){
if(this.isPalette){
return false;
}else{
return lconn.dboard.dnd.Source.superclass.checkAcceptance.apply(this,arguments);
}
},onDndDrop:function(_3,_4,_5){
if(this.containerState=="Over"&&dojo.hasClass(_4[0],"paletteItem")){
dojo.publish("/lconn/dboard/dropPaletteItem",[_4[0],this.dropIndicator,this.node]);
this.deleteDropIndicator();
lconn.core.dnd.Source.superclass.onDndCancel.call(this);
}else{
if(dojo.hasClass(_4[0],"paletteItem")){
this.flagNotHide=true;
}
var _6=this.current;
this.current=this.dropIndicator;
lconn.dboard.dnd.Source.superclass.onDndDrop.apply(this,arguments);
this.flagNotHide=false;
this.current=_6;
if(this.containerState=="Over"){
dojo.publish("/lconn/dboard/dnd/drop",[_3.node,this.node,_4[0]]);
}
}
dojo.body().onselectstart=null;
dojo.body().unselectable="off";
dojo.dnd.manager().canDropFlag=false;
}});
}

dojo.provide("lconn.core.nls.feedreader")._built=true;
dojo.provide("lconn.core.nls.feedreader.en");
lconn.core.nls.feedreader.en={"feedreader.bookmarks.membernocontent":"Share Web resources with your community.","feedreader.updatedby":"Updated by","feedreader.tags":"Tags: ","feedreader.bookmarks.logo":"Bookmarks logo","feedreader.nofeed":"No feed URL has been provided.","feedreader.viewall":"View All","feedreader.feeds.logo":"Feeds logo","feedreader.createdby":"Created by","feedreader.feeds.nocontent":"There are no feeds yet for this community.","feedreader.bookmarks.membercreate":"Add a Bookmark","feedreader.feeds.membercreatefirst":"Add Your First Feed","feedreader.feeds.membernocontent":"Stay current with up-to-minute information.","feedreader.bookmarks.nocontent":"There are no bookmarks yet for this community.","feedreader.feeds.membercreate":"Add a Feed","feedreader.bookmarks.membercreatefirst":"Add Your First Bookmark","feedreader.viewallparam":"View All ({0})"};

;dojo.cache("lconn.comm", "widgets/feedReader/feedreader.xsl", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xsl:stylesheet version=\"1.0\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:html=\"http://www.w3.org/1999/xhtml\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn/profiles\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" exclude-result-prefixes=\"snx xsl atom\"> <xsl:output method=\"html\" omit-xml-declaration=\"yes\" indent=\"no\" /> <xsl:param name=\"pm_CanContribute\" select=\"false()\"/> <xsl:param name=\"rs_SeeAllFeeds\" select=\"'View All'\"/> <xsl:param name=\"rs_UpdatedBy\" select=\"'Updated by'\"/> <xsl:param name=\"rs_CreatedBy\" select=\"'Created by'\"/> <xsl:param name=\"rs_Tags\" select=\"'Tags: '\"/> <xsl:param name=\"pm_Icon\" select=\"'/nav/common/styles/images/blank.gif'\"/> <xsl:param name=\"pm_IconClass\" select=\"'lconnSprite lconnSprite-iconFeed16'\"/> <xsl:param name=\"rs_IconAlt\" select=\"'Feeds logo'\"/> <xsl:param name=\"rs_MemberNoContent\" select=\"'Stay current with up-to-minute information.'\"/> <xsl:param name=\"rs_MemberCreate\" select=\"'Add your first feed.'\"/> <xsl:param name=\"rs_MemberCreateMore\" select=\"'Add entry'\"/> <xsl:param name=\"rs_NoContent\" select=\"'There are no feeds yet for this community.'\"/> <xsl:param name=\"pm_MemberCreateUrl\" select=\"'Invalid URL'\"/> <xsl:param name=\"pm_WidgetID\" select=\"foo\"/> <xsl:param name=\"applicationContext\" /> <xsl:variable name=\"vendor\" select=\"system-property('xsl:vendor')\" /> <xsl:variable name=\"isIE\"> <xsl:choose> <xsl:when test=\"$vendor='Microsoft'\"> <xsl:value-of select=\"true()\" /> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"false()\" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:template match=\"/\"> <div class=\"lotusChunk\"> <table id=\"{$pm_WidgetID}TableContainer\" class=\"lotusTable\" cellspacing=\"0\" role=\"presentation\"> <xsl:choose> <xsl:when test=\"count(atom:feed/atom:entry) > 0\"> <xsl:if test=\"$pm_CanContribute='true'\"> <xsl:call-template name=\"renderMemberCreateLink\"> <xsl:with-param name=\"memberCreateUrl\">{atom:feed/atom:link[@rel='alternate']/@href}</xsl:with-param> </xsl:call-template> </xsl:if> <xsl:for-each select=\"atom:feed/atom:entry\"> <tr> <xsl:if test=\"position() = 1 and $pm_CanContribute='false'\"> <xsl:attribute name=\"class\">lotusFirst</xsl:attribute> </xsl:if> <xsl:if test=\"count(atom:link[@type='image/x-icon']/@href) > 0\"> <td width=\"20\"> <img src=\"{atom:link[@type='image/x-icon']/@href}\"/> </td> </xsl:if> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <h4> <xsl:choose> <xsl:when test=\"count(atom:category[@term='feed'])>0\"> <xsl:variable name=\"baseURL\" select=\"/atom:feed/atom:link['rel=alternate' and @type='text/html']/@href\"/> <xsl:variable name=\"feedURL\" select=\"atom:id\"/> <xsl:variable name=\"feedId\" select=\"substring-after($feedURL,'referenceId=')\"/> <a> <xsl:attribute name=\"href\"><xsl:value-of select=\"concat($baseURL,'&amp;feedUuid=', $feedId)\" /></xsl:attribute> <xsl:value-of select=\"atom:title/text()\" /> </a> </xsl:when> <xsl:when test=\"count(atom:link[@rel='alternate' and @type='text/html']/@href) > 0\"> <a href=\"{atom:link[@rel='alternate' and @type='text/html']/@href}\"><xsl:value-of select=\"atom:title/text()\" /></a> </xsl:when> <xsl:otherwise> <a href=\"{atom:link/@href}\"><xsl:value-of select=\"atom:title/text()\" /></a> </xsl:otherwise> </xsl:choose> </h4> <div class=\"lotusMeta\" role=\"list\"> <span role=\"listitem\"> <xsl:choose> <xsl:when test=\"count(atom:contributor/atom:name) > 0\"> <xsl:call-template name=\"renderUserInfo\"> <xsl:with-param name=\"stringContent\" select=\"$rs_UpdatedBy\" /> <xsl:with-param name=\"userInfoNode\" select=\"atom:contributor\" /> </xsl:call-template> </xsl:when> <xsl:when test=\"count(atom:author/atom:name) > 0\"> <xsl:call-template name=\"renderUserInfo\"> <xsl:with-param name=\"stringContent\" select=\"$rs_CreatedBy\" /> <xsl:with-param name=\"userInfoNode\" select=\"atom:author\" /> </xsl:call-template> </xsl:when> </xsl:choose> </span> <span class=\"lotusDivider\" role=\"img\" aria-hidden=\"true\">|</span> <span lcNodeType=\"AtomFeedDate\" role=\"listitem\"><xsl:value-of select=\"atom:updated/text()\" /></span> <span class=\"lotusDivider\" role=\"img\" aria-hidden=\"true\">|</span> <span role=\"listitem\"> <span class=\"lotusTags\"> <xsl:if test=\"count(atom:category[@term='feed'])>0\"> <xsl:attribute name=\"role\">list</xsl:attribute> </xsl:if> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$rs_Tags\" /></xsl:attribute> <xsl:value-of select=\"$rs_Tags\"/> <xsl:for-each select=\"atom:category[@term]\"> <xsl:if test=\"not(attribute::scheme)\"> <span role=\"listitem\"> <a href=\"{/atom:feed/atom:link[@rel='alternate']/@href}&amp;tag={attribute::term}\"><xsl:value-of select=\"attribute::term\" /></a>&#160; </span> </xsl:if> </xsl:for-each> </span> </span> </div> </td> </tr> </xsl:for-each> <tr> <td class=\"lotusFirstCell\" colspan=\"2\"> <a href=\"{atom:feed/atom:link[@rel='alternate']/@href}\" class=\"lotusAction\"><xsl:value-of select=\"$rs_SeeAllFeeds\"/></a> </td> </tr> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$pm_CanContribute='true'\"> <xsl:if test=\"$isIE='true'\"> <xsl:attribute name=\"style\">table-layout: fixed;</xsl:attribute> </xsl:if> <xsl:call-template name=\"renderMemberNoContent\"> <xsl:with-param name=\"memberCreateUrl\">{atom:feed/atom:link[@rel='alternate']/@href}</xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"renderNoContent\"></xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </table> </div> <span id=\"{$pm_WidgetID}FeedReaderLastSpan\" style=\"display: none;\"></span> </xsl:template> <xsl:template name=\"renderMemberCreateLink\"> <xsl:param name=\"memberCreateUrl\" /> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" colspan=\"2\"> <a class=\"lotusAction\"><xsl:attribute name=\"href\"><xsl:value-of select=\"$pm_MemberCreateUrl\" />&amp;contextAction=createEntry</xsl:attribute><xsl:value-of select=\"$rs_MemberCreateMore\" /></a> </td> </tr> </xsl:template> <xsl:template name=\"renderMemberNoContent\"> <xsl:param name=\"memberCreateUrl\" /> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <span style=\"vertical-align:bottom;\"><xsl:value-of select=\"$rs_MemberNoContent\" /></span> </td> </tr> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" colspan=\"2\"> <a class=\"lotusAction\"><xsl:attribute name=\"href\"><xsl:value-of select=\"$pm_MemberCreateUrl\" />&amp;contextAction=createEntry</xsl:attribute><xsl:value-of select=\"$rs_MemberCreate\" /></a> </td> </tr> </xsl:template> <xsl:template name=\"renderNoContent\"> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <span style=\"vertical-align:bottom;\"><xsl:value-of select=\"$rs_NoContent\" /></span> <br/><br/> </td> </tr> </xsl:template> <xsl:template name=\"renderUserInfo\"> <xsl:param name=\"stringContent\" /> <xsl:param name=\"userInfoNode\" /> <span> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$stringContent\" /></xsl:attribute> <xsl:value-of select=\"$stringContent\" /> </span> <span> <xsl:variable name=\"userid\" select=\"$userInfoNode/*[local-name()='userid']\"/> <xsl:choose> <xsl:when test=\"$userid\"> <xsl:attribute name=\"class\">vcard <xsl:value-of select=\"$pm_WidgetID\" />MemberToBeProcessed</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:if test=\"count($userInfoNode/atom:email) > 0\"> <xsl:attribute name=\"class\">vcard <xsl:value-of select=\"$pm_WidgetID\" />MemberToBeProcessed</xsl:attribute> </xsl:if> </xsl:otherwise> </xsl:choose> <xsl:text>&#160;</xsl:text> <a class=\"fn url lotusPerson\"> <xsl:attribute name=\"href\"><xsl:value-of select=\"$applicationContext\"/>/communities/service/html/allcommunities?userid=<xsl:value-of select=\"$userid\"/></xsl:attribute> <xsl:value-of select=\"$userInfoNode/atom:name/text()\"/> </a> <span class=\"x-lconn-userid\" style=\"display:none;\" ><xsl:value-of select=\"$userid\" /></span> <xsl:choose> <xsl:when test=\"$userid\"> <span class=\"x-lconn-userid lotusHidden\"><xsl:value-of select=\"$userid\"/></span> </xsl:when> <xsl:otherwise> <xsl:if test=\"count($userInfoNode/atom:email) > 0\"> <span class=\"email lotusHidden\"><xsl:value-of select=\"$userInfoNode/atom:email/text()\"/></span> </xsl:if> </xsl:otherwise> </xsl:choose> </span> </xsl:template> <xsl:template name=\"replacePlaceHolders\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"value\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"$inputString\" /> <xsl:with-param name=\"searchFor\" select=\"'{0}'\" /> <xsl:with-param name=\"replaceText\" select=\"$value\" /> </xsl:call-template> </xsl:template> <xsl:template name=\"replace\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"searchFor\" /> <xsl:param name=\"replaceText\" /> <xsl:choose> <xsl:when test=\"contains($inputString,$searchFor)\"> <xsl:value-of select=\"substring-before($inputString,$searchFor)\" /> <xsl:value-of select=\"$replaceText\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"substring-after($inputString,$searchFor)\" /> <xsl:with-param name=\"searchFor\" select=\"$searchFor\" /> <xsl:with-param name=\"replaceText\" select=\"$replaceText\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$inputString\" /> </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>");

;if(!dojo._hasResource["lconn.core.feedReader"]){
dojo._hasResource["lconn.core.feedReader"]=true;
dojo.provide("lconn.core.feedReader");
dojo.require("lconn.core.xslt");
dojo.require("lconn.core.util._XSLCache");
dojo.require("lconn.core.utilities");
dojo.require("lconn.core.formutilities");
dojo.require("lconn.core.errorhandling");
dojo.require("lconn.core.DateUtil");
dojo.require("com.ibm.lconn.layout.people");
dojo.requireLocalization("lconn.core","feedreader");
lconn.core.feedReader=function(){
this.messages=dojo.i18n.getLocalization("lconn.core","feedreader");
var _1=1;
var _2=2;
var _3=3;
this.applicationContext=null;
this.resourceId=null;
this.atomFeedUrl_forms=null;
this.FEEDREADERLASTSPANDOMID_SUFFIX="FeedReaderLastSpan";
this.FEEDREADERLASTSPANDOMID=null;
this.nodeToProcess=null;
this.onLoad=function(){
if(dojo.config.isDebug){
console.log("feedReader.js: onLoad()");
}
var _4=this.iContext.getiWidgetAttributes();
var _5=this.iContext.getiDescriptor().getItemValue("mode");
this.resourceId=_4.getItemValue("resourceId");
this.applicationContext=WidgetPlacementConfig.applicationContext;
var _6=_4.getItemValue("widgetType");
var _7=_6;
switch(_6){
case "bookmarks":
_6=_2;
break;
case "feeds":
_6=_3;
break;
default:
_6=_1;
break;
}
this.widgetType=_6;
this.FEEDREADERLASTSPANDOMID=_7+this.FEEDREADERLASTSPANDOMID_SUFFIX;
this.nodeToProcess="."+_7+"MemberToBeProcessed";
var _8=_4.getItemValue("feedUrl");
if(_8==null){
this.iContext.getElementById("feedReaderwidgetContainer").innerHTML=this.messages["feedreader.nofeed"]+"<br/>";
}else{
this.atomFeedUrl_forms=_8;
if(typeof refLastMod!="undefined"){
var _9="?";
if(_8.indexOf("?")!=-1){
_9="&";
}
_8=_8+_9+"lastMod="+refLastMod;
}else{
if(typeof lastMod!="undefined"){
var _9="?";
if(_8.indexOf("?")!=-1){
_9="&";
}
_8=_8+_9+"lastMod="+lastMod;
}
}
if(dojo.config.isDebug){
console.log("feedReader.js: onLoad(): 2, atomFeedUrl = "+_8);
console.log("feedReader.js: onLoad(): this.atomFeedUrl_forms = "+this.atomFeedUrl_forms);
}
if(_5=="search"){
if(_6==_2){
var _a="communities:bookmark";
var _b=this.iContext.getElementById("resultContainer");
lconn.core.widgetUtils.search(this.iContext,_a,_b);
return;
}else{
if(_6==_3){
var _a="communities:feed";
var _b=this.iContext.getElementById("resultContainer");
lconn.core.widgetUtils.search(this.iContext,_a,_b);
return;
}
}
}else{
if(_5=="view"){
var _c=this.iContext.getElementById("feedReaderwidgetContainer");
var _d=new Image();
_d.src=djConfig.blankGif;
_d.width=0;
_d.height=130;
_c.appendChild(_d);
}
}
if(_6==_2){
lconn.core.utilities.show(document.getElementById("importantBookmarksSection"));
}
_8=lconn.core.widgetUtils.handleRefresh(_8,this.iContext);
if(dojo.config.isDebug){
console.log("feedReader.js: onLoad(): 3, atomFeedUrl = "+_8);
}
var _e=this.iContext.io.rewriteURI(_8);
if(dojo.config.isDebug){
console.log("feedReader.js: onLoad(): rewrittenAtomFeedUrl = "+_e);
}
}
var _f=this.messages;
var _10=[];
if(_6!=_1&&this.iContext.getUserProfile().getItemValue("canContribute")=="true"){
_10.push(["pm_CanContribute","true"]);
}else{
_10.push(["pm_CanContribute","false"]);
}
_10.push(["rs_SeeAllFeeds",_f["feedreader.viewall"]]);
_10.push(["rs_UpdatedBy",_f["feedreader.updatedby"]]);
_10.push(["rs_CreatedBy",_f["feedreader.createdby"]]);
_10.push(["rs_Tags",_f["feedreader.tags"]]);
_10.push(["pm_Icon",djConfig.blankGif]);
_10.push(["pm_WidgetID",_7]);
if(_6==_2){
_10.push(["pm_IconClass","lconnSprite lconnSprite-iconBookmarks16"]);
_10.push(["rs_IconAlt",""]);
_10.push(["rs_MemberNoContent",_f["feedreader.bookmarks.membernocontent"]]);
_10.push(["rs_MemberCreate",_f["feedreader.bookmarks.membercreatefirst"]]);
_10.push(["rs_MemberCreateMore",_f["feedreader.bookmarks.membercreate"]]);
_10.push(["pm_MemberCreateUrl",WidgetPlacementConfig.applicationContext+"/service/html/community/bookmarks?communityUuid="+this.resourceId]);
_10.push(["rs_NoContent",_f["feedreader.bookmarks.nocontent"]]);
}else{
if(_6==_3){
_10.push(["pm_IconClass","lconnSprite lconnSprite-iconFeed16"]);
_10.push(["rs_IconAlt",""]);
_10.push(["rs_MemberNoContent",_f["feedreader.feeds.membernocontent"]]);
_10.push(["rs_MemberCreate",_f["feedreader.feeds.membercreatefirst"]]);
_10.push(["rs_MemberCreateMore",_f["feedreader.feeds.membercreate"]]);
_10.push(["pm_MemberCreateUrl",WidgetPlacementConfig.applicationContext+"/service/html/community/feeds?communityUuid="+this.resourceId]);
_10.push(["rs_NoContent",_f["feedreader.feeds.nocontent"]]);
}
}
var _11=new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"feedreader.xsl":{templatePath:dojo.moduleUrl("lconn.comm","widgets/feedReader/feedreader.xsl")}}}))();
var _12=this.iContext.getElementById("feedReaderwidgetContainer");
_12.id=_7+"WidgetContainer";
var _13={xmlDocUrl:_e,xslDoc:_11.getXslDoc("feedreader.xsl"),htmlContainerElemId:_12,aXslParams:_10,dojoErrorHandler:lconn.core.errorhandling.DefaultXHRErrorHandler,exceptionHandler:lconn.core.errorhandling.DefaultErrorHandler};
lconn.core.xslt.transformAndRender(_13);
var _14=this.iContext;
var _15=_7+"TableContainer";
var _16=function(_17){
dojo.requireLocalization("dojo.cldr","gregorian");
dojo.requireLocalization("lconn.core","strings");
var _18=_17.getElementsByTagName("span");
for(var i=0;_18!=null&&i<_18.length;i++){
var _19=_18[i];
if(_19.getAttribute("lcNodeType")=="AtomFeedDate"){
try{
var _1a=lconn.core.DateUtil.AtomDateToString(_19.innerHTML);
_19.innerHTML=_1a;
}
catch(exception){
lconn.core.errorhandling.DefaultErrorHandler("lconn.core.feedReader.onLoad",exception,_13);
}
}
}
if(window.SemTagSvc!=null){
SemTagSvc.parseDom(null,_17);
}
};
lconn.core.utilities.processUntilElementIsFound(_15,_16,this.iContext);
this.handleAfterLoad();
};
this.handleAfterLoad=function(){
lconn.core.utilities.processUntilElementIsFound(this.FEEDREADERLASTSPANDOMID,dojo.hitch(this,function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("feedReader.js: handleAfterLoad(): DOM object, which has its id, "+this.FEEDREADERLASTSPANDOMID+", is in the DOM now.");
}
}
dojo.query(this.nodeToProcess).forEach(function(_1b){
var _1c="";
var _1d=null;
var _1e="";
try{
_1c=dojo.query(".x-lconn-userid",_1b)[0].innerHTML;
_1d=dojo.query(".fn",_1b)[0];
_1e=_1d.innerHTML;
if(_1e.length>0){
var _1f="active";
if(dojo.hasClass(_1d,"lotusPersonInactive")){
_1f="inactive";
}
try{
var _20=com.ibm.lconn.layout.people.createLink({name:_1e,userid:_1c,state:_1f});
if(_20.tagName.toLowerCase()==="a"||dojo.query("a",_20).length>0){
if(dojo.hasAttr(_20,"href")){
dojo.removeAttr(_1d,"href");
var _21=_1d.innerHTML;
dojo.attr(_1d,"href",dojo.attr(_20,"href"));
_1d.innerHTML=_21;
}
}
}
catch(ee){
}
}
}
catch(ee){
}
});
}));
};
this.onRemoveWidgetUIContent=function(){
var _22=this.iContext.getiWidgetAttributes();
var _23=_22.getItemValue("feedUrl");
if(_23!=null&&_23.indexOf("community/bookmarks")!=-1){
lconn.core.utilities.hide(document.getElementById("importantBookmarksSection"));
}
};
this.closeNewItemsUI=function(_24){
this.clearAllFields(_24);
this.iContext.iEvents.fireEvent("onModeChanged","","{'newMode': '"+this.iContext.constants.mode.VIEW+"'}");
};
this.clearAllFields=function(_25){
var _26=findParentForm(_25);
_26.feedURL.value=null;
};
this.onedit=function(){
var _27=this.iContext.getiWidgetAttributes();
var _28=_27.getItemValue("widgetTitle");
var _29=_27.getItemValue("feedUrl");
if(_28!=null){
this.iContext.getElementById("widgetTitle").value=_28;
}
if(_29!=null){
this.iContext.getElementById("feedURL").value=_29;
}
};
this.saveAttribute=function(_2a){
var _2b=findParentForm(_2a);
var _2c=this.iContext.getiWidgetAttributes();
_2c.setItemValue("widgetTitle",_2b.widgetTitle.value);
_2c.setItemValue("feedUrl",_2b.feedURL.value);
_2c.save();
this.closeNewItemsUI(_2a);
this.onLoad();
};
};
}

dojo.provide("lconn.core.nls.subcommunity")._built=true;
dojo.provide("lconn.core.nls.subcommunity.en");
lconn.core.nls.subcommunity.en={"subcommunity.logo":"Subcommunities logo","subcommunity.viewimages":"View Images","subcommunity.nocontent":"There are no subcommunities yet for this community.","subcommunity.nofeed":"No subcommunities feed URL has been provided.","subcommunity.badplacement":"The Subcommunties widget must be placed on the overview page of the parent community.","subcommunity.membercreatefirst":"Add Your First Subcommunity","subcommunity.viewlist":"View List","subcommunity.membernocontent":"Create subcommunities within this community.","subcommunity.membercreate":"Add a Subcommunity"};

;dojo.cache("lconn.comm", "widgets/subcommunityNav/subcommunitynav.xsl", "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xsl:stylesheet version=\"1.0\" xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:html=\"http://www.w3.org/1999/xhtml\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn/profiles\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" exclude-result-prefixes=\"snx xsl atom\"> <xsl:output method=\"html\" omit-xml-declaration=\"yes\" indent=\"no\" /> <xsl:param name=\"pm_WidgetObj\" select=\"'Widget'\"/> <xsl:param name=\"pm_DisplayType\" select=\"'images'\"/> <xsl:param name=\"pm_CanContribute\" select=\"false()\"/> <xsl:param name=\"pm_IsSubcommunity\" select=\"false()\"/> <xsl:param name=\"rs_ViewAll\" select=\"'View All'\"/> <xsl:param name=\"rs_UpdatedBy\" select=\"'Updated by'\"/> <xsl:param name=\"rs_CreatedBy\" select=\"'Created by'\"/> <xsl:param name=\"rs_Tags\" select=\"'Tags: '\"/> <xsl:param name=\"pm_Icon\" select=\"'/nav/common/styles/images/blank.gif'\"/> <xsl:param name=\"pm_IconClass\" select=\"'lconnSprite lconnSprite-iconFeed16'\"/> <xsl:param name=\"rs_IconAlt\" select=\"'Subcommunity logo'\"/> <xsl:param name=\"rs_MemberNoContent\" select=\"'Stay current with up-to-minute information.'\"/> <xsl:param name=\"rs_MemberCreate\" select=\"'Add your first Subcommunity.'\"/> <xsl:param name=\"rs_MemberCreateMore\" select=\"'Add entry'\"/> <xsl:param name=\"rs_NoContent\" select=\"'There are no Subcommunities yet for this community.'\"/> <xsl:param name=\"pm_MemberCreateUrl\" select=\"'Invalid URL'\"/> <xsl:param name=\"pm_TagUrl\" select=\"'Invalid URL'\"/> <xsl:param name=\"rs_ViewImages\" select=\"'View Images'\"/> <xsl:param name=\"rs_ViewList\" select=\"'View List'\"/> <xsl:param name=\"rs_BadPlacement\" select=\"'The Subcommunties widget must be placed on the overview page of the parent community.'\"/> <xsl:param name=\"applicationContext\" /> <xsl:template match=\"/\"> <xsl:choose> <xsl:when test=\"$pm_DisplayType='images'\"> <xsl:call-template name=\"renderImageList\"> <xsl:with-param name=\"displayContent\" select=\"'visible'\" /> </xsl:call-template> <xsl:call-template name=\"renderTextList\"> <xsl:with-param name=\"displayContent\" select=\"'hidden'\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"renderTextList\"> <xsl:with-param name=\"displayContent\" select=\"'visible'\" /> </xsl:call-template> <xsl:call-template name=\"renderImageList\"> <xsl:with-param name=\"displayContent\" select=\"'hidden'\" /> </xsl:call-template> </xsl:otherwise> </xsl:choose> <span id=\"{$pm_WidgetObj}SubCommunityWidgetLastSpan\" style=\"display: none;\"></span> </xsl:template> <xsl:template name=\"renderImageList\"> <xsl:param name=\"displayContent\" /> <div class=\"lotusChunk\" id=\"subcommunityImages\"> <xsl:if test=\"$displayContent='hidden'\"> <xsl:attribute name=\"class\">lotusHidden</xsl:attribute> </xsl:if> <table class=\"lotusTable\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"> <xsl:choose> <xsl:when test=\"count(atom:feed/atom:entry) > 0\"> <tr class=\"lotusFirst\"> <td> <xsl:for-each select=\"atom:feed/atom:entry\"> <div class=\"lotusLeft\" style=\"width:105px; height:200px; padding-top:0px; overflow:hidden;\"> <table role=\"presentation\"> <tr> <td class=\"lotusFirstCell\"> <xsl:choose> <xsl:when test=\"count(atom:link[@rel='http://www.ibm.com/xmlns/prod/sn/logo']/@href) > 0\"> <xsl:variable name=\"communityLink\" select=\"atom:link[@rel='alternate' and @type='text/html']/@href\" /> <xsl:variable name=\"communityName\" select=\"atom:title/text()\"/> <table cellspacing=\"0\" role=\"presentation\"> <tr> <td><a tabindex=\"-1\" href=\"{$communityLink}\" title=\"{$communityName}\"><img class=\"lotusForceLineHeight\" src=\"{atom:link[@rel='http://www.ibm.com/xmlns/prod/sn/logo']/@href}\" alt=\"{$communityName} - {$rs_IconAlt}\" width=\"90px\" height=\"90px\"></img></a></td> </tr> <tr> <td> <a href=\"{$communityLink}\" title=\"{$communityName}\"><xsl:value-of select=\"atom:title/text()\" /></a> </td> </tr> </table> </xsl:when> <xsl:otherwise> <a href=\"{atom:link/@href}\"><xsl:value-of select=\"atom:title/text()\" /></a> </xsl:otherwise> </xsl:choose> </td> </tr> </table> </div> </xsl:for-each> </td> </tr> <tr> <td class=\"lotusFirstCell\" colspan=\"6\"> <a class=\"lotusAction\" onclick=\"{$pm_WidgetObj}.displayView('List','subcommunityImages','subcommunityList');\" href=\"javascript:void(0);\"><xsl:value-of select=\"$rs_ViewList\"/></a> </td> </tr> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$pm_IsSubcommunity='true'\"> <xsl:call-template name=\"renderBadPlacement\"></xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$pm_CanContribute='true'\"> <xsl:call-template name=\"renderMemberNoContent\"> <xsl:with-param name=\"memberCreateUrl\">{atom:feed/atom:link[@rel='alternate']/@href}</xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"renderNoContent\"></xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </table> </div> </xsl:template> <xsl:template name=\"renderTextList\"> <xsl:param name=\"displayContent\" /> <div class=\"lotusChunk\" id=\"subcommunityList\"> <xsl:if test=\"$displayContent='hidden'\"> <xsl:attribute name=\"class\">lotusHidden</xsl:attribute> </xsl:if> <table id=\"subcommunityTableContainer\" class=\"lotusTable\" cellspacing=\"0\" role=\"presentation\"> <xsl:choose> <xsl:when test=\"count(atom:feed/atom:entry) > 0\"> <xsl:for-each select=\"atom:feed/atom:entry\"> <tr> <xsl:if test=\"position() = 1\"> <xsl:attribute name=\"class\">lotusFirst</xsl:attribute> </xsl:if> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <h4> <xsl:choose> <xsl:when test=\"count(atom:link[@rel='alternate' and @type='text/html']/@href) > 0\"> <a href=\"{atom:link[@rel='alternate' and @type='text/html']/@href}\"><xsl:value-of select=\"atom:title/text()\" /></a> </xsl:when> <xsl:otherwise> <a href=\"{atom:link/@href}\"><xsl:value-of select=\"atom:title/text()\" /></a> </xsl:otherwise> </xsl:choose> </h4> <div class=\"lotusMeta\"> <xsl:choose> <xsl:when test=\"count(atom:contributor/atom:name) > 0\"> <xsl:call-template name=\"renderUserInfo\"> <xsl:with-param name=\"stringContent\" select=\"$rs_UpdatedBy\" /> <xsl:with-param name=\"userInfoNode\" select=\"atom:contributor\" /> </xsl:call-template> </xsl:when> <xsl:when test=\"count(atom:author/atom:name) > 0\"> <xsl:call-template name=\"renderUserInfo\"> <xsl:with-param name=\"stringContent\" select=\"$rs_CreatedBy\" /> <xsl:with-param name=\"userInfoNode\" select=\"atom:author\" /> </xsl:call-template> </xsl:when> </xsl:choose> <span class=\"lotusDivider\">|</span> <span lcNodeType=\"AtomFeedDate\"><xsl:value-of select=\"atom:updated/text()\" /></span> <span class=\"lotusDivider\">|</span> <xsl:value-of select=\"$rs_Tags\"/> <xsl:for-each select=\"atom:category[@term]\"> <xsl:if test=\"not(attribute::scheme)\"> <a><xsl:attribute name=\"href\"><xsl:value-of select=\"$pm_TagUrl\" />?tag=<xsl:value-of select=\"attribute::term\" /></xsl:attribute><xsl:value-of select=\"attribute::term\" /></a>&#160; </xsl:if> </xsl:for-each> </div> </td> </tr> </xsl:for-each> <tr> <td class=\"lotusFirstCell\" colspan=\"6\"> <a class=\"lotusAction\" onclick=\"{$pm_WidgetObj}.displayView('Images','subcommunityImages','subcommunityList');\" href=\"javascript:void(0);\"><xsl:value-of select=\"$rs_ViewImages\"/></a> </td> </tr> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$pm_CanContribute='true'\"> <xsl:call-template name=\"renderMemberNoContent\"> <xsl:with-param name=\"memberCreateUrl\">{atom:feed/atom:link[@rel='alternate']/@href}</xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"renderNoContent\"></xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </table> </div> </xsl:template> <xsl:template name=\"renderMemberCreateLink\"> <xsl:param name=\"memberCreateUrl\" /> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" colspan=\"2\"> <a class=\"lotusAction\"><xsl:attribute name=\"href\"><xsl:value-of select=\"$pm_MemberCreateUrl\" />&amp;contextAction=createEntry</xsl:attribute><xsl:value-of select=\"$rs_MemberCreateMore\" /></a> </td> </tr> </xsl:template> <xsl:template name=\"renderMemberNoContent\"> <xsl:param name=\"memberCreateUrl\" /> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <span style=\"vertical-align:bottom;\"><xsl:value-of select=\"$rs_MemberNoContent\" /></span> </td> </tr> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" colspan=\"2\"> <a class=\"lotusAction\"><xsl:attribute name=\"href\"><xsl:value-of select=\"$pm_MemberCreateUrl\" />&amp;contextAction=createSubcommunity</xsl:attribute><xsl:value-of select=\"$rs_MemberCreate\" /></a> </td> </tr> </xsl:template> <xsl:template name=\"renderNoContent\"> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <span style=\"vertical-align:bottom;\"><xsl:value-of select=\"$rs_NoContent\" /></span> <br/><br/> </td> </tr> </xsl:template> <xsl:template name=\"renderBadPlacement\"> <tr class=\"lotusFirst\"> <td class=\"lotusFirstCell\" style=\"width:20px;padding-top:9px;\"> <img style=\"vertical-align:top;padding:1px;\"> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_IconAlt\" /></xsl:attribute> <xsl:attribute name=\"src\"><xsl:value-of select=\"$pm_Icon\" /></xsl:attribute> <xsl:attribute name=\"class\"><xsl:value-of select=\"$pm_IconClass\" /></xsl:attribute> </img> </td> <td> <span style=\"vertical-align:bottom;\"><xsl:value-of select=\"$rs_BadPlacement\" /></span> <br/><br/> </td> </tr> </xsl:template> <xsl:template name=\"renderUserInfo\"> <xsl:param name=\"stringContent\" /> <xsl:param name=\"userInfoNode\" /> <span><xsl:value-of select=\"$stringContent\" /></span> <span> <xsl:variable name=\"userid\" select=\"$userInfoNode/*[local-name()='userid']\"/> <xsl:choose> <xsl:when test=\"$userid\"> <xsl:attribute name=\"class\">vcard subcommMemberToBeProcessed</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:if test=\"count($userInfoNode/atom:email) > 0\"> <xsl:attribute name=\"class\">vcard subcommMemberToBeProcessed</xsl:attribute> </xsl:if> </xsl:otherwise> </xsl:choose> <xsl:text>&#160;</xsl:text> <a class=\"fn url lotusPerson\"> <xsl:attribute name=\"href\"><xsl:value-of select=\"$applicationContext\"/>/communities/service/html/allcommunities?userid=<xsl:value-of select=\"$userid\"/></xsl:attribute> <xsl:value-of select=\"$userInfoNode/atom:name/text()\"/> </a> <xsl:choose> <xsl:when test=\"$userid\"> <span class=\"x-lconn-userid\" style=\"display: none;\"><xsl:value-of select=\"$userid\"/></span> </xsl:when> <xsl:otherwise> <xsl:if test=\"count($userInfoNode/atom:email) > 0\"> <span class=\"email\" style=\"display: none;\"><xsl:value-of select=\"$userInfoNode/atom:email/text()\"/></span> </xsl:if> </xsl:otherwise> </xsl:choose> </span> </xsl:template> <xsl:template name=\"replacePlaceHolders\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"value\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"$inputString\" /> <xsl:with-param name=\"searchFor\" select=\"'{0}'\" /> <xsl:with-param name=\"replaceText\" select=\"$value\" /> </xsl:call-template> </xsl:template> <xsl:template name=\"replace\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"searchFor\" /> <xsl:param name=\"replaceText\" /> <xsl:choose> <xsl:when test=\"contains($inputString,$searchFor)\"> <xsl:value-of select=\"substring-before($inputString,$searchFor)\" /> <xsl:value-of select=\"$replaceText\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"substring-after($inputString,$searchFor)\" /> <xsl:with-param name=\"searchFor\" select=\"$searchFor\" /> <xsl:with-param name=\"replaceText\" select=\"$replaceText\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$inputString\" /> </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>");

;if(!dojo._hasResource["lconn.core.subcommunityNav"]){
dojo._hasResource["lconn.core.subcommunityNav"]=true;
dojo.provide("lconn.core.subcommunityNav");
dojo.require("lconn.core.xslt");
dojo.require("lconn.core.util._XSLCache");
dojo.require("lconn.core.utilities");
dojo.require("lconn.core.formutilities");
dojo.require("lconn.core.errorhandling");
dojo.require("lconn.core.DateUtil");
dojo.requireLocalization("lconn.core","feedreader");
dojo.requireLocalization("lconn.core","subcommunity");
lconn.core.subcommunityNav=function(){
var _1=dojo.i18n.getLocalization("lconn.core","feedreader");
var _2=dojo.i18n.getLocalization("lconn.core","subcommunity");
this.applicationContext=null;
this.resourceId=null;
this.atomFeedUrl_forms=null;
this.widgetObjStr=null;
this.canContribute=false;
this.LASTSPANDOMID_SUFFIX="SubCommunityWidgetLastSpan";
this.LASTSPANDOMID=null;
this.onLoad=function(){
this.debugLog("subcommunityNav.js: onLoad()");
var _3=this.iContext.getiWidgetAttributes();
var _4=this.iContext.getiDescriptor().getItemValue("mode");
this.resourceId=_3.getItemValue("resourceId");
this.parentResourceId=_3.getItemValue("parentResourceId");
this.applicationContext=WidgetPlacementConfig.applicationContext;
var _5=_3.getItemValue("subcommunitiesFeedUrl");
this.defaultView=_3.getItemValue("defaultView");
if(this.defaultView==null||this.defaultView.length==0){
this.defaultView="images";
}
this.widgetObjStr="_"+this.iContext.widgetId+"_iContext.scope";
this.LASTSPANDOMID=this.widgetObjStr+this.LASTSPANDOMID_SUFFIX;
if(_4=="view"){
var _6=this.iContext.getElementById("subcommunityNavWidgetContainer");
var _7=new Image();
_7.src=djConfig.blankGif;
_7.width=0;
_7.height=130;
_6.appendChild(_7);
}
if(_5==null){
this.iContext.getElementById("subcommunityNavWidgetContainer").innerHTML=_2["subcommunity.nofeed"]+"<br/>";
}else{
this.debugLog("subcommunityNav.js: onLoad(): initial atomFeedUrl = "+_5);
if(typeof lastMod!="undefined"){
var _8="?";
if(_5.indexOf("?")!=-1){
_8="&";
}
_5=_5+_8+"lastMod="+lastMod;
}
_5=lconn.core.widgetUtils.handleRefresh(_5,this.iContext);
this.debugLog("subcommunityNav.js: onLoad(): modified atomFeedUrl = "+_5);
var _9=this.iContext.io.rewriteURI(_5);
this.debugLog("subcommunityNav.js: onLoad(): rewrittenAtomFeedUrl = "+_9);
var _a=new Array;
_a.push(["pm_WidgetObj",this.widgetObjStr]);
_a.push(["pm_DisplayType",this.defaultView]);
if(canCreateSubcommunities!=null){
this.canContribute=canCreateSubcommunities;
}
_a.push(["pm_CanContribute",this.canContribute]);
if(this.parentResourceId!=null){
_a.push(["pm_IsSubcommunity","true"]);
}else{
_a.push(["pm_IsSubcommunity","false"]);
}
_a.push(["rs_ViewAll",_1["feedreader.viewall"]]);
_a.push(["rs_UpdatedBy",_1["feedreader.updatedby"]]);
_a.push(["rs_CreatedBy",_1["feedreader.createdby"]]);
_a.push(["rs_Tags",_1["feedreader.tags"]]);
_a.push(["pm_Icon",djConfig.blankGif]);
_a.push(["pm_IconClass","lconnSprite lconnSprite-iconCommunities16"]);
_a.push(["rs_IconAlt",_2["subcommunity.logo"]]);
_a.push(["rs_MemberNoContent",_2["subcommunity.membernocontent"]]);
_a.push(["rs_MemberCreate",_2["subcommunity.membercreatefirst"]]);
_a.push(["rs_MemberCreateMore",_2["subcommunity.membercreate"]]);
_a.push(["pm_MemberCreateUrl",WidgetPlacementConfig.applicationContext+"/service/html/communityview?communityUuid="+this.resourceId]);
_a.push(["pm_TagUrl",WidgetPlacementConfig.applicationContext+"/service/html/mycommunities"]);
_a.push(["rs_NoContent",_2["subcommunity.nocontent"]]);
_a.push(["rs_ViewImages",_2["subcommunity.viewimages"]]);
_a.push(["rs_ViewList",_2["subcommunity.viewlist"]]);
_a.push(["rs_BadPlacement",_2["subcommunity.badplacement"]]);
var _b=new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"subcommunitynav.xsl":{templatePath:dojo.moduleUrl("lconn.comm","widgets/subcommunityNav/subcommunitynav.xsl")}}}))();
var _c={xmlDocUrl:_9,xslDoc:_b.getXslDoc("subcommunitynav.xsl"),htmlContainerElemId:this.iContext.getElementById("subcommunityNavWidgetContainer"),aXslParams:_a,dojoErrorHandler:lconn.core.errorhandling.DefaultXHRErrorHandler,exceptionHandler:lconn.core.errorhandling.DefaultErrorHandler};
lconn.core.xslt.transformAndRender(_c);
var _d=this.iContext;
var _e="subcommunityTableContainer";
var _f=function(_10){
var _11=_10.getElementsByTagName("span");
for(var i=0;_11!=null&&i<_11.length;i++){
var _12=_11[i];
if(_12.getAttribute("lcNodeType")=="AtomFeedDate"){
try{
var _13=lconn.core.DateUtil.AtomDateToString(_12.innerHTML);
_12.innerHTML=_13;
}
catch(exception){
lconn.core.errorhandling.DefaultErrorHandler("lconn.core.subcommunityNav.onLoad",exception,_c);
}
}
}
if(window.SemTagSvc!=null){
SemTagSvc.parseDom(null,_10);
}
};
lconn.core.utilities.processUntilElementIsFound(_e,_f,this.iContext);
}
this.handleAfterLoad();
};
this.displayView=function(_14,_15,_16){
this.debugLog("subcommunityNav.js: onLoad(): displayView = "+_14);
var _17=this.iContext.getElementById(_15);
var _18=this.iContext.getElementById(_16);
if(_14=="Images"){
dojo.addClass(_18,"lotusHidden");
dojo.removeClass(_17,"lotusHidden");
}else{
dojo.addClass(_17,"lotusHidden");
dojo.removeClass(_18,"lotusHidden");
}
};
this.debugLog=function(msg){
if(window.debugComm!=null){
if(window.console!=null){
console.log(msg);
}
}
};
this.handleAfterLoad=function(){
lconn.core.utilities.processUntilElementIsFound(this.LASTSPANDOMID,dojo.hitch(this,function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("subcommunityNav.js: handleAfterLoad(): DOM object, which has its id, "+this.LASTSPANDOMID+", is in the DOM now.");
}
}
dojo.query(".subcommMemberToBeProcessed").forEach(function(_19){
var _1a="";
var _1b=null;
var _1c="";
try{
_1a=dojo.query(".x-lconn-userid",_19)[0].innerHTML;
_1b=dojo.query(".fn",_19)[0];
_1c=_1b.innerHTML;
if(_1c.length>0){
var _1d="active";
if(dojo.hasClass(_1b,"lotusPersonInactive")){
_1d="inactive";
}
try{
var _1e=com.ibm.lconn.layout.people.createLink({name:_1c,userid:_1a,state:_1d});
if(_1e.tagName.toLowerCase()==="a"||dojo.query("a",_1e).length>0){
if(dojo.hasAttr(_1e,"href")){
dojo.removeAttr(_1b,"href");
dojo.attr(_1b,"href",dojo.attr(_1e,"href"));
}
}
}
catch(ee){
}
}
}
catch(ee){
}
});
}));
};
};
}

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

;dojo.cache("lconn.communityactivities", "activitySummary.xsl", "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><xsl:stylesheet version=\"1.0\" xmlns:f=\"http://www.w3.org/2005/Atom\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:os=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' /> <xsl:template match=\"/\"> <xsl:variable name=\"numEntries\" select=\"count(/f:feed/f:entry)\" /> <div id=\"widgetHeadline\" class=\"lotusHeader\" style=\"display:none\"> <h1 id=\"widgetTitle\">${rs_activityWidgetTitle} </h1> <p id=\"widgetDescription\">${rs_activityWidgetDescription} </p> </div> <xsl:choose> <xsl:when test=\"$numEntries\"> <div id=\"startActivity\" class=\"lotusChunk\" style=\"display: none;\"> ${rs_startActivity} </div> <span id=\"activityTopPaging\" style=\"display: none;\"> <div class=\"lotusPaging\"> <div class=\"lotusLeft pagePos\"> </div> <ul class=\"lotusInlinelist lotusRight pageNav\"> </ul> </div> </span> <div class=\"lotusChunk\"> <table class=\"lotusTable ActivityList\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" summary=\"\" role=\"presentation\"> <tbody> <xsl:apply-templates select=\"/f:feed/f:entry\" /> </tbody> </table> </div> <span id=\"activityBottomPaging\" style=\"display: none;\"> <div class=\"lotusPaging\"> <div class=\"lotusLeft pagePos\"> </div> <ul class=\"lotusInlinelist lotusRight pageNav\"> </ul> </div> </span> <span id=\"viewAllActivities\" style=\"display: none;\"> <div class=\"lotusBorderTop lotusMeta lotusTiny\" style=\"height:1em; margin: 5px 0\"> <div class=\"lotusLeft\"> <a href=\"#activityFullpage\" onclick=\"return iContext.iScope().showFullpage();\"> <span>${rs_viewAll} </span> <span> ( <xsl:value-of select=\"/f:feed/os:totalResults\" /> ) </span> </a> </div> </div> </span> <xsl:if test=\"/f:feed/f:link[@rel='next']\"> <span id=\"hasNext\" class=\"lotusHidden\" /> </xsl:if> <xsl:if test=\"/f:feed/f:link[@rel='previous']\"> <span id=\"hasPrevious\" class=\"lotusHidden\" /> </xsl:if> <span id=\"totalResults\" class=\"lotusHidden\"> <xsl:value-of select=\"/f:feed/os:totalResults\" /> </span> <span id=\"numEntries\" class=\"lotusHidden\"> <xsl:value-of select=\"$numEntries\" /> </span> </xsl:when> <xsl:otherwise> <div class=\"lotusChunk\"> <table class=\"lotusTable ActivityList\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" summary=\"\" id=\"noActivitiesTable\" role=\"presentation\"> <tbody> <tr class=\"lotusFirst\"> <td width=\"20\" class=\"\"> <img alt=\"\" url=\"/nav/common/styles/images/blank.gif\" class=\"communityImage lconnSprite lconnSprite-iconActivities16\" /> </td> <td> <span id=\"noActivitiesCanCreate\" style=\"display:none;\"> ${rs_activityWidgetBriefDescription} </span> <span id=\"noActivities\"> ${rs_noActivities} </span> </td> </tr> </tbody> </table> </div> <div id=\"startActivity\" class=\"lotusChunk\" style=\"display:none;\"> ${rs_startFirstActivity} </div> </xsl:otherwise> </xsl:choose> <ul class=\"lotusFeeds lotusInlinelist\" id=\"activityFeeds\" style=\"display:none;\"> <li class=\"lotusFirst\"> <a id=\"activityCompletedLink\" href=\"javascript:;\" class=\"lotusAction \"> <img url=\"/nav/common/styles/images/blank.gif\" class=\"communityImage lconnSprite lconnSprite-iconCompleted16\" alt=\"\"/> ${rs_completedActivityLink} </a> </li> <li class=\"lotusFirst\"> <a class=\"lotusAction\" id=\"activityFeedLink\"> <xsl:attribute name=\"href\"> <xsl:choose> <xsl:when test=\"/f:feed/f:link[@rel='first']\"> <xsl:value-of select=\"/f:feed/f:link[@rel='first']/@href\" /> </xsl:when> <xsl:otherwise><xsl:value-of select=\"/f:feed/f:link[@rel='self']/@href\" /></xsl:otherwise> </xsl:choose> </xsl:attribute> <img url=\"/nav/common/styles/images/blank.gif\" class=\"communityImage lconnSprite lconnSprite-iconFeed12\" alt=\"\"/> <xsl:text> ${rs_activityFeedLink}</xsl:text> </a> </li> </ul> </xsl:template> <xsl:template match=\"f:entry\"> <tr> <xsl:if test=\"position() = 1\"> <xsl:attribute name=\"class\"> <xsl:text>lotusFirst</xsl:text> </xsl:attribute> </xsl:if> <xsl:variable name=\"priority\" select=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/priority']/@term\" /> <xsl:variable name=\"flags\" select=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/flags']/@term\" /> <xsl:variable name=\"canEdit\" select=\"contains(./snx:permissions,'edit_activity')\" /> <xsl:variable name=\"canDelete\" select=\"contains(./snx:permissions,'delete_activity')\" /> <xsl:variable name=\"isOwner\" select=\"contains(./snx:permissions,'activity_owner')\" /> <xsl:variable name=\"icon\"> <xsl:choose> <xsl:when test=\"$flags='completed'\"> <xsl:text>iconCompleted16</xsl:text> </xsl:when> <xsl:when test=\"$flags='deleted'\"> <xsl:text>iconTrashCan16</xsl:text> </xsl:when> <xsl:when test=\"$flags='template'\"> <xsl:choose> <xsl:when test=\"$priority='3000'\"> <xsl:text>iconFavTemplate16</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>iconCopy16</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test=\"$priority='2000'\"> <xsl:text>iconPriorityMedium16</xsl:text> </xsl:when> <xsl:when test=\"$priority='3000'\"> <xsl:text>iconPriorityHigh16</xsl:text> </xsl:when> <xsl:when test=\"$priority='0'\"> <xsl:text>iconTunedOut16</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>iconActivities16</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name=\"iconAlt\"> <xsl:choose> <xsl:when test=\"$flags='completed'\"> <xsl:text>${rs_normalPri}</xsl:text> </xsl:when> <xsl:when test=\"$flags='deleted'\"> <xsl:text>${rs_normalPri}</xsl:text> </xsl:when> <xsl:when test=\"$flags='template'\"> <xsl:choose> <xsl:when test=\"$priority='3000'\"> <xsl:text>${rs_normalPri}</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>${rs_normalPri}</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test=\"$priority='2000'\"> <xsl:text>${rs_medPri}</xsl:text> </xsl:when> <xsl:when test=\"$priority='3000'\"> <xsl:text>${rs_highPri}</xsl:text> </xsl:when> <xsl:when test=\"$priority='0'\"> <xsl:text>${rs_tunedOutPri}</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>${rs_normalPri}</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <td width=\"20\" class=\"\"> <img url=\"/nav/common/styles/images/blank.gif\" class=\"communityImage lconnSprite lconnSprite-{$icon}\" alt=\"{$iconAlt}\" /> <span class=\"lotusAltText\"><xsl:value-of select=\"$iconAlt\" /></span> </td> <td> <div id=\"{./snx:activity}-headline\"> <span class=\"priority lotusHidden\"> <xsl:value-of select=\"$priority\" /> </span> <h4> <a url=\"/service/html/mainpage#activitypage,{./snx:activity}\" class=\"activityLink\"> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:title\" /> </xsl:call-template> </a> <xsl:if test=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type'][@term='activity']\"> <span class=\"cnxnsType lotusMeta\">${rs_shared}</span> </xsl:if> <xsl:if test=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/flags'][@term='external']\"> <span class=\"llcom-icon2 llcom-icon2-external\"></span> </xsl:if> </h4> </div> </td> <td class=\"lotusAlignRight lotusLastCell lotusTiny\"> <a href=\"#\" onclick=\"return iContext.iScope().toggleDetails('{./snx:activity}',event);\" class=\"lotusAction activityMoreButton\"> <xsl:attribute name=\"title\"> <xsl:text>${rs_more}</xsl:text> </xsl:attribute> <img url=\"/nav/common/styles/images/blank.gif\" class=\"communityImage lotusIcon16 lotusIconShow\"> <xsl:attribute name=\"alt\"> <xsl:text>${rs_more}</xsl:text> </xsl:attribute> </img> </a> </td> </tr> <tr class=\"lotusDetails\"> <td class=\"lotusFirstCell\"></td> <td class=\"lotusLastCell\" id=\"{./snx:activity}-summary\"> <div class=\"lotusMeta\" role=\"list\"> <span class=\"updatedBySection\" role=\"listitem\"><xsl:apply-templates select=\"./f:contributor\"/></span> <span class=\"lotusDivider\" role=\"presentation\"><xsl:text> | </xsl:text></span> <span class=\"atomDate\" role=\"listitem\"><xsl:value-of select=\"./f:updated\"/></span> <xsl:if test=\"./f:category[not(@scheme)]\"> <span class=\"lotusDivider\" role=\"presentation\"><xsl:text> | </xsl:text></span> <span class=\"lotusTags\" role=\"listitem\"> <span>${rs_actTags} </span> <span role=\"list\"> <xsl:for-each select=\"./f:category[not(@scheme)]\"> <span role=\"listitem\"><a href=\"#\" onclick=\"iContext.iScope().handleTagLink(event)\"> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"@term\" /> </xsl:call-template> </a></span> <xsl:if test=\"position() != last()\"> <span class=\"presentation\"><xsl:text>${rs_actTagsDelim} </xsl:text></span> </xsl:if> </xsl:for-each> </span> </span> </xsl:if> <xsl:if test=\"./snx:duedate\"> <span class=\"lotusDivider\" role=\"presentation\"> <xsl:text> | </xsl:text> </span> <span class=\"dueDate atomDate\" role=\"listitem\"> <xsl:value-of select=\"./snx:duedate\" /> </span> </xsl:if> </div> <span id=\"{./snx:activity}-details\" style=\"display: none\"> <div id=\"{./snx:activity}-historyList\" style=\"display:none\"> <span class=\"historyNotLoaded\" /> </div> <xsl:if test=\"normalize-space(./f:content) or normalize-space(./f:summary)\"> <div id=\"{./snx:activity}-description\" class=\"summary\"> <span> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"(./f:content[@type='html'] or ./f:summary[@type='html'])\"> <xsl:text>escapedMarkup</xsl:text> </xsl:when> <xsl:when test=\"system-property('xsl:vendor')='libxslt' and (./f:content[@type='text'] or ./f:summary[@type='text'])\"> <xsl:text>unconvertedNewline</xsl:text> </xsl:when> </xsl:choose> </xsl:attribute> <xsl:choose> <xsl:when test=\"./f:content[@type='text']\"> <xsl:call-template name=\"newline-to-break\"> <xsl:with-param name=\"text\" > <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:content\" /> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test=\"./f:summary[@type='text']\"> <xsl:call-template name=\"newline-to-break\"> <xsl:with-param name=\"text\" > <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:summary\" /> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:when test=\"./f:content\"> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:content/node()\"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:summary/node()\"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </span> <xsl:if test=\"./f:link[@rel='enclosure']\"> <a href=\"javascript:;\" class=\"moreDescription\" onclick=\"iContext.iScope().handleMoreDescription(event,'{./f:link[@rel='enclosure']/@href}','{./f:link[@rel='enclosure']/@type}');\"> <xsl:text>${rs_linkMore}</xsl:text> </a> </xsl:if> </div> </xsl:if> <xsl:if test=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type'][@term='activity']\"> <a href=\"#\" id=\"{./snx:activity}-removeAct\" onclick=\"return iContext.iScope().removeCommunity('{./snx:activity}',event);\" class=\"lotusAction activityRemoveButton lotusHidden\"> <xsl:attribute name=\"title\"> <xsl:text>${rs_removeActFromComm}</xsl:text> </xsl:attribute> ${rs_removeActFromComm}</a> </xsl:if> </span> </td> </tr> </xsl:template> <xsl:template match=\"f:contributor\"> <span class=\"vcard\"> <a class=\"fn person lotusPerson\" onclick=\"return iContext.iScope().handleEMailLink(event)\"> <xsl:attribute name=\"href\"> <xsl:text>#userid=</xsl:text><xsl:value-of select=\"./snx:userid\" /> </xsl:attribute> <xsl:value-of select=\"./f:name\" /> </a> <span class=\"x-lconn-userid\" style=\"display: none;\"> <xsl:value-of select=\"./snx:userid\" /> </span> </span> </xsl:template> <xsl:template name=\"newline-to-break\"> <xsl:param name=\"text\" select=\".\" /> <xsl:choose> <xsl:when test=\"system-property('xsl:vendor')='libxslt'\"> <xsl:value-of select=\"$text\"/> </xsl:when> <xsl:when test=\"contains($text, '&#xa;')\"> <xsl:value-of select=\"substring-before($text, '&#xa;')\" /> <br /> <xsl:call-template name=\"newline-to-break\"> <xsl:with-param name=\"text\" select=\"substring-after($text,'&#xa;')\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$text\" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name=\"make-dojo-safe\"> <xsl:param name=\"text\" select=\".\" /> <xsl:param name=\"noescape\" select=\"no\"/> <xsl:choose> <xsl:when test=\"contains($text, '${')\"> <xsl:value-of select=\"substring-before($text, '${')\"/> <xsl:text>${ </xsl:text> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"substring-after($text,'${')\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$text\"/> </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>");

;dojo.cache("lconn.communityactivities", "activityHistory.xsl", "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><xsl:stylesheet version=\"1.0\" xmlns:f=\"http://www.w3.org/2005/Atom\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:os=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\"> <xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' /> <xsl:template match=\"/\"> <div class=\"ActivityHistory\"> <ul class=\"lotusList\"> <xsl:apply-templates select=\"/f:feed/f:entry\" /> </ul> </div> </xsl:template> <xsl:template match=\"f:entry\"> <li> <xsl:attribute name=\"class\"> <xsl:text>event_</xsl:text> <xsl:value-of select=\"./f:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type']/@term\" /> <xsl:if test=\"position() = 1\"> <xsl:text> lotus_first</xsl:text> </xsl:if> </xsl:attribute> <div class=\"icon\"></div> <div class=\"lotusMeta\"> <span> <xsl:choose> <xsl:when test=\"./f:summary[@type='text']\"> <xsl:call-template name=\"newline-to-break\"> <xsl:with-param name=\"text\"> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:summary\"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\">escapedMarkup</xsl:attribute> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"./f:summary\"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </span> <xsl:text> </xsl:text> <span class=\"date atomDate\"> <xsl:value-of select=\"./f:updated\" /> </span> </div> </li> </xsl:template> <xsl:template name=\"newline-to-break\"> <xsl:param name=\"text\" select=\".\" /> <xsl:choose> <xsl:when test=\"contains($text, '&#xa;')\"> <xsl:value-of select=\"substring-before($text, '&#xa;')\" /> <br /> <xsl:call-template name=\"newline-to-break\"> <xsl:with-param name=\"text\" select=\"substring-after($text,'&#xa;')\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$text\" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name=\"make-dojo-safe\"> <xsl:param name=\"text\" select=\".\" /> <xsl:param name=\"noescape\" select=\"no\"/> <xsl:choose> <xsl:when test=\"contains($text, '${')\"> <xsl:value-of select=\"substring-before($text, '${')\"/> <xsl:text>${ </xsl:text> <xsl:call-template name=\"make-dojo-safe\"> <xsl:with-param name=\"text\" select=\"substring-after($text,'${')\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$text\"/> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>");

;if(!dojo._hasResource["lconn.core.ActivityList"]){
dojo._hasResource["lconn.core.ActivityList"]=true;
dojo.provide("lconn.core.ActivityList");
dojo.deprecated("lconn.core.ActivityList","Rename to an Activities specific bundle in 3.5, reduce size of code, and move into dynamic loading path","3.5");
dojo.require("dojo.i18n");
dojo.require("dojo.string");
dojo.require("lconn.core.Res");
dojo.require("lconn.core.DateUtil");
dojo.require("lconn.core.errorhandling");
dojo.require("lconn.core.util._XSLCache");
dojo.require("lconn.core.config.services");
dojo.require("com.ibm.lconn.layout.people");
dojo.require("com.ibm.lconn.layout.track");
lconn.core.ActivityList=function(){
this.activityBaseUrl=null;
this.stylesheets={};
this.feeds={};
this.showCompleted=false;
this.isFullpage=false;
this.defaultPaging=5;
this.defaultPagingFull=10;
this.defaultHistoryItems=5;
this.xslCache=null;
this.profilesService=null;
this.themeId=null;
this.onLoad=function onLoad(){
var wa=this.iContext.getiWidgetAttributes();
this.activityBaseUrl=wa.getItemValue("activityBaseUrl");
this.communityUUID=wa.getItemValue("resourceId");
var up=this.iContext.getUserProfile();
this.isLoggedIn=up.getItemValue("userId");
this.isOwner=up.getItemValue("canPersonalize")=="true";
this.isContributor=up.getItemValue("canContribute")=="true";
var _1=this.iContext.getiDescriptor().getItemValue("mode");
this.isFullpage=(_1=="fullpage");
this.xslCache=new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"activitySummary.xsl":{templatePath:dojo.moduleUrl("lconn.communityactivities","activitySummary.xsl")},"activityHistory.xsl":{templatePath:dojo.moduleUrl("lconn.communityactivities","activityHistory.xsl")}}}))();
if(!this.activityBaseUrl){
throw ("lconn.core.ActivityList has been loaded without the required activityBaseUrl attribute");
}
this.cPath=wa.getItemValue("cPath");
this.profilesService=lconn.core.config.services.profiles;
if(_1=="search"){
var _2="communities:activities";
var _3=this.iContext.getElementById("resultContainer");
lconn.core.widgetUtils.search(this.iContext,_2,_3);
}else{
var _4=new lconn.core.Res();
_4.loadDefaultBundle();
this.strBundle=_4.resBundle;
this.strBundle.cPath=this.cPath;
if(this.isFullpage){
this.pageSize=wa.getItemValue("activitiesPerPageFullpage")||this.defaultPagingFull;
}else{
this.pageSize=wa.getItemValue("activitiesPerPage")||this.defaultPaging;
}
this.numHistoryItems=wa.getItemValue("numHistoryItems")||this.defaultHistoryItems;
this.pageNum=1;
this.getFeed("activities");
}
if(this.isFullpage){
try{
com.ibm.lconn.layout.track.read("ACTIVITIES","ACTIVITIES",{source:"ACTIVITIES",userId:this.isLoggedIn,communityId:this.communityUUID,extra:{contentLink:self.location.href}});
}
catch(e){
if(dojo.config.isDebug){
console.debug(e);
}
}
}
};
this.getFeed=function getFeed(_5){
var _6,_7,_8=this.activityBaseUrl+"/service/atom2/";
if(this.isLoggedIn){
_8+="forms/";
}
var _9=(window.WidgetPlacementConfig&&WidgetPlacementConfig.params)?WidgetPlacementConfig.params["version"]:null;
_9="?version="+_9;
switch(_5){
case "activities":
_6="activitySummary.xsl"+_9;
var _a=this.xslCache.getXslDoc("activitySummary.xsl");
_8+="activities?includeRelated=yes&tunedout=yes&ps="+this.pageSize+"&page="+this.pageNum+"&isMember="+this.isContributor;
if(this.communityUUID){
_8+="&commUuid="+this.communityUUID;
}
_7="activityList";
break;
case "history":
_6="activityHistory.xsl"+_9;
var _a=this.xslCache.getXslDoc("activityHistory.xsl");
var _b=arguments[1];
_8+="activity/history?ps="+this.numHistoryItems+"&activityUuid="+_b;
_7=_b+"-historyList";
break;
}
_8+="&public=yes";
if(!this.isLoggedIn){
_8+="&authenticate=no";
}
if(this.showCompleted){
_8+="&completed=yes";
}
this.showLoading(_7,true);
this.stylesheets[_8]=null;
this.feeds[_8]=null;
var _c={url:this.iContext.io.rewriteURI(_6),load:dojo.hitch(this,function loadStylesheetFunct(_d,_e){
this.stylesheets[_8]=_d;
if(this.feeds[_8]){
this.transform(this.feeds[_8],this.stylesheets[_8],_7,_5);
}
}),handleAs:"xml",error:dojo.hitch(this,"loadError"),htmlContainerElemId:_7};
this.stylesheets[_8]=_a;
if(this.feeds[_8]){
this.transform(this.feeds[_8],this.stylesheets[_8],_7,_5);
}
var _f=dojo.hitch(this,function loadFeedFunct(_10,_11){
if(dojo.isIE&&!_10.xml){
try{
_10=new ActiveXObject("Microsoft.XMLDOM");
_10.async="false";
_10.loadXML(_11.xhr.responseText);
}
catch(err){
lconn.core.errorhandling.DefaultErrorHandler("",err,_7);
return;
}
}
this.feeds[_8]=_10;
if(this.stylesheets[_8]){
this.transform(this.feeds[_8],this.stylesheets[_8],_7,_5);
}
});
var _12={url:this.iContext.io.rewriteURI(_8),load:_f,handleAs:"xml",error:dojo.hitch(this,"loadError"),htmlContainerElemId:_7};
dojo.xhrGet(_12);
};
this.transform=function transform(xml,xsl,_13,_14){
this.showLoading(_13,false);
var _15;
try{
if(window.ActiveXObject){
_15=xml.transformNode(xsl);
}else{
if(document.implementation&&document.implementation.createDocument){
var _16=new XSLTProcessor();
_16.importStylesheet(xsl);
var _17=_16.transformToFragment(xml,document);
var tmp=document.createElement("span");
tmp.appendChild(_17);
_15=tmp.innerHTML;
}
}
}
catch(err){
lconn.core.errorhandling.DefaultErrorHandler("",err,_13);
return;
}
_15=dojo.string.substitute(_15,this.strBundle);
_15=_15.replace(/\$\{ /g,"${");
var re=new RegExp("/nav/common/styles/images/blank.gif","g");
var _18=_15.replace(re,dojo.config.blankGif);
if(_18){
console.log(_18);
}
this.iContext.getElementById(_13).innerHTML=this.iContext.processMarkup(_18);
this.getElementsByClass("escapedMarkup").forEach(function(elt){
elt.innerHTML=elt.firstChild[dojo.isIE?"nodeValue":"textContent"];
dojo.removeClass(elt,"escapedMarkup");
});
this.getElementsByClass("unconvertedNewline").forEach(function(elt){
elt.innerHTML=elt.innerHTML.replace(/\n/g,"<br>\n");
dojo.removeClass(elt,"unconvertedNewline");
});
if(this.isOwner){
this.getElementsByClass("activityRemoveButton").forEach(function(_19){
dojo.removeClass(_19,"lotusHidden");
});
}
this.getElementsByClass("atomDate").forEach(function(_1a){
dojo.removeClass(_1a,"atomDate");
var _1b=lconn.core.DateUtil.atomDateToJsDate(dojo.trim(_1a.innerHTML));
var _1c=_1a.parentNode.className||"";
if(_1a.className.indexOf("dueDate")!=-1){
_1a.innerHTML=dojo.string.substitute(this.strBundle.rs_actDue,[lconn.core.DateUtil.toString(_1b,true)]);
var _1d=new Date();
if(_1b<_1d){
_1a.className="cnxsDueDateLate";
}
}else{
_1a.innerHTML=lconn.core.DateUtil.toString(_1b);
}
},this);
this.getElementsByClass("updatedBySection").forEach(function(_1e){
dojo.removeClass(_1e,"updatedBySection");
_1e.innerHTML=dojo.string.substitute(this.strBundle.rs_actUpdatedBy,[_1e.innerHTML,""]);
},this);
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.iContext.getRootElement());
}
dojo.query(".activityLink",this.iContext.getRootElement()).forEach(function(_1f){
var _20=_1f.innerHTML;
_1f.href=this.activityBaseUrl+_1f.getAttribute("url");
_1f.innerHTML=_20;
},this).removeClass("activityLink");
dojo.query(".communityImage",this.iContext.getRootElement()).forEach(function(_21){
_21.src=_21.getAttribute("url");
},this).removeClass("communityImage");
if(_14=="activities"){
if(this.iContext.getElementById("totalResults")){
var _22=this.iContext.getElementById("totalResults").innerHTML*1;
var _23=this.iContext.getElementById("numEntries").innerHTML*1;
var _24=((this.pageNum-1)*this.pageSize)+1;
var _25=_24+_23-1;
dojo.query(".pagePos",this.iContext.getRootElement()).addContent(dojo.string.substitute(this.strBundle.rs_pagepos,[_24,_25,_22]));
}
if(this.isFullpage){
this.iContext.getElementById("widgetHeadline").style.display="";
var _26=document.createElement("li");
_26.className="lotusFirst";
var _27=document.createTextNode(this.strBundle.rs_navPrevLabel);
if(this.iContext.getElementById("hasPrevious")){
var _28=_27;
_27=document.createElement("a");
_27.className="prevLink";
_27.href="javascript:;";
_27.appendChild(_28);
}
_26.appendChild(_27);
var _29=dojo.query(".pageNav",this.iContext.getRootElement());
_29.addContent(_26);
var _2a=document.createElement("li");
_27=document.createTextNode(this.strBundle.rs_navNextLabel);
if(this.iContext.getElementById("hasNext")){
var _28=_27;
_27=document.createElement("a");
_27.className="nextLink";
_27.href="javascript:;";
_27.appendChild(_28);
}
_2a.appendChild(_27);
_29.addContent(_2a);
_29.query(".prevLink").onclick(dojo.hitch(this,"prev"));
_29.query(".nextLink").onclick(dojo.hitch(this,"next"));
if(_22){
this.iContext.getElementById("activityBottomPaging").style.display="";
this.iContext.getElementById("activityTopPaging").style.display="";
}else{
this.iContext.getElementById("noActivitiesTable").style.display="none";
}
this.iContext.getElementById("activityFeeds").style.display="";
var _2b=this.iContext.getElementById("activityFeedLink");
_2b.href=_2b.href.replace("/forms","");
var _2c=this.iContext.getElementById("activityCompletedLink");
_2c.href=this.activityBaseUrl+"/service/html/mainpage#dashboard,search,completed=only,public=yes,includeRelated=yes,commUuid="+this.communityUUID;
}else{
if(_22>this.pageSize){
this.iContext.getElementById("viewAllActivities").style.display="";
}
}
var _2d=document.getElementById("lotusBaseStylesheet");
if(_2d){
this.themeId=_2d.getAttribute("theme");
}
if(this.isContributor){
var _2e=this.iContext.getElementById("startActivity");
var _27=document.createElement("a");
_27.href=this.activityBaseUrl+"/service/html/mainpage"+"#communityActivityForm,"+this.communityUUID+",isOwner="+this.isOwner+",themeId="+this.themeId;
_27.innerHTML=_2e.innerHTML;
var _2f=document.createElement("span");
_2f.className=_27.className=this.isFullpage?"":"lotusAction";
_2f.className=this.isFullpage?"lotusBtn":"lotusAction";
_2f.appendChild(_27);
_2e.innerHTML="";
_2e.appendChild(_2f);
_2e.style.display="";
if(!_22&&!this.isFullpage){
this.iContext.getElementById("noActivities").style.display="none";
this.iContext.getElementById("noActivitiesCanCreate").style.display="";
}
}
}else{
dojo.query(".vcard .fn.person",_13).onclick(dojo.hitch(this,"handleEMailLink"));
}
};
this.handleCompletedLink=function handleCompletedLink(_30){
dojo.stopEvent(_30);
this.showCompleted=true;
this.pageNum=1;
this.getFeed("activities");
};
this.handleEMailLink=function handleEMailLink(_31){
_31=dojo.fixEvent(_31);
dojo.stopEvent(_31);
if(this.profilesService){
var _32=_31.target.hash.substring(1);
var _33=_32.indexOf("=");
var _34=_32.substring(_33+1);
if(_34.indexOf("@")!=-1){
var url=com.ibm.lconn.layout.people.getProfileUrl({email:_34});
}else{
var url=com.ibm.lconn.layout.people.getProfileUrl({userid:_34});
}
}else{
var url=this.activityBaseUrl+"/service/html/mainpage#dashboard,search,"+_31.target.hash.substring(1);
}
window.location=url;
};
this.handleTagLink=function handleTagLink(_35){
_35=dojo.fixEvent(_35);
var url=this.activityBaseUrl+"/service/html/mainpage#dashboard,search,tag="+_35.target.innerHTML;
window.location=url;
return false;
};
this.handleMoreDescription=function handleMoreDescription(_36,url,_37){
_36=dojo.fixEvent(_36);
var id=_36.target.parentNode.id;
dojo.xhrGet({url:this.iContext.io.rewriteURI(url),load:function loadDescr(_38,_39){
document.getElementById(id).innerHTML=_38.replace(/\n/g,"<br>\n");
},handleAs:"text",error:dojo.hitch(this,"loadError"),htmlContainerElemId:id});
};
this.removeConfirmCommunity=function(id,_3a,_3b){
dojo.xhrPost({url:this.activityBaseUrl+"/service/html/post/deletemember",content:{activityUuid:id,communityUuid:this.communityUUID,dangerousurlnonce:_3a},load:dojo.hitch(this,"getFeed","activities"),error:dojo.hitch(this,"loadError")});
};
this.removeCommunity=function removeCommunity(id,_3c){
dojo.fixEvent(_3c);
dojo.stopEvent(_3c);
var _3d=this.activityBaseUrl+"/service/getnonce/forms";
var _3e={url:_3d,handleAs:"text",timeout:10000,headers:{"x-requested-with":"XMLHttpRequest"},isNonceRequest:true,load:dojo.hitch(this,"removeConfirmCommunity",id),error:dojo.hitch(this,"loadError")};
dojo.xhrGet(_3e);
};
this.toggleDetails=function toggleDetails(id,_3f){
_3f=dojo.fixEvent(_3f);
var _40=this.iContext.getElementById(id+"-details");
var _41="none";
var _42=this.strBundle.rs_more;
var _43="lotusIconShow";
var _44="lotusIconHide";
if(_40.style.display==_41){
_41="";
_42=this.strBundle.rs_hide;
_44="lotusIconShow";
_43="lotusIconHide";
}
_40.style.display=_41;
var _45=dojo.query(".latestUpdate",this.iContext.getElementById(id+"-summary")).style({display:(_41?"":"none")});
_3f.target.alt=_3f.target.parentNode.title=_42;
dojo.removeClass(_3f.target,_44);
dojo.addClass(_3f.target,_43);
var _46=this.iContext.getElementById(id+"-historyList");
_46.style.display=_41;
if(dojo.query(".historyNotLoaded",_46).length){
this.getFeed("history",id);
}
return false;
};
this.loadError=function loadError(_47,_48){
this.showLoading(_48.args.htmlContainerElemId,false);
_48.args.xsltArgs={htmlContainerElemId:_48.args.htmlContainerElemId};
lconn.core.errorhandling.DefaultXHRErrorHandler(_47,_48);
};
this.showLoading=function showLoading(_49,_4a){
var _4b=this.iContext.getElementById(_49+"-progressIndicator");
if(!_4b&&_4a){
var elt=this.iContext.getElementById(_49);
_4b=document.createElement("div");
_4b.id=_49+"-progressIndicator";
_4b.innerHTML=this.strBundle.rs_loading;
elt.appendChild(_4b);
}else{
if(!_4a&&_4b){
_4b.parentNode.removeChild(_4b);
}
}
};
this.next=function next(){
++this.pageNum;
this.getFeed("activities");
return false;
};
this.prev=function prev(){
--this.pageNum;
this.getFeed("activities");
return false;
};
this.showFullpage=function showFullPage(){
this.iContext.iEvents.fireEvent("onModeChanged","","{'newMode': 'fullpage'}");
return false;
};
this.getElementsByClass=function getElementsByClass(_4c,_4d){
return dojo.query("."+_4c,_4d||this.iContext.getRootElement());
};
};
}


;if(!dojo._hasResource["lconn.comm.ronin.AjaxRequestsHandler"]){
dojo._hasResource["lconn.comm.ronin.AjaxRequestsHandler"]=true;
dojo.provide("lconn.comm.ronin.AjaxRequestsHandler");
dojo.declare("lconn.comm.ronin.AjaxRequestsHandler",null,{constructor:function(){
},rewriteUrl:function(_1,_2){
_2=_2?_2:proxyUrl;
if(!dojo.isString(_1)){
return;
}
if(_1.toLowerCase().indexOf("http")!=0){
return _1;
}
var ph=new lconn.core.url.ProxyUrlHelper(_2);
return ph.getProxifiedURL(_1);
},xhrGet:function(_3){
_3.url=this.rewriteUrl(_3.url);
var _4=dojo.xhrGet(_3);
return _4;
},xhrPost:function(_5){
_5.url=this.rewriteUrl(_5.url);
return dojo.xhrPost(_5);
}});
}


;if(!dojo._hasResource["lconn.comm.ronin.extendedData"]){
dojo._hasResource["lconn.comm.ronin.extendedData"]=true;
dojo.provide("lconn.comm.ronin.extendedData");
dojo.require("dojo.string");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.extendedData",null,{constructor:function(_1,_2,_3,_4){
this.type=_1;
this.elemId=_2;
this.attrName=_3;
this.value=_4;
}});
}


;if(!dojo._hasResource["lconn.comm.ronin.feedMapping"]){
dojo._hasResource["lconn.comm.ronin.feedMapping"]=true;
dojo.provide("lconn.comm.ronin.feedMapping");
dojo.require("dojo.string");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.feedMapping",null,{constructor:function(_1,_2,_3,_4){
this.prefPathIndex=0;
this.type=_1;
this.elemId=_2;
this.paths=_3.split(",");
this.attrName=_4;
}});
}


;if(!dojo._hasResource["lconn.comm.ronin.feedType"]){
dojo._hasResource["lconn.comm.ronin.feedType"]=true;
dojo.provide("lconn.comm.ronin.feedType");
dojo.require("dojo.string");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.feedType",null,{constructor:function(_1,_2,_3,_4){
this.type=_1;
this.version=_2;
this.namespace=_3;
this.prefix=_4;
},getType:function(){
return this.type;
},getVersion:function(){
return this.version;
}});
}


;if(!dojo._hasResource["dojox.date.posix"]){
dojo._hasResource["dojox.date.posix"]=true;
dojo.provide("dojox.date.posix");
dojo.require("dojo.date");
dojo.require("dojo.date.locale");
dojo.require("dojo.string");
dojox.date.posix.strftime=function(_1,_2,_3){
var _4=null;
var _5=function(s,n){
return dojo.string.pad(s,n||2,_4||"0");
};
var _6=dojo.date.locale._getGregorianBundle(_3);
var $=function(_7){
switch(_7){
case "a":
return dojo.date.locale.getNames("days","abbr","format",_3)[_1.getDay()];
case "A":
return dojo.date.locale.getNames("days","wide","format",_3)[_1.getDay()];
case "b":
case "h":
return dojo.date.locale.getNames("months","abbr","format",_3)[_1.getMonth()];
case "B":
return dojo.date.locale.getNames("months","wide","format",_3)[_1.getMonth()];
case "c":
return dojo.date.locale.format(_1,{formatLength:"full",locale:_3});
case "C":
return _5(Math.floor(_1.getFullYear()/100));
case "d":
return _5(_1.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_4==null){
_4=" ";
}
return _5(_1.getDate());
case "f":
if(_4==null){
_4=" ";
}
return _5(_1.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _5(_1.getHours());
case "I":
return _5(_1.getHours()%12||12);
case "j":
return _5(dojo.date.locale._getDayOfYear(_1),3);
case "k":
if(_4==null){
_4=" ";
}
return _5(_1.getHours());
case "l":
if(_4==null){
_4=" ";
}
return _5(_1.getHours()%12||12);
case "m":
return _5(_1.getMonth()+1);
case "M":
return _5(_1.getMinutes());
case "n":
return "\n";
case "p":
return _6[_1.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _5(_1.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_1.getDay()||7);
case "U":
return _5(dojo.date.locale._getWeekOfYear(_1));
case "V":
return _5(dojox.date.posix.getIsoWeekOfYear(_1));
case "W":
return _5(dojo.date.locale._getWeekOfYear(_1,1));
case "w":
return String(_1.getDay());
case "x":
return dojo.date.locale.format(_1,{selector:"date",formatLength:"full",locale:_3});
case "X":
return dojo.date.locale.format(_1,{selector:"time",formatLength:"full",locale:_3});
case "y":
return _5(_1.getFullYear()%100);
case "Y":
return String(_1.getFullYear());
case "z":
var _8=_1.getTimezoneOffset();
return (_8>0?"-":"+")+_5(Math.floor(Math.abs(_8)/60))+":"+_5(Math.abs(_8)%60);
case "Z":
return dojo.date.getTimezoneName(_1);
case "%":
return "%";
}
};
var _9="";
var i=0;
var _a=0;
var _b=null;
while((_a=_2.indexOf("%",i))!=-1){
_9+=_2.substring(i,_a++);
switch(_2.charAt(_a++)){
case "_":
_4=" ";
break;
case "-":
_4="";
break;
case "0":
_4="0";
break;
case "^":
_b="upper";
break;
case "*":
_b="lower";
break;
case "#":
_b="swap";
break;
default:
_4=null;
_a--;
break;
}
var _c=$(_2.charAt(_a++));
switch(_b){
case "upper":
_c=_c.toUpperCase();
break;
case "lower":
_c=_c.toLowerCase();
break;
case "swap":
var _d=_c.toLowerCase();
var _e="";
var ch="";
for(var j=0;j<_c.length;j++){
ch=_c.charAt(j);
_e+=(ch==_d.charAt(j))?ch.toUpperCase():ch.toLowerCase();
}
_c=_e;
break;
default:
break;
}
_b=null;
_9+=_c;
i=_a;
}
_9+=_2.substring(i);
return _9;
};
dojox.date.posix.getStartOfWeek=function(_f,_10){
if(isNaN(_10)){
_10=dojo.cldr.supplemental.getFirstDayOfWeek?dojo.cldr.supplemental.getFirstDayOfWeek():0;
}
var _11=_10;
if(_f.getDay()>=_10){
_11-=_f.getDay();
}else{
_11-=(7-_f.getDay());
}
var _12=new Date(_f);
_12.setHours(0,0,0,0);
return dojo.date.add(_12,"day",_11);
};
dojox.date.posix.setIsoWeekOfYear=function(_13,_14){
if(!_14){
return _13;
}
var _15=dojox.date.posix.getIsoWeekOfYear(_13);
var _16=_14-_15;
if(_14<0){
var _17=dojox.date.posix.getIsoWeeksInYear(_13);
_16=(_17+_14+1)-_15;
}
return dojo.date.add(_13,"week",_16);
};
dojox.date.posix.getIsoWeekOfYear=function(_18){
var _19=dojox.date.posix.getStartOfWeek(_18,1);
var _1a=new Date(_18.getFullYear(),0,4);
_1a=dojox.date.posix.getStartOfWeek(_1a,1);
var _1b=_19.getTime()-_1a.getTime();
if(_1b<0){
return dojox.date.posix.getIsoWeeksInYear(_19);
}
return Math.ceil(_1b/604800000)+1;
};
dojox.date.posix.getIsoWeeksInYear=function(_1c){
function p(y){
return y+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);
};
var y=_1c.getFullYear();
return (p(y)%7==4||p(y-1)%7==3)?53:52;
};
}


;if(!dojo._hasResource["lconn.comm.ronin.post"]){
dojo._hasResource["lconn.comm.ronin.post"]=true;
dojo.provide("lconn.comm.ronin.post");
dojo.require("dojo.string");
dojo.require("dojo.date.locale");
dojo.require("dojox.date.posix");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.post",null,{EXPANDED:1,COLLAPSED:2,EXPAND_LIMIT:10,REPLY_TEMPLATE_DIV:"reply_template_div",LOAD_POST_EVENT:"loadpost",FIELD_MAPPING:1,ATTRIBUTE_MAPPING:2,PROPERTY_MAPPING:3,DELETED_ENTRY:"[[D]]",constructor:function(_1,_2,_3,_4){
this.thread=_1;
this.postNum=_3;
this.postId=_1.id+"_post_"+_3;
this.guid=null;
this.parentId=null;
this.subject=null;
this.author=null;
this.author_mail=null;
this.author_userid=null;
this.published=null;
this.updated=null;
this.published_modified=null;
this.delete_published=null;
this.delete_deleted=null;
this.duration=null;
this.updated=null;
this.summary=null;
this.subtitle=null;
this.bodyUrl=null;
this.body=null;
this.extData=null;
this.expanded=false;
this.container=null;
this.owner=false;
this.replyForm=null;
this.replyRte=null;
this.replyEnabled=false;
this.editLink=null;
this.editForm=null;
this.editRte=null;
this.editEnabled=false;
this.edited=false;
this.editInProgress=false;
this.deleteForm=null;
this.deleteRte=null;
this.deleteEnabled=false;
this.deleted=false;
this.moreLink=null;
this.moreEnabled=false;
this.moreText=null;
this.moreExpanded=false;
var _5=null;
var _6="";
var _7;
var _8=this.thread.config.enableAcf;
for(var ii=1;ii<this.thread.fieldMapping.length;ii++){
var _9=this.thread.fieldMapping[ii];
var _a=lconn.comm.ronin.utils.prototype.findPreferredFeedFieldValue(_4,_9,_8,"alternate",this.thread.baseURL);
switch(_9.elemId){
case "post_subject":
this.subject=_a;
break;
case "post_author":
this.author=_a;
break;
case "post_author_mail":
this.author_mail=_a;
break;
case "post_author_userid":
this.author_userid=_a;
break;
case "post_published":
this.published=_a;
break;
case "post_updated":
this.updated=_a;
break;
case "post_published_modified":
this.published_modified=_a;
break;
case "post_delete_published":
this.delete_published=_a;
break;
case "post_delete_deleted":
this.delete_deleted=_a;
break;
case "post_duration":
this.duration=_a;
break;
case "post_summary":
this.summary=this.adjustLinks(_a,this.thread.baseURL);
break;
case "post_subtitle":
this.subtitle=_a;
break;
case "post_body_url":
this.bodyUrl=_a;
break;
case "post_body_text":
this.body=this.adjustLinks(_a,this.thread.baseURL);
break;
default:
if(this.extData==null){
this.extData=new Array();
}
this.extData[this.extData.length]=new lconn.comm.ronin.extendedData(_9.type,_9.elemId,_9.attrName,_a);
break;
}
}
this.guid=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/id",_8);
if(this.guid!=null){
_7=this.guid.lastIndexOf(":");
if(_7>-1){
this.guid=this.guid.substring(_7+1);
}
}
this.moreLink=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/link@href",_8,"enclosure",this.thread.baseURL);
if(this.moreLink.length==0){
this.moreLink=null;
}
this.editLink=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/link@href",_8,"edit",this.thread.baseURL);
if(this.editLink.length==0){
this.editLink=null;
}
if(this.thread.layout=="INDENTED"){
if(this.guid!=null&&this.guid.length!=0){
this.thread.postIdLookup[this.guid]=this.postId;
}
var _b=lconn.comm.ronin.utils.prototype.getElementsByTagNameNS(_4,"http://purl.org/syndication/thread/1.0",_8,"thr","in-reply-to");
if(_b!=null&&_b.length!=0){
this.parentId=_b[0].getAttribute("ref");
_7=this.parentId.lastIndexOf(":");
if(_7>-1){
this.parentId=this.parentId.substring(_7+1);
}
}
}
if(this.subject!=null&&this.subject.indexOf(this.DELETED_ENTRY)==0){
this.setDeleted(true);
_7=this.DELETED_ENTRY.length;
this.subject=this.subject.substring(_7);
}else{
_6=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/snx:permissions",_8);
if(_6.length==0){
_6=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/permissions",_8);
}
this.setPermissions(_6);
this.updated=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/updated",_8);
var _c=lconn.comm.ronin.utils.prototype.findFeedFieldValue(_4,"entry/published",_8);
if(this.updated.length>0&&_c.length>0){
this.setEdited(this.updated!=_c);
}
}
this.setOwner(this.author==_2);
},adjustLinks:function(_d,_e){
var _f=_d;
if(window.ActiveXObject){
var _10=/(<\s*(a|img)\s+[^>]*(href|src)\s*=\s*[\"'])(?!http)([^\"'>]+)[\"'>]/gi;
var _11=_f.match(_10);
if(_11!=null){
for(var i=0;i<_11.length;i++){
var _12=_11[i].split("\"/");
_f=_f.replace(_11[i],_12[0]+"\""+_e+"/"+_12[1]);
}
}
}else{
var _13=document.createElement("div");
_13.innerHTML=_f;
var _14=_13.getElementsByTagName("*");
for(var i=0;i<_14.length;i++){
var _15=_14[i].nodeName.toLowerCase();
if(_15=="a"){
var _16=_14[i].getAttribute("href",2);
if(_16!=null&&_16!=""){
_16=dojo.trim(_16);
var _17=_16.split("/");
if(_17[0].length==0){
_16=_e+_16;
_14[i].setAttribute("href",_16);
}
}
}else{
if(_15=="img"){
var _18=_14[i].getAttribute("src",2);
if(_18!=null&&_18!=""){
_18=dojo.trim(_18);
var _19=_18.split("/");
if(_19[0].length==0){
_18=_e+_18;
_14[i].setAttribute("src",_18);
}
}
}
}
}
_f=_13.innerHTML;
}
return _f;
},setPermissions:function(_1a){
if(_1a!=null){
if((_1a.indexOf("add_child,")!=-1)&&this.thread.config.context!="TOPIC"){
this.replyEnabled=true;
}
if((_1a.indexOf("edit,")!=-1)){
this.editEnabled=true;
}
if((_1a.indexOf("delete,")!=-1)){
this.deleteEnabled=true;
}
}
if(this.moreLink!=null){
this.moreEnabled=true;
}
},getOwner:function(){
return this.owner;
},setOwner:function(_1b){
this.owner=_1b;
},getEdited:function(){
return this.edited;
},setEdited:function(_1c){
this.edited=_1c;
},displayEditHistory:function(){
if(this.container!=null){
var _1d=lconn.comm.ronin.utils.prototype.getElementById(this.container,"post_edit_history_"+this.postId);
if(_1d==null){
return;
}
if(this.edited==true){
_1d.style.display="";
}else{
_1d.style.display="none";
}
}
},getDeleted:function(){
return this.deleted;
},setDeleted:function(_1e){
this.deleted=_1e;
},displayDeleteHistory:function(){
if(this.container!=null){
var _1f=lconn.comm.ronin.utils.prototype.getElementById(this.container,"post_entry_"+this.postId);
var _20=lconn.comm.ronin.utils.prototype.getElementById(this.container,"post_delete_history_"+this.postId);
if(_20!=null){
if(this.deleted==true){
if(_1f!=null){
_1f.style.display="none";
}
_20.style.display="";
}else{
_20.style.display="none";
if(_1f!=null){
_1f.style.display="";
}
}
}
}
},insertPost:function(_21){
if(this.thread.layout=="INDENTED"){
this.insertPostIndented(_21);
}else{
if(this.thread.layout=="FLAT"){
this.insertPostFlat(_21);
}
}
this.displayDeleteHistory();
this.displayEditHistory();
},insertPostIndented:function(_22){
if((this.parentId!=null)&&(lconn.comm.ronin.utils.prototype.getElementById(_22,this.parentId)!=null)){
var _23=lconn.comm.ronin.utils.prototype.getElementById(_22,this.parentId);
if(_23.parentNode.childNodes.length>1){
var _24=_23.parentNode.childNodes[_23.parentNode.childNodes.length-1];
this.insertPostFlat(_24);
}else{
var _25=document.createElement("ul");
this.insertPostFlat(_25);
_23.parentNode.appendChild(_25);
}
}else{
if(_22==null){
_22=document.createElement("ul");
document.getElementById(this.thread.container).appendChild(_22);
}
this.insertPostFlat(_22);
}
},insertPostFlat:function(_26){
var _27=_26.childNodes;
var _28=document.createElement("li");
if(this.thread.layout=="INDENTED"){
_28.className="lotusIndent20";
}
var _29=this.clonePostTemplate();
if(_29!=null){
_29.postObj=this;
this.container=_29;
_28.appendChild(_29);
_26.appendChild(_28);
this.thread.triggerEvent(this.LOAD_POST_EVENT,_29.postObj,_29);
}
},loadTemplate:function(_2a,_2b){
var _2c=_2a;
var req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:_2c,error:dojo.hitch(this,this.handleError),handleAs:"text"});
req.addCallback(this,_2b);
},clonePostTemplate:function(){
var _2d=document.getElementById(this.thread.postTemplateDivName);
if(_2d==null){
_2d=this.thread.addTemplateToDOM(this.thread.postTemplateDivName);
}
var _2e=lconn.comm.ronin.utils.prototype.getElementById(_2d,"post_template");
var _2f=_2e.cloneNode(true);
var _30=null;
var idx=-1;
var _31=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_subject");
if(_31!=null){
_31.innerHTML=this.subject;
}
var _32=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_author");
if(_32!=null){
_32.innerHTML=this.author;
if(this.thread.authorVisible!=true){
_32.style.display="none";
}else{
_32.innerHTML=_32.innerHTML+"&nbsp;";
}
}
var _33=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_author_mail");
if(_33!=null){
_33.innerHTML=this.author_mail;
}
var _34=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_author_userid");
if(_34!=null){
_34.innerHTML=this.author_userid;
}
var _35=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_published");
if(_35!=null){
_35.innerHTML=this.convertDate(this.published)+"<br/>";
}
var _36=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_published_modified");
if(_36!=null){
_36.innerHTML=this.published_modified+"<br/>";
}
var _37=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_updated");
if(_37!=null){
_37.innerHTML=this.convertDate(this.updated)+"<br/>";
}
var _38=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_delete_published");
if(_38!=null){
_38.innerHTML=this.convertDate(this.delete_published)+"<br/>";
}
var _39=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_delete_deleted");
if(_39!=null){
_39.innerHTML=this.convertDate(this.delete_published)+"<br/>";
}
var dur=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_duration");
if(dur!=null){
dur.innerHTML=this.duration;
}
var _3a=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_summary");
if(_3a!=null){
_3a.innerHTML=this.summary;
}
var _3b=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_subtitle");
if(_3b!=null){
_3b.innerHTML=this.subtitle;
}
this.handleExtData(_2f);
var _3c=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_expand");
if(_3c){
dojo.connect(_3c,"onclick",this,"expandPost");
}
var _3d=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_collapse");
if(_3d){
dojo.connect(_3d,"onclick",this,"collapsePost");
}
var _3e=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_more");
if(_3e){
if(this.isMoreEnabled()){
dojo.connect(_3e,"onclick",this,"morePost");
_3e.style.display="";
}else{
_3e.style.display="none";
}
}
var _3f=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_less");
if(_3f){
if(this.isMoreEnabled()){
dojo.connect(_3f,"onclick",this,"lessPost");
}
}
var _40=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_reply");
if(_40){
if(this.isReplyEnabled()){
dojo.connect(_40,"onclick",this,"replyPost");
_40.parentNode.style.display="";
_40.parentNode.className="lotusFirst";
}else{
_40.parentNode.style.display="none";
}
}
var _41=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_edit");
if(_41){
if(this.isEditEnabled()){
dojo.connect(_41,"onclick",this,"editPost");
_41.parentNode.style.display="";
if(!this.isReplyEnabled()){
_41.parentNode.className="lotusFirst";
}
}else{
_41.parentNode.style.display="none";
}
}
var del=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_delete");
if(del){
if(this.isDeleteEnabled()){
dojo.connect(del,"onclick",this,"deletePost");
del.parentNode.style.display="";
}else{
del.parentNode.style.display="none";
}
}
if(this.getOwner()==true){
var _42=lconn.comm.ronin.utils.prototype.getElementById(_2f,"post_number_"+this.postId);
if(_42){
_42.parentNode.className="post_number_owner";
}
}
var _43="_"+this.postId;
lconn.comm.ronin.utils.prototype.makeIdsUnique(_2f,_43);
_2f.id=this.postId;
return _2f;
},handleExtData:function(_44){
if(this.extData!=null){
for(var ii=0;ii<this.extData.length;ii++){
var _45=this.extData[ii];
var _46=lconn.comm.ronin.utils.prototype.getElementById(_44,_45.elemId);
if(_46==null){
_46=lconn.comm.ronin.utils.prototype.getElementById(_44,_45.elemId+"_"+this.postId);
updated=true;
}
if(_46!=null){
if(_45.type==this.FIELD_MAPPING){
_46.innerHTML=_45.value;
}else{
if(_45.type==this.ATTRIBUTE_MAPPING){
_46.setAttribute(_45.attrName,_45.value);
}else{
if(_45.type==this.PROPERTY_MAPPING){
_46.innerHTML=this.postId;
}
}
}
}
}
}
},isReplyEnabled:function(){
return this.replyEnabled;
},isEditEnabled:function(){
return this.editEnabled;
},isDeleteEnabled:function(){
return this.deleteEnabled;
},isMoreEnabled:function(){
return this.moreEnabled;
},togglePostBody:function(){
if(this.expanded){
this.collapsePost();
}else{
this.expandPost();
}
return;
},expandPost:function(){
var _47=dojo.byId("post_summary_"+this.postId);
var _48=dojo.byId("post_body_"+this.postId);
var _49=dojo.byId("post_body_text_"+this.postId);
var _4a=dojo.byId("post_expand_"+this.postId);
var _4b=dojo.byId("post_collapse_"+this.postId);
if(_48!=null){
_48.style.display="";
}
if(_47!=null){
_47.style.display="none";
}
if(_4a!=null&&_4b!=null){
_4a.style.display="none";
_4b.style.display="";
}
if(_49!=null){
if(!this.scrubbedBody){
this.scrubbedBody=lconn.comm.ronin.utils.prototype.serverSideAcf(this.body,this.thread.config.contextURL);
}
_49.innerHTML=this.scrubbedBody;
}
this.expanded=true;
},loadPostBody:function(){
var _4c=this.bodyUrl;
var _4d=this.bodyUrl.indexOf("byId");
if(_4d>-1&&_4d<2){
_4c=this.thread.contextURL+this.bodyUrl;
}
dojo.io.bind({url:_4c,load:function(_4e,_4f,evt){
this.parseBodyXMLResponse(_4f);
},error:function(_50,_51){
this.handleError(_50,_51);
},mimetype:"text/plain"});
},collapsePost:function(){
var _52=lconn.comm.ronin.utils.prototype.getElementById(this.thread.threadRoot,"post_summary_"+this.postId);
var _53=lconn.comm.ronin.utils.prototype.getElementById(this.thread.threadRoot,"post_body_"+this.postId);
var _54=dojo.byId("post_expand_"+this.postId);
var _55=dojo.byId("post_collapse_"+this.postId);
if(_53!=null){
_53.style.display="none";
}
if(_52!=null){
_52.style.display="";
}
if(_54!=null&&_55!=null){
_55.style.display="none";
_54.style.display="";
}
this.expanded=false;
},parseBodyXMLResponse:function(_56){
this.parseBodyXML(_56.documentElement);
var _57=document.getElementById(this.postId);
lconn.comm.ronin.utils.prototype.getElementById(_57,"post_body_text_"+this.postId).innerHTML=this.body;
lconn.comm.ronin.utils.prototype.getElementById(_57,"post_body_"+this.postId).style.display="";
},parseBodyXML:function(dom){
var _58=dom.getElementsByTagName("entry");
var _59=_58[0].getElementsByTagName("body")[0].childNodes[0].nodeValue;
this.body=_59;
},morePost:function(e){
console.log("ronin.morePost");
this.retrievePost();
lconn.comm.ronin.utils.prototype.cancelClick(e);
return false;
},retrievePost:function(e){
console.log("ronin.retrievePost");
var req=null;
if(this.thread.config.dojoCache){
req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:this.moreLink+"?authenticate=no&public=yes",error:dojo.hitch(this,this.handleError),preventCache:true,handleAs:"text"});
}else{
req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:this.moreLink+"?authenticate=no&public=yes",error:dojo.hitch(this,this.handleError),handleAs:"text"});
}
req.addCallback(this,"parseMoreResponse");
return;
},parseMoreResponse:function(_5a){
console.log("ronin.parseMoreResponse");
this.moreText=_5a;
var _5b=document.getElementById("post_body_text_"+this.postId);
if(_5b!=null){
_5b.innerHTML=this.moreText;
}
var _5c=document.getElementById("post_more_"+this.postId);
if(_5c!=null){
_5c.style.display="none";
}
var _5d=document.getElementById("post_less_"+this.postId);
if(_5d!=null){
_5d.style.display="";
}
if(this.editInProgress){
this.initEdit();
}
return;
},lessPost:function(e){
console.log("ronin.lessPost");
var _5e=document.getElementById("post_body_text_"+this.postId);
if(_5e!=null){
_5e.innerHTML=this.body;
}
var _5f=document.getElementById("post_less_"+this.postId);
if(_5f!=null){
_5f.style.display="none";
}
var _60=document.getElementById("post_more_"+this.postId);
if(_60!=null){
_60.style.display="";
}
lconn.comm.ronin.utils.prototype.cancelClick(e);
return false;
},replyPost:function(e){
console.log("ronin.replyPost");
this.insertReplyForm();
lconn.comm.ronin.utils.prototype.cancelClick(e);
return false;
},insertReplyForm:function(){
console.log("ronin.insertReplyForm");
if(this.thread.isReplyTemplateLoaded()){
var _61=document.getElementById(this.postId);
this.replyForm=this.cloneReplyTemplate();
var _62=document.createElement("ul");
var _63=document.createElement("li");
_63.appendChild(this.replyForm);
_62.appendChild(_63);
if(_61!=null){
if(_61.parentNode.childNodes.length>1){
_61.parentNode.insertBefore(_62,_61.parentNode.childNodes[1]);
this.showReply();
}else{
_61.parentNode.appendChild(_62);
this.showReply();
}
}
}else{
this.loadTemplate(this.thread.config.replyTemplate,this.insertReplyTemplate);
}
},insertReplyTemplate:function(_64){
console.log("ronin.insertReplyTemplate");
var _65=document.getElementById(this.thread.replyTemplateDivName);
if(_65==null){
_65=this.thread.addTemplateToDOM(this.thread.replyTemplateDivName);
}
_65.innerHTML=_64;
this.thread.replyTemplateLoaded=true;
this.insertReplyForm();
},cloneReplyTemplate:function(){
var _66=document.getElementById(this.thread.replyTemplateDivName);
var _67=_66.cloneNode(true);
_67.id="reply";
var _68=lconn.comm.ronin.utils.prototype.getElementById(_67,"reply_ok_btn");
if(_68!=null){
dojo.connect(_68,"onclick",this,"submitReply");
}
var _69=lconn.comm.ronin.utils.prototype.getElementById(_67,"reply_cancel_btn");
if(_69!=null){
dojo.connect(_69,"onclick",this,"cancelReply");
}
var _6a="_"+this.postId;
lconn.comm.ronin.utils.prototype.makeIdsUnique(_67,_6a);
return _67;
},showReply:function(){
this.replyForm.style.display="";
if(!this.replyRte){
var _6b=["bold","italic","underline","strikethrough","|","foreColor","hiliteColor","|","insertUnorderedList","insertOrderedList","|","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","|","createLink","insertImage","insertHorizontalRule"];
var _6c={minHeight:"100px",plugins:_6b};
this.replyRte=new dijit.Editor(_6c,dojo.byId("reply_body_text_"+this.postId));
}
var _6d=document.getElementById("reply_subject_"+this.postId);
if(_6d!=null){
_6d.focus();
}
return false;
},submitReply:function(e){
var _6e="";
var _6f=document.getElementById("reply_subject_"+this.postId);
if(_6f){
_6e=lconn.core.HTMLUtil.escapeText(_6f.value);
}
var _70="";
if(this.replyRte){
_70=this.replyRte.getValue();
}
var _71="<contributor>"+"<snx:communityUuid xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" component="+"\"http://www.ibm.com/xmlns/prod/sn/activities\">"+this.thread.config.ownersRoleId+"</snx:communityUuid>"+"<category scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" term=\"community\" />"+"<snx:role xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" component="+"\"http://www.ibm.com/xmlns/prod/sn/activities\">owner</snx:role>"+"</contributor>"+"<contributor>"+"<snx:communityUuid xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" component="+"\"http://www.ibm.com/xmlns/prod/sn/activities\">"+this.thread.config.membersRoleId+"</snx:communityUuid>"+"<category scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" term=\"community\" />"+"<snx:role xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" component="+"\"http://www.ibm.com/xmlns/prod/sn/activities\">member</snx:role>"+"</contributor>";
var _72="<thr:in-reply-to "+"ref=\"urn:lsid:ibm.com:oa:"+this.guid+"\" "+"type=\"application/atom+xml\" "+"href=\""+this.thread.contextURL+"forum/service/atom/forum/reply?activityNodeUuid="+this.guid+"\"  "+"source=\"urn:lsid:ibm.com:oa:"+this.thread.guid+"\"/>";
this.hideReply();
lconn.comm.ronin.utils.prototype.cancelClick(e);
if((_6e!=null&&_6e.length>0)||(_70!=null&&_70.length>0)){
var _73="<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:thr=\"http://purl.org/syndication/thread/1.0\"><title type=\"text\"><![CDATA["+_6e+"]]></title><content type=\"html\"><![CDATA["+_70+"]]></content>"+_71+_72+"</entry>";
var _74=this.thread.contextURL+"forum/service/atom/forum/topic/replies?authenticate=no&public=yes&activityUuid="+this.thread.guid;
console.log("ronin.submitReply: submitting reply");
var req=dojo.rawXhrPost({url:_74,postData:_73,contentType:"application/atom+xml",error:dojo.hitch(this,this.handleError),handleAs:"xml"});
req.addCallback(this,"parseReplyResponse");
}
},parseReplyResponse:function(_75){
var _76=0;
if(this.thread.layout=="INDENTED"){
this.thread.refreshThread();
}else{
this.thread.refreshThread();
}
},hideReply:function(){
if(this.replyRte){
this.replyRte.destroy();
}
this.replyRte=null;
this.replyForm.parentNode.removeChild(this.replyForm);
this.replyForm=null;
return false;
},cancelReply:function(e){
console.log("ronin.cancelReply");
this.hideReply();
lconn.comm.ronin.utils.prototype.cancelClick(e);
},editPost:function(e){
console.log("ronin.editPost");
this.initEdit();
lconn.comm.ronin.utils.prototype.cancelClick(e);
return false;
},initEdit:function(){
this.editInProgress=true;
if((this.isMoreEnabled()&&this.moreText!=null)||!this.isMoreEnabled()){
if(this.thread.isEditTemplateLoaded()){
var _77=document.getElementById(this.postId);
this.editForm=this.cloneEditTemplate();
if(_77!=null){
if(_77.parentNode.childNodes.length>1){
_77.parentNode.insertBefore(this.editForm,_77.parentNode.childNodes[1]);
this.showEdit();
}else{
_77.parentNode.appendChild(this.editForm);
this.showEdit();
}
}
}else{
this.loadTemplate(this.thread.config.editTemplate,this.insertEditTemplate);
}
}else{
this.morePost();
}
},insertEditTemplate:function(_78){
console.log("ronin.insertEditTemplate");
var _79=document.getElementById(this.thread.editTemplateDivName);
if(_79==null){
_79=this.thread.addTemplateToDOM(this.thread.editTemplateDivName);
}
_79.innerHTML=_78;
this.thread.editTemplateLoaded=true;
this.initEdit();
},cloneEditTemplate:function(){
var _7a=document.getElementById(this.thread.editTemplateDivName);
var _7b=_7a.cloneNode(true);
_7b.id="edit";
var _7c=lconn.comm.ronin.utils.prototype.getElementById(_7b,"edit_subject");
if(_7c!=null){
_7c.value=this.subject;
}
var _7d=lconn.comm.ronin.utils.prototype.getElementById(_7b,"edit_body_text");
if(_7d!=null){
if(this.isMoreEnabled()){
_7d.value=this.moreText;
}else{
_7d.value=this.body;
}
}
var _7e=lconn.comm.ronin.utils.prototype.getElementById(_7b,"edit_ok_btn");
if(_7e!=null){
dojo.connect(_7e,"onclick",this,"submitEdit");
}
var _7f=lconn.comm.ronin.utils.prototype.getElementById(_7b,"edit_cancel_btn");
if(_7f!=null){
dojo.connect(_7f,"onclick",this,"cancelEdit");
}
var _80="_"+this.postId;
lconn.comm.ronin.utils.prototype.makeIdsUnique(_7b,_80);
return _7b;
},showEdit:function(){
var _81=document.getElementById(this.postId);
if(_81){
_81.style.display="none";
}
this.editForm.style.display="";
if(!this.editRte){
var _82=["bold","italic","underline","strikethrough","|","foreColor","hiliteColor","|","insertUnorderedList","insertOrderedList","|","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","|","createLink","insertImage","insertHorizontalRule"];
var _83={minHeight:"100px",plugins:_82};
this.editRte=new dijit.Editor(_83,dojo.byId("edit_body_text_"+this.postId));
}
var _84=document.getElementById("edit_subject_"+this.postId);
if(_84!=null){
_84.focus();
}
return false;
},submitEdit:function(e){
var _85="";
var _86=document.getElementById("edit_subject_"+this.postId);
if(_86){
_85=lconn.core.HTMLUtil.escapeText(_86.value);
}
var _87="";
if(this.editRte){
_87=this.editRte.getValue();
}
var _88="<entry xmlns=\"http://www.w3.org/2005/Atom\">"+this.thread.config.customData+"<title type=\"text\"><![CDATA["+_85+"]]></title><content type=\"html\"><![CDATA["+_87+"]]></content></entry>";
var _89=this.thread.config.editURL+this.guid;
var _8a=lconn.comm.ronin.utils.prototype.rewriteURL(_89,this.thread.config.contextURL,this.thread.config.proxyPrefixURL);
console.debug("ronin.submitEdit: submitting edit");
var req=dojo.rawXhrPut({url:_8a,putData:_88,contentType:"application/atom+xml",error:dojo.hitch(this,this.handleError),handleAs:"xml"});
req.addCallback(this,"parseEditResponse");
this.hideEdit();
lconn.comm.ronin.utils.prototype.cancelClick(e);
},parseEditResponse:function(dom){
console.log("ronin.parseEditResponse");
this.thread.refreshThread();
},cancelEdit:function(e){
this.hideEdit();
lconn.comm.ronin.utils.prototype.cancelClick(e);
},hideEdit:function(){
if(this.editRte){
this.editRte.destroy();
}
this.editRte=null;
this.editForm.parentNode.removeChild(this.editForm);
this.editForm=null;
var _8b=document.getElementById(this.postId);
if(_8b){
_8b.style.display="";
}
this.editInProgress=false;
return false;
},deletePost:function(e){
console.log("ronin.deletePost");
this.initDelete();
lconn.comm.ronin.utils.prototype.cancelClick(e);
return false;
},initDelete:function(){
if((this.thread.config.context=="TOPIC")||(this.thread.config.context=="TOPIC_DISCUSSION_VIEW")){
var _8c=confirm(confirmTopicDeleteString);
if(_8c){
this.submitDelete();
}
}else{
if(this.thread.isDeleteTemplateLoaded()){
var _8d=document.getElementById(this.postId);
this.deleteForm=this.cloneDeleteTemplate();
if(_8d!=null){
if(_8d.parentNode.childNodes.length>1){
_8d.parentNode.insertBefore(this.deleteForm,_8d.parentNode.childNodes[1]);
this.showDelete();
}else{
_8d.parentNode.appendChild(this.deleteForm);
this.showDelete();
}
}
}else{
this.loadTemplate(this.thread.config.deleteTemplate,this.insertDeleteTemplate);
}
}
},insertDeleteTemplate:function(_8e){
console.log("ronin.insertDeleteTemplate");
var _8f=document.getElementById(this.thread.deleteTemplateDivName);
if(_8f==null){
_8f=this.thread.addTemplateToDOM(this.thread.deleteTemplateDivName);
}
_8f.innerHTML=_8e;
this.thread.deleteTemplateLoaded=true;
this.initDelete();
},cloneDeleteTemplate:function(){
var _90=document.getElementById(this.thread.deleteTemplateDivName);
var _91=_90.cloneNode(true);
_91.id="delete";
var _92=lconn.comm.ronin.utils.prototype.getElementById(_91,"delete_ok_btn");
if(_92!=null){
dojo.connect(_92,"onclick",this,"submitDelete");
}
var _93=lconn.comm.ronin.utils.prototype.getElementById(_91,"delete_cancel_btn");
if(_93!=null){
dojo.connect(_93,"onclick",this,"cancelDelete");
}
var _94="_"+this.postId;
lconn.comm.ronin.utils.prototype.makeIdsUnique(_91,_94);
return _91;
},showDelete:function(){
var _95=document.getElementById(this.postId);
if(_95){
_95.style.display="none";
}
this.deleteForm.style.display="";
if(!this.deleteRte){
var _96=["bold","italic","underline","strikethrough","|","foreColor","hiliteColor","|","insertUnorderedList","insertOrderedList","|","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull","|","createLink","insertImage","insertHorizontalRule"];
var _97={minHeight:"100px",plugins:_96};
this.deleteRte=new dijit.Editor(_97,dojo.byId("delete_body_text_"+this.postId));
}
if(this.deleteRte){
this.deleteRte.focus();
}
return false;
},submitDelete:function(e){
console.debug("submitDelete: submitting delete");
if((this.thread.config.context=="TOPIC")||(this.thread.config.context=="TOPIC_DISCUSSION_VIEW")){
var _98=this.thread.config.editURL+this.guid;
var _99=lconn.comm.ronin.utils.prototype.rewriteURL(_98,this.thread.config.contextURL,this.thread.config.proxyPrefixURL);
var req=dojo.xhrDelete({url:_99,error:dojo.hitch(this,this.handleError),handleAs:"text"});
req.addCallback(this,"parseDeleteResponse");
}else{
var _9a=this.DELETED_ENTRY;
var _9b="";
if(this.deleteRte){
_9b=this.deleteRte.getValue();
}
var _9c="<entry xmlns=\"http://www.w3.org/2005/Atom\">"+this.thread.config.customData+"<title type=\"text\"><![CDATA["+_9a+"]]></title><content type=\"html\"><![CDATA["+_9b+"]]></content></entry>";
var _98=this.thread.config.editURL+this.guid;
var _99=lconn.comm.ronin.utils.prototype.rewriteURL(_98,this.thread.config.contextURL,this.thread.config.proxyPrefixURL);
var req=dojo.rawXhrPut({url:_99,putData:_9c,error:dojo.hitch(this,this.handleError),contentType:"application/atom+xml",handleAs:"xml"});
req.addCallback(this,"parseDeleteResponse");
this.hideDelete();
}
lconn.comm.ronin.utils.prototype.cancelClick(e);
},parseDeleteResponse:function(_9d){
if(this.thread.config.context=="REPLIES_DISCUSSION_VIEW"){
this.setDeleted(true);
this.editEnabled=false;
var _9e=lconn.comm.ronin.utils.prototype.getElementById(this.container,"post_edit_"+this.postId);
if(_9e){
_9e.style.display="none";
}
this.deleteEnabled=false;
var _9f=lconn.comm.ronin.utils.prototype.getElementById(this.container,"post_delete_"+this.postId);
if(_9f){
_9f.style.display="none";
}
}
if(this.thread.config.context=="TOPIC_DISCUSSION_VIEW"){
var _a0=document.getElementById("forumBreadcrumbRoot");
location.href=_a0.href;
return;
}
this.thread.refreshThread();
},cancelDelete:function(e){
this.hideDelete();
lconn.comm.ronin.utils.prototype.cancelClick(e);
},hideDelete:function(){
if(this.deleteRte){
this.deleteRte.destroy();
}
this.deleteRte=null;
this.deleteForm.parentNode.removeChild(this.deleteForm);
this.deleteForm=null;
var _a1=document.getElementById(this.postId);
if(_a1){
_a1.style.display="";
}
return false;
},getContainer:function(){
return this.container;
},compareByTs:function(a,b){
return (new Date(Date.parse(a.published))).valueOf()-(new Date(Date.parse(b.published))).valueOf();
},handleError:function(_a2,_a3){
this.triggerEvent(this.ERROR_EVENT,_a2,_a3.xhr.status);
return true;
},convertDate:function(_a4){
var _a5=_a4;
var _a6;
if(_a4.indexOf("-")!=-1){
_a6=lconn.core.DateUtil.AtomDateToString(_a4);
}
if(!_a6){
_a6=lconn.core.DateUtil.toString(_a4);
}
if(_a6){
_a5=_a6;
}
return _a5;
}});
}


;if(!dojo._hasResource["lconn.comm.ronin.utils"]){
dojo._hasResource["lconn.comm.ronin.utils"]=true;
dojo.provide("lconn.comm.ronin.utils");
dojo.require("dojo.string");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.utils",null,{debug:false,version:"1.0",ATOM_NS:"http://www.w3.org/2005/Atom",rewriteURL:function(_1,_2,_3){
var _4="";
if(_3!=null&&_3.length>0){
var _5=_2+_3;
_4=_5+"?url="+encodeURIComponent(_1);
}else{
_4=_1;
}
return _4;
},generateThreadUID:function(_6){
function _7(_8){
return Math.floor(Math.random()*_8);
};
function _9(){
var _a="0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ";
return _a.substr(_7(_a.length),1);
};
var _b="";
for(var i=0;i<_6;i++){
_b+=_9();
}
return _b.toString();
},getDomainFromURL:function(_c){
var _d="";
if(_c==null||_c.length==0){
return "";
}
var i=_c.indexOf("/",7);
if(i>-1){
_d=_c.substring(7,i);
}else{
_d=_c.substring(7,_c.length);
}
return _d;
},loadScript:function(_e){
if((typeof SemTagSvc!="undefined"&&SemTagSvc!=null)&&!SemTagSvc.scripts[_e]){
SemTagSvc.scripts[_e]=true;
var _f=document.createElement("script");
_f.src=SemTagSvc.baseUrl+_e;
document.body.insertBefore(_f,document.body.firstChild);
}
},getFeedType:function(_10,_11,_12){
var _13=this;
_13.feedType=new lconn.comm.ronin.feedType("rss","1.0");
var _14=function(_15,_16,evt,_17){
var doc=dojox.data.dom.createDocument(_16);
var _18=null;
var _19=null;
var _1a=doc.getElementsByTagName("rss")[0];
if(_1a!=null){
var _1b=_1a.getAttribute("xmlns:itunes");
if(_1b!=null){
_18="podcast";
_19=_1a.getAttribute("version");
return _13.feedType=new lconn.comm.ronin.feedType(_18,_19);
}
_19=_1a.getAttribute("version");
_18="rss";
return _13.feedType=new lconn.comm.ronin.feedType(_18,_19);
}
var _1c=doc.getElementsByTagName("rdf")[0];
if(_1c!=null){
_18="rdf";
_19=_1c.getAttribute("version");
return _13.feedType=new lconn.comm.ronin.feedType(_18,_19);
}
var _1d;
if(doc.getElementsByTagNameNS){
_1d=doc.getElementsByTagNameNS(_13.ATOM_NS,"feed")[0];
if(_1d!=null){
_18="atom";
_19=_1d.getAttribute("version");
return _13.feedType=new lconn.comm.ronin.feedType(_18,_19,_13.ATOM_NS);
}
}
_1d=doc.lastChild;
if(_1d!=null&&_1d.nodeName.indexOf("feed")>=0){
_18="atom";
_19=_1d.getAttribute("version");
prefix=_1d.prefix;
return _13.feedType=new lconn.comm.ronin.feedType(_18,_19,null,prefix);
}
};
if(!_12){
var _1e=this.rewriteURL(_10,_11);
console.log("getFeedType: Issuing AJAX request "+_1e);
dojo.xhrGet({url:_1e,sync:true,load:function(_1f,_20,evt){
return _14(_1f,_20,evt,false);
},error:function(_21,_22){
this.handleError(_21,_22);
},handleAs:"text"});
}else{
_14(null,_12,null,true);
}
return _13.feedType;
},handleError:function(_23,_24){
alert("Error: "+dojo.errorToString(_24));
},trim:function(str){
str=this!=window?this:str;
return str.replace(/^\s+/,"").replace(/\s+$/,"");
},Sanitizer:{escapeAllTags:function(_25){
return _25.replace(/(<)|(>)/g,function(m){
if(m=="<"){
return "&lt;";
}else{
return "&gt;";
}
});
},_enableSimpleTags:function(_26){
var _27=/&lt;[\s\/]*(div|b|big|hr|h[1-6]{1,1}|li|ul|ol|small|br|i|em|strong|code|p|span|blockquote)[\s\/]*&gt;/ig;
var _28=_26.replace(_27,function(m){
return m.replace("&lt;","<").replace("&gt;",">");
});
return _28;
},_enableStartTag:function(_29,_2a){
var _2b=new RegExp("&lt;[\\s]*"+_2a+"[\\s]+","i");
var _2c=new RegExp("&lt;[\\s]*"+_2a+"[\\s]+(.|\\s)*","ig");
while(_2b.test(_29)){
_29=_29.replace(_2c,function(m){
return m.replace("&lt;","<").replace("&gt;",">");
});
}
return _29;
},_enableATags:function(_2d){
_2d=this._enableStartTag(_2d,"a");
_2d=_2d.replace(/&lt;[\s\/]*a[\s]*&gt;/ig,function(m){
return m.replace("&gt;",">").replace("&lt;","<");
});
return _2d;
},_enableIMGTags:function(_2e){
_2e=this._enableStartTag(_2e,"img");
return _2e;
},_cleanStartTag:function(m){
var _2f=/([\s]+(onabort|onerror|onresize|onscroll|onload|onunload|onblur|onclick|ondblclick|onselect|onchange|onsubmit|onreset|onfocus|onblur|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|class)[\s]*=[\s]*)/ig;
var _30=m.replace(_2f,function(t){
return " rm=";
});
var _31=/[\s]+href[\s]*=([^\s>]+)/ig;
var _32=_30.replace(_31,function(t){
var _33=t;
var _34=RegExp.$1;
if((_34.search("javascript:")==1)||(_34.search("vbscript:")==1)){
_33=" rm="+_34;
}
return _33;
});
var _35=/[\s]+src[\s]*=([^\s>]+)/ig;
var _36=_32.replace(_35,function(t){
var _37=t;
var _38=RegExp.$1;
if(_38.search("http://")!=1){
_37=" rm="+_38;
}
return _37;
});
return _36;
},_cleanSelectedStartTags:function(_39,_3a){
var _3b=new RegExp("<[\\s]*("+_3a+")[\\s]+[^>]+>","ig");
_39=_39.replace(_3b,this._cleanStartTag);
return _39;
},run:function(_3c){
var _3d=_3c;
_3d=this.escapeAllTags(_3d);
_3d=this._enableSimpleTags(_3d);
_3d=this._enableATags(_3d);
_3d=this._enableIMGTags(_3d);
_3d=this._cleanSelectedStartTags(_3d,"a|img");
return _3d;
}},removeEvent:function(elm,_3e,fn,_3f){
var _40;
if(elm.removeEventListener){
elm.removeEventListener(_3e,fn,_3f);
_40=true;
}else{
if(elm.detachEvent){
_40=elm.detachEvent("on"+_3e,fn);
}else{
elm["on"+_3e]=null;
_40=true;
}
}
return _40;
},findPreferredFeedFieldValue:function(_41,_42,_43,_44,_45){
var pos=_42.prefPathIndex;
var _46=this.findFeedFieldValue(_41,_42.paths[pos],_43,_44,_45);
var i=0;
while((i<_42.paths.length)&&((_46==null)||(_46.length==0))){
if(i!=pos){
_46=this.findFeedFieldValue(_41,_42.paths[i],_43,_44,_45);
if((_46!=null)||(_46.length>0)){
_42.prefPathIndex=i;
}
}
i++;
}
return (_46==null?"":_46);
},selectFromGroup:function(_47,_48,_49){
var _4a=null;
if(_47!=null){
_4a=_47[0];
if(_48=="link"){
var _4a=null;
for(var i=0;i<_47.length;i++){
if(_47[i].getAttribute("rel")==_49){
_4a=_47[i];
}else{
if((_47[i].getAttribute("rel")==null)&&(_49=="alternate")&&(_4a==null)){
_4a=_47[i];
}
}
}
}
}
return _4a;
},findFeedFieldValue:function(_4b,_4c,_4d,_4e,_4f){
var _50="";
var _51=null;
var _52=_4b;
var _53="alternate";
if(_4e){
_53=_4e;
}
var idx=_4c.lastIndexOf("@");
if(idx!=-1){
_51=_4c.substring(idx+1);
_4c=_4c.substring(0,idx);
}
var _54=_4c.split("/");
var ii=1;
if(_54[0].length==0){
ii=2;
}
for(;ii<_54.length&&_52!=null;ii++){
if(_54[ii].length>0){
var _55;
var _56=_54[ii].indexOf(":")!=-1;
if(_52.getElementsByTagNameNS==undefined||_56||_4b.namespaceURI==undefined||_4b.namespaceURI==null){
var _57=_54[ii];
if(!_56&&_4b.prefix&&_4b.prefix.length>0){
_57=_4b.prefix+":"+_57;
}
_55=_52.getElementsByTagName(_57);
}else{
_55=_52.getElementsByTagNameNS(_4b.namespaceURI,_54[ii]);
}
if(_55!=null){
_52=this.selectFromGroup(_55,_54[ii],_53);
}
}
}
if(_52!=null){
try{
if(_51!=null){
_50=_52.getAttribute(_51);
}else{
if(_52.childNodes[0]!=null){
_50=_52.childNodes[0].nodeValue;
if(_4d){
var _58=_52.getAttribute("type");
if(_4c!="item/description"&&(!_58||_58=="text")){
_50=lconn.comm.ronin.utils.prototype.Sanitizer.escapeAllTags(_50);
}
}
}
}
if(_52.tagName=="link"&&_50){
idx=_50.indexOf("http");
if(idx!=0){
if(_4f.lastIndexOf("/")!=(_4f.length-1)&&_50.indexOf("/")!=0){
_50=_4f+"/"+_50;
}else{
_50=_4f+_50;
}
}
}
}
catch(e){
}
}
return (_50==null?"":_50);
},makeIdsUnique:function(_59,_5a){
if(_59){
if(_59.id){
_59.id=_59.id+_5a;
}
var _5b=_59.getElementsByTagName("*");
for(var ii=0;ii<_5b.length;ii++){
if(_5b[ii].id){
_5b[ii].id=_5b[ii].id+_5a;
}
}
}
},getThreadElement:function(e){
var _5c=false;
var _5d=getEventElement(e);
if(_5d){
while(_5d!=document.body&&!_5c){
_5d=_5d.parentNode;
if(_5d.nodeName.toLowerCase()=="div"&&_5d.threadObj){
_5c=true;
}
}
}
return _5d;
},getPostElement:function(e){
var _5e=false;
var _5f=getEventElement(e);
if(_5f){
while(_5f!=document.body&&!_5e){
_5f=_5f.parentNode;
if(_5f.nodeName.toLowerCase()=="div"&&_5f.postObj){
_5e=true;
}
}
}
return _5f;
},getEventElement:function(e){
var _60=null;
if(window.event&&window.event.srcElement){
_60=window.event.srcElement;
}else{
if(e&&e.target){
_60=e.target;
}
}
return _60;
},getElementById:function(_61,_62){
var _63=null;
var _64=_61.getElementsByTagName("*");
for(var ii=0;ii<_64.length;ii++){
if(_64[ii].id==_62){
_63=_64[ii];
break;
}
}
return (_63);
},getElementsByClassName:function(_65,_66){
var _67=new Array();
var _68=_65.getElementsByTagName("*");
for(var ii=0;ii<_68.length;ii++){
var _69=_68[ii];
var _6a=_69.className.split(" ");
for(var jj=0;jj<_6a.length;jj++){
if(_6a[jj]==_66){
_67.push(_69);
break;
}
}
}
return _67;
},getElementsByTagNameNS:function(_6b,_6c,_6d){
var _6e;
if(_6c&&_6c.namespace&&_6b.getElementsByTagNameNS){
_6e=_6b.getElementsByTagNameNS(_6c.namespace,_6d);
}else{
var _6f=_6d;
if(_6c&&_6c.prefix&&_6c.prefix.length>0){
_6f=_6c.prefix+":"+_6d;
}
_6e=_6b.getElementsByTagName(_6f);
}
return _6e;
},cancelClick:function(e){
if(e&&e.returnValue){
e.returnValue=false;
}
if(e&&e.preventDefault){
e.preventDefault();
}
},formatDate:function(_70){
var _71="AM";
var _72=_70.getMonth()+1;
var day=_70.getDate();
var _73=_70.getFullYear();
var _74=_70.getHours();
var _75=_70.getMinutes();
if(_74>12){
_71="PM";
_74-=12;
}else{
if(_74==0){
_74=12;
}
}
if(_74<10){
_74="0"+_74;
}
if(_75<10){
_75="0"+_75;
}
return (_72+"/"+day+"/"+_73+" "+_74+":"+_75+" "+_71);
},serverSideAcf:function(_76,_77){
var _78;
var _79=function(res,_7a){
_78=res.substring(17,res.length-18);
_78=dojox.html.entities.decode(_78);
};
dojo.xhrPost({url:_77+"acffilter",putData:_76,sync:true,load:_79});
if(window.console!=null){
console.log("serverSideAcf result: "+_78);
}
return _78;
}});
}


;if(!dojo._hasResource["lconn.comm.ronin.roninService"]){
dojo._hasResource["lconn.comm.ronin.roninService"]=true;
dojo.provide("lconn.comm.ronin.roninService");
dojo.require("dojo.string");
dojo.require("dojo.date.locale");
dojo.require("dojox.date.posix");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.require("lconn.comm.ronin.utils");
function removeEvent(_1,_2,fn,_3){
var _4;
if(_1.removeEventListener){
_1.removeEventListener(_2,fn,_3);
_4=true;
}else{
if(_1.detachEvent){
_4=_1.detachEvent("on"+_2,fn);
}else{
_1["on"+_2]=null;
_4=true;
}
}
return _4;
};
function selectFromGroup(_5,_6,_7){
var _8=null;
if(_5!=null){
_8=_5[0];
if(_6=="link"){
var _8=null;
for(var i=0;i<_5.length;i++){
if(_5[i].getAttribute("rel")==_7){
_8=_5[i];
}else{
if((_5[i].getAttribute("rel")==null)&&(_7=="alternate")&&(_8==null)){
_8=_5[i];
}
}
}
}
}
return _8;
};
function makeIdsUnique(_9,_a){
if(_9){
if(_9.id){
_9.id=_9.id+_a;
}
var _b=_9.getElementsByTagName("*");
for(var ii=0;ii<_b.length;ii++){
if(_b[ii].id){
_b[ii].id=_b[ii].id+_a;
}
}
}
};
function getThreadElement(e){
var _c=false;
var _d=getEventElement(e);
if(_d){
while(_d!=document.body&&!_c){
_d=_d.parentNode;
if(_d.nodeName.toLowerCase()=="div"&&_d.threadObj){
_c=true;
}
}
}
return _d;
};
function getPostElement(e){
var _e=false;
var _f=getEventElement(e);
if(_f){
while(_f!=document.body&&!_e){
_f=_f.parentNode;
if(_f.nodeName.toLowerCase()=="div"&&_f.postObj){
_e=true;
}
}
}
return _f;
};
function getEventElement(e){
var _10=null;
if(window.event&&window.event.srcElement){
_10=window.event.srcElement;
}else{
if(e&&e.target){
_10=e.target;
}
}
return _10;
};
function getElementById(_11,_12){
var _13=null;
var _14=_11.getElementsByTagName("*");
for(var ii=0;ii<_14.length;ii++){
if(_14[ii].id==_12){
_13=_14[ii];
break;
}
}
return (_13);
};
function getElementsByClassName(_15,_16){
var _17=new Array();
var _18=_15.getElementsByTagName("*");
for(var ii=0;ii<_18.length;ii++){
var _19=_18[ii];
var _1a=_19.className.split(" ");
for(var jj=0;jj<_1a.length;jj++){
if(_1a[jj]==_16){
_17.push(_19);
break;
}
}
}
return _17;
};
function getElementsByTagNameNS(_1b,ns,_1c,_1d){
var _1e;
if(_1b.getElementsByTagNameNS){
_1e=_1b.getElementsByTagNameNS(ns,_1d);
}else{
_1e=_1b.getElementsByTagName(_1c+":"+_1d);
}
return _1e;
};
function cancelClick(e){
if(e&&e.returnValue){
e.returnValue=false;
}
if(e&&e.preventDefault){
e.preventDefault();
}
};
function formatDate(_1f){
var _20="AM";
var _21=_1f.getMonth()+1;
var day=_1f.getDate();
var _22=_1f.getFullYear();
var _23=_1f.getHours();
var _24=_1f.getMinutes();
if(_23>12){
_20="PM";
_23-=12;
}else{
if(_23==0){
_23=12;
}
}
if(_23<10){
_23="0"+_23;
}
if(_24<10){
_24="0"+_24;
}
return (_21+"/"+day+"/"+_22+" "+_23+":"+_24+" "+_20);
};
}


;if(!dojo._hasResource["lconn.comm.ronin.thread"]){
dojo._hasResource["lconn.comm.ronin.thread"]=true;
dojo.provide("lconn.comm.ronin.thread");
dojo.require("dojo.string");
dojo.require("dojo.date.locale");
dojo.require("dojox.date.posix");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");
dojo.require("dojox.data.dom");
dojo.declare("lconn.comm.ronin.thread",null,{IMAGES_DIR:"images/",TEMPLATE_DIR:"templates/",EXPANDED:1,COLLAPSED:2,EXPAND_LIMIT:10,POST_TEMPLATE_DIV:"post_template_div",POST_TEMPLATE_NAME:"PostTemplate.jsp",REPLY_TEMPLATE_DIV:"reply_template_div",REPLY_TEMPLATE_NAME:"ReplyTemplate.jsp",EDIT_TEMPLATE_DIV:"edit_template_div",EDIT_TEMPLATE_NAME:"EditTemplate.jsp",DELETE_TEMPLATE_DIV:"delete_template_div",DELETE_TEMPLATE_NAME:"DeleteTemplate.jsp",LOAD_THREAD_EVENT:"loadthread",LOAD_POST_EVENT:"loadpost",DISPLAY_THREAD_EVENT:"viewthread",ADD_POST_EVENT:"addpost",DELETE_POST_EVENT:"deletepost",ERROR_EVENT:"error",DEFAULT_LAYOUT:"FLAT",DEFAULT_ROOT:"item",FIELD_MAPPING:1,ATTRIBUTE_MAPPING:2,PROPERTY_MAPPING:3,DELETED_ENTRY:"[[D]]",PAGE_SIZE:5,config:null,portletNS:null,contextURL:null,targetURL:null,fullURL:null,authorVisible:null,dateVisible:null,interval:null,containerId:null,layout:null,postTemplateMap:null,pageSize:null,id:null,postTemplateDivName:null,editTemplateDivName:null,replyTemplateDivName:null,deleteTemplateDivName:null,threadState:null,threadRoot:null,threadXml:null,postArray:null,nextUniquePostId:null,postIdLookup:null,currentPage:null,lastPage:null,fieldRoot:null,fieldMapping:null,docOwner:null,dataLoaded:null,postTemplateLoaded:null,replyTemplateLoaded:null,editTemplateLoaded:null,deleteTemplateLoaded:null,events:null,container:null,constructor:function(_1){
_1.contextURL=_1.contextURL?_1.contextURL:"";
_1.portletNS=_1.portletNS?_1.portletNS:"";
_1.staticReplyForm=_1.staticReplyForm?_1.staticReplyForm:false;
_1.layout=_1.layout?_1.layout:this.DEFAULT_LAYOUT;
_1.postTemplate=_1.postTemplate?_1.postTemplate:this.POST_TEMPLATE_NAME;
_1.replyTemplate=_1.replyTemplate?_1.replyTemplate:this.REPLY_TEMPLATE_NAME;
_1.editTemplate=_1.editTemplate?_1.editTemplate:this.EDIT_TEMPLATE_NAME;
_1.deleteTemplate=_1.deleteTemplate?_1.deleteTemplate:this.DELETE_TEMPLATE_NAME;
_1.authorVisible=_1.authorVisible?_1.authorVisible:true;
_1.dateVisible=_1.dateVisible?_1.dateVisible:true;
_1.enableAcf=_1.enableAcf?_1.enableAcf:false;
_1.pageSize=_1.pageSize?_1.pageSize:this.PAGE_SIZE;
_1.loggedIn=_1.loggedIn?_1.loggedIn:false;
_1.context=_1.context?_1.context:"TOPIC";
_1.customData=_1.customData?_1.customData:"";
_1.dojoCache=_1.dojoCache?_1.dojoCache:false;
this.config=_1;
this.portletNS=_1.portletNS;
this.contextURL=_1.contextURL;
this.targetURL=_1.targetURL;
this.fullURL=this.targetURL;
this.baseURL=this.extractBaseURL(this.targetURL);
this.authorVisible=_1.authorVisible;
this.dateVisible=_1.dateVisible;
this.interval=_1.interval;
this.containerId=_1.portletNS+_1.containerId;
this.layout=_1.layout;
this.postTemplateMap=_1.postTemplateMap;
this.pageSize=_1.pageSize;
this.id=lconn.comm.ronin.utils.prototype.generateThreadUID(25);
this.guid=null;
this.postTemplateDivName=this.POST_TEMPLATE_DIV+"_"+encodeURIComponent(this.config.postTemplate);
this.editTemplateDivName=this.EDIT_TEMPLATE_DIV+"_"+encodeURIComponent(this.config.editTemplate);
this.replyTemplateDivName=this.REPLY_TEMPLATE_DIV+"_"+encodeURIComponent(this.config.replyTemplate);
this.deleteTemplateDivName=this.DELETE_TEMPLATE_DIV+"_"+encodeURIComponent(this.config.deleteTemplate);
this.threadState=this.COLLAPSED;
this.threadRoot=null;
this.threadXml=null,this.postArray=new Array();
this.nextUniquePostId=-1;
this.postIdLookup=new Array();
this.currentPage=0;
this.lastPage=0;
this.fieldRoot=this.DEFAULT_ROOT;
this.fieldMapping=null;
this.docOwner=null;
this.dataLoaded=false;
this.postTemplateLoaded=false;
this.replyTemplateLoaded=false;
this.editTemplateLoaded=false;
this.deleteTemplateLoaded=false;
this.events=new Array();
this.addEvent(this.LOAD_THREAD_EVENT);
this.addEvent(this.LOAD_POST_EVENT);
this.addEvent(this.DISPLAY_THREAD_EVENT);
this.addEvent(this.ADD_POST_EVENT);
this.addEvent(this.ERROR_EVENT);
this.container=document.getElementById(this.containerId);
if(this.container){
this.container.threadObj=this;
}
if(this.config.staticReplyForm){
this.loadTemplate(this.config.replyTemplate,this.insertReplyTemplate);
}
},addEvent:function(_2){
this.events[_2.toLowerCase()]=new Array();
},addListener:function(_3,_4){
var _5=_3.toLowerCase();
var _6=this.events[_5];
if(_6!=null){
_6.push(_4);
}
},removeListener:function(_7,_8){
var _9=_7.toLowerCase();
var _a=this.events[_9];
if(_a!=null){
for(var ii=0;ii<_a.length;ii++){
var _b=_a[ii];
if(_b==_8){
_a.splice(ii,1);
}
}
}
},triggerEvent:function(_c,_d,_e){
var _f=_c.toLowerCase();
var _10=this.events[_f];
if(_10!=null){
for(var ii=0;ii<_10.length;ii++){
var _11=_10[ii];
_11(_f,_d,_e);
}
}
},extractBaseURL:function(_12){
var _13=_12;
idx=_12.indexOf("://");
if(idx>-1){
idx=_12.indexOf("/",idx+3);
if(idx>-1){
_13=_12.substring(0,idx);
}
}
return _13;
},clearThread:function(){
this.container.innerHTML="";
},refreshThread:function(){
console.log("ronin.refreshThread");
this.initThread();
this.loadThread();
},initThread:function(){
console.log("ronin.initThread");
this.threadState=this.COLLAPSED;
this.threadRoot=null;
this.threadXml=null;
this.container.innerHTML="";
this.postArray=new Array();
this.nextUniquePostId=-1;
this.postIdLookup=new Array();
this.currentPage=0;
this.lastPage=0;
this.docOwner=null;
this.guid=null;
this.dataLoaded=false;
},loadThread:function(){
console.log("ronin.loadThread: requesting feed");
if(!this.isDataLoaded()){
var req="";
if(this.config.dojoCache){
req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:this.fullURL,preventCache:true,error:dojo.hitch(this,this.handleError),handleAs:"text"});
}else{
req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:this.fullURL,error:dojo.hitch(this,this.handleError),handleAs:"text"});
}
req.addCallback(this,"parseThreadXMLResponse");
}
},getFullURL:function(){
return this.fullURL;
},parseThreadXMLResponse:function(_14){
if(this.threadXml==null){
this.threadXml=_14;
}
if(!this.isPostTemplateLoaded()){
var _15=lconn.comm.ronin.utils.prototype.getFeedType("","",this.threadXml);
this.feedType=_15;
if(this.config.postTemplateMap){
this.postTemplateDivName=this.POST_TEMPLATE_DIV+"_"+encodeURIComponent(this.postTemplateMap[_15.type]);
this.loadTemplate(this.postTemplateMap[_15.type],this.insertPostTemplate);
}else{
this.loadTemplate(this.config.postTemplate,this.insertPostTemplate);
}
}else{
console.log("ronin.parseThreadXMLResponse: parsing feed");
this.parseThreadXML(this.threadXml);
if(this.layout=="INDENTED"){
for(var ii=0;ii<this.postArray.length;ii++){
var _16=this.postArray[ii];
var _17=this.postIdLookup[_16.parentId];
if(_17){
_16.parentId=_17;
}else{
_16.parentId=null;
}
}
}
this.dataLoaded=true;
nextUniquePostId=this.postArray.length;
this.displayThread();
}
},parseThreadXML:function(dom){
dom=dojox.data.dom.createDocument(dom);
var _18;
this.docOwner=lconn.comm.ronin.utils.prototype.findFeedFieldValue(dom,"feed/author/name",this.config.enableAcf);
this.guid=lconn.comm.ronin.utils.prototype.findFeedFieldValue(dom,"feed/snx:activity",this.config.enableAcf);
if(this.guid.length==0){
this.guid=lconn.comm.ronin.utils.prototype.findFeedFieldValue(dom,"feed/activity",this.config.enableAcf);
}
var _19="";
try{
var _1a=dom.getElementsByTagName("feed");
if(_1a!=null){
_19=_1a[0].getAttribute("xml:base");
}
}
catch(e){
}
if(_19!=null&&_19.length>0){
this.baseURL=_19;
console.log("ronin.parseThreadXML: baseUrl set to: "+_19);
}
var _1b=lconn.comm.ronin.utils.prototype.getElementsByTagNameNS(dom,this.feedType,this.fieldRoot);
for(var ii=0;ii<_1b.length;ii++){
_18=this.uniqueId();
this.postArray[_18]=new lconn.comm.ronin.post(this,this.docOwner,_18,_1b[ii]);
}
this.initPaging();
},setPageSize:function(_1c){
this.pageSize=_1c;
this.currentPage=0;
this.initPaging();
this.displayThread();
},getPageSize:function(){
return this.pageSize;
},initPaging:function(){
this.lastPage=Math.ceil(this.postArray.length/this.pageSize)-1;
},hasPreviousPage:function(){
return (this.currentPage>0);
},pageBackward:function(){
if(this.hasPreviousPage()){
this.currentPage--;
this.displayThread();
}
},hasNextPage:function(){
return (this.currentPage<this.lastPage);
},pageForward:function(){
if(this.hasNextPage()){
this.currentPage++;
this.displayThread();
}
},displayThread:function(){
if(this.isDataLoaded()){
console.log("ronin.displayThread: adding feed to the DOM");
var _1d=document.createElement("ul");
this.threadRoot=_1d;
if(this.postArray.length>this.EXPAND_LIMIT){
this.threadState=this.COLLAPSED;
}
var _1e=this.currentPage*this.pageSize;
var _1f=_1e+(this.pageSize-1);
if(_1f>(this.postArray.length-1)){
_1f=this.postArray.length-1;
}
for(var ii=_1e;ii<=_1f;ii++){
var _20=this.postArray[ii];
_20.insertPost(this.threadRoot);
if(this.threadState==this.EXPANDED){
_20.expandPost();
}
}
this.triggerEvent(this.LOAD_THREAD_EVENT,this,this.threadRoot);
this.clearThread();
this.container.appendChild(this.threadRoot);
this.triggerEvent(this.DISPLAY_THREAD_EVENT,this,this.threadRoot);
}
},loadTemplate:function(_21,_22){
var _23=_21;
var req=new lconn.comm.ronin.AjaxRequestsHandler().xhrGet({url:_23,error:dojo.hitch(this,this.handleError),handleAs:"text"});
req.addCallback(this,_22);
},addTemplateToDOM:function(_24){
var _25=document.getElementById(this.containerId);
var _26=document.createElement("div");
_26.id=_24;
_26.style.display="none";
_25.parentNode.appendChild(_26);
return _26;
},insertPostTemplate:function(_27){
console.log("ronin.insertPostTemplate: adding template to the DOM");
var _28=document.getElementById(this.postTemplateDivName);
if(_28==null){
_28=this.addTemplateToDOM(this.postTemplateDivName);
}
_28.innerHTML=_27;
this.postTemplateLoaded=true;
this.fieldMapping=this.findFieldMapping(_28);
this.fieldRoot=this.findRootMapping(this.fieldMapping);
this.parseThreadXMLResponse(_27);
},insertReplyTemplate:function(_29){
var _2a=document.getElementById(this.replyTemplateDivName);
if(_2a==null){
_2a=this.addTemplateToDOM(this.replyTemplateDivName);
}
_2a.innerHTML=_29;
this.replyTemplateLoaded=true;
var _2b=document.getElementById("reply_template_ok_btn");
if(_2b){
dojo.event.connect(_2b,"onclick",this,"submitReply");
}
},submitReply:function(e){
var _2c=null;
var _2d=null;
_2c=document.getElementById("reply_template_text");
if(_2c!=null){
_2d=_2c.value;
if(_2d!=null&&_2d.length>0){
_2d=lconn.core.HTMLUtil.escapeText(_2d);
}
}
if(_2d!=null&&_2d.length>0){
var req=new lconn.comm.ronin.AjaxRequestsHandler().xhrPut({url:this.targetURL,error:dojo.hitch(this,this.handleError),handleAs:"text"});
req.addCallback(this,"parseReplyResponse");
}
this.clearReply();
cancelClick(e);
},parseReplyResponse:function(_2e){
var _2f=_2e.documentElement;
postNum=this.uniqueId();
var _30=new lconn.comm.ronin.post(this,this.docOwner,postNum,_2f);
this.postArray[postNum]=_30;
this.initPaging();
_30.insertPost(this.threadRoot);
if(this.threadState==this.EXPANDED){
_30.expandPost();
}
},clearReply:function(e){
if(this.config.staticReplyForm){
var _31=document.getElementById("reply_template_subject");
if(_31!=null){
_31.value="";
}
document.getElementById("reply_template_text").value="";
}
},findFieldMapping:function(_32){
var _33=null;
var _34=new Array();
var _35=_32.getElementsByTagName("*");
var jj=0;
for(var ii=0;ii<_35.length;ii++){
var _36=_35[ii];
_33=_36.getAttribute("bindField");
if(_33!=null){
templateId=_36.getAttribute("id");
if(templateId!=null){
_34[jj]=new lconn.comm.ronin.feedMapping(this.FIELD_MAPPING,templateId,_33,"");
jj++;
}
}
_33=_36.getAttribute("bindAttribute");
if(_33!=null){
templateId=_36.getAttribute("id");
var idx=_33.indexOf("|");
if(templateId!=null&&idx!=-1){
var _37=_33.substring(0,idx);
_33=_33.substring(idx+1);
_34[jj]=new lconn.comm.ronin.feedMapping(this.ATTRIBUTE_MAPPING,templateId,_33,_37);
jj++;
}
}
_33=_36.getAttribute("bindProperty");
if(_33!=null){
_33=_33.toLowerCase();
templateId=_36.getAttribute("id");
if(templateId!=null){
_34[jj]=new lconn.comm.ronin.feedMapping(this.PROPERTY_MAPPING,templateId,_33,"");
jj++;
}
}
}
return _34;
},findRootMapping:function(_38){
var _39=this.DEFAULT_ROOT;
if(_38!=null&&_38.length>0){
var _3a=_38[0];
var _3b=_3a.paths[_3a.prefPathIndex].split("/");
_39=_3b[0];
if(_3b[0].length==0){
_39=_3b[1];
}
}
return _39;
},getContainer:function(){
return this.container;
},getPostArray:function(){
return this.postArray;
},getPostCount:function(){
retval=0;
if(this.postArray!=null){
retval=this.postArray.length;
}
return retval;
},getThreadState:function(){
return this.threadState;
},getPost:function(_3c){
var _3d=null;
if(_3c>=0&&_3c<this.postArray.length){
_3d=this.postArray[_3c];
}
return _3d;
},isDataLoaded:function(){
return this.dataLoaded;
},isPostTemplateLoaded:function(){
return this.postTemplateLoaded;
},isReplyTemplateLoaded:function(){
return this.replyTemplateLoaded;
},isEditTemplateLoaded:function(){
return this.editTemplateLoaded;
},isDeleteTemplateLoaded:function(){
return this.deleteTemplateLoaded;
},setPost:function(_3e,_3f){
if(_3e>=0&&_3e<this.postArray.length){
this.postArray[_3e]=_3f;
}
},expandAllPosts:function(){
for(var ii=0;ii<this.postArray.length;ii++){
var _40=this.postArray[ii];
_40.expandPost();
}
this.threadState=this.EXPANDED;
},collapseAllPosts:function(){
for(var ii=0;ii<this.postArray.length;ii++){
var _41=this.postArray[ii];
_41.collapsePost();
}
this.threadState=this.COLLAPSED;
},uniqueId:function(){
this.nextUniquePostId++;
return this.nextUniquePostId;
},handleError:function(_42,_43){
var _44=dojo.i18n.getLocalization("lconn.comm","strings");
var _45=dojo.string.substitute(_44["rs_unable_to_load"],[_43.url,""+_43.xhr.status]);
if(_43.xhr.response!=null&&_43.xhr.response.length>0){
_45+="<br/>"+_43.xhr.response;
}
this.triggerEvent(this.ERROR_EVENT,_45,_43.xhr.status);
return true;
},handleParseError:function(){
this.triggerEvent(this.ERROR_EVENT,null,404);
return true;
}});
}


;dojo.cache("lconn.comm", "communityMembers/communityMembers.xsl", "<?xml version=\"1.0\"?><xsl:stylesheet version=\"1.0\" xmlns:html=\"http://www.w3.org/1999/xhtml\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:opensearch=\"http://a9.com/-/spec/opensearch/1.1/\" exclude-result-prefixes=\"snx xsl html atom opensearch\"> <xsl:output method=\"html\" omit-xml-declaration=\"yes\" indent=\"no\" /> <xsl:param name=\"photoUrl\" /> <xsl:param name=\"fullMembersMode\" /> <xsl:param name=\"exportWarning\" /> <xsl:param name=\"selectedTab\" /> <xsl:param name=\"loggedInUserid\" /> <xsl:param name=\"canAddOthers\" /> <xsl:param name=\"canAddGroups\" /> <xsl:param name=\"groupSupportEnabled\" /> <xsl:param name=\"canRemoveOthers\" /> <xsl:param name=\"canViewInvites\" /> <xsl:param name=\"canInvite\" /> <xsl:param name=\"canRevokeInvites\" /> <xsl:param name=\"enableBizCard\" /> <xsl:param name=\"upArrow\" /> <xsl:param name=\"downArrow\" /> <xsl:param name=\"blankImage\" /> <xsl:param name=\"widgetObj\" /> <xsl:param name=\"widgetId\" /> <xsl:param name=\"communityType\" /> <xsl:param name=\"isInternalOnly\" /> <xsl:param name=\"sortButtonID\" /> <xsl:param name=\"sortDirection\" /> <xsl:param name=\"inviteSortButtonID\" /> <xsl:param name=\"inviteSortDirection\" /> <xsl:param name=\"exposeEmail\" /> <xsl:param name=\"forceImportAvailable\" /> <xsl:param name=\"exposePublicCommunities\" /> <xsl:param name=\"bidi\" /> <xsl:param name=\"atomFeedUrl\" /> <xsl:param name=\"filterString\" /> <xsl:param name=\"filterRole\" /> <xsl:param name=\"showFilterString\" /> <xsl:param name=\"updateMemberList\" /> <xsl:param name=\"doNotShowOrgItems\" /> <xsl:param name=\"communityOrgId\" /> <xsl:param name=\"isSubcommunity\" /> <xsl:param name=\"isLoggedInUserBizOwner\" /> <xsl:param name=\"applicationContext\" /> <xsl:param name=\"rs_member_pagepos\" /> <xsl:param name=\"rs_member_jumptopage\" /> <xsl:param name=\"rs_member_jumptopageof\" /> <xsl:param name=\"rs_member_person_count_singular\" /> <xsl:param name=\"rs_member_person_count_plural\" /> <xsl:param name=\"rs_group_count_singular\" /> <xsl:param name=\"rs_group_count_plural\" /> <xsl:param name=\"rs_members_typeahead\" /> <xsl:param name=\"rs_member_allmembers\" /> <xsl:param name=\"rs_member_viewall\" /> <xsl:param name=\"rs_member_viewall_nocnt\"/> <xsl:param name=\"rs_member_paging_show\" /> <xsl:param name=\"rs_member_paging_all\" /> <xsl:param name=\"rs_member_paging_previous\" /> <xsl:param name=\"rs_member_paging_next\" /> <xsl:param name=\"rs_member_paging_page\" /> <xsl:param name=\"rs_member_edit\" /> <xsl:param name=\"rs_member_remove\" /> <xsl:param name=\"rs_member_remove_confirm\" /> <xsl:param name=\"rs_member_role\" /> <xsl:param name=\"rs_member_role_business_owner\" /> <xsl:param name=\"rs_member_role_owner\" /> <xsl:param name=\"rs_member_role_member\" /> <xsl:param name=\"rs_member_email\" /> <xsl:param name=\"rs_member_email_allowed\" /> <xsl:param name=\"rs_member_email_none\" /> <xsl:param name=\"rs_member_save\" /> <xsl:param name=\"rs_member_cancel\" /> <xsl:param name=\"rs_member_create_invite\" /> <xsl:param name=\"rs_member_members\" /> <xsl:param name=\"rs_member_members_tip\" /> <xsl:param name=\"rs_member_owners\" /> <xsl:param name=\"rs_member_add_to_community\" /> <xsl:param name=\"rs_member_add_members_btn\" /> <xsl:param name=\"rs_member_add_members\" /> <xsl:param name=\"rs_member_invite_to_community\" /> <xsl:param name=\"rs_member_invite_members_btn\" /> <xsl:param name=\"rs_member_invite_members\" /> <xsl:param name=\"rs_member_members_colon\" /> <xsl:param name=\"rs_member_sortby_colon\" /> <xsl:param name=\"rs_member_sortby_newest\" /> <xsl:param name=\"rs_member_sortby_owners\" /> <xsl:param name=\"rs_member_sortby_all\" /> <xsl:param name=\"rs_member_sortby_name\" /> <xsl:param name=\"rs_member_sortby_date\" /> <xsl:param name=\"rs_member_sortby_ascending\" /> <xsl:param name=\"rs_member_sortby_descending\" /> <xsl:param name=\"rs_member_filterby\" /> <xsl:param name=\"rs_member_filterDescription\" /> <xsl:param name=\"rs_member_filterby_all\" /> <xsl:param name=\"rs_member_filterby_owners\" /> <xsl:param name=\"rs_member_filterby_members\" /> <xsl:param name=\"rs_member_filterby_external\" /> <xsl:param name=\"rs_member_filterby_internal\" /> <xsl:param name=\"rs_member_export_members\" /> <xsl:param name=\"rs_member_export\" /> <xsl:param name=\"rs_member_export_colon\" /> <xsl:param name=\"rs_member_import_members\" /> <xsl:param name=\"rs_member_import\" /> <xsl:param name=\"rs_member_import_action\" /> <xsl:param name=\"rs_member_import_action_add\" /> <xsl:param name=\"rs_member_import_action_invite\" /> <xsl:param name=\"rs_member_import_select_role\" /> <xsl:param name=\"rs_member_import_people_to_import\" /> <xsl:param name=\"rs_member_import_enter_email\" /> <xsl:param name=\"rs_member_import_select_file\" /> <xsl:param name=\"rs_member_browse_file\" /> <xsl:param name=\"rs_member_generic_error\" /> <xsl:param name=\"rs_popup_subscribe_to_feed\" /> <xsl:param name=\"rs_member_subscribe_feed_members\" /> <xsl:param name=\"rs_member_network_tab\" /> <xsl:param name=\"rs_invite_tab\" /> <xsl:param name=\"rs_invite_resend\" /> <xsl:param name=\"rs_invite_revoke\" /> <xsl:param name=\"rs_invite_sortby_name\" /> <xsl:param name=\"rs_invite_sortby_date\" /> <xsl:param name=\"rs_invite_invited\" /> <xsl:param name=\"rs_invite_subscribe_feed\" /> <xsl:param name=\"rs_memberprofile_active\" /> <xsl:param name=\"rs_memberprofile_inactive\" /> <xsl:param name=\"rs_invite_no_invites\" /> <xsl:param name=\"rs_member_find_a_member\" /> <xsl:param name=\"rs_member_find_a_member_desc\" /> <xsl:param name=\"rs_member_sub_notice\" /> <xsl:param name=\"rs_member_sub_addall\" /> <xsl:param name=\"rs_member_sub_inviteall\" /> <xsl:param name=\"rs_member_people\" /> <xsl:param name=\"rs_member_groups\" /> <xsl:param name=\"rs_member_as\" /> <xsl:param name=\"rs_member_member_role\" /> <xsl:param name=\"rs_member_member_type\" /> <xsl:param name=\"rs_member_export_warn_missing_email\" /> <xsl:param name=\"rs_member_export_warn_missing_emails\" /> <xsl:param name=\"rs_member_external_label\" /> <xsl:param name=\"rs_moderated_community\" /> <xsl:param name=\"rs_private_community\" /> <xsl:param name=\"rs_internal_only\" /> <xsl:param name=\"rs_external_members_allowed\" /> <xsl:param name=\"rs_member_transfer\" /> <xsl:param name=\"rs_profile_photo\" /> <xsl:param name=\"rs_external_indicator\" /> <xsl:param name=\"rs_export_warning_icon\" /> <xsl:param name=\"rs_add_members_fieldset\"/> <xsl:param name=\"rs_invite_members_fieldset\"/> <xsl:param name=\"rs_import_members_fieldset\"/> <xsl:param name=\"rs_export_members_fieldset\"/> <xsl:template name=\"exportWarning\"> <xsl:variable name=\"totalMissing\" select=\"/missingEmail/count/text()\" /> <xsl:if test=\"$totalMissing &gt; 0\"> <xsl:variable name=\"displayNames\" select=\"/missingEmail/displayNames/text()\" /> <xsl:variable name=\"translatedWarnMessage\"> <xsl:choose> <xsl:when test=\"$totalMissing = 1\"> <xsl:call-template name=\"replacePlaceHolders2\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_export_warn_missing_email\" /> <xsl:with-param name=\"params\" select=\"$displayNames\"/> <xsl:with-param name=\"paramSeparator\" select=\"';'\"/> <xsl:with-param name=\"prefix\" select=\"''\"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"replacePlaceHolders2\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_export_warn_missing_emails\" /> <xsl:with-param name=\"params\" select=\"concat($totalMissing,';',$displayNames)\"/> <xsl:with-param name=\"paramSeparator\" select=\"';'\"/> <xsl:with-param name=\"prefix\" select=\"''\"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <div class=\"lotusMessage lotusWarning\" > <img class=\"iconsMessages16 iconsMessages16-msgWarning16\" src=\"{$blankImage}\"> <xsl:attribute name=\"title\"><xsl:value-of select=\"$translatedWarnMessage\"/></xsl:attribute> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_export_warning_icon\"/></xsl:attribute> </img> <span><xsl:value-of select=\"$translatedWarnMessage\"/></span> </div> </xsl:if> </xsl:template> <xsl:template match=\"/\"> <xsl:choose> <xsl:when test=\"$exportWarning = 'true'\" > <xsl:call-template name=\"exportWarning\"/> </xsl:when> <xsl:when test=\"$updateMemberList = 'true'\" > <xsl:call-template name=\"membersList\"/> </xsl:when> <xsl:when test=\"$fullMembersMode = 'true'\" > <table class=\"lotusLayout lotusHeader\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%; margin-bottom: 10px;\" role=\"presentation\"> <tr> <td> <h1 style=\"display:inline;\"><xsl:value-of select=\"$rs_member_members\"/></h1> <xsl:choose> <xsl:when test=\"$communityType='private'\"> <span class=\"cnxnsType lotusMeta\"> <img class=\"iconsStates16 iconsStates16-CheckedOut\" src=\"{$blankImage}\" alt=\"{$rs_private_community}\" title=\"{$rs_private_community}\" /> <xsl:value-of select=\"$rs_private_community\" /> </span> </xsl:when> <xsl:when test=\"$communityType='publicInviteOnly'\"> <span class=\"cnxnsType lotusMeta\"> <img class=\"iconsOther16 iconsOther16-ModeratedCommunity16\" src=\"{$blankImage}\" alt=\"{$rs_moderated_community}\" title=\"{$rs_moderated_community}\" /> <xsl:value-of select=\"$rs_moderated_community\" /> </span> </xsl:when> </xsl:choose> <xsl:if test=\"not($doNotShowOrgItems='true')\"> <span class=\"cnxnsType\"> <xsl:choose> <xsl:when test=\"$isInternalOnly='true'\"> - <xsl:value-of select=\"$rs_internal_only\" /> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"style\"> margin-left: 10px; margin-right: 10px;</xsl:attribute> <span class=\"llcom-icon2 llcom-icon2-external\" /> - <xsl:value-of select=\"$rs_external_members_allowed\" /> </xsl:otherwise> </xsl:choose> </span> </xsl:if> </td> </tr> <tr> <td> <div class=\"lotusTabContainer\"> <ul id=\"membersPageTabContainer\" class=\"lotusTabs\" role=\"tablist\"> <li id=\"networkTab\" role=\"presentation\"> <xsl:if test=\"$selectedTab='network'\"> <xsl:attribute name=\"class\">lotusSelected</xsl:attribute> </xsl:if> <a onclick=\"{$widgetObj}.showNetwork()\" href=\"javascript:void(0);\" role=\"tab\" tabindex=\"-1\" aria-selected=\"false\" aria-controls=\"MembersPanel\"> <xsl:if test=\"$selectedTab='network'\"> <xsl:attribute name=\"tabindex\">0</xsl:attribute> <xsl:attribute name=\"aria-selected\">true</xsl:attribute> </xsl:if> <xsl:value-of select=\"$rs_member_network_tab\" /> </a> </li> <xsl:if test=\"$canViewInvites\"> <li id=\"invitesTab\" role=\"presentation\"> <xsl:if test=\"$selectedTab='invites'\"> <xsl:attribute name=\"class\">lotusSelected</xsl:attribute> </xsl:if> <a onclick=\"{$widgetObj}.showPendingInvites()\" href=\"javascript:void(0);\" role=\"tab\" tabindex=\"-1\" aria-selected=\"false\" aria-controls=\"InvitesPanel\"> <xsl:if test=\"$selectedTab='invites'\"> <xsl:attribute name=\"tabindex\">0</xsl:attribute> <xsl:attribute name=\"aria-selected\">true</xsl:attribute> </xsl:if> <xsl:value-of select=\"$rs_invite_tab\" /> </a> </li> </xsl:if> </ul> </div> </td> </tr> </table> <xsl:if test=\"$selectedTab='network'\"> <div id=\"MembersPanel\" role=\"tabpanel\"> <table class=\"lotusLayout lotusHeader\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%; margin-bottom: 10px;\" role=\"presentation\"> <tr> <td> <div id=\"memberAddButton\" class=\"lotusBtnContainer\"> <xsl:if test=\"$canAddOthers = 'true'\"> <span class=\"lotusBtn lotusBtnAction lotusLeft\"> <a id=\"memberAddButtonLink\" role=\"button\" titlekey=\"link.add.members2\" onclick=\"{$widgetObj}.displayMemberCreateForm(); return false;\" href=\"javascript:void(0);\"> <xsl:value-of select=\"$rs_member_add_members_btn\"/> </a> </span> </xsl:if> <xsl:if test=\"$canInvite='true'\"> <span class=\"lotusBtn lotusBtnAction lotusLeft\"> <a id=\"memberInviteButtonLink\" role=\"button\" titlekey=\"link.invite.members2\" onclick=\"{$widgetObj}.displayMemberInviteForm(); return false;\" href=\"javascript:void(0);\"> <xsl:value-of select=\"$rs_member_invite_members_btn\"/> </a> </span> </xsl:if> <xsl:if test=\"$forceImportAvailable='true' or $exposeEmail='true'\"> <xsl:if test=\"$canAddOthers = 'true' or $canInvite = 'true'\"> <span class=\"lotusBtn lotusBtnAction lotusLeft\"> <a role=\"button\" titlekey=\"link.add.members2\" onclick=\"{$widgetObj}.displayImport(); return false;\" href=\"javascript:void(0);\"> <xsl:value-of select=\"$rs_member_import_members\"/> </a> </span> </xsl:if> </xsl:if> <xsl:if test=\"$exposeEmail='true'\"> <span class=\"lotusBtn lotusBtnAction lotusLeft\"> <a role=\"button\" titlekey=\"link.add.members2\" onclick=\"{$widgetObj}.displayExport(); return false;\" href=\"javascript:void(0);\"> <xsl:value-of select=\"$rs_member_export_members\"/> </a> </span> </xsl:if> </div> </td> <td style=\"text-align:right;\"> <div class=\"lotusBtnContainer\"> <xsl:if test=\"$showFilterString!='true'\"> <a id=\"findAMember\" class=\"lotusAction\" onclick=\"{$widgetObj}.showFilterString(); return false;\" href=\"javascript:void(0);\"> <xsl:value-of select=\"$rs_member_find_a_member\"/> </a> </xsl:if> <input id=\"filterString\" onkeyup=\"{$widgetObj}.filterStringChanged(this.value);\" value=\"{$filterString}\" aria-describedby=\"findAMemberDescription\"> <xsl:if test=\"$showFilterString!='true'\"> <xsl:attribute name=\"style\">display: none;</xsl:attribute> </xsl:if> </input> <span id=\"findAMemberDescription\" style=\"display: none;\"><xsl:value-of select=\"$rs_member_find_a_member_desc\"/></span> </div> </td> </tr> <tr> <td colspan=\"2\"> <div class=\"lotusRight\" > <label id=\"filterLabel\"> <xsl:value-of select=\"$rs_member_filterby\"/> </label> <label id=\"filterDescription\" class=\"lotusHidden\"><xsl:value-of select=\"$rs_member_filterDescription\"/></label> <span class=\"lotusIndent10\"> <select id=\"roleFilter\" onchange=\"{$widgetObj}.displayFilterRole(this.value)\" role=\"listbox\" aria-describedby=\"filterDescription\" aria-labelledby=\"filterLabel\"> <option value=\"all\" role=\"option\"><xsl:value-of select=\"$rs_member_filterby_all\"/></option> <option value=\"owner\" role=\"option\"><xsl:value-of select=\"$rs_member_filterby_owners\"/></option> <option value=\"member\" role=\"option\"><xsl:value-of select=\"$rs_member_filterby_members\"/></option> <xsl:if test=\"not($doNotShowOrgItems='true')\"> <option value=\"externalOnly\" role=\"option\"><xsl:value-of select=\"$rs_member_filterby_external\"/></option> <option value=\"internalOnly\" role=\"option\"><xsl:value-of select=\"$rs_member_filterby_internal\"/></option> </xsl:if> </select> </span> </div> </td> </tr> <tr> <td colspan=\"2\"> <xsl:call-template name=\"addMembers\"/> <xsl:call-template name=\"inviteMembers\"/> <xsl:if test=\"$forceImportAvailable='true' or $exposeEmail='true'\"> <xsl:call-template name=\"importMembers\"/> </xsl:if> <xsl:if test=\"$exposeEmail='true'\"> <xsl:call-template name=\"exportMembers\"/> </xsl:if> </td> </tr> </table> <div id=\"membersListId\"> <xsl:call-template name=\"membersList\"/> </div> </div> </xsl:if> <xsl:if test=\"$selectedTab='invites'\"> <xsl:call-template name=\"invite-view\" /> </xsl:if> </xsl:when> <xsl:otherwise> <xsl:variable name=\"totalResults\" select=\"atom:feed/opensearch:totalResults/text()\" /> <xsl:variable name=\"numUsers\" select=\"/atom:feed/snx:rank[@scheme='http://www.ibm.com/xmlns/prod/sn/user']/text()\"/> <xsl:variable name=\"numGroups\" select=\"/atom:feed/snx:rank[@scheme='http://www.ibm.com/xmlns/prod/sn/group']/text()\"/> <xsl:choose> <xsl:when test=\"$fullMembersMode = 'true'\"> <table id=\"membersEntriesSmall{$widgetId}\" width=\"100%\"> <tr class=\"lotusFirst\"> <td> <xsl:call-template name=\"outputEntriesSmall\"> <xsl:with-param name=\"entries\" select=\"atom:feed/atom:entry\"/> </xsl:call-template> </td> </tr> </table> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$photoUrl != ''\"> <div class=\"lotusChunk\" > <xsl:call-template name=\"outputEntriesSmall\"> <xsl:with-param name=\"entries\" select=\"atom:feed/atom:entry\"/> </xsl:call-template> </div> </xsl:when> <xsl:otherwise> <ul class=\"lotusList lotusMeta\" role=\"list\"> <xsl:call-template name=\"outputEntriesSmall\"> <xsl:with-param name=\"entries\" select=\"atom:feed/atom:entry\"/> </xsl:call-template> </ul> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> <table width=\"100%\"> <xsl:if test=\"count(atom:feed/atom:link[@rel = 'next']) = 0\"> <xsl:attribute name=\"style\">margin-top: 5px;</xsl:attribute> </xsl:if> <tr> <td> <xsl:variable name=\"nonBidiStyle\" select=\"'text-align: left; vertical-align: middle; width: 100%;'\" /> <xsl:variable name=\"bidiStyle\" select=\"'text-align: right; vertical-align: middle; width: 100%;'\" /> <xsl:choose> <xsl:when test=\"not($bidi)\"> <xsl:attribute name=\"style\"><xsl:value-of select=\"$nonBidiStyle\" /></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"style\"><xsl:value-of select=\"$bidiStyle\" /></xsl:attribute> </xsl:otherwise> </xsl:choose> <span> <a class=\"lotusAction\" href=\"javascript:void(0);\" onclick=\"{$widgetObj}.showFullMembersWidget();\" title=\"{$rs_member_allmembers}\"> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_viewall_nocnt\" /> </xsl:call-template> <xsl:call-template name=\"outputNumberOfUsersAndGroups\"> <xsl:with-param name=\"numUsers\" select=\"$numUsers\" /> <xsl:with-param name=\"numGroups\" select=\"$numGroups\" /> </xsl:call-template> </a> </span> </td> </tr> </table> </xsl:otherwise> </xsl:choose> <span id=\"membersLastSpan{$widgetId}\" style=\"display: none;\"> </span> </xsl:template> <xsl:template name=\"invite-view\"> <div id=\"InvitesPanel\" role=\"tabpanel\"> <xsl:variable name=\"numEntries\" select=\"count(/atom:feed/atom:entry)\"/> <xsl:variable name=\"linkPrev\" select=\"/atom:feed/atom:link[@rel = 'prev']/@href\"/> <xsl:if test=\"$numEntries>0\"> <table class=\"lotusLayout lotusHeader\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%; margin-bottom: 10px;\"> <tr> <td> <div id=\"inviteButtons\" class=\"lotusBtnContainer\"> <xsl:if test=\"$canInvite='true'\"> <span id=\"resendInviteButton\" class=\"lotusBtn lotusBtnAction lotusLeft\" > <a role=\"button\" onclick=\"{$widgetObj}.resendInvites(); return false;\" href=\"javascript:void(0);\"><xsl:value-of select=\"$rs_invite_resend\" /></a> </span> </xsl:if> <xsl:if test=\"$canRevokeInvites = 'true'\"> <form method=\"post\" name=\"revokeInvitesForm\" id=\"revokeInvitesForm\"> <input type=\"hidden\" name=\"dangerousurlnonce\"/> <input type=\"hidden\" name=\"communityUuid\"/> <input type=\"hidden\" name=\"directoryUuids\" /> </form> <span id=\"revokeInviteButton\" class=\"lotusBtn lotusBtnAction lotusLeft\" > <a role=\"button\" onclick=\"{$widgetObj}.revokeInvites({$numEntries}, '{$linkPrev}'); return false;\" href=\"javascript:void(0);\"><xsl:value-of select=\"$rs_invite_revoke\" /></a> </span> </xsl:if> </div> </td> </tr> </table> </xsl:if> <xsl:choose> <xsl:when test=\"$numEntries>0\"> <table width=\"100%\"> <xsl:call-template name=\"outputPagingBannerFull\"/> </table> <div class=\"lotusSort\"> <ul class=\"lotusInlinelist\" role=\"toolbar\" aria-labelledby=\"invitesSortByColon\"> <li id=\"invitesSortByColon\" class=\"lotusFirst\"><xsl:value-of select=\"$rs_member_sortby_colon\"/> </li> <li class=\"lotusFirst\"> <a id=\"sortInvitesByName\" role=\"button\" href=\"javascript:void(0);\" onclick=\"{$widgetObj}.sortInvitesByName();\"> <xsl:choose> <xsl:when test=\"$inviteSortButtonID = 'sortInvitesByName'\"> <xsl:attribute name=\"class\">lotusActiveSort lotusDescending</xsl:attribute> <xsl:attribute name=\"aria-pressed\">true</xsl:attribute> <xsl:variable name=\"sortName\" select=\"$rs_invite_sortby_name\"/> <xsl:choose> <xsl:when test=\"$inviteSortDirection = 'true'\"> <xsl:variable name=\"asc\" select=\"$rs_member_sortby_ascending\"/> <xsl:variable name=\"ascCon\" select=\"concat($sortName, ' ',$asc)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$ascCon\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:variable name=\"desc\" select=\"$rs_member_sortby_descending\"/> <xsl:variable name=\"descCon\" select=\"concat($sortName, ' ',$desc)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$descCon\"/></xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"aria-pressed\">false</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"$rs_invite_sortby_name\" /> <xsl:if test=\"$inviteSortButtonID = 'sortInvitesByName'\"> <xsl:choose> <xsl:when test=\"$inviteSortDirection = 'true'\"> <span class=\"lotusAltText\">&#x25B2;</span> </xsl:when> <xsl:otherwise> <span class=\"lotusAltText\">&#x25BC;</span> </xsl:otherwise> </xsl:choose> </xsl:if> </a> </li> <li> <a id=\"sortInvitesByDateInvited\" role=\"button\" href=\"javascript:void(0);\" onclick=\"{$widgetObj}.sortInvitesByDateInvited();\"> <xsl:choose> <xsl:when test=\"$inviteSortButtonID = 'sortInvitesByDateInvited'\"> <xsl:attribute name=\"class\">lotusActiveSort lotusDescending</xsl:attribute> <xsl:attribute name=\"aria-pressed\">true</xsl:attribute> <xsl:variable name=\"sortDate\" select=\"$rs_invite_sortby_date\"/> <xsl:choose> <xsl:when test=\"$inviteSortDirection = 'true'\"> <xsl:variable name=\"asc1\" select=\"$rs_member_sortby_ascending\"/> <xsl:variable name=\"ascCon1\" select=\"concat($sortDate, ' ',$asc1)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$ascCon1\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:variable name=\"desc1\" select=\"$rs_member_sortby_descending\"/> <xsl:variable name=\"descCon1\" select=\"concat($sortDate, ' ',$desc1)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$descCon1\"/></xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"aria-pressed\">false</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"$rs_invite_sortby_date\" /> <xsl:if test=\"$inviteSortButtonID = 'sortInvitesByDateInvited'\"> <xsl:choose> <xsl:when test=\"$inviteSortDirection = 'true'\"> <span class=\"lotusAltText\">&#x25B2;</span> </xsl:when> <xsl:otherwise> <span class=\"lotusAltText\">&#x25BC;</span> </xsl:otherwise> </xsl:choose> </xsl:if> </a> </li> </ul> </div> <div id=\"inviteEntriesFull\" style=\"overflow:auto\"> <xsl:call-template name=\"outputInvitesFull\"> <xsl:with-param name=\"entries\" select=\"atom:feed/atom:entry\"/> </xsl:call-template> </div> <table width=\"100%\"> <xsl:call-template name=\"outputPagingBannerFull\"> <xsl:with-param name=\"isBottom\" select=\"true()\"/> </xsl:call-template> </table> </xsl:when> <xsl:otherwise> <div class=\"lconnEmpty\"><xsl:value-of select=\"$rs_invite_no_invites\"/></div> </xsl:otherwise> </xsl:choose> <table width=\"100%\"> <tr> <td> <div class=\"lotusFeeds\"> <a class=\"lotusFeed lotusAction\" onclick=\"{$widgetObj}.atomLinkOnClick()\" href=\"{$atomFeedUrl}\"> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_invite_subscribe_feed\" /></xsl:attribute> <xsl:value-of select=\"$rs_invite_subscribe_feed\" /> </a> </div> </td> </tr> </table> </div> </xsl:template> <xsl:template name=\"outputPagingBannerFull\"> <xsl:param name=\"isBottom\"/> <tr> <td> <xsl:variable name=\"totalResults\" select=\"/atom:feed/opensearch:totalResults/text()\" /> <xsl:variable name=\"startIndex\" select=\"/atom:feed/opensearch:startIndex/text()\" /> <xsl:variable name=\"numUsers\" select=\"/atom:feed/snx:rank[@scheme='http://www.ibm.com/xmlns/prod/sn/user']/text()\"/> <xsl:variable name=\"numGroups\" select=\"/atom:feed/snx:rank[@scheme='http://www.ibm.com/xmlns/prod/sn/group']/text()\"/> <div class=\"lotusPaging\"> <xsl:choose> <xsl:when test=\"$isBottom\"> <ul class=\"lotusLeft lotusInlinelist\"> <li class=\"lotusFirst\"><xsl:value-of select=\"$rs_member_paging_show\"/></li> <li class=\"lotusFirst\"> <xsl:choose> <xsl:when test=\"$items-per-page = '16'\">16</xsl:when> <xsl:otherwise><a onclick=\"{$widgetObj}.changePageSize(16); return false;\" href=\"javascript:void(0);\">16</a></xsl:otherwise> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test=\"$items-per-page = '32'\">32</xsl:when> <xsl:otherwise><a onclick=\"{$widgetObj}.changePageSize(32); return false;\" href=\"javascript:void(0);\">32</a></xsl:otherwise> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test=\"$items-per-page = '48'\">48</xsl:when> <xsl:otherwise><a onclick=\"{$widgetObj}.changePageSize(48); return false;\" href=\"javascript:void(0);\">48</a></xsl:otherwise> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test=\"$items-per-page = '100'\">100</xsl:when> <xsl:otherwise><a onclick=\"{$widgetObj}.changePageSize(100); return false;\" href=\"javascript:void(0);\">100</a></xsl:otherwise> </xsl:choose> </li> </ul> </xsl:when> <xsl:otherwise> <div class=\"lotusLeft\"> <xsl:choose> <xsl:when test=\"$startIndex = '0'\"> <xsl:variable name=\"params\">0,0,0</xsl:variable> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_pagepos\" /> <xsl:with-param name=\"params\" select=\"$params\"/> <xsl:with-param name=\"paramSeparator\" select=\"','\"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name=\"params\"><xsl:value-of select=\"$startIndex\" />,<xsl:value-of select=\"number($startIndex) + count(/atom:feed/atom:entry) - 1\" />,<xsl:value-of select=\"$totalResults\" /></xsl:variable> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_pagepos\" /> <xsl:with-param name=\"params\" select=\"$params\"/> <xsl:with-param name=\"paramSeparator\" select=\"','\"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> <xsl:if test=\"$filterString='' and $filterRole='all'\"> <xsl:call-template name=\"outputNumberOfUsersAndGroups\"> <xsl:with-param name=\"numUsers\" select=\"$numUsers\" /> <xsl:with-param name=\"numGroups\" select=\"$numGroups\" /> </xsl:call-template> </xsl:if> </div> </xsl:otherwise> </xsl:choose> <ul class=\"lotusInlinelist lotusRight\"> <li class=\"lotusFirst\"> <xsl:choose> <xsl:when test=\"count(/atom:feed/atom:link[@rel = 'prev']) = 0\"><xsl:value-of select=\"$rs_member_paging_previous\"/></xsl:when> <xsl:otherwise> <xsl:apply-templates select=\"/atom:feed/atom:link[@rel = 'prev']\" mode=\"full\"/> </xsl:otherwise> </xsl:choose> </li> <li> <xsl:choose> <xsl:when test=\"count(/atom:feed/atom:link[@rel = 'next']) = 0\"><xsl:value-of select=\"$rs_member_paging_next\"/></xsl:when> <xsl:otherwise> <xsl:apply-templates select=\"/atom:feed/atom:link[@rel = 'next']\" mode=\"full\"/> </xsl:otherwise> </xsl:choose> </li> </ul> <xsl:choose> <xsl:when test=\"not($isBottom)\"> <xsl:call-template name=\"display-pages\"/> </xsl:when> <xsl:otherwise> <xsl:call-template name=\"display-pager\"/> </xsl:otherwise> </xsl:choose> </div> </td> </tr> </xsl:template> <xsl:variable name=\"startIndex\" select=\"/atom:feed/opensearch:startIndex/text()\" /> <xsl:variable name=\"total-items-count\" select=\"/atom:feed/opensearch:totalResults/text()\" /> <xsl:variable name=\"items-per-page\" select=\"/atom:feed/opensearch:itemsPerPage/text()\" /> <xsl:variable name=\"tablePagingPage\" select=\"$rs_member_paging_page\" /> <xsl:variable name=\"js-app-prefix\" select=\"$widgetObj\" /> <xsl:variable name=\"current-page\" select=\"ceiling(($startIndex) div ($items-per-page)) - 1\" /> <xsl:variable name=\"total-pages\" select=\"ceiling(($total-items-count) div ($items-per-page))\" /> <xsl:variable name=\"communityLastMod\" select=\"/atom:feed/snx:communityLastMod/text()\" /> <xsl:template name=\"display-pager\"> <xsl:if test=\"$total-pages &gt; 1\"> <ul class=\"lotusInlinelist\" role=\"list\"> <li class=\"lotusFirst\" role=\"listitem\"> <label for=\"jumpToPageNumber\"><xsl:value-of select=\"$rs_member_jumptopage\"/> </label> <input id=\"jumpToPageNumber\" type=\"text\" name=\"pageNumber\" value=\"{$current-page+1}\" onblur=\"{$js-app-prefix}.jumpToPage(this,this.value,{$current-page+1},{$total-pages});\" onkeypress=\"{$js-app-prefix}.jumpToPage(this,this.value,{$current-page+1},{$total-pages},event.keyCode);\" /> <xsl:variable name=\"params2\" select=\"$total-pages\" /> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_jumptopageof\" /> <xsl:with-param name=\"params\" select=\"$params2\"/> <xsl:with-param name=\"paramSeparator\" select=\"','\"/> </xsl:call-template> </li> </ul> </xsl:if> </xsl:template> <xsl:template name=\"display-pages\"> <xsl:if test=\"$total-pages &gt; 1\"> <ul class=\"lotusInlinelist\"> <xsl:call-template name=\"loop\"> <xsl:with-param name=\"repeat\" select=\"$current-page - 2\"/> </xsl:call-template> <xsl:if test=\"(($current-page + 1) + 2) &lt; ($total-pages)\"> <li class=\"lotusLast\">...</li> <li class=\"lotusLast\"> <a href=\"javascript:void(0);\" onclick=\"{$js-app-prefix}.pageTo(this,{$total-pages - 1})\"> <xsl:value-of select=\"$total-pages\"/> </a> </li> </xsl:if> </ul> </xsl:if> </xsl:template> <xsl:template name=\"loop\"> <xsl:param name=\"repeat\">0</xsl:param> <xsl:if test=\"$repeat &gt;= 0 and $repeat &lt;= ($total-pages - 1) and ($repeat &lt;= ($current-page + 2) and $repeat &gt;= ($current-page - 2))\"> <xsl:choose> <xsl:when test=\"($current-page) = 0 and ($repeat = 0)\"> <li class=\"lotusFirst\"><xsl:value-of select=\"$tablePagingPage\"/> 1</li> </xsl:when> <xsl:when test=\"$repeat = 0\"> <li class=\"lotusFirst\"><a href=\"javascript:void(0);\" onclick=\"{$js-app-prefix}.pageTo(this,0)\"><xsl:value-of select=\"$tablePagingPage\"/> 1</a></li> </xsl:when> <xsl:when test=\"($current-page - 2) = ($repeat)\"> <li class=\"lotusFirst\"><a href=\"javascript:void(0);\" onclick=\"{$js-app-prefix}.pageTo(this,0)\"><xsl:value-of select=\"$tablePagingPage\"/> 1 ...</a></li> </xsl:when> <xsl:when test=\"($current-page) = ($repeat)\"> <li><xsl:value-of select=\"$repeat + 1\"/></li> </xsl:when> <xsl:otherwise> <li><a href=\"javascript:void(0);\" onclick=\"{$js-app-prefix}.pageTo(this,{$repeat})\"><xsl:value-of select=\"$repeat + 1\"/></a></li> </xsl:otherwise> </xsl:choose> <xsl:call-template name=\"loop\"> <xsl:with-param name=\"repeat\" select=\"$repeat + 1\"/> </xsl:call-template> </xsl:if> <xsl:if test=\"$repeat &lt; 0\"> <xsl:call-template name=\"loop\"> <xsl:with-param name=\"repeat\" select=\"$repeat + 1\"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name=\"outputEntriesFull\"> <xsl:param name=\"totalOwners\"/> <xsl:param name=\"entries\"/> <xsl:if test=\"$entries\"> <xsl:variable name=\"tablestyle\" select=\"'table-layout:fixed; border-style: solid; border-width: 0px 0px 1px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"tablestylelast\" select=\"'table-layout:fixed; border-style: solid; border-width: 0px 0px 0px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"newentries\" select=\"$entries[position() != 1 and position() != 2 and position() != 3 and position() != 4]\"/> <table width=\"100%\" role=\"presentation\"> <xsl:choose> <xsl:when test=\"$newentries\"> <xsl:attribute name=\"style\"><xsl:value-of select=\"$tablestyle\" /></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"style\"><xsl:value-of select=\"$tablestylelast\" /></xsl:attribute> </xsl:otherwise> </xsl:choose> <tr> <xsl:variable name=\"first\" select=\"$entries[1]\"/> <xsl:variable name=\"second\" select=\"$entries[2]\"/> <xsl:variable name=\"third\" select=\"$entries[3]\"/> <xsl:variable name=\"fouth\" select=\"$entries[4]\"/> <xsl:variable name=\"firstId\" select=\"generate-id($entries[1])\"/> <xsl:variable name=\"secondId\" select=\"generate-id($entries[2])\"/> <xsl:variable name=\"thirdId\" select=\"generate-id($entries[3])\"/> <xsl:variable name=\"fouthId\" select=\"generate-id($entries[4])\"/> <xsl:if test=\"$first\"> <td id=\"{$firstId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputEntryFull\"> <xsl:with-param name=\"totalOwners\" select=\"$totalOwners\" /> <xsl:with-param name=\"uniqueId\" select=\"$firstId\"/> <xsl:with-param name=\"entry\" select=\"$first\"/> </xsl:call-template> </td> </xsl:if> <xsl:choose> <xsl:when test=\"$second\"> <td id=\"{$secondId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputEntryFull\"> <xsl:with-param name=\"totalOwners\" select=\"$totalOwners\" /> <xsl:with-param name=\"uniqueId\" select=\"$secondId\"/> <xsl:with-param name=\"entry\" select=\"$second\"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test=\"$third\"> <td id=\"{$thirdId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputEntryFull\"> <xsl:with-param name=\"totalOwners\" select=\"$totalOwners\" /> <xsl:with-param name=\"uniqueId\" select=\"$thirdId\"/> <xsl:with-param name=\"entry\" select=\"$third\"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test=\"$fouth\"> <td id=\"{$fouthId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputEntryFull\"> <xsl:with-param name=\"totalOwners\" select=\"$totalOwners\" /> <xsl:with-param name=\"uniqueId\" select=\"$fouthId\"/> <xsl:with-param name=\"entry\" select=\"$fouth\"/> </xsl:call-template> </td> </xsl:when> <xsl:otherwise> <td id=\"filler25\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <td id=\"filler50\" style=\"width: 50%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <td id=\"filler75\" style=\"width: 75%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </tr> </table> <xsl:if test=\"$newentries\"> <xsl:call-template name=\"outputEntriesFull\"> <xsl:with-param name=\"totalOwners\" select=\"$totalOwners\" /> <xsl:with-param name=\"entries\" select=\"$newentries\"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name=\"outputEntryFull\"> <xsl:param name=\"totalOwners\"/> <xsl:param name=\"entry\"/> <xsl:param name=\"uniqueId\"/> <xsl:variable name=\"editurl\" select=\"$entry/atom:link[@rel = 'edit']/@href\"/> <xsl:variable name=\"jScriptEscEditurl\"> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\"> <xsl:value-of select=\"$editurl\" /> </xsl:with-param> <xsl:with-param name=\"patternString\"> <xsl:text disable-output-escaping=\"yes\">&#39;</xsl:text> </xsl:with-param> <xsl:with-param name=\"patchString\"> <xsl:text disable-output-escaping=\"yes\">&#37;27</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name=\"editId\">edit<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"tableToCloneId\">table<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"formId\">form<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"editRemoveId\">editremove<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"ownerRadioButtonId\">ownerradio<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"memberRadioButtonId\">memberradio<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"businessOwnerRadioButtonId\">businessownerradio<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"businessOwnerHelpId\">businessOwnerHelpId<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"isMe\" select=\"$entry/atom:contributor/snx:userid/text() = $loggedInUserid\"/> <xsl:variable name=\"bizOwner\" select=\"'business-owner'\"/> <xsl:variable name=\"isBizOwner\" select=\"$entry/atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type']/@term = $bizOwner\"/> <xsl:variable name=\"numEntries\" select=\"count(/atom:feed/atom:entry)\"/> <xsl:variable name=\"linkSelf\" select=\"/atom:feed/atom:link[@rel = 'self']/@href\"/> <xsl:variable name=\"linkPrev\" select=\"/atom:feed/atom:link[@rel = 'prev']/@href\"/> <xsl:variable name=\"group\" select=\"'group'\"/> <xsl:variable name=\"isGroup\" select=\"$entry/atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type']/@term = $group\"/> <xsl:variable name=\"nameId\">name_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"displayName\" select=\"$entry/atom:contributor/atom:name/text()\"/> <xsl:variable name=\"jScriptEscDisplayName\"> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\"> <xsl:value-of select=\"$displayName\" /> </xsl:with-param> <xsl:with-param name=\"patternString\"> <xsl:text disable-output-escaping=\"yes\">&#39;</xsl:text> </xsl:with-param> <xsl:with-param name=\"patchString\"> <xsl:text disable-output-escaping=\"yes\">&#92;&#39;</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name=\"jScriptEsc_rs_member_transfer\"> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\"> <xsl:value-of select=\"$rs_member_transfer\" /> </xsl:with-param> <xsl:with-param name=\"patternString\"> <xsl:text disable-output-escaping=\"yes\">&#39;</xsl:text> </xsl:with-param> <xsl:with-param name=\"patchString\"> <xsl:text disable-output-escaping=\"yes\">&#92;&#39;</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <table id=\"{$tableToCloneId}\" width=\"100%\" role=\"presentation\"> <tr> <td style=\"width: 73px; vertical-align:text-top;\"> <table> <tr> <xsl:call-template name=\"photo\"> <xsl:with-param name=\"userid\" select=\"$entry/atom:contributor/snx:userid/text()\"/> <xsl:with-param name=\"displayName\" select=\"$displayName\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> <xsl:with-param name=\"userState\" select=\"$entry/atom:contributor/snx:userState/text()\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> </xsl:call-template> </tr> </table> </td> <td style=\"vertical-align: middle; height: 50px;\"> <xsl:call-template name=\"name\"> <xsl:with-param name=\"displayName\" select=\"$displayName\"/> <xsl:with-param name=\"userid\" select=\"$entry/atom:contributor/snx:userid/text()\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> <xsl:with-param name=\"userState\" select=\"$entry/atom:contributor/snx:userState/text()\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> </xsl:call-template> <br /> <xsl:choose> <xsl:when test=\"$isBizOwner = 'true'\"> <xsl:value-of select=\"$rs_member_role_business_owner\"/> </xsl:when> <xsl:when test=\"$entry/snx:role/text() = 'owner'\"> <xsl:value-of select=\"$rs_member_role_owner\"/> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$rs_member_role_member\"/> </xsl:otherwise> </xsl:choose> <xsl:if test=\"not($communityOrgId='')\"> <xsl:variable name=\"orgId\" select=\"$entry/snx:orgId/text()\"/> <xsl:if test=\"not($isBizOwner = 'true') and ($communityOrgId='0' or $communityOrgId='org0' or not($communityOrgId = $orgId))\"> <br /> <span style=\"margin-left: 0px; margin-right: 0px;\"><xsl:value-of select=\"$rs_external_indicator\"/></span> </xsl:if> </xsl:if> <xsl:choose> <xsl:when test=\"$canRemoveOthers = 'true' and not($isMe and $totalOwners and number($totalOwners) &lt; 2) and not($isBizOwner)\"> <span id=\"{$editRemoveId}\"> <br /> <xsl:if test=\"not($isGroup)\"> <a id=\"edit_{$uniqueId}\" onclick=\"{$widgetObj}.openEditUI('{$uniqueId}'); return false;\" href=\"javascript:void(0);\" title=\"{$rs_member_edit}\"><xsl:value-of select=\"$rs_member_edit\"/></a> </xsl:if> <xsl:if test=\"not($isMe)\"> <xsl:if test=\"not($isGroup)\"> | </xsl:if> <a onclick='{$widgetObj}.doMemberDelete({$numEntries}, \"{$linkSelf}\", \"{$linkPrev}\", \"{$rs_member_remove_confirm}\", \"{$nameId}\", \"{$jScriptEscEditurl}\", \"{$communityLastMod}\"); return false;' href=\"javascript:void(0);\" title=\"{$rs_member_remove}\"><xsl:value-of select=\"$rs_member_remove\"/></a> </xsl:if> </span> </xsl:when> <xsl:otherwise> </xsl:otherwise> </xsl:choose> </td> </tr> </table> <xsl:if test=\"$canRemoveOthers = 'true'\"> <div id=\"{$editId}\" style=\"display: none; opacity: 1; z-index: 900; position: absolute; background-color: #FFFFFF;\" wairole=\"dialog\" role=\"dialog\"> <div id=\"wai_{$editId}\" wairole=\"alert\" role=\"alert\"> <form id=\"{$formId}\" class=\"lotusForm\"> <table width=\"100%\"> <xsl:if test=\"$canRemoveOthers = 'true'\"> <tr> <td style=\"vertical-align: middle; padding: 0px 14px; width: 45px; font-weight: bold;\"> <xsl:value-of select=\"$rs_member_role\"/> </td> <td> <table width=\"100%\"> <xsl:variable name=\"orgId\" select=\"$entry/snx:orgId/text()\"/> <xsl:if test=\"($isLoggedInUserBizOwner = 'true')and($communityOrgId = $orgId)and($communityOrgId != '0')\"> <tr> <td> <input type=\"radio\" name=\"role\" id=\"{$businessOwnerRadioButtonId}\" value=\"business-owner\"> <xsl:if test=\"$entry/snx:role/text() = 'business-owner'\"> <xsl:attribute name=\"checked\">checked</xsl:attribute> </xsl:if> </input> <xsl:text disable-output-escaping=\"yes\">&#160;</xsl:text> <label for=\"{$businessOwnerRadioButtonId}\" class=\"lotusCheckbox\"><xsl:value-of select=\"$rs_member_role_business_owner\"/></label> <span class=\"lotusIndent10\" id=\"{$businessOwnerHelpId}\"> </span> </td> </tr> </xsl:if> <tr> <td> <input type=\"radio\" name=\"role\" id=\"{$ownerRadioButtonId}\" value=\"owner\"> <xsl:if test=\"$entry/snx:role/text() = 'owner'\"> <xsl:attribute name=\"checked\">checked</xsl:attribute> </xsl:if> </input> <xsl:text disable-output-escaping=\"yes\">&#160;</xsl:text> <label for=\"{$ownerRadioButtonId}\" class=\"lotusCheckbox\"><xsl:value-of select=\"$rs_member_role_owner\"/></label> </td> </tr> <tr> <td > <input type=\"radio\" name=\"role\" id=\"{$memberRadioButtonId}\" value=\"member\"> <xsl:if test=\"$entry/snx:role/text() = 'member'\"> <xsl:attribute name=\"checked\">checked</xsl:attribute> </xsl:if> </input> <xsl:text disable-output-escaping=\"yes\">&#160;</xsl:text> <label for=\"{$memberRadioButtonId}\" class=\"lotusCheckbox\"><xsl:value-of select=\"$rs_member_role_member\"/></label> </td> </tr> </table> </td> </tr> </xsl:if> </table> <table width=\"100%\" class=\"lotusFormTable\" style=\"margin-left: auto; margin-right: auto;\"> <tr> <td class=\"lotusFormFooter\" style=\"text-align: center;\"> <xsl:variable name=\"userid\" select=\"$entry/atom:contributor/snx:userid/text()\"/> <input type=\"submit\" value=\"{$rs_member_save}\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.saveEdit(this.form, '{$jScriptEscEditurl}', '{$userid}', '{$linkSelf}', '{$uniqueId}', '{$communityLastMod}', '{$jScriptEsc_rs_member_transfer}', '{$jScriptEscDisplayName}'); return false;\"/> <input type=\"button\" value=\"{$rs_member_cancel}\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.closeEditUI('{$uniqueId}'); return false;\"/> <xsl:if test=\"not($isMe)\"> <input type=\"button\" value=\"{$rs_member_remove}\" class=\"lotusFormButton\" onclick='{$widgetObj}.closeEditUI(\"{$uniqueId}\"); {$widgetObj}.doMemberDelete({$numEntries}, \"{$linkSelf}\", \"{$linkPrev}\", \"{$rs_member_remove_confirm}\", \"{$nameId}\", \"{$jScriptEscEditurl}\", \"{$communityLastMod}\"); return false;'/> </xsl:if> </td> </tr> </table> </form> </div> </div> </xsl:if> </xsl:template> <xsl:template name=\"outputInvitesFull\"> <xsl:param name=\"entries\"/> <xsl:if test=\"$entries\"> <xsl:variable name=\"tablestyle\" select=\"'table-layout:fixed; border-style: solid; border-width: 0px 0px 1px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"tablestylelast\" select=\"'table-layout:fixed; border-style: solid; border-width: 0px 0px 0px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"newentries\" select=\"$entries[position() != 1 and position() != 2 and position() !=3 and position() !=4]\"/> <table width=\"100%\" role=\"presentation\"> <xsl:choose> <xsl:when test=\"$newentries\"> <xsl:attribute name=\"style\"><xsl:value-of select=\"$tablestyle\" /></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"style\"><xsl:value-of select=\"$tablestylelast\" /></xsl:attribute> </xsl:otherwise> </xsl:choose> <tr> <xsl:variable name=\"first\" select=\"$entries[1]\"/> <xsl:variable name=\"second\" select=\"$entries[2]\"/> <xsl:variable name=\"third\" select=\"$entries[3]\"/> <xsl:variable name=\"fouth\" select=\"$entries[4]\"/> <xsl:variable name=\"firstId\" select=\"generate-id($entries[1])\"/> <xsl:variable name=\"secondId\" select=\"generate-id($entries[2])\"/> <xsl:variable name=\"thirdId\" select=\"generate-id($entries[3])\"/> <xsl:variable name=\"fouthId\" select=\"generate-id($entries[4])\"/> <xsl:if test=\"$first\"> <td id=\"{$firstId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputInviteFull\"> <xsl:with-param name=\"uniqueId\" select=\"$firstId\"/> <xsl:with-param name=\"entry\" select=\"$first\"/> </xsl:call-template> </td> </xsl:if> <xsl:choose> <xsl:when test=\"$second\"> <td id=\"{$secondId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputInviteFull\"> <xsl:with-param name=\"uniqueId\" select=\"$secondId\"/> <xsl:with-param name=\"entry\" select=\"$second\"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test=\"$third\"> <td id=\"{$thirdId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputInviteFull\"> <xsl:with-param name=\"uniqueId\" select=\"$thirdId\"/> <xsl:with-param name=\"entry\" select=\"$third\"/> </xsl:call-template> </td> <xsl:choose> <xsl:when test=\"$fouth\"> <td id=\"{$fouthId}\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <xsl:call-template name=\"outputInviteFull\"> <xsl:with-param name=\"uniqueId\" select=\"$fouthId\"/> <xsl:with-param name=\"entry\" select=\"$fouth\"/> </xsl:call-template> </td> </xsl:when> <xsl:otherwise> <td id=\"filler_fouthId\" style=\"width: 25%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <td id=\"filler_thirdId\" style=\"width: 50%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <td id=\"filler_$secondId\" style=\"width: 75%; vertical-align: top; overflow: hidden;\"> <![CDATA[ ]]> </td> </xsl:otherwise> </xsl:choose> </tr> </table> <xsl:if test=\"$newentries\"> <xsl:call-template name=\"outputInvitesFull\"> <xsl:with-param name=\"entries\" select=\"$newentries\"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name=\"outputInviteFull\"> <xsl:param name=\"entry\"/> <xsl:param name=\"uniqueId\"/> <xsl:variable name=\"editurl\" select=\"$entry/atom:link[@rel = 'edit']/@href\"/> <xsl:variable name=\"jScriptEscEditurl\"> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\"> <xsl:value-of select=\"$editurl\" /> </xsl:with-param> <xsl:with-param name=\"patternString\"> <xsl:text disable-output-escaping=\"yes\">&#39;</xsl:text> </xsl:with-param> <xsl:with-param name=\"patchString\"> <xsl:text disable-output-escaping=\"yes\">&#37;27</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name=\"tableToCloneId\">table<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"dateInvited\" select=\"$entry/atom:updated/text()\"/> <xsl:variable name=\"userid\" select=\"$entry/atom:contributor/snx:userid/text()\"/> <xsl:variable name=\"canResend\"><xsl:value-of select=\"$canInvite\"/></xsl:variable> <xsl:variable name=\"resendRevokeId\">resendRevoke<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"numEntries\" select=\"count(/atom:feed/atom:entry)\"/> <xsl:variable name=\"linkPrev\" select=\"/atom:feed/atom:link[@rel = 'prev']/@href\"/> <xsl:variable name=\"group\" select=\"'group'\"/> <xsl:variable name=\"isGroup\" select=\"$entry/atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type']/@term = $group\"/> <xsl:variable name=\"displayName\" select=\"$entry/atom:contributor/atom:name/text()\"/> <xsl:variable name=\"jScriptEscDisplayName\"> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\"> <xsl:value-of select=\"$displayName\" /> </xsl:with-param> <xsl:with-param name=\"patternString\"> <xsl:text disable-output-escaping=\"yes\">&#39;</xsl:text> </xsl:with-param> <xsl:with-param name=\"patchString\"> <xsl:text disable-output-escaping=\"yes\">&#92;&#39;</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:variable name=\"userState\" select=\"$entry/atom:contributor/snx:userState/text()\"/> <table id=\"{$tableToCloneId}\" width=\"100%\" role=\"presentation\"> <tr> <td style=\"width: 12%; vertical-align: middle; height: 50px;\"> <xsl:if test=\"$canResend = 'true' or $canRevokeInvites = 'true'\"> <xsl:variable name=\"nameId\">name_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <input type=\"checkbox\" id=\"p_{$userid}\" aria-labelledby=\"{$nameId}\"/> </xsl:if> </td> <xsl:call-template name=\"photo\"> <xsl:with-param name=\"userid\" select=\"$userid\"/> <xsl:with-param name=\"displayName\" select=\"$displayName\"/> <xsl:with-param name=\"userState\" select=\"$userState\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> </xsl:call-template> <td style=\"vertical-align: middle; height: 50px;\"> <xsl:call-template name=\"name\"> <xsl:with-param name=\"displayName\" select=\"$displayName\"/> <xsl:with-param name=\"userid\" select=\"$userid\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> <xsl:with-param name=\"userState\" select=\"$userState\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> </xsl:call-template> <xsl:if test=\"not($communityOrgId='')\"> <xsl:variable name=\"orgId\" select=\"$entry/atom:contributor/snx:orgId/text()\"/> <xsl:if test=\"$communityOrgId='0' or $communityOrgId='org0' or not($communityOrgId = $orgId)\"> <br /> <span style=\"margin-left: 0px; margin-right: 0px;\"><xsl:value-of select=\"$rs_external_indicator\"/></span> </xsl:if> </xsl:if> <br /><xsl:value-of select=\"$rs_invite_invited\" /><span id=\"date_{$uniqueId}\" class=\"dateToBeLocalized\" style=\"display: none;\"><xsl:value-of select=\"$dateInvited\"/></span> <xsl:if test=\"$canResend = 'true'\"> <br /> <span id=\"{$resendRevokeId}\"> <xsl:if test=\"$userState='active'\"> <a onclick=\"{$widgetObj}.resendInvite('p_{$userid}'); return false;\" href=\"javascript:void(0);\" title=\"{$rs_invite_resend}\"><xsl:value-of select=\"$rs_invite_resend\" /></a> </xsl:if> <xsl:if test=\"$canRevokeInvites = 'true'\"> <xsl:if test=\"$userState='active'\"> | </xsl:if> <a onclick=\"{$widgetObj}.revokeInvite({$numEntries},'{$linkPrev}', '{$jScriptEscDisplayName}', '{$jScriptEscEditurl}', '{$communityLastMod}'); return false;\" href=\"javascript:void(0);\" title=\"{$rs_invite_revoke}\"><xsl:value-of select=\"$rs_invite_revoke\" /></a> </xsl:if> </span> </xsl:if> </td> </tr> </table> </xsl:template> <xsl:template name=\"outputEntriesSmall\"> <xsl:param name=\"entries\"/> <xsl:if test=\"$entries\"> <xsl:variable name=\"tablestyle\" select=\"'border-style: solid; border-width: 1px 0px 0px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"tablestylelast\" select=\"'border-style: solid; border-width: 1px 0px 1px 0px; border-color: #CCCBCB'\" /> <xsl:variable name=\"newentries\" select=\"$entries[position()!= 1]\"/> <xsl:variable name=\"entry\" select=\"$entries[1]\"/> <xsl:if test=\"$entry\"> <xsl:variable name=\"uniqueId\" select=\"generate-id($entry)\"/> <xsl:variable name=\"group\" select=\"'group'\"/> <xsl:variable name=\"isGroup\" select=\"$entry/atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/type']/@term = $group\"/> <xsl:call-template name=\"photo\"> <xsl:with-param name=\"userid\" select=\"$entry/atom:contributor/snx:userid/text()\"/> <xsl:with-param name=\"displayName\" select=\"$entry/atom:contributor/atom:name/text()\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> <xsl:with-param name=\"userState\" select=\"$entry/atom:contributor/snx:userState/text()\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> </xsl:call-template> </xsl:if> <xsl:if test=\"$newentries\"> <xsl:call-template name=\"outputEntriesSmall\"> <xsl:with-param name=\"entries\" select=\"$newentries\"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template match=\"atom:feed/atom:link[@rel = 'prev']\" mode=\"full\"> <a href=\"javascript:void(0);\" onclick=\"{$widgetObj}.doNextPrev('{@href}');\" title=\"{$rs_member_paging_previous}\"><xsl:value-of select=\"$rs_member_paging_previous\"/></a> </xsl:template> <xsl:template match=\"atom:feed/atom:link[@rel = 'next']\" mode=\"full\"> <a href=\"javascript:void(0);\" onclick=\"{$widgetObj}.doNextPrev('{@href}');\" title=\"{$rs_member_paging_next}\"><xsl:value-of select=\"$rs_member_paging_next\"/></a> </xsl:template> <xsl:template match=\"atom:feed/atom:link[@rel = 'prev']\"> <table width=\"100%\"> <tr> <td style=\"text-align: center;\"> <a href=\"javascript:void(0);\" onclick=\"{$widgetObj}.loadMembers('{@href}', '{$communityLastMod}');\" title=\"{$rs_member_paging_previous}\"><img width=\"16\" height=\"16\" src=\"{$upArrow}\" alt=\"{$rs_member_paging_previous}\"/></a> </td> </tr> </table> </xsl:template> <xsl:template match=\"atom:feed/atom:link[@rel = 'next']\"> <table width=\"100%\"> <tr> <td style=\"text-align: center;\"> <a href=\"javascript:void(0);\" onclick=\"{$widgetObj}.loadMembers('{@href}', '{$communityLastMod}');\" title=\"{$rs_member_paging_next}\"><img width=\"16\" height=\"16\" src=\"{$downArrow}\" alt=\"{$rs_member_paging_next}\"/></a> </td> </tr> </table> </xsl:template> <xsl:template name=\"photo\"> <xsl:param name=\"userid\"/> <xsl:param name=\"displayName\"/> <xsl:param name=\"uniqueId\"/> <xsl:param name=\"userState\" /> <xsl:param name=\"isGroup\"/> <xsl:variable name=\"nameId\">phonename_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"userIdId\">userid_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"tdstylefull\" select=\"'vertical-align: middle; padding: 0px 8px; width: 45px;'\" /> <xsl:variable name=\"tdstylesmall\" select=\"'vertical-align: middle; padding: 0px 5px; width: 45px;'\" /> <xsl:choose> <xsl:when test=\"$fullMembersMode = 'true'\"> <xsl:choose> <xsl:when test=\"not($isGroup)\"> <xsl:variable name=\"fullPhotoUrl\"> <xsl:choose> <xsl:when test=\"$photoUrl != ''\"> <xsl:value-of select=\"$photoUrl\"/><xsl:value-of select=\"$userid\"/> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$blankImage\"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name=\"otherPeople48Class\"> <xsl:choose> <xsl:when test=\"$photoUrl != ''\">otherPeople48</xsl:when> <xsl:otherwise>otherPeople48 otherPeople48-NoPhotoPerson48</xsl:otherwise> </xsl:choose> </xsl:variable> <td> <span> <xsl:attribute name=\"class\">memberToBeProcessed </xsl:attribute> <a id=\"{$nameId}\"> <xsl:choose> <xsl:when test=\"$userState='inactive'\"> <xsl:attribute name=\"class\">fn url </xsl:attribute> <xsl:attribute name=\"aria-disabled\">true</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\">fn url </xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test=\"$exposePublicCommunities='true'\"> <xsl:attribute name=\"href\"><xsl:value-of select=\"$applicationContext\"/>/service/html/allcommunities?userid=<xsl:value-of select=\"$userid\"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"href\">javascript:void(0);</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:if test=\"$userState='active'\"> <img width=\"48\" height=\"48\" class=\"{$otherPeople48Class}\" alt=\"{$displayName} {$rs_profile_photo}\" src=\"{$fullPhotoUrl}\" title=\"{$displayName}\" /> </xsl:if> <xsl:if test=\"$userState='inactive'\"> <img width=\"48\" height=\"48\" class=\"{$otherPeople48Class} lotusDim \" aria-disabled=\"true\" alt=\"{$rs_memberprofile_inactive}\" title=\"{$displayName}\" src=\"{$fullPhotoUrl}\" /> </xsl:if> </a> <span id=\"{$userIdId}\" class=\"x-lconn-userid\" style=\"display:none;\" ><xsl:value-of select=\"$userid\" /></span> <span class=\"x-lconn-displayname\" style=\"display: none;\"><xsl:value-of select=\"$displayName\"/></span> </span> </td> </xsl:when> <xsl:otherwise> <td> <div role=\"presentation\"> <img width=\"48\" height=\"48\" class=\"otherPeople48 otherPeople48-NoPhotoGroup48\" alt=\"{$displayName}\" title=\"{$displayName}\" src=\"{$blankImage}\" /> </div> </td> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test=\"$photoUrl != ''\"> <xsl:choose> <xsl:when test=\"not($isGroup)\"> <div role=\"presentation\" class=\"lotusLeft\" style=\"padding:0px 5px 4px 0px;\"> <xsl:variable name=\"photolinkurl\" select=\"concat($applicationContext,'/service/html/allcommunities?userid=',$userid)\" /> <xsl:variable name=\"nolink\" select=\"'javascript:void(0);'\" /> <span class=\"vcard memberPhotoToBeProcessed\"> <a class=\"fn url\"> <xsl:choose> <xsl:when test=\"$userState='inactive'\"> <xsl:attribute name=\"tabindex\">-1</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"tabindex\">0</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test=\"$exposePublicCommunities='true'\"> <xsl:attribute name=\"href\"><xsl:value-of select=\"$photolinkurl\" /></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"href\"><xsl:value-of select=\"$nolink\" /></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test=\"$userState='inactive'\"> <img src=\"{$photoUrl}{$userid}\" width=\"32\" height=\"32\" class=\"otherPeople32 lotusDim\"> <xsl:attribute name=\"title\"><xsl:value-of select=\"$displayName\"/></xsl:attribute> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$rs_memberprofile_inactive\"/></xsl:attribute> <xsl:attribute name=\"aria-disabled\">true</xsl:attribute> </img> </xsl:when> <xsl:otherwise> <img src=\"{$photoUrl}{$userid}\" width=\"32\" height=\"32\" class=\"otherPeople32\"> <xsl:attribute name=\"title\"><xsl:value-of select=\"$displayName\"/></xsl:attribute> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$displayName\"/></xsl:attribute> </img> </xsl:otherwise> </xsl:choose> </a> <span class=\"x-lconn-userid\" style=\"display: none;\"><xsl:value-of select=\"$userid\"/></span> <span class=\"x-lconn-displayname\" style=\"display: none;\"><xsl:value-of select=\"$displayName\"/></span> </span> </div> </xsl:when> <xsl:otherwise> <div role=\"presentation\" class=\"lotusLeft\" style=\"padding:0px 5px 4px 0px;\"> <span> <a class=\"fn url\" href=\"javascript:void(0);\"> <img width=\"32\" height=\"32\" class=\"otherPeople32 otherPeople32-NoPhotoGroup32\" alt=\"{$displayName}\" title=\"{$displayName}\" src=\"{$blankImage}\"></img> </a> </span> </div> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <li role=\"listitem\"> <xsl:call-template name=\"name\"> <xsl:with-param name=\"displayName\" select=\"$displayName\"/> <xsl:with-param name=\"userid\" select=\"$userid\"/> <xsl:with-param name=\"uniqueId\" select=\"$uniqueId\"/> <xsl:with-param name=\"userState\" select=\"$userState\"/> <xsl:with-param name=\"isGroup\" select=\"$isGroup\"/> </xsl:call-template> </li> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name=\"name\"> <xsl:param name=\"displayName\"/> <xsl:param name=\"userid\"/> <xsl:param name=\"uniqueId\"/> <xsl:param name=\"userState\" /> <xsl:param name=\"isGroup\"/> <xsl:variable name=\"nameId\">name_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <xsl:variable name=\"userIdId\">userid_<xsl:value-of select=\"$uniqueId\"/></xsl:variable> <span> <xsl:choose> <xsl:when test=\"not($isGroup)\"> <xsl:choose> <xsl:when test=\"$enableBizCard = 'true'\"> <xsl:attribute name=\"class\">vcard memberToBeProcessed</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\">memberToBeProcessed</xsl:attribute> </xsl:otherwise> </xsl:choose> <a id=\"{$nameId}\"> <xsl:choose> <xsl:when test=\"$exposePublicCommunities='true'\"> <xsl:attribute name=\"href\"><xsl:value-of select=\"$applicationContext\"/>/service/html/allcommunities?userid=<xsl:value-of select=\"$userid\"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"href\">javascript:void(0);</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test=\"$userState='inactive'\"> <xsl:attribute name=\"class\">fn url lotusPersonInactive</xsl:attribute> <xsl:attribute name=\"aria-disabled\">true</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\">fn url lotusPerson</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"$displayName\" /> </a> <span id=\"{$userIdId}\" class=\"x-lconn-userid\" style=\"display:none;\" ><xsl:value-of select=\"$userid\" /></span> <span class=\"x-lconn-displayname\" style=\"display: none;\"><xsl:value-of select=\"$displayName\"/></span> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"id\"><xsl:value-of select=\"$nameId\"/></xsl:attribute> <xsl:attribute name=\"class\">lotusLeft</xsl:attribute> <xsl:value-of select=\"$displayName\" /> </xsl:otherwise> </xsl:choose> </span> </xsl:template> <xsl:template name=\"replacePlaceHolders\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"params\" /> <xsl:param name=\"paramSeparator\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"$inputString\" /> <xsl:with-param name=\"paramIndex\" select=\"'0'\" /> <xsl:with-param name=\"params\" select=\"$params\" /> <xsl:with-param name=\"paramSeparator\" select=\"$paramSeparator\"/> <xsl:with-param name=\"prefix\" select=\"'$'\"/> </xsl:call-template> </xsl:template> <xsl:template name=\"replacePlaceHolders2\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"params\" /> <xsl:param name=\"paramSeparator\" /> <xsl:param name=\"prefix\" /> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"$inputString\" /> <xsl:with-param name=\"paramIndex\" select=\"'0'\" /> <xsl:with-param name=\"params\" select=\"$params\" /> <xsl:with-param name=\"paramSeparator\" select=\"$paramSeparator\"/> <xsl:with-param name=\"prefix\" select=\"$prefix\"/> </xsl:call-template> </xsl:template> <xsl:template name=\"replace\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"paramIndex\" /> <xsl:param name=\"params\" /> <xsl:param name=\"paramSeparator\" /> <xsl:param name=\"prefix\" /> <xsl:variable name=\"searchFor\"><xsl:value-of select=\"$prefix\" /><xsl:text>{</xsl:text><xsl:value-of select=\"$paramIndex\" /><xsl:text>}</xsl:text></xsl:variable> <xsl:choose> <xsl:when test=\"contains($inputString,$searchFor)\"> <xsl:value-of select=\"substring-before($inputString,$searchFor)\" /> <xsl:choose> <xsl:when test=\"contains($params,$paramSeparator)\"> <xsl:value-of select=\"substring-before($params,$paramSeparator)\" /> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$params\" /> </xsl:otherwise> </xsl:choose> <xsl:call-template name=\"replace\"> <xsl:with-param name=\"inputString\" select=\"substring-after($inputString,$searchFor)\" /> <xsl:with-param name=\"paramIndex\" select=\"number($paramIndex) + 1\" /> <xsl:with-param name=\"params\" select=\"substring-after($params,$paramSeparator)\" /> <xsl:with-param name=\"paramSeparator\" select=\"$paramSeparator\"/> <xsl:with-param name=\"prefix\" select=\"$prefix\"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$inputString\" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name=\"replacePatternByPatch\"> <xsl:param name=\"inputString\" /> <xsl:param name=\"patternString\" /> <xsl:param name=\"patchString\" /> <xsl:choose> <xsl:when test=\"contains($inputString,$patternString)\"> <xsl:value-of select=\"substring-before($inputString,$patternString)\" /> <xsl:value-of select=\"$patchString\" /> <xsl:call-template name=\"replacePatternByPatch\"> <xsl:with-param name=\"inputString\" select=\"substring-after($inputString,$patternString)\" /> <xsl:with-param name=\"patternString\" select=\"$patternString\" /> <xsl:with-param name=\"patchString\" select=\"$patchString\" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select=\"$inputString\" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name=\"addMembers\"> <div id=\"memberAddFormDiv\" style=\"display:none\" wairole=\"application\" role=\"application\"> <div id=\"wai_memberAddFormDiv\"> <form method=\"post\" name=\"memberAddForm\" id=\"memberAddForm\" class=\"lotusForm\" role=\"application\"> <fieldset> <legend class=\"lotusHidden\"><xsl:value-of select=\"$rs_add_members_fieldset\"/></legend> <input type=\"hidden\" name=\"communityUuid\"/> <input type=\"hidden\" name=\"parentUuid\"/> <input type=\"hidden\" name=\"members\" /> <input type=\"hidden\" name=\"owners\" /> <input type=\"hidden\" name=\"memberemails\" /> <input type=\"hidden\" name=\"owneremails\" /> <table class=\"lotusTable lotusFormTable\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\" role=\"presentation\"> <tr class=\"lotusFormFieldRow\"> <td colspan=\"3\" class=\"lotusFormTitle\"> <h2><xsl:value-of select=\"$rs_member_add_members\"/></h2> </td> </tr> <tr class=\"lotusFormFieldRow\" id=\"addNoticeRow\" style=\"display:none\" aria-hidden=\"true\"> <td width=\"155px\" class=\"lotusFormLabel\"></td> <td id=\"addNoticeRowLabel\" style=\"padding-left:10px;padding-right:10px;\"> </td> <td class=\"lotusFormFieldRow\" width=\"7%\"> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td width=\"50px\" class=\"lotusFormLabel\"></td> <td> <table style=\"width: 650px;\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"> <tr id=\"addMembersRow\" style=\"white-space: nowrap;\"> <xsl:choose> <xsl:when test=\"$groupSupportEnabled = 'true' and $canAddGroups = 'true' and $isSubcommunity != 'true'\"> <td width=\"250px\" class=\"lotusAlignRight\" style=\"padding-top: 10px;\"> <span> <xsl:value-of select=\"$rs_member_members_colon\"/> <label for=\"addMembersSelect\" class=\"lotusAccess\"><xsl:value-of select=\"$rs_member_member_role\"/></label> <label for=\"addMembersWidgetPeopleTypeAhead\" class=\"lotusAccess\"><xsl:value-of select=\"$rs_members_typeahead\"/></label> <label for=\"addPeopleOrGroupsSelect\" class=\"lotusAccess\"><xsl:value-of select=\"$rs_member_member_type\"/></label> <select style=\"margin:0 5px 0 5px;\" id=\"addPeopleOrGroupsSelect\" onkeydown=\"{$widgetObj}.processTAKeyDown(event, this.value)\" onchange=\"{$widgetObj}.processTASelect(this.value)\" role=\"listbox\"> <option role=\"option\" value=\"people\" selected=\"selected\"><xsl:value-of select=\"$rs_member_people\"/></option> <option role=\"option\" value=\"groups\"><xsl:value-of select=\"$rs_member_groups\"/></option> </select> <label><xsl:value-of select=\"$rs_member_as\"/></label> <label id=\"addMemberGroupMember\" style=\"display: none\">&#160;<xsl:value-of select=\"$rs_member_members\"/></label> </span> </td> </xsl:when> <xsl:otherwise> <td width=\"120px\" class=\"lotusAlignRight\" style=\"padding-top: 16px;\"> <span> <label for=\"addMembersSelect\"><xsl:value-of select=\"$rs_member_member_role\"/></label> <label for=\"addMembersWidgetPeopleTypeAhead\" class=\"lotusAccess\"><xsl:value-of select=\"$rs_members_typeahead\"/></label> </span> </td> </xsl:otherwise> </xsl:choose> <td id=\"addMembersWidgetTD\"> <xsl:if test=\"$groupSupportEnabled = 'true' and $canAddGroups = 'true' and $isSubcommunity != 'true'\"> <label class=\"lotusHidden\" for=\"groupSelect\">group select</label> <div id=\"addGroupsWidget\" style=\"display:none\" aria-hidden=\"true\">hidden</div> </xsl:if> <div id=\"addMembersWidget\">hidden</div> </td> </tr> <tr> <td colspan=\"10\"> <span id=\"memberListContainerExternal\"> <div class=\"field\" id=\"memberListContainer\" style=\"display:none;\"> <div id=\"memberList\" class=\"memberList\" aria-labelledby=\"addMembersWidget\" role=\"listbox\"></div> </div> </span> </td> </tr> <tr id=\"addAllParentMembersRow\" style=\"display:none\" aria-hidden=\"true\"> <td class=\"lotusFormFieldRow\" colspan=\"2\"> <input type=\"checkbox\" role=\"checkbox\" name=\"addAllParentMembers\" id=\"addAllParentMembers\" onclick=\"{$widgetObj}.toggleSubcommunityMembers(this, dojo.byId('addMembersRow'));\" /> <label for=\"addAllParentMembers\"><xsl:value-of select=\"$rs_member_sub_addall\"/></label> </td> </tr> </table> </td> <td width=\"50px\" class=\"lotusFormLabel\"> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td colspan=\"3\" class=\"lotusFormFooter\"> <input type=\"button\" role=\"button\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.saveMemberFields(this.form);\" value=\"{$rs_member_save}\" name=\"submit\"/> <input type=\"button\" role=\"button\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.cancelMemberCreateForm();dojo.byId('memberAddButtonLink').focus(); return false;\" value=\"{$rs_member_cancel}\" /> </td> </tr> </table> </fieldset> </form> </div> </div> </xsl:template> <xsl:template name=\"inviteMembers\"> <div id=\"memberInviteFormDiv\" style=\"display:none\" wairole=\"application\" role=\"application\"> <div id=\"wai_memberInviteFormDiv\"> <form method=\"post\" name=\"memberInviteForm\" id=\"memberInviteForm\" class=\"lotusForm\" role=\"application\"> <fieldset> <legend class=\"lotusHidden\"><xsl:value-of select=\"$rs_invite_members_fieldset\"/></legend> <input type=\"hidden\" name=\"dangerousurlnonce\"/> <input type=\"hidden\" name=\"communityUuid\"/> <input type=\"hidden\" name=\"memberInvitees\" /> <input type=\"hidden\" name=\"memberInviteesEmails\" /> <table class=\"lotusTable lotusFormTable\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\" role=\"presentation\"> <tr class=\"lotusFormFieldRow\"> <td colspan=\"3\" class=\"lotusFormTitle\"> <h2><xsl:value-of select=\"$rs_member_invite_members\"/></h2> </td> </tr> <tr class=\"lotusFormFieldRow\" id=\"inviteNoticeRow\" style=\"display:none\"> <td width=\"155px\" class=\"lotusFormLabel\"></td> <td class=\"lotusIndent10\"> <label for=\"inviteMembersWidget\"><xsl:value-of select=\"$rs_member_sub_notice\"/></label> </td> <td class=\"lotusFormFieldRow\" width=\"7%\"> </td> </tr> <tr class=\"lotusFormFieldRow\"> <td width=\"155px\" class=\"lotusFormLabel\" style=\"padding-top: 16px;\"> <label for=\"inviteMembersWidgetPeopleTypeAhead\"><xsl:value-of select=\"$rs_member_members_colon\"/></label> </td> <td> <table style=\"width: 500px;\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" role=\"presentation\"> <tr id=\"inviteMembersRow\"> <td id=\"inviteMembersWidgetTD\"> <div id=\"inviteMembersWidget\"> </div> </td> </tr> <tr id=\"inviteAllParentMembersRow\" style=\"display:none\"> <td class=\"lotusFormFieldRow\"> <input type=\"checkbox\" role=\"checkbox\" name=\"inviteAllParentMembers\" id=\"inviteAllParentMembers\" onclick=\"{$widgetObj}.toggleSubcommunityMembers(this, dojo.byId('inviteMembersRow'));\" /> <label for=\"inviteAllParentMembers\"><xsl:value-of select=\"$rs_member_sub_inviteall\"/></label> </td> </tr> </table> </td> <td width=\"7%\" /> </tr> <tr class=\"lotusFormFieldRow\"> <td colspan=\"3\" class=\"lotusFormFooter\"> <input type=\"button\" role=\"button\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.saveInviteFields(this.form);\" value=\"{$rs_member_create_invite}\" name=\"submit\"/> <input type=\"button\" role=\"button\" class=\"lotusFormButton\" onclick=\"{$widgetObj}.cancelMemberInviteForm();dojo.byId('memberInviteButtonLink').focus(); return false;\" value=\"{$rs_member_cancel}\" /> </td> </tr> </table> </fieldset> </form> </div> </div> </xsl:template> <xsl:template name=\"importMembers\"> <div id=\"importMembersDialogContent\" style=\"display: none;\"> <form method=\"POST\" name=\"memberAddForm\" id=\"importMembersForm\" class=\"lotusDialog lotusForm\" enctype=\"multipart/form-data\"> <fieldset> <legend class=\"lotusHidden\"><xsl:value-of select=\"$rs_import_members_fieldset\"/></legend> <input type=\"hidden\" name=\"isImport\" value=\"true\"/> <input type=\"hidden\" name=\"dangerousurlnonce\"/> <input type=\"hidden\" name=\"communityUuid\"/> <table class=\"lotusTable lotusFormTable\" summary=\"\" role=\"presentation\"> <tr class=\"lotusFormFieldRow\" id=\"importNoticeRow\" style=\"display:none;\"> <td style=\"padding-left:10px;padding-right:10px;\" colspan=\"2\"> <label for=\"addMembersWidget\"><xsl:value-of select=\"$rs_member_sub_notice\"/></label> </td> </tr> <tr> <td id=\"ActionGroupimportMembersForm\" width=\"15%\" rowspan=\"2\" class=\"lotusFormLabel lotusFormFieldRow\"> <xsl:value-of select=\"$rs_member_import_action\"/> </td> <td class=\"lotusFormFieldRow\"> <div aria-labelledby=\"ActionGroupimportMembersForm\" role=\"radiogroup\"> <div> <xsl:if test=\"$canAddOthers != 'true'\"> <xsl:attribute name=\"style\">display:none</xsl:attribute> </xsl:if> <input type=\"radio\" id=\"addImportedPeopleimportMembersForm\" name=\"importAction\" value=\"addImportedPeople\" onclick=\"selectRoleimportMembersForm.disabled=false;\" role=\"radio\" aria-checked=\"false\" tabindex=\"0\"> <xsl:if test=\"$canAddOthers = 'true'\"> <xsl:attribute name=\"checked\">checked</xsl:attribute> <xsl:attribute name=\"aria-checked\">true</xsl:attribute> </xsl:if> <xsl:if test=\"$canAddOthers != 'true' or $canInvite != 'true'\"> <xsl:attribute name=\"style\">display:none;</xsl:attribute> </xsl:if> </input> <label id=\"addImportedPeopleimportMembersForm_label\" for=\"addImportedPeopleimportMembersForm\"> <xsl:value-of select=\"$rs_member_import_action_add\"/> <xsl:text> </xsl:text> </label> <select name=\"role\" id=\"selectRoleimportMembersForm\" aria-labelledby=\"addImportedPeopleimportMembersForm_label\"> <option value=\"members\"><xsl:value-of select=\"$rs_member_members\"/></option> <option value=\"owners\"><xsl:value-of select=\"$rs_member_owners\"/></option> </select> </div> <xsl:if test=\"$canInvite = 'true'\"> <div> <input type=\"radio\" id=\"inviteImportedPeopleimportMembersForm\" name=\"importAction\" value=\"inviteImportedPeople\" onclick=\"selectRoleimportMembersForm.disabled=true;\" role=\"radio\" aria-checked=\"false\"> <xsl:if test=\"$canAddOthers != 'true'\"> <xsl:attribute name=\"checked\">checked</xsl:attribute> <xsl:attribute name=\"aria-checked\">true</xsl:attribute> </xsl:if> <xsl:if test=\"$canAddOthers != 'true' or $canInvite != 'true'\"> <xsl:attribute name=\"style\">display:none;</xsl:attribute> </xsl:if> </input> <label for=\"inviteImportedPeopleimportMembersForm\"><xsl:value-of select=\"$rs_member_import_action_invite\"/></label> </div> </xsl:if> </div> </td> </tr> <tr> <td/> </tr> <tr> <td id=\"PeopleGroupimportMembersForm\" width=\"15%\" rowspan=\"2\" class=\"lotusFormLabel lotusFormFieldRow\" style=\"word-break: keep-all;\"> <xsl:value-of select=\"$rs_member_import_people_to_import\"/> </td> <td class=\"lotusFormFieldRow\"> <div aria-labelledby=\"PeopleGroupimportMembersForm\" role=\"radiogroup\"> <div> <input type=\"radio\" id=\"radiotextareaimportMembersForm\" name=\"csvinput\" value=\"usetextarea\" checked=\"checked\" onclick=\"csvtextareaimportMembersForm.disabled=false; csvfileimportMembersForm.disabled=true;\" role=\"radio\" aria-checked=\"true\"/> <label id=\"radiotextareaimportMembersForm_label\" for=\"radiotextareaimportMembersForm\"><xsl:value-of select=\"$rs_member_import_enter_email\"/></label> </div><div> <textarea style=\"width: 90%\" class=\"lotusText\" name=\"csvtextarea\" id=\"csvtextareaimportMembersForm\" aria-labelledby=\"radiotextareaimportMembersForm_label\"> <xsl:text> </xsl:text> </textarea> </div><div> <input type=\"radio\" id=\"radiocsvfileimportMembersForm\" name=\"csvinput\" value=\"usefile\" onclick=\"csvtextareaimportMembersForm.disabled=true; csvfileimportMembersForm.disabled=false;\" role=\"radio\" aria-checked=\"false\"/> <label id=\"radiocsvfileimportMembersForm_label\" for=\"radiocsvfileimportMembersForm\"><xsl:value-of select=\"$rs_member_import_select_file\"/></label> </div><div> <input type=\"file\" id=\"csvfileimportMembersForm\" name=\"csvfile\" size=\"50\" disabled=\"true\" aria-labelledby=\"radiocsvfileimportMembersForm_label\"/> </div> </div> </td> </tr> </table> </fieldset> </form> </div> </xsl:template> <xsl:template name=\"exportMembers\"> <div id=\"exportMembersDialogContent\" style=\"width: 450px; display: none;\"> <div id=\"exportwarningdivexportMembersForm\"><p></p></div> <form method=\"POST\" id=\"exportMembersForm\" class=\"lotusDialog lotusForm\"> <fieldset> <legend class=\"lotusHidden\"><xsl:value-of select=\"$rs_export_members_fieldset\"/></legend> <input type=\"hidden\" name=\"export\" value=\"true\"/> <input type=\"hidden\" name=\"communityUuid\"/> <table class=\"lotusTable lotusFormTable lotusForm\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\" role=\"presentation\"> <tr style=\"height: 60px;\"> <td class=\"lotusFormFieldRow lotusFormLabel\" style=\"vertical-align: middle; width: 33%;\"> <xsl:value-of select=\"$rs_member_export_colon\"/> </td> <td class=\"lotusFormFieldRow\" style=\"vertical-align: middle;\"> <input type=\"checkbox\" checked=\"yes\" name=\"role\" value=\"owner\" id=\"ownersCheckboxexportMembersForm\"/> <xsl:text disable-output-escaping=\"yes\">&#160;</xsl:text> <label for=\"ownersCheckboxexportMembersForm\"><xsl:value-of select=\"$rs_member_owners\"/></label> </td> <td class=\"lotusFormFieldRow\" style=\"vertical-align: middle;\"> <input type=\"checkbox\" checked=\"yes\" name=\"role\" value=\"member\" id=\"membersCheckboxexportMembersForm\"/> <xsl:text disable-output-escaping=\"yes\">&#160;</xsl:text> <label for=\"membersCheckboxexportMembersForm\"><xsl:value-of select=\"$rs_member_members\"/></label> </td> </tr> </table> </fieldset> </form> </div> </xsl:template> <xsl:template name=\"membersList\"> <table width=\"100%\"> <xsl:call-template name=\"outputPagingBannerFull\"/> </table> <div class=\"lotusSort\"> <ul class=\"lotusInlinelist\" role=\"toolbar\" aria-labelledby=\"sortByColon\" > <li id=\"sortByColon\" class=\"lotusFirst\"><xsl:value-of select=\"$rs_member_sortby_colon\"/> </li> <li class=\"lotusFirst\"> <a id=\"memButtonAll\" href=\"javascript:void(0);\" role=\"button\" onclick=\"{$widgetObj}.executeSortByButton(this.id, 'name'); \"> <xsl:choose> <xsl:when test=\"$sortButtonID = 'memButtonAll'\"> <xsl:attribute name=\"class\">lotusActiveSort lotusDescending</xsl:attribute> <xsl:attribute name=\"aria-pressed\">true</xsl:attribute> <xsl:variable name=\"sortName\" select=\"$rs_member_sortby_name\"/> <xsl:choose> <xsl:when test=\"$sortDirection = 'true'\"> <xsl:variable name=\"asc\" select=\"$rs_member_sortby_ascending\"/> <xsl:variable name=\"ascCon\" select=\"concat($sortName, ' ',$asc)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$ascCon\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:variable name=\"desc\" select=\"$rs_member_sortby_descending\"/> <xsl:variable name=\"descCon\" select=\"concat($sortName, ' ',$desc)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$descCon\"/></xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"aria-pressed\">false</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"$rs_member_sortby_name\"/> <xsl:if test=\"$sortButtonID = 'memButtonAll'\"> <xsl:choose> <xsl:when test=\"$sortDirection = 'true'\"> <span class=\"lotusAltText\">&#x25B2;</span> </xsl:when> <xsl:otherwise> <span class=\"lotusAltText\">&#x25BC;</span> </xsl:otherwise> </xsl:choose> </xsl:if> </a> </li> <li> <a id=\"memButtonNewest\" href=\"javascript:void(0);\" role=\"button\" onclick=\"{$widgetObj}.executeSortByButton(this.id, 'date');\" > <xsl:choose> <xsl:when test=\"$sortButtonID = 'memButtonNewest'\"> <xsl:attribute name=\"class\">lotusActiveSort lotusDescending</xsl:attribute> <xsl:attribute name=\"aria-pressed\">true</xsl:attribute> <xsl:variable name=\"sortDate\" select=\"$rs_member_sortby_date\"/> <xsl:choose> <xsl:when test=\"$sortDirection = 'true'\"> <xsl:variable name=\"asc1\" select=\"$rs_member_sortby_ascending\"/> <xsl:variable name=\"ascCon1\" select=\"concat($sortDate, ' ',$asc1)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$ascCon1\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:variable name=\"desc1\" select=\"$rs_member_sortby_descending\"/> <xsl:variable name=\"descCon1\" select=\"concat($sortDate, ' ',$desc1)\"/> <xsl:attribute name=\"aria-label\"> <xsl:value-of select=\"$descCon1\"/></xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"aria-pressed\">false</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:value-of select=\"$rs_member_sortby_date\"/> <xsl:if test=\"$sortButtonID = 'memButtonNewest'\"> <xsl:choose> <xsl:when test=\"$sortDirection = 'true'\"> <span class=\"lotusAltText\">&#x25B2;</span> </xsl:when> <xsl:otherwise> <span class=\"lotusAltText\">&#x25BC;</span> </xsl:otherwise> </xsl:choose> </xsl:if> </a> </li> </ul> </div> <table id=\"membersEntriesFull{$widgetId}\" width=\"100%\"> <xsl:call-template name=\"outputEntriesFull\"> <xsl:with-param name=\"totalOwners\" select=\"atom:feed/snx:totalowners/text()\" /> <xsl:with-param name=\"entries\" select=\"atom:feed/atom:entry\"/> </xsl:call-template> </table> <table width=\"100%\"> <xsl:call-template name=\"outputPagingBannerFull\"> <xsl:with-param name=\"isBottom\" select=\"true()\"/> </xsl:call-template> </table> <table width=\"100%\"> <tr> <td> <div class=\"lotusFeeds\"> <a class=\"lotusFeed lotusAction\" onclick=\"{$widgetObj}.atomLinkOnClick()\" href=\"{$atomFeedUrl}\"> <xsl:attribute name=\"title\"><xsl:value-of select=\"$rs_member_subscribe_feed_members\"/></xsl:attribute> <xsl:value-of select=\"$rs_member_subscribe_feed_members\"/> </a> </div> </td> </tr> </table> </xsl:template> <xsl:template name=\"outputNumberOfUsersAndGroups\"> <xsl:param name=\"numUsers\" /> <xsl:param name=\"numGroups\" /> <xsl:choose> <xsl:when test=\"$numUsers >= 0 or $numGroups >=0\"> <xsl:text> (</xsl:text> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numUsers = 1\"> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_person_count_singular\" /> <xsl:with-param name=\"params\" select=\"$numUsers\" /> <xsl:with-param name=\"paramSeparator\" select=\"','\" /> </xsl:call-template> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numUsers > 1\"> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_member_person_count_plural\" /> <xsl:with-param name=\"params\" select=\"$numUsers\" /> <xsl:with-param name=\"paramSeparator\" select=\"','\" /> </xsl:call-template> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numUsers > 0 and $numGroups > 0\"> <xsl:text> </xsl:text> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numGroups = 1\"> <xsl:value-of select=\"$rs_group_count_singular\" /> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numGroups > 1\"> <xsl:call-template name=\"replacePlaceHolders\"> <xsl:with-param name=\"inputString\" select=\"$rs_group_count_plural\" /> <xsl:with-param name=\"params\" select=\"$numGroups\" /> <xsl:with-param name=\"paramSeparator\" select=\"','\" /> </xsl:call-template> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:choose> <xsl:when test=\"$numUsers >= 0 or $numGroups >=0\"> <xsl:text>)</xsl:text> </xsl:when> <xsl:otherwise /> </xsl:choose> </xsl:template> </xsl:stylesheet>");

;if(!dojo._hasResource["lconn.comm.communityMembers.CommunityMembers"]){
dojo._hasResource["lconn.comm.communityMembers.CommunityMembers"]=true;
dojo.provide("lconn.comm.communityMembers.CommunityMembers");
dojo.require("dojo.i18n");
dojo.require("dojo.string");
dojo.require("dojo.parser");
dojo.require("dijit.form.Button");
dojo.require("dijit.Dialog");
dojo.require("dijit.form.TextBox");
dojo.require("dojo.io.iframe");
dojo.require("lconn.core.HelpLauncher");
dojo.require("com.ibm.lconn.layout.people");
dojo.require("lconn.core.aria.TabPanel");
dojo.require("lconn.core.util._XSLCache");
dojo.require("lconn.core.DialogUtil");
dojo.requireLocalization("lconn.comm","strings");
lconn.comm.communityMembers.CommunityMembers=function(){
this.MEMBERSDOMID="membersdiv";
this.FULLMEMBERSDOMID="fullmembersdiv";
this.EXPORTWARNINGDOMID="exportwarningdivexportMembersForm1";
this.ADDBUTTONDOMID="memberAddButtonLink";
this.INVITEBUTTONDOMID="memberInviteButtonLink";
this.MEMBERSSELECTDOMID="addMembersSelect";
this.NETWORKTABDOMID="networkTab";
this.INVITESTABDOMID="invitesTab";
this.NETWORKDIVDOMID="networkDiv";
this.INVITESDIVDOMID="invitesDiv";
this.MEMBERSLISTDOMID="membersListId";
this.PEOPLEORGROUPSSELECTDOMID="addPeopleOrGroupsSelect";
this.ADDGROUPSTYPEAHEADID="addGroupsWidgetPeopleTypeAhead";
this.ADDFORMDIVDOMID="memberAddFormDiv";
this.ADDMEMBERSDOMID="addMembersWidget";
this.ADDGROUPSDOMID="addGroupsWidget";
this.INVITEFORMDIVDOMID="memberInviteFormDiv";
this.INVITEMEMBERSDOMID="inviteMembersWidget";
this.ADDGROUPSMEMBERDOMID="addMemberGroupMember";
this.ADDGROUPSSELECTDOMID="groupSelect";
this.MEMBERSLASTSPANDOMID_PREFIX="membersLastSpan";
this.MEMBERSLASTSPANDOMID="";
this.MEMBERS_FEED="/service/atom/forms/community/members";
this.MEMBERS_FEED_NO_FORMS="/service/atom/community/members";
this.MEMBERS_ADDSUBMIT="/service/html/community/members/add";
this.MEMBERS_INVITESUBMIT="/service/atom/forms/community/invitesRequest/create?communityUuid=";
this.MEMBERS_BATCHINVITESUBMIT="/service/html/community/members/batchinvite";
this.MEMBERS_INVITESREVOKE="/service/html/community/invite/revoke";
this.MEMBERS_EXPORT_ACTION="/service/html/community/members/export";
this.COMMUNITY_VIEW_PAGE="/service/html/communityview";
this.MEMBERS_FULL_VIEW_PAGE="service/html/community/members";
this.PROFILES_PHOTO_ACTION="/photo.do";
this.ALL_COMMUNITIES_MEMBER_SEARCH_URL="/service/html/allcommunities";
this.USERID_PARAM="userid";
this.COMMUNITYUUID_PARAM="communityUuid";
this.PAGESIZE_PARAM="ps";
this.ASC_PARAM="asc";
this.DESC_PARAM="desc";
this.SORTBY_PARAM="sortBy";
this.SORTFIELD_VALUE_BY_CREATED="created";
this.SORTFIELD_VALUE_BY_NAME="name";
this.SORTFIELD_VALUE_RANDOM="random";
this.ROLE_PARAM="role";
this.ROLE_VALUE_MEMBER="member";
this.ROLE_VALUE_OWNER="owner";
this.ROLE_VALUE_ALL="all";
this.FILTER_ROLE="filterRole";
this.FILTER_PHOTO="filterPhoto";
this.ORGID_PARAM="orgId";
this.NOT_ORGID_PARAM="notInOrgId";
this.INVITE_SORTFIELD_VALUE_BY_NAME="name";
this.INVITE_SORTFIELD_VALUE_BY_DATE_INVITED="modified";
this.UPARROW="/nav/common/styles/images/arrowScrollUp.gif";
this.DOWNARROW="/nav/common/styles/images/arrowScrollDown.gif";
this.BLANKIMAGE=djConfig.blankGif;
this.FORMAT_PARAM="format";
this.FORMAT_VALUE_FULL="full";
this.PAGINGTYPE_PARAM="pagingtype";
this.PAGINGTYPE_VALUE_OFFSETS="offsets";
this.membersTimeout=null;
this.applicationContext=null;
this.commId=null;
this.loggedInUserid=null;
this.orgId=null;
this.canAddOthers=null;
this.canAddGroups=null;
this.groupSupportEnabled=null;
this.canRemoveOthers=null;
this.canViewInvites=null;
this.canInvite=null;
this.canRevokeInvites=null;
this.profileService=null;
this.profilePhotoPartialUrl=null;
this.atomCommunityMembersUrl=null;
this.atomCommunityMembersUrlForSubscription=null;
this.membersPerPage=5;
this.currentMembersUIState=null;
this.currentInvitesUIState=null;
this.fullMembersMode=null;
this.selectedTab=null;
this.widgetObjStr=null;
this.linkSelf=null;
this.linkPrev=null;
this.numEntries=null;
this.selectedCount=null;
this.isEditInProgress=false;
this.addMembers_W=null;
this.addGroups_W=null;
this.inviteMembers_W=null;
this.lastMembersAtomUrl=null;
this.lastMod="0";
this.useLastMod=true;
this.bidi=false;
this.dangerousurlnonce=null;
this.exposeEmail=false;
this.forceImportAvailable=false;
this.exposePublicCommunities=true;
this.stringResources=null;
this.filterRole=this.ROLE_VALUE_ALL;
this.filterString=null;
this.doshowFilterString=false;
this.filterStringHasFocus=false;
this.sortItem=null;
this.sortDirection=null;
this.sortElement=null;
this.hideImport=null;
this.hideExport=null;
this.loaded=false;
this.onLoad=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: onLoad()");
}
}
this.loadStrings();
var _1=this.iContext.getiWidgetAttributes();
this.membersPerPage=_1.getItemValue("membersPerPage");
this.resourceId=_1.getItemValue("resourceId");
this.parentResourceId=_1.getItemValue("parentResourceId");
this.widgetObjStr="_"+this.iContext.widgetId+"_iContext.scope";
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: widgetObjStr: "+this.widgetObjStr);
}
}
this.fullMembersMode=false;
var _2=this.iContext.getiDescriptor().getItemValue("mode");
if(_2=="fullpage"){
this.fullMembersMode=true;
}
this.selectedTab="network";
this.commId=_1.getItemValue("resourceId");
this.applicationContext=WidgetPlacementConfig.applicationContext;
if(typeof isBidi!="undefined"){
this.bidi=isBidi;
}
if(typeof dangerousurlnonce!="undefined"){
this.dangerousurlnonce=dangerousurlnonce;
}
if(typeof exposeEmail!="undefined"){
this.exposeEmail=exposeEmail;
}
if(typeof forceImportAvailable!="undefined"){
this.forceImportAvailable=forceImportAvailable;
}
if(typeof exposePublicCommunities!="undefined"){
this.exposePublicCommunities=exposePublicCommunities;
}
if(typeof memberLastMod!="undefined"){
this.setLastMod(memberLastMod);
}else{
if(typeof lastMod!="undefined"){
this.setLastMod(lastMod);
}
}
this.UPARROW=this.applicationContext+this.UPARROW;
this.DOWNARROW=this.applicationContext+this.DOWNARROW;
this.MEMBERSLASTSPANDOMID=this.MEMBERSLASTSPANDOMID_PREFIX+this.iContext.widgetId;
var _3=this.iContext.getUserProfile();
this.loggedInUserid=_3.getItemValue("userId");
this.orgId=_3.getItemValue("orgId");
this.canAddOthers=canAddOthers;
this.canRemoveOthers=canRemoveOthers;
this.canViewInvites=canViewInvites;
this.canInvite=canInvite;
this.canRevokeInvites=canRevokeInvites;
this.canAddGroups=canAddGroups;
this.groupSupportEnabled=null;
this.isSubcommunity=(this.parentResourceId!=null)&&(this.parentResourceId.length>0);
this.isLoggedInUserBizOwner=isLoggedInUserBizOwner;
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: canAddOthers: "+this.canAddOthers+", canRemoveOthers: "+this.canRemoveOthers+", groupSupportEnabled: "+this.groupSupportEnabled+", canAddGroups: "+this.canAddGroups+", orgId: "+this.orgId);
}
}
if(typeof profileService!="undefined"&&profileService!=null&&profileService!=""){
this.profileService=profileService;
this.profilePhotoPartialUrl=this.profileService+this.PROFILES_PHOTO_ACTION+"?"+this.USERID_PARAM+"=";
}else{
}
this.atomCommunityMembersUrl=this.applicationContext+this.MEMBERS_FEED+"?"+this.COMMUNITYUUID_PARAM+"="+this.commId;
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: this.atomCommunityMembersUrl: "+this.atomCommunityMembersUrl);
}
}
var _4=lconn.core.widgetUtils.handleRefresh(this.atomCommunityMembersUrl,this.iContext);
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: mod_atomCommunityMembersUrl: "+_4);
}
}
this.atomCommunityMembersUrl=_4;
this.atomCommunityMembersUrlForSubscription=this.applicationContext+this.MEMBERS_FEED_NO_FORMS+"?"+this.COMMUNITYUUID_PARAM+"="+this.commId;
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: this.atomCommunityMembersUrlForSubscription: "+this.atomCommunityMembersUrlForSubscription);
}
}
if(this.fullMembersMode==true){
this.membersPerPage=_1.getItemValue("membersPerPageFullPage");
this.MEMBERSDOMID=this.FULLMEMBERSDOMID;
if(this.canAddOthers){
}
this.currentMembersUIState=new lconn.comm.communityMembers.MembersUIState(this,null,null,null,this.membersPerPage);
this.currentMembersUIState.setFormat(this.FORMAT_VALUE_FULL);
this.executeNewestButton();
}else{
this.currentMembersUIState=new lconn.comm.communityMembers.MembersUIState(this,this.SORTFIELD_VALUE_BY_CREATED,this.DESC_PARAM,null,this.membersPerPage);
this.currentMembersUIState.setPagingType(this.PAGINGTYPE_VALUE_OFFSETS);
this.setCurrentMembersUIState(this.currentMembersUIState);
}
};
this.loadStrings=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: loadStrings()");
}
}
if(this.stringResources==null){
this.stringResources=dojo.i18n.getLocalization("lconn.comm","strings");
}
};
this.getOffsetTop=function(_5){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: getOffsetTop(): pElem: "+_5);
}
}
var _6=0;
var _7=_5;
while(_7){
_6+=_7.offsetTop;
_7=_7.offsetParent;
if(_7){
_6-=_7.scrollTop;
}
}
return _6;
};
this.getOffsetLeft=function(_8){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: getOffsetLeft(): pElem: "+_8);
}
}
var _9=0;
var _a=_8;
while(_a){
_9+=_a.offsetLeft;
_a=_a.offsetParent;
if(_a){
_9-=_a.scrollLeft;
}
}
return _9;
};
this.openEditUI=function(_b){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: openEditUI(): uniqueID: "+_b);
}
}
if(this.isEditInProgress){
return;
}
this.isEditInProgress=true;
var _c=this.iContext.getElementById(_b);
_c.style.overflow="visible";
var _d=this.iContext.getElementById("table"+_b);
var _e=this.iContext.getElementById("edit"+_b);
var _f=this.iContext.getElementById("form"+_b);
var _10=this.iContext.getElementById("editremove"+_b);
_10.style.visibility="hidden";
var _11="table"+_b;
_d.setAttribute("id",_11+"1");
var _12="name_"+_b;
var _13=this.iContext.getElementById("name_"+_b);
_13.setAttribute("id",_12+"1");
var _14="userid_"+_b;
var _15=this.iContext.getElementById(_14);
_15.setAttribute("id",_14+"1");
var _16="editremove"+_b;
_10.setAttribute("id",_16+"1");
var _17=_d.cloneNode(true);
_d.setAttribute("id",_11);
_13.setAttribute("id",_12);
_15.setAttribute("id",_14);
_10.setAttribute("id",_16);
var _18=_f;
_18.insertBefore(_17,_18.firstChild);
_e.style.width=_d.offsetWidth+5+"px";
if(_d.offsetWidth<380){
_e.style.width="380px";
}
initHelpLink("businessOwnerHelpId"+_b,this.stringResources["rs_member_businessowner_headder_tip"],this.stringResources["rs_member_businessowner_tip"],{HELP:this.stringResources["rs_member_tip_help"],CLOSE:this.stringResources["rs_member_tip_help"]});
_e.style.top=this.getOffsetTop(_d)+"px";
_e.style.left=this.getOffsetLeft(_d)+"px";
_e.style.borderStyle="solid";
_e.style.borderWidth="2px";
_e.style.display="block";
if(dojo.isIE&&this.bidi){
_e.style.position="static";
}
var _19=document.createElement("span");
_19.innerHTML=_13.innerHTML;
var _1a=this.iContext.getElementById("name_"+_b+"1");
parentVcardDiv=_1a.parentNode;
parentVcardDiv.parentNode.insertBefore(_19,parentVcardDiv);
parentVcardDiv.parentNode.removeChild(parentVcardDiv);
var _1b=this.iContext.getElementById("ownerradio"+_b);
_1b.focus();
};
this.closeEditUI=function(_1c){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: closeEditUI(): uniqueID: "+_1c);
}
}
var _1d=this.iContext.getElementById("edit"+_1c);
var _1e=this.iContext.getElementById("wai_edit"+_1c);
var _1f=this.iContext.getElementById("form"+_1c);
_1f.removeChild(_1f.firstChild);
var _20=this.iContext.getElementById("editremove"+_1c);
_20.style.visibility="visible";
var _21=this.iContext.getElementById("userid_"+_1c);
var _22=this.iContext.getElementById("name_"+_1c);
if(_21!=null){
_22.setAttribute("href",this.applicationContext+"/service/html/allcommunities?userid="+_21.innerHTML);
}else{
_22.setAttribute("href","javascript:void(0);");
}
_1d.style.display="none";
_1d.style.borderStyle="none";
_1d.style.borderWidth="0px";
var _23=this.iContext.getElementById(_1c);
_23.style.overflow="hidden";
_1f.reset();
this.isEditInProgress=false;
var _24=dojo.byId("edit_"+_1c);
if(_24){
_24.focus();
}
};
this.saveEdit=function(_25,_26,_27,_28,_29,_2a,_2b,_2c){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveEdit(): theForm: "+_25);
console.log("CommunityMembers.js: saveEdit(): editurl: "+_26);
console.log("CommunityMembers.js: saveEdit(): userid: "+_27);
console.log("CommunityMembers.js: saveEdit(): linkSelf: "+_28);
console.log("CommunityMembers.js: saveEdit(): uniqueID: "+_29);
}
}
var _2d=_25.elements["role"];
if(typeof _2d!="undefined"&&_2d!=null){
var _2e=null;
for(var x=0;x<_2d.length;x++){
if(_2d[x].checked){
_2e=_2d[x].value;
}
}
var _2f=this;
var _30=dojo.partial(function(_31,res,_32){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveEdit: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: saveEdit: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: saveEdit: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: saveEdit: callbackfn: ioArgs: "+_32);
}
}
_2f.closeEditUI(_29);
if((_27==_2f.loggedInUserid)||(_31=="business-owner")){
window.location.href=_2f.applicationContext+_2f.MEMBERS_FULL_VIEW_PAGE+"?"+_2f.COMMUNITYUUID_PARAM+"="+_2f.commId;
window.location.reload(true);
}else{
_2f.loadMembers(_28,null,true);
}
return res;
},_2e);
var _33="";
var _34=false;
if(_2e=="business-owner"){
_33="<category term='business-owner' scheme='http://www.ibm.com/xmlns/prod/sn/type'></category>";
_2e="owner";
_34=true;
}
var _35="<?xml version='1.0' encoding='utf-8'?>"+"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>"+"<contributor>"+"<snx:userid>"+_27+"</snx:userid>"+"</contributor>"+"<snx:role component='http://www.ibm.com/xmlns/prod/sn/communities'>"+_2e+"</snx:role>"+_33+"</entry>";
var _36=new Object();
_36["Content-Type"]="application/atom+xml";
if((_34&&confirm(dojo.string.substitute(_2b,[_2c])))||!_34){
this.setLastMod(null);
dojo.xhrPut({url:_26,putData:_35,sync:true,load:_30,error:dojo.hitch(this,this.xhrerrorcallback),headers:_36});
}
}
};
this.xhrerrorcallback=function(res,_37){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: xhrerrorcallback: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: xhrerrorcallback: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: xhrerrorcallback: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: xhrerrorcallback: ioArgs: "+_37);
}
}
if(this.lastMembersAtomUrl!=null){
this.loadMembers(this.lastMembersAtomUrl,null,true);
}
if((typeof _37.xhr.status!="unknown")&&_37.xhr.status!=302&&_37.xhr.status!=0&&_37.xhr.status!=12150){
var _38=res.message;
var _39="";
var _3a;
if((_37.xhr.status==404||_37.xhr.status==409)&&typeof (res.responseText)!="undefined"&&res.responseText!=null){
_38=res.responseText;
var _3b="<message>";
var _3c="</message>";
var _3d=_38.indexOf(_3b);
var _3e=_38.indexOf(_3c);
_38=_38.substr(_3d+_3b.length,_3e-(_3d+_3b.length));
}else{
if(_37.xhr.status==401){
_3a=this.stringResources["rs_member_not_logged_in_error"];
_38=_3a;
}else{
_3a=dojo.string.substitute(this.stringResources["rs_member_generic_error"],[res.message]);
_38=_3a;
}
}
var _3f="membersmessagesstart"+"<div class=\"lotusMessage"+_39+"\" >"+"<img class=\"iconsMessages16 iconsMessages16-msgError16\" src=\""+this.BLANKIMAGE+"\" alt=\"\" title=\""+_38+"\"/>"+"<span>"+_38+"</span>"+"</div>"+"membersmessagesend";
this.displayMessages(_3f);
}
if(this.lastMembersAtomUrl==null){
window.location.href=this.applicationContext+this.MEMBERS_FULL_VIEW_PAGE+"?"+this.COMMUNITYUUID_PARAM+"="+this.commId;
window.location.reload(true);
}
};
this.jumpToPage=function(obj,_40,_41,_42,_43){
_40=parseInt(_40);
if(isNaN(_40)||_40<1){
_40=1;
}
if(_40>_42){
_40=_42;
}
if(obj&&obj.value){
obj.value=_40;
}
if((typeof _43=="undefined"||_43==13)&&_40!=_41){
this.pageTo(null,_40-1);
}
};
this.pageTo=function(_44,_45){
var _46="&page="+(_45+1);
if(this.selectedTab=="network"){
this.setCurrentMembersUIState(this.currentMembersUIState,_46);
}else{
var _47=this.applicationContext+"/service/atom/forms/community/invites?"+this.COMMUNITYUUID_PARAM+"="+this.commId+this.currentInvitesUIState.getParams()+_46;
this.loadInvites(_47);
}
};
this.doNextPrev=function(_48){
if(this.selectedTab=="network"){
this.loadMembers(_48);
}else{
this.loadInvites(_48);
}
};
this.doMemberDelete=function(_49,_4a,_4b,_4c,_4d,_4e,_4f){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: doMemberDelete(): numEntries: "+_49);
console.log("CommunityMembers.js: doMemberDelete(): linkSelf: "+_4a);
console.log("CommunityMembers.js: doMemberDelete(): linkPrev: "+_4b);
console.log("CommunityMembers.js: doMemberDelete(): confirmMsg: "+_4c);
console.log("CommunityMembers.js: doMemberDelete(): displayName: "+_4d);
console.log("CommunityMembers.js: doMemberDelete(): deleteUrl: "+_4e);
}
}
if(this.isEditInProgress){
return;
}
var _50=this.stringResources["rs_member_remove_members"];
var ok=dojo.i18n.getLocalization("lconn.core","strings").rs_ok;
var _51=this.stringResources["rs_member_cancel"];
var _52=dojo.byId(_4d).innerHTML;
var _53=this;
var _54=function(_55){
if(!_55){
return;
}
_53.numEntries=_49;
_53.linkSelf=_4a;
_53.linkPrev=_4b;
_53.setLastMod(null);
var _56=function(res,_57){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: doMemberDelete: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: doMemberDelete: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: doMemberDelete: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: doMemberDelete: callbackfn: ioArgs: "+_57);
}
}
var _58=_53.linkSelf;
if(_53.numEntries<=1&&_53.linkPrev!=null&&_53.linkPrev!=""){
_58=_53.linkPrev;
}
_53.loadMembers(_58,null,true);
};
dojo.xhrDelete({url:_4e,load:_56,error:dojo.hitch(_53,_53.xhrerrorcallback)});
};
lconn.core.DialogUtil.prompt(_50,dojo.string.substitute(_4c,[_52]),ok,_51,_54);
};
this.setCurrentMembersUIState=function(_59,_5a){
if(typeof _5a!="undefined"&&_5a!=null){
this.loadMembers(_59.toString()+_5a);
}else{
this.loadMembers(_59.toString());
}
};
this.displaySorted=function(_5b){
this.currentMembersUIState.setSortField(_5b);
this.setCurrentMembersUIState(this.currentMembersUIState);
};
this.displayDirection=function(_5c){
this.currentMembersUIState.setSortDirection(_5c);
this.setCurrentMembersUIState(this.currentMembersUIState);
};
this.updateFilter=function(_5d){
var _5e;
if(_5d==this.ROLE_VALUE_ALL||_5d==this.ROLE_VALUE_MEMBER||_5d==this.ROLE_VALUE_OWNER){
_5e=new lconn.comm.communityMembers.CommunityRoleFilter(this,_5d);
}else{
_5e=new lconn.comm.communityMembers.CommunityOrgFilter(this,_5d);
}
var _5f={};
_5f[this.FILTER_ROLE]=_5e;
this.currentMembersUIState.setFilters(_5f);
this.setCurrentMembersUIState(this.currentMembersUIState);
};
this.displayFilterRole=function(_60){
this.filterRole=_60;
this.updateFilter(_60);
};
this.showFullMembersWidget=function(){
this.iContext.iEvents.fireEvent("onModeChanged","","{'newMode': 'fullpage'}");
return false;
};
this.setLastMod=function(_61){
this.lastMod=_61;
memberLastMod=_61;
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: setLastMod(): Updated this.lastMod: "+this.lastMod);
}
}
};
this.configLastModInGivenUrl=function(_62,_63,_64){
if(typeof (_63)!="undefined"&&_63!=null&&_63!=""){
this.setLastMod(_63);
}
if(_62.indexOf("lastMod")<0){
if(this.useLastMod){
if(this.lastMod!=null&&this.lastMod!=""){
_62+="&lastMod="+this.lastMod;
}
}
}else{
var _65="lastMod=";
var _66=_62.indexOf(_65);
var _67=_62.substring(0,_66);
var _68=_62.substring(_66);
var _69=_68.indexOf("&");
var _6a="";
if(_69>-1){
_6a=_68.substring(0,_69);
_68=_68.substring(_69);
}else{
_6a=_68.substring(0);
_68=null;
}
if((this.useLastMod)&&this.lastMod!=null&&this.lastMod!=""){
if(this.lastMod==_6a){
return _62;
}
console.log("CommunityMembers.js: configLastModInGivenUrl: updating lastMod in old membersAtomUrl = "+_62);
if(_68!=null){
_62=_67+_65+this.lastMod+_68;
}else{
_62=_67+_65+this.lastMod;
}
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: configLastModInGivenUrl: updated lastMod in new membersAtomUrl = "+_62);
}
}
}else{
if(_68!=null){
_62=_67+_68.substring(1);
}else{
_62=_67.substring(0,_67.length-1);
}
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: configLastModInGivenUrl: removed lastMod in new membersAtomUrl = "+_62);
}
}
}
}
return _62;
};
this.loadMembers=function(_6b,_6c,_6d){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: loadMembers(): membersAtomUrl: "+_6b);
console.log("CommunityMembers.js: loadMembers(): communityLastMod: "+_6c);
}
}
_6b=this.configLastModInGivenUrl(_6b,_6c,_6d);
this.useLastMod=false;
this.lastMembersAtomUrl=_6b;
this.isEditInProgress=false;
var _6e=this.iContext.getElementById("membersmessages");
if(typeof _6e!="undefined"&&_6e!=null){
_6e.style.display="none";
}
var _6f=this.iContext.getElementById(this.MEMBERSLASTSPANDOMID);
if(typeof _6f!="undefined"&&_6f!=null){
_6f.parentNode.removeChild(_6f);
}
var _70=new Array();
var x=0;
_70[x++]=["enableBizCard","true"];
if(this.profilePhotoPartialUrl!=null&&this.profilePhotoPartialUrl!=""){
_70[x++]=["photoUrl",this.profilePhotoPartialUrl];
}
if(this.fullMembersMode!=null&&this.fullMembersMode){
_70[x++]=["fullMembersMode",this.fullMembersMode];
}
if(this.selectedTab!=null&&this.selectedTab){
_70[x++]=["selectedTab",this.selectedTab];
}
if(this.loggedInUserid!=null&&this.loggedInUserid!=""){
_70[x++]=["loggedInUserid",this.loggedInUserid];
}
if(this.canAddOthers!=null&&this.canAddOthers!=""){
_70[x++]=["canAddOthers",this.canAddOthers];
}
if(this.canRemoveOthers!=null&&this.canRemoveOthers!=""){
_70[x++]=["canRemoveOthers",this.canRemoveOthers];
}
if(this.canViewInvites!=null&&this.canViewInvites!=""){
_70[x++]=["canViewInvites",this.canViewInvites];
}
if(this.canInvite!=null&&this.canInvite!=""){
_70[x++]=["canInvite",this.canInvite];
}
if(this.canAddGroups!=null&&this.canAddGroups!=""){
_70[x++]=["canAddGroups",this.canAddGroups];
}
if(this.groupSupportEnabled!=null&&this.groupSupportEnabled!=""){
_70[x++]=["groupSupportEnabled",this.groupSupportEnabled];
}
if(this.isSubcommunity!=null){
_70[x++]=["isSubcommunity",this.isSubcommunity];
}
if(this.UPARROW!=null&&this.UPARROW!=""){
_70[x++]=["upArrow",this.UPARROW];
}
if(this.DOWNARROW!=null&&this.DOWNARROW!=""){
_70[x++]=["downArrow",this.DOWNARROW];
}
if(this.BLANKIMAGE!=null&&this.BLANKIMAGE!=""){
_70[x++]=["blankImage",this.BLANKIMAGE];
}
if(this.currentMembersUIState.getSortButtonID()!=null){
_70[x++]=["sortButtonID",this.currentMembersUIState.getSortButtonID()];
}
if(this.currentMembersUIState.getSortDirection()!=null){
_70[x++]=["sortDirection",this.currentMembersUIState.getSortDirection()];
}
if(this.exposeEmail!=null){
_70[x++]=["exposeEmail",this.exposeEmail];
}
if(this.forceImportAvailable!=null){
_70[x++]=["forceImportAvailable",this.forceImportAvailable];
}
if(this.exposePublicCommunities!=null){
_70[x++]=["exposePublicCommunities",this.exposePublicCommunities];
}
if(this.bidi!=null){
_70[x++]=["bidi",this.bidi];
}
if(this.atomCommunityMembersUrl!=null){
_70[x++]=["atomFeedUrl",this.atomCommunityMembersUrlForSubscription];
}
if(this.filterString!=null){
_70[x++]=["filterString",this.filterString];
}
if(this.filterRole!=null){
_70[x++]=["filterRole",this.filterRole];
}
if(this.doshowFilterString!=null){
_70[x++]=["showFilterString",this.doshowFilterString];
}
if(this.filterStringHasFocus!=null&&this.filterStringHasFocus!=""){
_70[x++]=["updateMemberList",this.filterStringHasFocus];
}else{
_70[x++]=["updateMemberList","false"];
}
if((typeof communityOrgId!="undefined")&&communityOrgId!=null){
_70[x++]=["communityOrgId",communityOrgId];
}
if(this.isLoggedInUserBizOwner!=null&&this.isLoggedInUserBizOwner!=""){
_70[x++]=["isLoggedInUserBizOwner",this.isLoggedInUserBizOwner];
}
_70[x++]=["applicationContext",this.applicationContext];
if(this.stringResources!=null){
for(str in this.stringResources){
_70[x++]=[str,this.stringResources[str]];
}
}
_70[x++]=["widgetObj",this.widgetObjStr];
_70[x++]=["widgetId",this.iContext.widgetId];
_70[x++]=["communityType",communityType];
_70[x++]=["isInternalOnly",isInternalOnly];
_70[x++]=["doNotShowOrgItems",doNotShowOrgItems];
_70[x++]=["rs_external_indicator",rs_external_indicator];
this.transformAndRenderMembers(_6b,_70);
this.handleAfterLoad();
};
this.loadInvites=function(_71){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: loadInvites(): invitesAtomUrl: "+_71);
}
}
if(_71==null){
_71=this.applicationContext+"/service/atom/forms/community/invites?"+this.COMMUNITYUUID_PARAM+"="+this.commId+this.currentInvitesUIState.getParams();
}
var _72=this.iContext.getElementById("membersmessages");
if(typeof _72!="undefined"&&_72!=null){
_72.style.display="none";
}
var _73=this.iContext.getElementById(this.MEMBERSLASTSPANDOMID);
if(typeof _73!="undefined"&&_73!=null){
_73.parentNode.removeChild(_73);
}
var _74=new Array();
var x=0;
_74[x++]=["enableBizCard","true"];
if(this.profilePhotoPartialUrl!=null&&this.profilePhotoPartialUrl!=""){
_74[x++]=["photoUrl",this.profilePhotoPartialUrl];
}
if(this.fullMembersMode!=null&&this.fullMembersMode){
_74[x++]=["fullMembersMode",this.fullMembersMode];
}
if(this.selectedTab!=null&&this.selectedTab){
_74[x++]=["selectedTab",this.selectedTab];
}
if(this.loggedInUserid!=null&&this.loggedInUserid!=""){
_74[x++]=["loggedInUserid",this.loggedInUserid];
}
if(this.canInvite!=null&&this.canInvite!=""){
_74[x++]=["canInvite",this.canInvite];
}
if(this.canViewInvites!=null&&this.canViewInvites!=""){
_74[x++]=["canViewInvites",this.canViewInvites];
}
if(this.canRevokeInvites!=null&&this.canRevokeInvites!=""){
_74[x++]=["canRevokeInvites",this.canRevokeInvites];
}
if(this.UPARROW!=null&&this.UPARROW!=""){
_74[x++]=["upArrow",this.UPARROW];
}
if(this.DOWNARROW!=null&&this.DOWNARROW!=""){
_74[x++]=["downArrow",this.DOWNARROW];
}
if(this.BLANKIMAGE!=null&&this.BLANKIMAGE!=""){
_74[x++]=["blankImage",this.BLANKIMAGE];
}
if(this.currentInvitesUIState.getSortButtonID()!=null){
_74[x++]=["inviteSortButtonID",this.currentInvitesUIState.getSortButtonID()];
}
if(this.currentInvitesUIState.getSortDirection()!=null){
_74[x++]=["inviteSortDirection",this.currentInvitesUIState.getSortDirection()];
}
if(this.exposeEmail!=null){
_74[x++]=["exposeEmail",this.exposeEmail];
}
if(this.exposePublicCommunities!=null){
_74[x++]=["exposePublicCommunities",this.exposePublicCommunities];
}
if(this.bidi!=null){
_74[x++]=["bidi",this.bidi];
}
var _75=_71.replace("/service/atom/forms/","/service/atom/");
_74[x++]=["atomFeedUrl",_75];
if((typeof communityOrgId!="undefined")&&communityOrgId!=null){
_74[x++]=["communityOrgId",communityOrgId];
}
_74[x++]=["applicationContext",this.applicationContext];
if(this.stringResources!=null){
for(str in this.stringResources){
_74[x++]=[str,this.stringResources[str]];
}
}
_74[x++]=["widgetObj",this.widgetObjStr];
_74[x++]=["widgetId",this.iContext.widgetId];
_74[x++]=["communityType",communityType];
_74[x++]=["isInternalOnly",isInternalOnly];
_74[x++]=["doNotShowOrgItems",doNotShowOrgItems];
_74[x++]=["rs_external_indicator",rs_external_indicator];
this.transformAndRenderMembers(_71,_74);
this.handleAfterLoad();
};
this.handleAfterLoad=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: handleAfterLoad() ");
}
}
lconn.core.utilities.processUntilElementIsFound(this.MEMBERSLASTSPANDOMID,dojo.hitch(this,function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: handleAfterLoad(): DOM object, which has its id, "+this.MEMBERSLASTSPANDOMID+", is in the DOM now.");
}
}
if(dojo.byId("membersPageTabContainer")){
var _76=-1;
if(this.selectedTab=="network"){
_76=0;
var _77=dojo.query("#networkTab a")[0];
if(_77!=null){
_77.setAttribute("aria-controls","MembersPanel");
}
var _78=dojo.query("#invitesTab a")[0];
if(_78!=null){
_78.removeAttribute("aria-controls");
}
}else{
if(this.selectedTab=="invites"){
_76=1;
var _77=dojo.query("#networkTab a")[0];
if(_77!=null){
_77.removeAttribute("aria-controls");
}
var _78=dojo.query("#invitesTab a")[0];
if(_78!=null){
_78.setAttribute("aria-controls","InvitesPanel");
}
}
}
if(this.panelConnect_){
dojo.disconnect(this.panelConnect_);
}
var _79=this;
setTimeout(function(){
var _7a=dojo.query("#membersPageTabContainer a");
var _7b=new lconn.core.aria.TabPanel("membersPageTabContainer",{"selIdx":_76});
_79.panelConnect_=dojo.connect(_7b,"_selectItem",dojo.hitch(_7b,function(){
var _7c=_7a[_79.selIdx];
if(_7c){
_7c.click();
}
}));
},1);
}
dojo.query(".memberPhotoToBeProcessed").forEach(function(_7d){
var _7e="";
var _7f="";
var _80=null;
var _81=null;
var _82=null;
try{
_7e=dojo.query(".x-lconn-userid",_7d)[0].innerHTML;
_81=dojo.query(".x-lconn-displayname",_7d)[0];
_80=_7d.childNodes[0];
_7f=_81.innerHTML;
_82=dojo.query(".otherPeople32",_7d)[0];
}
catch(ee){
}
if(_80&&_7f.length>0){
try{
var _83="active";
if(dojo.hasClass(_80,"lotusPersonInactive")){
_83="inactive";
}
var _84=com.ibm.lconn.layout.people.createLink({name:_7f,userid:_7e,state:_83});
if(_84&&(_84.tagName.toLowerCase()==="a"||dojo.query("a",_84).length>0)){
dojo.forEach(_80.className.split(" "),function(_85){
if(!dojo.hasClass(_84,_85)){
dojo.addClass(_84,_85);
}
});
if(dojo.hasClass(_84,"vcard")){
dojo.removeClass(_84,"vcard");
}
if(dojo.hasAttr(_80,"aria-disabled")){
dojo.attr(_84,"aria-disabled",dojo.attr(_80,"aria-disabled"));
}
if(_82){
_84.innerHTML="";
_84.appendChild(_82);
}
dojo.place(_84,_80,"replace");
}
}
catch(ee){
}
}
dojo.removeClass(_7d,"memberPhotoToBeProcessed");
});
dojo.query(".memberToBeProcessed").forEach(function(_86){
var _87="";
var _88="";
var _89=null;
var _8a=null;
try{
_87=dojo.query(".x-lconn-userid",_86)[0].innerHTML;
_89=dojo.query(".fn",_86)[0];
_88=dojo.query(".x-lconn-displayname",_86)[0].innerHTML;
_8a=dojo.query(".otherPeople48",_86)[0];
}
catch(ee){
}
if(_89&&_88.length>0){
try{
var _8b="active";
if(dojo.hasClass(_89,"lotusPersonInactive")){
_8b="inactive";
}
var _8c=com.ibm.lconn.layout.people.createLink({name:_88,userid:_87,state:_8b});
if(_8c&&(_8c.tagName.toLowerCase()==="a"||dojo.query("a",_8c).length>0)){
dojo.forEach(_89.className.split(" "),function(_8d){
if(!dojo.hasClass(_8c,_8d)){
dojo.addClass(_8c,_8d);
}
});
if(dojo.hasClass(_8c,"vcard")){
dojo.removeClass(_8c,"vcard");
}
if(dojo.hasAttr(_89,"aria-disabled")){
dojo.attr(_8c,"aria-disabled",dojo.attr(_89,"aria-disabled"));
}
var _8e=dojo.attr(_89,"id");
dojo.attr(_8c,"id",_8e);
if(_8a){
_8c.innerHTML="";
_8c.appendChild(_8a);
}
dojo.place(_8c,_89,"replace");
}
}
catch(ee){
}
}
dojo.removeClass(_86,"memberToBeProcessed");
});
if(dojo.byId("roleFilter")&&this.filterRole){
dojo.byId("roleFilter").value=this.filterRole;
}
var _8f=dojo.byId("memButtonAll");
if(_8f){
if(this.sortItem=="name"){
_8f.className=this.sortDirection==this.ASC_PARAM?"lotusActiveSort lotusAscending":"lotusActiveSort lotusDescending";
}else{
_8f.className="";
}
_8f=dojo.byId("memButtonNewest");
if(this.sortItem!="name"){
_8f.className=this.sortDirection==this.ASC_PARAM?"lotusActiveSort lotusAscending":"lotusActiveSort lotusDescending";
}else{
_8f.className="";
}
}
dojo.query(".dateToBeLocalized").forEach(function(_90){
_90.innerHTML=lconn.core.DateUtil.AtomDateToString(_90.innerHTML,true)+" ";
_90.style.display="inline";
});
if(dojo.byId("invitesTab")!=null&&dojo.hasClass(dojo.byId("invitesTab"),"lotusSelected")){
var _91=false;
if(this.sortElement=="sortInvitesByName"){
dojo.byId("sortInvitesByName").focus();
this.sortElement=null;
_91=true;
}
if(this.sortElement=="sortInvitesByDateInvited"){
this.sortElement=null;
dojo.byId("sortInvitesByDateInvited").focus();
_91=true;
}
var _92=dojo.query("#invitesTab a");
if(!_91&&_92!=null){
if(this.loaded){
_92[0].focus();
}
}
}
if(dojo.byId("networkTab")!=null&&dojo.hasClass(dojo.byId("networkTab"),"lotusSelected")){
var _91=false;
if(this.sortElement=="memButtonAll"){
dojo.byId("memButtonAll").focus();
this.sortElement=null;
_91=true;
}
if(this.sortElement=="memButtonNewest"){
this.sortElement=null;
dojo.byId("memButtonNewest").focus();
_91=true;
}
var _93=dojo.byId("filterString");
if(_93!=null&&_93.value!=""){
_93.focus();
_91=true;
}
var _94=dojo.query("#networkTab a");
if(!_91&&_94!=null){
if(this.loaded){
_94[0].focus();
}
}
}
this.loaded=true;
if(globalAddMemberObj!=null&&globalAddMemberObj){
if(this.canAddOthers){
this.displayMemberCreateForm();
this.addMembers_W.addNewPerson("authors",globalAddMemberObj["personId"],globalAddMemberObj["personName"],globalAddMemberObj["personEmail"]);
}else{
if(this.canInvite){
this.displayMemberInviteForm();
this.inviteMembers_W.addNewPerson("authors",globalAddMemberObj["personId"],globalAddMemberObj["personName"],globalAddMemberObj["personEmail"]);
}
}
globalAddMemberObj=null;
}
if(globalAddMemberError!=null){
this.displayMessages(globalAddMemberError);
}
if(this.filterStringHasFocus){
var _95=dojo.byId("filterString");
if(_95!=null){
_95.focus();
}
this.filterStringHasFocus=false;
}
if(dojo.isIE==6){
var _96=dojo.byId("inviteEntriesFull");
if(_96!=null&&_96){
var _97=dojo.byId("lotusColLeft");
var _98=dojo.byId("lotusFrame");
if(_97!=null&&_97&&_98!=null&&_98){
var _99=dojo.coords(_97).w+dojo.coords(_96).w+20;
if(dojo.coords(_98).w<_99){
_98.style.width=""+_99+"px";
}
}
}
}
lconn.core.utilities.processUntilAvailable(dojo.hitch(this,function(){
if(window.SemTagSvc!=null){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: handleAfterLoad(): Enabling the person card by parsing DOM object, which has its id, "+this.MEMBERSDOMID);
}
}
lconn.core.utilities.processUntilElementIsFound(this.MEMBERSDOMID,dojo.hitch(this,function(){
SemTagSvc.parseDom(null,dojo.byId(this.MEMBERSDOMID));
}));
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: handleAfterLoad(): Finished parsing DOM object, which has its id, "+this.MEMBERSDOMID);
}
}
}
}),"(window.SemTagSvc != undefined)");
}));
};
this.getMemberPhotoURL=function(){
};
this.transformAndRenderMembers=function(_9a,_9b){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: transformAndRenderMembers()");
}
}
var _9c=this.MEMBERSDOMID;
if(this.filterStringHasFocus){
_9c=this.MEMBERSLISTDOMID;
}
var _9d=new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"communityMembers.xsl":{templatePath:dojo.moduleUrl("lconn.comm","communityMembers/communityMembers.xsl")}}}))();
var _9e={xmlDocUrl:_9a,xslDoc:_9d.getXslDoc("communityMembers.xsl"),htmlContainerElemId:_9c,aXslParams:_9b,dojoErrorHandler:lconn.core.errorhandling.DefaultXHRErrorHandler,exceptionHandler:lconn.core.errorhandling.DefaultErrorHandler};
lconn.core.xslt.transformAndRender(_9e);
};
this.transformAndRenderExportWarning=function(_9f){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: transformAndRenderExportWarning()");
}
}
xmlUrl=this.applicationContext+"/service/xml/missingemailmembers?communityUuid="+this.commId;
var _9f=new Array();
var x=0;
_9f[x++]=["exportWarning","true"];
_9f[x++]=["applicationContext",this.applicationContext];
_9f[x++]=["blankImage",this.BLANKIMAGE];
for(str in this.stringResources){
_9f[x++]=[str,this.stringResources[str]];
}
var _a0=new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"communityMembers.xsl":{templatePath:dojo.moduleUrl("lconn.comm","communityMembers/communityMembers.xsl")}}}))();
var _a1={xmlDocUrl:xmlUrl,xslDoc:_a0.getXslDoc("communityMembers.xsl"),htmlContainerElemId:this.EXPORTWARNINGDOMID,aXslParams:_9f,dojoErrorHandler:lconn.core.errorhandling.DefaultXHRErrorHandler,exceptionHandler:lconn.core.errorhandling.DefaultErrorHandler};
lconn.core.xslt.transformAndRender(_a1);
};
this.executeNewestButton=function(){
this.currentMembersUIState.setSortButtonID("memButtonNewest");
this.currentMembersUIState.setSortDirection(this.DESC_PARAM);
this.currentMembersUIState.setSortField(this.SORTFIELD_VALUE_BY_CREATED);
this.sortItem="date";
this.updateFilter(this.ROLE_VALUE_ALL);
};
this.executeOwnersButton=function(){
this.currentMembersUIState.setSortButtonID("memButtonOwners");
this.currentMembersUIState.setSortDirection(this.ASC_PARAM);
this.currentMembersUIState.setSortField(this.SORTFIELD_VALUE_BY_NAME);
this.sortItem="name";
this.updateFilter(this.ROLE_VALUE_OWNER);
};
this.executeAllButton=function(){
this.currentMembersUIState.setSortButtonID("memButtonAll");
this.currentMembersUIState.setSortDirection(this.ASC_PARAM);
this.currentMembersUIState.setSortField(this.SORTFIELD_VALUE_BY_NAME);
this.sortItem="name";
this.updateFilter(this.ROLE_VALUE_ALL);
};
this.executeInternalFilter=function(){
this.currentMembersUIState.setSortButtonID("memButtonInternal");
this.currentMembersUIState.setSortDirection(this.ASC_PARAM);
this.currentMembersUIState.setSortField(this.SORTFIELD_VALUE_BY_NAME);
this.sortItem="name";
this.updateFilter(this.INTERNAL_ONLY);
};
this.executeExternalFilter=function(){
this.currentMembersUIState.setSortButtonID("memButtonExternal");
this.currentMembersUIState.setSortDirection(this.ASC_PARAM);
this.currentMembersUIState.setSortField(this.SORTFIELD_VALUE_BY_NAME);
this.sortItem="name";
this.updateFilter(this.EXTERNAL_ONLY);
};
this.executeSortByButton=function(_a2,_a3){
var _a4=this.sortItem==_a3&&this.sortDirection==this.ASC_PARAM?this.DESC_PARAM:this.ASC_PARAM;
this.sortItem=_a3;
this.sortElement=_a2;
this.sortDirection=_a4;
this.currentMembersUIState.setSortButtonID(_a2);
this.currentMembersUIState.setSortDirection(_a4);
this.currentMembersUIState.setSortField(_a3=="name"?this.SORTFIELD_VALUE_BY_NAME:this.SORTFIELD_VALUE_BY_CREATED);
this.updateFilter(this.filterRole!=null?this.filterRole:this.ROLE_VALUE_ALL);
};
this.showFilterString=function(){
dojo.byId("findAMember").style.display="none";
var _a5=dojo.byId("filterString");
_a5.style.display="";
_a5.focus();
this.doshowFilterString=true;
};
this.filterStringChanged=function(_a6){
_a6=dojo.trim(_a6);
this.filterString=_a6;
this.currentMembersUIState.setFilterString(_a6);
this.filterStringHasFocus=true;
this.setCurrentMembersUIState(this.currentMembersUIState);
};
this.changePageSize=function(_a7){
if(this.selectedTab=="network"){
this.currentMembersUIState.setPageSize(_a7);
this.setCurrentMembersUIState(this.currentMembersUIState);
}else{
this.currentInvitesUIState.setPageSize(_a7);
this.loadInvites(null);
}
};
this.displayMessages=function(_a8){
var _a9=this.iContext.getElementById("membersmessages");
if(typeof _a9!="undefined"&&_a9!=null){
if(typeof _a8!="undefined"&&_a8!=null&&_a8.length>0){
var _aa="membersmessagesstart";
var _ab="membersmessagesend";
var _ac=_a8.indexOf(_aa);
var _ad=_a8.indexOf(_ab);
var _ae="";
if(_ac>=0&&_ad>=0){
_ae=_a8.substr(_ac+_aa.length,_ad-(_ac+_aa.length));
}
_a9.innerHTML=_ae;
_a9.style.display="block";
var _aa="emailsNotFoundStart";
var _ab="emailsNotFoundEnd";
_ac=_a8.indexOf(_aa);
_ad=_a8.indexOf(_ab);
if(_ac>=0&&_ad>=0){
showLotusLiveGuestInvitesMessage(_a8,this.commId);
}
}
}
};
this.displayImport=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: displayImport()");
}
}
if(this.existingFormOpen()){
errorMessage=this.stringResources["rs_member_form_already_open"];
errorTitle=this.stringResources["rs_member_members"];
var dlg=new lconn.core.DialogUtil.alert(errorTitle,errorMessage,function cb(){
});
return;
}
this.iContext.getElementById("csvtextareaimportMembersForm").innerHTML="";
var _af=this.iContext.getElementById("importNoticeRow");
if(this.parentResourceId!=null&&this.parentResourceId.length>0){
_af.style.display="";
}else{
while(_af.firstChild){
_af.removeChild(_af.firstChild);
}
}
var _b0=document.getElementById("importMembersDialogContent");
var _b1=_b0.innerHTML;
var _b2="importMembersForm";
var _b3=new RegExp(_b2,"g");
var _b4=_b2+"1";
_b1=_b1.replace(_b3,_b4);
var _b5=document.createElement("div");
_b5.innerHTML=_b1;
var _b6=lconn.core.DialogUtil.popupForm(this.stringResources["rs_member_import_title"],_b5,this.stringResources["rs_member_import"],this.stringResources["rs_member_cancel"],dojo.hitch(this,this.executeImport),null);
this.hideImport=_b6.hide;
return false;
};
this.executeImport=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: executeImport()");
}
}
var _b7=this;
var _b8=function(res,_b9){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: executeImport: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: executeImport: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: executeImport: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: executeImport: callbackfn: ioArgs: "+_b9);
}
}
var _ba=null;
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
_ba=res.body.innerHTML;
_ba=_ba.replace(/&lt;/g,"<").replace(/&gt;/g,">");
}
_b7.hideImport();
if(_ba==null||_ba.length<=0){
if(_b7.lastMembersAtomUrl!=null){
_b7.loadMembers(_b7.lastMembersAtomUrl,null,true);
}else{
window.location.href=_b7.applicationContext+_b7.MEMBERS_FULL_VIEW_PAGE+"?"+_b7.COMMUNITYUUID_PARAM+"="+_b7.commId;
window.location.reload(true);
}
}else{
_b7.setLastModFromResponse(_ba);
_b7.executeNewestButton();
_b7.displayMessages(_ba);
}
return res;
};
var _bb=function(res,_bc){
_b7.hideImport();
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: executeImport: errorCallbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: executeImport: errorCallbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: executeImport: errorCallbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: executeImport: errorCallbackfn: ioArgs: "+_bc);
}
}
if(_b7.lastMembersAtomUrl!=null){
_b7.loadMembers(_b7.lastMembersAtomUrl,null,true);
}
if((typeof _bc.xhr.status!="unknown")&&_bc.xhr.status!=302&&_bc.xhr.status!=0&&_bc.xhr.status!=12150){
var _bd="membersmessagesstart"+"<div class=\"lotusMessage\" >"+"<img class=\"iconsMessages16 iconsMessages16-msgError16\" src=\""+this.BLANKIMAGE+"\" alt=\""+res.message+"\" title=\""+res.message+"\"/>"+"<span>"+res.message+"</span>"+"</div>"+"membersmessagesend";
_b7.displayMessages(_bd);
alert(dojo.string.substitute(this.stringResources["rs_member_generic_error"],[res.message]));
}
if(_b7.lastMembersAtomUrl==null){
window.location.href=_b7.applicationContext+_b7.MEMBERS_FULL_VIEW_PAGE+"?"+_b7.COMMUNITYUUID_PARAM+"="+_b7.commId;
window.location.reload(true);
}
};
var _be=this.MEMBERS_ADDSUBMIT;
var _bf=document.getElementById("inviteImportedPeopleimportMembersForm1");
if(_bf!="undefined"&&_bf!=null&&_bf.checked){
_be=this.MEMBERS_BATCHINVITESUBMIT;
}
dojo.cookie("X-Update-Nonce",this.dangerousurlnonce);
_be+="?X-Update-Nonce="+this.dangerousurlnonce;
dojo.io.iframe.send({url:this.applicationContext+_be,method:"POST",contentType:"multipart/form-data",handleAs:"html",form:"importMembersForm1",content:{"dangerousurlnonce":this.dangerousurlnonce,"communityUuid":this.commId},load:_b8,preventCache:"true",error:dojo.hitch(this,_bb)});
};
this.displayExport=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: displayExport()");
}
}
if(this.existingFormOpen()){
errorMessage=this.stringResources["rs_member_form_already_open"];
errorTitle=this.stringResources["rs_member_members"];
var dlg=new lconn.core.DialogUtil.alert(errorTitle,errorMessage,function cb(){
});
return;
}
var _c0=document.getElementById("exportMembersDialogContent");
var _c1=_c0.innerHTML;
var _c2="exportMembersForm";
var _c3=new RegExp(_c2,"g");
var _c4=_c2+"1";
_c1=_c1.replace(_c3,_c4);
var _c5=document.createElement("div");
_c5.style.width=_c0.style.width;
_c5.innerHTML=_c1;
this.transformAndRenderExportWarning();
var _c6=lconn.core.DialogUtil.popupForm(this.stringResources["rs_member_export_title"]+" ",_c5,this.stringResources["rs_member_export"],this.stringResources["rs_member_cancel"],dojo.hitch(this,this.executeExport),null);
this.hideExport=_c6.hide;
return false;
};
this.executeExport=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: executeExport()");
}
}
var _c7=null;
var _c8=false;
var _c9=document.getElementById("ownersCheckboxexportMembersForm1");
var _ca=document.getElementById("membersCheckboxexportMembersForm1");
if(_c9.checked&&_ca.checked){
_c8=true;
_c7=null;
}else{
if(_c9.checked){
_c8=true;
_c7="owner";
}else{
if(_ca.checked){
_c8=true;
_c7="member";
}
}
}
if(_c8==true){
var str=this.applicationContext+this.MEMBERS_EXPORT_ACTION+"?"+"communityUuid="+this.commId+"&ps=-1"+(_c7!=null?"&role="+_c7:"");
location.href=str;
}
this.hideExport();
};
this.formAlreadyOpen=function(_cb){
if(_cb!="inviteMembers"){
var _cc=this.iContext.getElementById(this.INVITEFORMDIVDOMID);
if(_cc!=null&&_cc.style.display=="block"){
var _cd=this.getTypeAheadTextBox(_cc).value;
if(this.inviteMembers_W.howManyMembers()==0&&dojo.trim(_cd).length==0){
this.cancelMemberInviteForm();
}else{
return true;
}
}
}
if(_cb!="addMembers"){
var _ce=this.iContext.getElementById(this.ADDFORMDIVDOMID);
if(_ce.style.display=="block"){
var _cd=this.getTypeAheadTextBox(_ce).value;
if(this.addMembers_W.howManyMembers()==0&&dojo.trim(_cd).length==0){
this.cancelMemberCreateForm();
}else{
return true;
}
}
}
return false;
};
this.existingFormOpen=function(){
var _cf=this.iContext.getElementById(this.INVITEFORMDIVDOMID);
var _d0=this.iContext.getElementById(this.ADDFORMDIVDOMID);
if((_cf!=null&&_cf.style.display=="block")||(_d0.style.display=="block")){
return true;
}
return false;
};
this.displayMemberCreateForm=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: displayMemberCreateForm()");
}
}
if(this.formAlreadyOpen("addMembers")){
errorMessage=this.stringResources["rs_member_form_already_open"];
errorTitle=this.stringResources["rs_member_members"];
var dlg=new lconn.core.DialogUtil.alert(errorTitle,errorMessage,function cb(){
});
return;
}
var _d1=this.iContext.getElementById(this.ADDFORMDIVDOMID);
_d1.style.display="block";
if(this.groupSupportEnabled&&this.canAddGroups&&this.parentResourceId==null){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: displayMemberCreateForm(): add users and groups!");
}
}
if(this.validateWidget(this.ADDMEMBERSDOMID)&&this.validateWidget(this.ADDGROUPSDOMID)){
this.iContext.getElementById("addMembersWidgetTD").innerHTML="<div id=\"addMembersWidget\"> </div><div id=\"addGroupsWidget\" style=\"display:none\" aria-hidden=\"true\"> </div>";
}
}else{
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: displayMemberCreateForm(): add users only!");
}
}
if(this.validateWidget(this.ADDMEMBERSDOMID)){
this.iContext.getElementById("addMembersWidgetTD").innerHTML="<div id=\"addMembersWidget\"> </div>";
}
}
if(this.parentResourceId!=null&&this.parentResourceId.length>0){
this.addMembers_W=getStandardAddMembersWidget({"class":"content","communityUuid":this.parentResourceId},this.iContext.getElementById(this.ADDMEMBERSDOMID));
}else{
this.addMembers_W=getAddMembersWidget({"class":"content"},this.iContext.getElementById(this.ADDMEMBERSDOMID));
if(this.groupSupportEnabled&&this.canAddGroups){
this.addGroups_W=new lconn.core.AddGroups({"class":"content","contextPath":commContextPath,"orgId":this.orgId},this.iContext.getElementById(this.ADDGROUPSDOMID));
this.addGroups_W.domNode.style.display="none";
if(this.addGroups_W.addButton_AP){
this.addGroups_W.addButton_AP.style.display="none";
}
this.addGroups_W.addGroupsTA_AP.className=this.addGroups_W.addGroupsTA_AP.className+" field";
}
if(useCustomTypeAhead){
try{
this.addMembers_W.setInternalOnly(isInternalOnly);
}
catch(e){
if(window.debugComm!=null){
console.log(e);
}
}
}
}
if(this.parentResourceId!=null&&this.parentResourceId.length>0){
var _d2=this.iContext.getElementById("addNoticeRow");
_d2.style.display="";
_d2.setAttribute("aria-hidden","false");
_d2=this.iContext.getElementById("addNoticeRowLabel");
_d2.innerHTML="<label for=\"addMembersWidget\">"+this.stringResources["rs_member_sub_notice"]+"</label>";
_d2=this.iContext.getElementById("addAllParentMembersRow");
_d2.style.display="";
_d2.setAttribute("aria-hidden","false");
}
if(this.groupSupportEnabled&&this.canAddGroups&&!this.isSubcommunity){
this.setMemberCreateFormFocus(this.PEOPLEORGROUPSSELECTDOMID,true);
}else{
this.setMemberCreateFormFocus(this.MEMBERSSELECTDOMID,false);
}
if(dojo.isIE==6){
var div=dojo.byId("memberAddFormDiv");
if(div!=null&&div){
var _d3=dojo.byId("lotusColLeft");
var _d4=dojo.byId("lotusFrame");
if(_d3!=null&&_d3&&_d4!=null&&_d4){
var _d5=dojo.coords(_d3).w+dojo.coords(div).w+20;
if(dojo.coords(_d4).w<_d5){
_d4.style.width=""+_d5+"px";
}
}
}
}
return false;
};
this.validateWidget=function(_d6){
var tmp=this.iContext.getElementById(_d6);
if(typeof tmp!="undefined"&&tmp!=null){
var _d7=dijit.byId(tmp.id);
if(typeof _d7!="undefined"&&_d7!=null){
_d7.destroy();
return true;
}
}
return false;
};
this.setMemberCreateFormFocus=function(_d8,_d9){
var _da=this.iContext.getElementById(_d8);
if(_da!=null){
if(_d9){
_da.options[0].selected=true;
}
_da.focus();
}else{
console.log("CommunityMembers.js: setMemberCreateFormFocus() - Unable to find element with id = "+_d8);
}
};
this.toggleSubcommunityMembers=function(_db,_dc){
if(_db.checked){
_dc.style.display="none";
}else{
_dc.style.display="";
}
};
this.cancelMemberCreateForm=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: cancelMemberCreateForm(): ");
}
}
var _dd=this.iContext.getElementById("errorMessages");
if(typeof _dd!="undefined"&&_dd!=null){
_dd.style.display="none";
}
var _de=this.iContext.getElementById(this.ADDFORMDIVDOMID);
if(typeof _de!="undefined"&&_de!=null){
_de.style.display="none";
}
if(this.addMembers_W){
this.addMembers_W.reset();
}
if(this.addGroups_W){
this.addGroups_W.reset();
}
};
this.displayMemberInviteForm=function(){
if(this.formAlreadyOpen("inviteMembers")){
errorMessage=this.stringResources["rs_member_form_already_open"];
errorTitle=this.stringResources["rs_member_members"];
var dlg=new lconn.core.DialogUtil.alert(errorTitle,errorMessage,function cb(){
});
return;
}
var _df=this.iContext.getElementById(this.INVITEFORMDIVDOMID);
_df.style.display="block";
var tmp=this.iContext.getElementById(this.INVITEMEMBERSDOMID);
if(typeof tmp!="undefined"&&tmp!=null){
var _e0=dijit.byId(tmp.id);
if(typeof _e0!="undefined"&&_e0!=null){
_e0.destroy();
this.iContext.getElementById("inviteMembersWidgetTD").innerHTML="<div id=\"inviteMembersWidget\"> </div>";
}
}
if(this.parentResourceId!=null&&this.parentResourceId.length>0){
this.inviteMembers_W=getStandardInviteMembersWidget({"class":"content","communityUuid":this.parentResourceId},this.iContext.getElementById(this.INVITEMEMBERSDOMID));
}else{
this.inviteMembers_W=getInviteMembersWidget({"class":"content"},this.iContext.getElementById(this.INVITEMEMBERSDOMID));
try{
this.inviteMembers_W.setInternalOnly(isInternalOnly);
this.inviteMembers_W.displayMemberSelect(false);
}
catch(e){
if(window.debugComm!=null){
console.log(e);
}
}
}
if(this.parentResourceId!=null&&this.parentResourceId.length>0){
this.iContext.getElementById("inviteNoticeRow").style.display="";
}
this.setFocusToTypeAhead(this.iContext.getElementById(this.INVITEMEMBERSDOMID));
return false;
};
this.setFocusToTypeAhead=function(_e1){
if(dojo.isIE==6){
return;
}
if(_e1==null){
return;
}
this.getTypeAheadTextBox(_e1).focus();
};
this.getTypeAheadTextBox=function(_e2){
var _e3=_e2.getElementsByTagName("input");
for(var x=0;x<_e3.length;x++){
var id=_e3[x].id;
if(typeof id!="undefined"&&id!=null){
if(id.indexOf("PeopleTypeAhead")>=0){
return _e3[x];
}
}
}
return null;
};
this.cancelMemberInviteForm=function(){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: cancelMemberInviteForm(): ");
}
}
var _e4=this.iContext.getElementById("errorMessages");
if(typeof _e4!="undefined"&&_e4!=null){
_e4.style.display="none";
}
var _e5=this.iContext.getElementById(this.INVITEFORMDIVDOMID);
if(typeof _e5!="undefined"&&_e5!=null){
_e5.style.display="none";
}
if(this.inviteMembers_W){
this.inviteMembers_W.reset();
}
var _e6=this.iContext.getElementById(this.INVITEBUTTONDOMID);
if(_e6!=null){
dijit.focus(_e6);
}else{
console.log("CommunityMembers.js: cancelMemberInviteForm() - Unable to find element with id="+this.INVITEBUTTONDOMID);
}
};
this.saveMemberFields=function(_e7){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveMemberFields(): ");
}
}
this.addMembers_W.setHiddenFields();
if(this.addGroups_W){
this.addGroups_W.setHiddenFields();
}
_e7.elements["communityUuid"].value=this.commId;
_e7.elements["parentUuid"].value=this.parentResourceId;
if(this.addGroups_W){
if(this.addMembers_W.getMembers()&&this.addGroups_W.getGroups()){
_e7.elements["members"].value=this.addMembers_W.getMembers()+","+this.addGroups_W.getGroups();
}else{
if(this.addGroups_W.getGroups()){
_e7.elements["members"].value=this.addGroups_W.getGroups();
}else{
_e7.elements["members"].value=this.addMembers_W.getMembers();
}
}
}else{
_e7.elements["members"].value=this.addMembers_W.getMembers();
}
_e7.elements["owners"].value=this.addMembers_W.getOwners();
_e7.elements["memberemails"].value=this.addMembers_W.getMemberEmails();
_e7.elements["owneremails"].value=this.addMembers_W.getOwnerEmails();
var _e8=this;
var _e9=function(res,_ea){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveMemberFields: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: saveMemberFields: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: saveMemberFields: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: saveMemberFields: callbackfn: ioArgs: "+_ea);
}
}
_e8.cancelMemberCreateForm();
_e8.setLastModFromResponse(res);
_e8.displayFilterRole(_e8.ROLE_VALUE_ALL);
_e8.executeNewestButton();
_e8.displayMessages(res);
};
dojo.xhrPost({url:this.applicationContext+this.MEMBERS_ADDSUBMIT,form:_e7,headers:{"X-Update-Nonce":"true"},sync:true,load:_e9,error:dojo.hitch(this,this.xhrerrorcallback)});
};
this.processTAKeyDown=function(evt,_eb){
evt=evt||window.event;
if(!evt.shiftKey&&evt.keyCode==dojo.keys.TAB){
var el;
if(_eb=="people"){
el=this.iContext.getElementById(this.MEMBERSSELECTDOMID);
}else{
if(_eb=="groups"){
el=this.iContext.getElementById(this.ADDGROUPSTYPEAHEADID);
}
}
setTimeout(function(){
el.focus();
},0);
}
};
this.processTASelect=function(_ec){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: processTASelect(): useTA = "+_ec);
}
}
if(dojo.byId("memberListContainer")==null){
console.log("CommunityMembers.js: processTASelect(): no memberListContainer element found by id");
dojo.query(".memberList",dojo.byId("addMembersWidget"))[0].parentNode.id="memberListContainer";
console.log("CommunityMembers.js: processTASelect(): set memberListContainer element id");
}
if(_ec=="people"){
var _ed=this.iContext.getElementById(this.ADDGROUPSDOMID);
var _ee=this.iContext.getElementById(this.ADDMEMBERSDOMID);
var _ef=this.iContext.getElementById(this.ADDGROUPSMEMBERDOMID);
var _f0=dojo.query("#memberListContainer")[0];
if(_ed!=null){
_ed.style.display="none";
_ed.setAttribute("aria-hidden","true");
var _f1=dojo.query(".groupListContainer")[0];
dojo.place(_f1,_f0,"after");
}
_ee.style.display="block";
if(_ef!=null){
_ef.style.display="none";
}
}else{
if(_ec=="groups"){
this.iContext.getElementById(this.ADDMEMBERSDOMID).style.display="none";
var _ed=this.iContext.getElementById(this.ADDGROUPSDOMID);
var _ef=this.iContext.getElementById(this.ADDGROUPSMEMBERDOMID);
var _f2=this.iContext.getElementById(this.ADDGROUPSSELECTDOMID);
_ed.style.display="block";
_ed.removeAttribute("aria-hidden");
var _f1=dojo.query(".groupListContainer")[0];
var _f0=dojo.query("#memberListContainer")[0];
dojo.place(_f1,_f0,"after");
if(_ef!=null){
_ef.style.display="inline";
}
if(_f2!=null){
_f2.style.display="none";
}
}
}
};
this.saveInviteFields=function(_f3){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveInviteFields(): ");
}
}
this.inviteMembers_W.setHiddenFields();
if(this.inviteMembers_W.howManyMembers()==0){
this.cancelMemberInviteForm();
return;
}
var _f4=this;
var _f5=function(res,_f6){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: saveInviteFields: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: saveInviteFields: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: saveInviteFields: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: saveInviteFields: callbackfn: ioArgs: "+_f6);
}
}
_f4.cancelMemberInviteForm();
_f4.setLastModFromResponse(res);
_f4.executeNewestButton();
_f4.displayMessages(res);
};
var _f7="<?xml version='1.0' encoding='utf-8'?>"+"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>"+"<category term=\"invites_request\" scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" />"+"<snx:invitee_list>";
_f7+=this.inviteMembers_W.getMembers();
_f7+="</snx:invitee_list>";
var _f8=this.inviteMembers_W.getMemberEmails();
if(_f8!=null&&_f8.length>0){
_f7+="<snx:invitee_email_list>"+_f8+"</snx:invitee_email_list>";
}
_f7+="<content type=\"text\">Please consider joining this excellent community.</content>"+"</entry>";
var _f9=new Object();
_f9["Content-Type"]="application/atom+xml";
dojo.xhrPost({url:this.applicationContext+this.MEMBERS_INVITESUBMIT+this.commId,putData:_f7,sync:true,load:_f5,error:dojo.hitch(this,this.xhrerrorcallback),headers:_f9});
};
this.showNetwork=function(){
this.selectedTab="network";
var _fa=false;
this.loadMembers(this.lastMembersAtomUrl,null,true);
};
this.showPendingInvites=function(){
this.selectedTab="invites";
if(this.currentInvitesUIState==null){
this.currentInvitesUIState=new lconn.comm.communityMembers.InvitesUIState(this);
var _fb=this.iContext.getiWidgetAttributes();
this.currentInvitesUIState.setPageSize(_fb.getItemValue("membersPerPageFullPage"));
}
this.loadInvites(null);
};
this.sortInvitesByName=function(){
this.currentInvitesUIState.setSortField(this.INVITE_SORTFIELD_VALUE_BY_NAME);
this.currentInvitesUIState.setSortDirection(this.ASC_PARAM);
this.sortElement="sortInvitesByName";
this.loadInvites(null);
};
this.sortInvitesByDateInvited=function(){
this.currentInvitesUIState.setSortField(this.INVITE_SORTFIELD_VALUE_BY_DATE_INVITED);
this.currentInvitesUIState.setSortDirection(this.DESC_PARAM);
this.sortElement="sortInvitesByDateInvited";
this.loadInvites(null);
};
this.revokeInvites=function(_fc,_fd,_fe){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: revokeInvites(): numEntries: "+_fd);
console.log("CommunityMembers.js: revokeInvites(): linkPrev: "+_fe);
}
}
var _ff="";
var _100=0;
dojo.query("#fullmembersdiv input:checked").forEach(function(node,_101){
if(_101>0){
_ff+=",";
}
_ff+=node.id;
_100++;
});
if(_ff!=""){
var _102=this.stringResources["rs_invite_revoke"];
var _103=this.stringResources["rs_revoke_invites_confirm"];
var ok=dojo.i18n.getLocalization("lconn.core","strings").rs_ok;
var _104=this.stringResources["rs_member_cancel"];
var _105=this;
var _106=function(_107){
if(!_107){
return;
}
var _108=_105.iContext.getElementById("revokeInvitesForm");
_108.elements["dangerousurlnonce"].value=_105.dangerousurlnonce;
_108.elements["communityUuid"].value=_105.commId;
_108.elements["directoryUuids"].value=_ff;
_105.numEntries=_fd;
_105.selectedCount=_100;
_105.linkPrev=_fe;
var _109=function(res,_10a){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: revokeInvites: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: revokeInvites: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: revokeInvites: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: revokeInvites: callbackfn: ioArgs: "+_10a);
}
}
_105.setLastModFromResponse(res);
if((_105.numEntries-_105.selectedCount==0)&&typeof (_105.linkPrev)!="undefined"&&_105.linkPrev!=null&&_105.linkPrev.length>0){
_105.loadInvites(_105.linkPrev);
}else{
_105.loadInvites(null);
}
_105.displayMessages(res);
};
dojo.xhrPost({url:_105.applicationContext+_105.MEMBERS_INVITESREVOKE,form:_108,sync:true,load:_109,error:dojo.hitch(_105,_105.xhrerrorcallback)});
};
lconn.core.DialogUtil.prompt(_102,_103,ok,_104,_106);
}
};
this.revokeInvite=function(_10b,_10c,_10d,_10e,_10f){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: revokeInvite(): numEntries: "+_10b);
console.log("CommunityMembers.js: revokeInvite(): linkPrev: "+_10c);
console.log("CommunityMembers.js: revokeInvite(): displayName: "+_10d);
console.log("CommunityMembers.js: revokeInvite(): deleteUrl: "+_10e);
}
}
var _110=this.stringResources["rs_invite_revoke"];
var _111=dojo.string.substitute(this.stringResources["rs_invite_revoke_confirm"],[_10d]);
var ok=dojo.i18n.getLocalization("lconn.core","strings").rs_ok;
var _112=this.stringResources["rs_member_cancel"];
var _113=this;
var _114=function(_115){
if(!_115){
return;
}
_113.numEntries=_10b;
_113.linkPrev=_10c;
var _116=function(res,_117){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: revokeInvite: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: revokeInvite: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: revokeInvite: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: revokeInvite: callbackfn: ioArgs: "+_117);
}
}
if(_113.numEntries<=1&&typeof (_113.linkPrev)!="undefined"&&_113.linkPrev!=null&&_113.linkPrev.length>0){
_113.loadInvites(_113.linkPrev);
}else{
_113.loadInvites(null);
}
};
dojo.xhrDelete({url:_10e,load:_116,error:dojo.hitch(this,this.xhrerrorcallback)});
};
lconn.core.DialogUtil.prompt(_110,_111,ok,_112,_114);
};
this.resendInvites=function(){
var _118="";
dojo.query("#fullmembersdiv input:checked").forEach(function(node,_119){
if(_119>0){
_118+=",";
}
_118+=node.id;
});
if(_118!=""){
this.resendInvite(_118);
}
};
this.resendInvite=function(_11a){
var _11b=this;
var _11c=function(res,_11d){
if(window.debugComm!=null){
if(window.console!=null){
console.log("CommunityMembers.js: resendInvites: callbackfn: res: "+res);
if(typeof (res)!="undefined"&&res!=null){
if(typeof (res.body)!="undefined"&&res.body!=null){
console.log("CommunityMembers.js: resendInvites: callbackfn: res.body: "+res.body);
if(typeof (res.body.innerHTML)!="undefined"&&res.body.innerHTML!=null){
console.log("CommunityMembers.js: resendInvites: callbackfn: res.body.innerHTML: "+res.body.innerHTML);
}
}
}
console.log("CommunityMembers.js: resendInvites: callbackfn: ioArgs: "+_11d);
}
}
_11b.setLastModFromResponse(res);
_11b.loadInvites(null);
_11b.displayMessages(res);
};
var _11e="<?xml version='1.0' encoding='utf-8'?>"+"<entry xmlns='http://www.w3.org/2005/Atom' xmlns:snx='http://www.ibm.com/xmlns/prod/sn'>"+"<category term=\"invites_request\" scheme=\"http://www.ibm.com/xmlns/prod/sn/type\" />"+"<snx:invitee_list>";
_11e+=_11a;
_11e+="</snx:invitee_list>"+"<content type=\"text\">Please consider joining this excellent community.</content>"+"</entry>";
var _11f=new Object();
_11f["Content-Type"]="application/atom+xml";
dojo.xhrPost({url:this.applicationContext+this.MEMBERS_INVITESUBMIT+this.commId,putData:_11e,sync:true,load:_11c,error:dojo.hitch(this,this.xhrerrorcallback),headers:_11f});
};
this.setLastModFromResponse=function(_120){
if(typeof _120!="undefined"&&_120!=null&&_120.length>0){
var _121="lastmodstart";
var _122="lastmodend";
var _123=_120.indexOf(_121);
var _124=_120.indexOf(_122);
var _125=_120.substr(_123+_121.length,_124-(_123+_121.length));
this.setLastMod(_125);
this.useLastMod=true;
}
};
this.getRandomInteger=function(min,max){
return Math.floor(Math.random()*(max-min+1))+min;
};
this.atomLinkOnClick=function(){
var _126=navigator.appVersion;
var _127=_126.split(";");
var bVer=_127[1].replace(/[\s]/g,"");
if(bVer=="MSIE6.0"){
alert(this.stringResources["rs_popup_subscribe_to_feed"]);
return false;
}
return true;
};
};
lconn.comm.communityMembers.CommunityRoleFilter=function(_128,role){
this.membersWidget=_128;
this.role=role;
this.toString=function(){
if(this.role==null||this.role==this.membersWidget.ROLE_VALUE_ALL){
return "";
}else{
return "&"+this.membersWidget.ROLE_PARAM+"="+this.role;
}
};
this.setRole=function(role){
this.role=role;
};
};
lconn.comm.communityMembers.CommunityOrgFilter=function(_129,_12a){
this.membersWidget=_129;
this.orgFilter=_12a;
this.toString=function(){
if(this.orgFilter==null){
return "";
}else{
if(this.orgFilter=="internalOnly"){
return "&"+this.membersWidget.ORGID_PARAM+"="+communityOrgId;
}else{
return "&"+this.membersWidget.NOT_ORGID_PARAM+"="+communityOrgId;
}
}
};
this.setOrgFilter=function(_12b){
this.orgFilter=_12b;
};
};
lconn.comm.communityMembers.MembersUIState=function(_12c,_12d,_12e,_12f,_130){
this.membersWidget=_12c;
this.sortField=_12d;
this.sortDirection=_12e;
this.pageSize=_130;
this.format=null;
this.pagingType=null;
this.sortButtonID="memButtonNewest";
this.filterString=null;
if(_12f!=null){
this.filters=_12f;
}else{
this.filters=new Object();
}
this.setFilterString=function(_131){
this.filterString=_131;
};
this.setSortField=function(_132){
this.sortField=_132;
};
this.setSortDirection=function(_133){
this.sortDirection=_133;
};
this.getSortDirection=function(){
var asc=_12c.ASC_PARAM;
var desc=_12c.DESC_PARAM;
switch(this.sortDirection){
case asc:
return true;
case desc:
return false;
}
return null;
};
this.setPageSize=function(_134){
this.pageSize=_134;
};
this.setFormat=function(_135){
this.format=_135;
};
this.setPagingType=function(_136){
this.pagingType=_136;
};
this.setSortButtonID=function(_137){
this.sortButtonID=_137;
};
this.getSortButtonID=function(){
return this.sortButtonID;
};
this.setFilters=function(_138){
for(key in _138){
this.filters[key]=_138[key];
}
};
this.toString=function(){
var _139="";
if(this.sortField!=null){
_139+="&"+this.membersWidget.SORTBY_PARAM+"="+this.sortField;
if(this.sortDirection!=null){
_139+="&"+this.sortDirection+"=true";
}
}
if(this.filters!=null){
for(key in this.filters){
_139+=this.filters[key];
}
}
if(this.pageSize!=null){
_139+="&"+this.membersWidget.PAGESIZE_PARAM+"="+this.pageSize;
}
if(this.format!=null){
_139+="&"+this.membersWidget.FORMAT_PARAM+"="+this.format;
}
if(this.pagingType!=null){
_139+="&"+this.membersWidget.PAGINGTYPE_PARAM+"="+this.pagingType;
}
if(this.filterString!=null&&this.filterString.length>0){
_139+="&search="+encodeURI(this.filterString);
}
return this.membersWidget.atomCommunityMembersUrl+_139;
};
};
lconn.comm.communityMembers.InvitesUIState=function(_13a){
this.membersWidget=_13a;
this.sortField=_13a.INVITE_SORTFIELD_VALUE_BY_DATE_INVITED;
this.sortDirection=_13a.DESC_PARAM;
this.setPageSize=null;
this.setSortField=function(_13b){
this.sortField=_13b;
};
this.setSortDirection=function(_13c){
this.sortDirection=_13c;
};
this.getSortDirection=function(){
var asc=_13a.ASC_PARAM;
var desc=_13a.DESC_PARAM;
switch(this.sortDirection){
case asc:
return true;
case desc:
return false;
}
return null;
};
this.getSortButtonID=function(){
if(this.sortField==this.membersWidget.INVITE_SORTFIELD_VALUE_BY_DATE_INVITED){
return "sortInvitesByDateInvited";
}
return "sortInvitesByName";
};
this.setPageSize=function(_13d){
this.pageSize=_13d;
};
this.getParams=function(){
var _13e="";
if(this.sortField!=null){
_13e+="&"+this.membersWidget.SORTBY_PARAM+"="+this.sortField;
if(this.sortDirection!=null){
_13e+="&"+this.sortDirection+"=true";
}
}
if(this.pageSize!=null){
_13e+="&"+this.membersWidget.PAGESIZE_PARAM+"="+this.pageSize;
}
return _13e;
};
};
}

dojo.provide("lconn.sand.nls.ui")._built=true;
dojo.provide("lconn.sand.nls.ui.en");
lconn.sand.nls.ui.en={"sand_Blogs":"Blog entries","sand_SIsTManager":"%s is %t\'s manager","sand_TCommentedOnPostsOnSBoard":"%t commented on posts on %s\'s board.","sand_TSharedFilesWithYou":"%t shared files with you","sand_theyShareCommunity2":"They share ${tagA1}a community${tagA2}","sand_theyShareCollegue":"They share ${tagA1}a colleague${tagA2}","sand_theyShareCommunity1":"They share ${tagA1}a community${tagA2}","wikiCoCommenting":"You commented within the same wiki.","sand_TCommentedOnPostOnYourBoard":"%t commented on a post on your board.","sand_theyShareBookmarks":"They share ${tagA1}%c bookmarks${tagA2}","sand_TSharedAFileToYou":"%t shared a file with you","sand_theyWereBothTaggedWithTags":"They were both tagged with ${tagA1}%c tags${tagA2} ","sand_Communities":"Communities","sand_youShareActivity":"You share ${tagA1}an activity${tagA2}","lm1":"You are this person\'s manager","sand_youShareActivities":"You share ${tagA1}%c activities${tagA2}","sdm":"You share the same manager","sand_ForumThread":"Forum thread","sand_Bookmarks":"Bookmarks","sand_Forums":"Discussion topics","sand_TCommentedOnPostOnSBoard":"%t commented on a post on %s\'s board.","statusUpdatesOwnerPostedTo":"This person wrote on your board.","sand_SCommentedOnTPost":"%s commented on %t\'s post.","sand_SCommentedOnPostsOnTBoard":"%s commented on posts on %t\'s board.","sand_SWroteOnTBoard":"%s wrote on %t\'s board.","coFileCommenting":"You commented on the same files","sand_youBothTaggedPeople":"You both tagged ${tagA1}%c people${tagA2} ","sand_Activities":"Activities","sand_commentedCTimesOnYourBlog":"%t commented %c times on your ${tagA1}blog${tagA2}","sand_YouCommentedOnThePosts":"You commented on the same posts.","sand_theyBothTaggedSamePerson":"They both tagged the same ${tagA1}person${tagA2}","TAGS":"Tags: ","sand_YouCommentedOnPostOnTBoard":"You commented on a post on %t\'s board.","sand_youCollegues":"You are colleagues","sand_Discussion":"Discussion","DYKRemove":"Remove","sand_ExpandSection":"Expand section","sand_DYK":"Do You Know","sand_commentedCTimesOnTBlog":"%s commented %c times on %t\'s blog${tagA2}","numTagInCommon":"${0} related tags","sand_PersonIsConnectedToTarget":"${person} is connected to ${target}","sand_theyBothCommentedOnSameBlogEntry":"They both commented on the same ${tagA1}blog entry${tagA2}","sand_commentedOnTBlog":"%s commented on %t\'s ${tagA1}blog${tagA2}","statusUpdatesCommentedTo":"This person commented on your status update post.","sand_youWereBothTaggedWithTags":"You were both tagged with ${tagA1}%c tags${tagA2} ","fileShared":"This person shared one or more files with you","sand_theyShareCollegues":"They share ${tagA1}%c colleagues${tagA2}","sand_previous":"Previous","sand_YouCommentedOnTPosts":"You commented on %t\'s posts.","pctg":"You have both tagged the same person","sand_LogInTIC":"Log in to see common things between you.","sand_noRecomForNow":"There are no recommendations for you.","RESTORE_ACTION":"Restore removed recommendations","sand_youBothCommentedOnSameBlogEntryCTimes":"You both commented on the same ${tagA1}blog entry${tagA2} %c times","NDYK1":"No more people to recommend","sand_Blog":"Blog entry","forumthreaddiscussion":"You share a forum thread","sand_theyShareActivities":"They share ${tagA1}%c activities${tagA2}","str_component_id":"CLFRTT","sand_TwistyAccessHint":"Use the Enter key on the twisty to switch between the expanded and collapsed.","sand_theyShareActivity":"They share ${tagA1}an activity${tagA2}","numPeopleInCommon":"${0} related people","sand_youCoCommentedWiki":"You both commented within the same ${tagA1}wiki${tagA2}","sand_TWroteOnSBoard":"%t wrote on %s\'s board.","recommendErrorGeneric":"An error occurred while displaying content. Contact your system administrator.","sand_thingsInCommon_actionsFor":"Actions for Things in Common","sand_TCommentedOnPostsOnYourBoard":"%t commented on posts on your board.","sand_youShareDirectManager":"You share a ${tagA1}direct manager${tagA2}","sand_you":"you","ticUnavailable":"The items in common for you and this profile cannot currently be retrieved.","tgw":"You are tagged the same","sand_Tag":"Tag","sand_theyCoeditedWiki":"They co-edited a ${tagA1}wiki${tagA2}","numTagsInCommon":"${0} related tags","sand_Wikis":"Wiki pages","sand_Community":"Community","statusUpdatesCoCommenting":"You have commented on the same status update post.","acm":"You share activities","sand_youCoeditedWiki":"You co-edited a ${tagA1}wiki${tagA2}","sand_youAreTManager":"You are %t\'s manager","CANCEL_ACTION":"Cancel","SEND_ACTION":"Send","tgb":"The same people have tagged you both","sand_theyShareForumThread":"They share ${tagA1}a forum thread${tagA2}","sand_TSharedFilesWithS":"%t shared files with %s","sand_Tags":"Tags","sand_CollapseSection":"Collapse section","sand_YouWroteOnTBoard":"You wrote on %t\'s board.","sand_theyShareActivities120":"They share more than ${tagA1}120 activities${tagA2}","sand_youSharedAFileToT":"You shared a file with %t","LOADING":"Loading...","sand_recomItems_actionsFor":"Actions for Recommendations","sand_theyCollegues":"They are colleagues","sand_howAreConnected":"How are ${0} and ${1} connected","statusUpdatesOwnerCommentedBy":"You wrote on this person\'s board.","sand_Bookmark":"Bookmark","sand_SSharedFilesToT":"%s shared files with %t","NEXT":"Next","sand_theyCoCommentedWiki":"They both commented within the same ${tagA1}wiki${tagA2}","sand_noSocialPath":"There are no connections between you and ${person}.","sand_youBothTaggedSamePerson":"You both tagged the same ${tagA1}person${tagA2}","sand_YouAreConnectedToPerson":"You are connected to ${person}","sand_commentedCTimesOnSBlog":"%t commented %c times on %s\'s ${tagA1}blog${tagA2}","dykUnavailable":"Suggestions for people you could invite to your network cannot currently be retrieved.","sand_theyShareFiles":"They share ${tagA1}%c files${tagA2}","sand_commentedOnSBlog":"%t commented on %s\'s ${tagA1}blog${tagA2}","sand_theyBothUsedTags":"There are ${tagA1}%c tags${tagA2} which They both used","sand_thereArePeopleThatTaggedThemBoth":"There are ${tagA1}%c people${tagA2} that tagged them both","sand_youBothCommentedOnSameBlogEntry":"You both commented on the same ${tagA1}blog entry${tagA2}","sand_STaggedT":"%s tagged %t","sand_youBothUsedSameTag":"You both used the ${tagA1}same tag${tagA2}","sand_youBothUsedTags":"There are ${tagA1}%c tags${tagA2} which You both used","sand_SCoSharesFileWithT":"They have been shared the same file","sand_youShareFile":"You share ${tagA1}a file${tagA2}","sand_TWroteOnYourBoard":"%t wrote on your board.","sand_theyShareCommunities2":"They share ${tagA1}%c communities${tagA2}","statusUpdatesOwnerPostedBy":"You posted to this person\'s board.","sand_theyShareCommunities1":"They share ${tagA1}%c communities${tagA2}","NR2":"As you create content and connect to people recommendations will start to appear.","NR1":"There are no current recommendations for you.","sand_recomItems":"Recommendations","DYKRemovePerson":"Remove ${personName}","sand_youCoeditedWikis":"You co-edited ${tagA1}%c wikis${tagA2}","sand_theyBothTaggedPeople":"They both tagged ${tagA1}%c people${tagA2}","sand_YouCommentedOnPostsOnTBoard":"You commented on posts on %t\'s board.","sand_TopItemsComm":"Top Items in Common","sand_youShareBookmarks":"You share ${tagA1}%c bookmarks${tagA2}","todoout":"This person assigned todos to you","fileSharing":"You shared one or more files with this person.","sand_youCoCommentedWikis":"You commented within the same ${tagA1}%c wikis${tagA2}","sand_theyBothCommentedOnSameBlogEntryCTimes":"They both commented on the same ${tagA1}blog entry${tagA2} %c times","sand_theyShareForumThreads":"They share ${tagA1}%c forum threads${tagA2}","sand_next":"Next","recommendError":"An error has occured, the recommendation system may not be available.","sand_You":"You","sand_someoneTaggedThemBoth":"${tagA1}Someone${tagA2} tagged them both","INVITE_TITLE":"Send invitation to connect","sand_TCommentedOnSPost":"%t commented on %s\'s post.","sand_youShareForumThreads":"You share ${tagA1}%c forum threads${tagA2}","sand_TheyCommentedOnTheSamePost":"They commented on the same post.","statusUpdatesCommentedBy":"You commented on this person\'s status update post.","sand_fileCoSharing":"You have been shared the same file","tcu":"You have used the same tag","sand_DYK_actionsFor":"Actions for Do You Know","sand_youShareBookmark":"You share ${tagA1}a bookmark${tagA2}","sand_youShareCommunities2":"You share ${tagA1}%c communities${tagA2}","sand_youShareCommunities1":"You share ${tagA1}%c communities${tagA2}","pt":"This person tagged you","sand_Wiki":"Wiki page","sand_OneOfOne":"1 of 1","sand_youWereBothTaggedBySameTag":"You were both tagged by the same ${tagA1}tag${tagA2}","sand_personIsInYourNetwork":"${person} is in your network. ","sand_theyBothUsedSameTag":"They both used the ${tagA1}same tag${tagA2}","CONNECT_TO_PERSON":"Invite ${personName} to connect","sand_YouCommentedOnTPost":"You commented on %t\'s post.","sand_NothingInCommon":"There are no items in common for you and this profile.","sand_commentedOnYourBlog":"%t commented on your ${tagA1}blog${tagA2}","str.msgid.ignore":"true","sand_ActionsFor":"Actions for {0}","le1":"This person is your manager","sand_youShareCollegues":"You share ${tagA1}%c colleagues${tagA2}","sand_theyCoeditedWikis":"They co-edited ${tagA1}%c wikis${tagA2}","sand_theyShareBookmark":"They share ${tagA1}a bookmark${tagA2}","RECOMMENDATIONS_TITLE":"Your Recommendations","sand_TheyCommentedOnTheSamePosts":"They commented on the same posts.","sand_loadingString":"Loading...","DYK_TITLE":"Do You Know","pbt":"You tagged this person","sand_socialPath":"Who Connects Us?","sand_TTaggedS":"%t tagged %s","sand_Login":"Log in","sand_theyShareFile":"They share ${tagA1}a file${tagA2}","PREV":"Previous","TITLE_RECOMMEND":"Recommendations:","sand_theyShareDirectManager":"They share a ${tagA1}direct manager${tagA2}","sand_TSharedAFileWithS":"%t shared a file with %s","sand_TCommentedOnYourPost":"%t commented on your post.","sand_TIsSManager":"%t is %s\'s manager","lpfr":"Is your colleague","wikiCoContribution":"You both edited the same wiki","sand_youShareCollegue":"You share ${tagA1}a colleague${tagA2}","sand_Discussions":"Discussions","sand_youShareForumThread":"You share ${tagA1}a forum thread${tagA2}","sand_andMore":"and ${0} more","sand_thereArePeopleThatTaggedYouBoth":"There are ${tagA1}%c people${tagA2} that tagged you both","sand_TIsYourManager":"%t is your manager","sand_youSharedFilesToT":"You shared files with %t","sand_youShareCommunity2":"You share ${tagA1}a community${tagA2}","sand_youShareCommunity1":"You share ${tagA1}a community${tagA2}","sand_recomComm":"Recommendations","sand_Activity":"Activity","sand_SCoSharesFilesWithT":"They have been shared the same files","sand_More":"More (${restItemsNum})","sand_simComm":"Similar Communities","lpcfr":"You share some colleagues","CONNECT_TO":"Invite to Connect","sand_youShareActivities120":"You share more than ${tagA1}120 activities${tagA2}","sand_thingsInCommon":"Things in Common","sand_they":"They","sand_File":"File","sand_Forum":"Discussion topic","sand_someoneTaggedYouBoth":"${tagA1}Someone${tagA2} tagged you both","sand_TCommentedOnSPosts":"%t commented on %s\'s posts.","bpct":"Has commented on your blog","sand_youShareFiles":"You share ${tagA1}%c files${tagA2}","sand_XtoXofX":"${fromItem} - ${toItem} of ${totalItems}","sand_YouCommentedOnTheSamePost":"You commented on the same post.","sand_Files":"Files","fileCoSharing":"This person and you were shared the same file or files","ccms":"You are in a community together","sand_theyWereBothTaggedBySameTag":"They were both tagged by the same ${tagA1}tag${tagA2}","sand_ForumThreads":"Forum threads","TAGS_IN_COMMON":"Tags in common: ","sand_TCommentedOnYourPosts":"%t commented on your posts.","bpcc":"You have commented on the same blog","bpcb":"You commented on their blog","ctb":"You share a bookmark","sand_filesCoSharing":"You have been shared the same files","ccmf":"You are in a community together","sand_SSharedAFileToT":"%s shared a file with %t","todoin":"You assigned todos to this person","socialPathUnavailable":"The connections between you and other people cannot currently be retrieved.","statusUpdatesOwnerCommentedTo":"This person wrote on your board.","numPersonInCommon":"${0} related person","sand_theyCoCommentedWikis":"They commented within the same ${tagA1}%c wikis${tagA2}","sand_SCommentedOnPostOnTBoard":"%t commented on a post on %s\'s board.","sand_SCommentedOnTPosts":"%s commented on %t\'s posts."};
dojo.registerModulePath("lconn.sand", "../lconn.sand");

;if(!dojo._hasResource["lconn.sand.sandAll"]){
dojo._hasResource["lconn.sand.sandAll"]=true;
dojo.provide("lconn.sand.sandAll");
dojo.requireLocalization("lconn.sand","ui");
lconn.sand.sandAll.loadAllStringIntoObject=function(_1){
var _2=dojo.i18n.getLocalization("lconn.sand","ui");
for(var i in _2){
_1[i]=_2[i];
}
};
}


;if(!dojo._hasResource["dojo._base.lang"]){
dojo._hasResource["dojo._base.lang"]=true;
dojo.provide("dojo._base.lang");
(function(){
var d=dojo,_1=Object.prototype.toString;
dojo.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.isArray=function(it){
return it&&(it instanceof Array||typeof it=="array");
};
dojo.isFunction=function(it){
return _1.call(it)==="[object Function]";
};
dojo.isObject=function(it){
return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));
};
dojo.isArrayLike=function(it){
return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));
};
dojo.isAlien=function(it){
return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.extend=function(_2,_3){
for(var i=1,l=arguments.length;i<l;i++){
d._mixin(_2.prototype,arguments[i]);
}
return _2;
};
dojo._hitchArgs=function(_4,_5){
var _6=d._toArray(arguments,2);
var _7=d.isString(_5);
return function(){
var _8=d._toArray(arguments);
var f=_7?(_4||d.global)[_5]:_5;
return f&&f.apply(_4||this,_6.concat(_8));
};
};
dojo.hitch=function(_9,_a){
if(arguments.length>2){
return d._hitchArgs.apply(d,arguments);
}
if(!_a){
_a=_9;
_9=null;
}
if(d.isString(_a)){
_9=_9||d.global;
if(!_9[_a]){
throw (["dojo.hitch: scope[\"",_a,"\"] is null (scope=\"",_9,"\")"].join(""));
}
return function(){
return _9[_a].apply(_9,arguments||[]);
};
}
return !_9?_a:function(){
return _a.apply(_9,arguments||[]);
};
};
dojo.delegate=dojo._delegate=(function(){
function _b(){
};
return function(_c,_d){
_b.prototype=_c;
var _e=new _b();
_b.prototype=null;
if(_d){
d._mixin(_e,_d);
}
return _e;
};
})();
var _f=function(obj,_10,_11){
return (_11||[]).concat(Array.prototype.slice.call(obj,_10||0));
};
var _12=function(obj,_13,_14){
var arr=_14||[];
for(var x=_13||0;x<obj.length;x++){
arr.push(obj[x]);
}
return arr;
};
dojo._toArray=d.isIE?function(obj){
return ((obj.item)?_12:_f).apply(this,arguments);
}:_f;
dojo.partial=function(_15){
var arr=[null];
return d.hitch.apply(d,arr.concat(d._toArray(arguments)));
};
var _16=d._extraNames,_17=_16.length,_18={};
dojo.clone=function(o){
if(!o||typeof o!="object"||d.isFunction(o)){
return o;
}
if(o.nodeType&&"cloneNode" in o){
return o.cloneNode(true);
}
if(o instanceof Date){
return new Date(o.getTime());
}
var r,i,l,s,_19;
if(d.isArray(o)){
r=[];
for(i=0,l=o.length;i<l;++i){
if(i in o){
r.push(d.clone(o[i]));
}
}
}else{
r=o.constructor?new o.constructor():{};
}
for(_19 in o){
s=o[_19];
if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
r[_19]=d.clone(s);
}
}
if(_17){
for(i=0;i<_17;++i){
_19=_16[i];
s=o[_19];
if(!(_19 in r)||(r[_19]!==s&&(!(_19 in _18)||_18[_19]!==s))){
r[_19]=s;
}
}
}
return r;
};
dojo.trim=String.prototype.trim?function(str){
return str.trim();
}:function(str){
return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
var _1a=/\{([^\}]+)\}/g;
dojo.replace=function(_1b,map,_1c){
return _1b.replace(_1c||_1a,d.isFunction(map)?map:function(_1d,k){
return d.getObject(k,false,map);
});
};
})();
}


;if(!dojo._hasResource["dojo._base.html"]){
dojo._hasResource["dojo._base.html"]=true;
dojo.require("dojo._base.lang");
dojo.provide("dojo._base.html");
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
if(dojo.isIE||dojo.isOpera){
dojo.byId=function(id,_1){
if(typeof id!="string"){
return id;
}
var _2=_1||dojo.doc,te=_2.getElementById(id);
if(te&&(te.attributes.id.value==id||te.id==id)){
return te;
}else{
var _3=_2.all[id];
if(!_3||_3.nodeName){
_3=[_3];
}
var i=0;
while((te=_3[i++])){
if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){
return te;
}
}
}
};
}else{
dojo.byId=function(id,_4){
return (typeof id=="string")?(_4||dojo.doc).getElementById(id):id;
};
}
(function(){
var d=dojo;
var _5=d.byId;
var _6=null,_7;
d.addOnWindowUnload(function(){
_6=null;
});
dojo._destroyElement=dojo.destroy=function(_8){
_8=_5(_8);
try{
var _9=_8.ownerDocument;
if(!_6||_7!=_9){
_6=_9.createElement("div");
_7=_9;
}
_6.appendChild(_8.parentNode?_8.parentNode.removeChild(_8):_8);
_6.innerHTML="";
}
catch(e){
}
};
dojo.isDescendant=function(_a,_b){
try{
_a=_5(_a);
_b=_5(_b);
while(_a){
if(_a==_b){
return true;
}
_a=_a.parentNode;
}
}
catch(e){
}
return false;
};
dojo.setSelectable=function(_c,_d){
_c=_5(_c);
if(d.isMozilla){
_c.style.MozUserSelect=_d?"":"none";
}else{
if(d.isKhtml||d.isWebKit){
_c.style.KhtmlUserSelect=_d?"auto":"none";
}else{
if(d.isIE){
var v=(_c.unselectable=_d?"":"on");
d.query("*",_c).forEach("item.unselectable = '"+v+"'");
}
}
}
};
var _e=function(_f,ref){
var _10=ref.parentNode;
if(_10){
_10.insertBefore(_f,ref);
}
};
var _11=function(_12,ref){
var _13=ref.parentNode;
if(_13){
if(_13.lastChild==ref){
_13.appendChild(_12);
}else{
_13.insertBefore(_12,ref.nextSibling);
}
}
};
dojo.place=function(_14,_15,_16){
_15=_5(_15);
if(typeof _14=="string"){
_14=_14.charAt(0)=="<"?d._toDom(_14,_15.ownerDocument):_5(_14);
}
if(typeof _16=="number"){
var cn=_15.childNodes;
if(!cn.length||cn.length<=_16){
_15.appendChild(_14);
}else{
_e(_14,cn[_16<0?0:_16]);
}
}else{
switch(_16){
case "before":
_e(_14,_15);
break;
case "after":
_11(_14,_15);
break;
case "replace":
_15.parentNode.replaceChild(_14,_15);
break;
case "only":
d.empty(_15);
_15.appendChild(_14);
break;
case "first":
if(_15.firstChild){
_e(_14,_15.firstChild);
break;
}
default:
_15.appendChild(_14);
}
}
return _14;
};
dojo.boxModel="content-box";
if(d.isIE){
d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";
}
var gcs;
if(d.isWebKit){
gcs=function(_17){
var s;
if(_17.nodeType==1){
var dv=_17.ownerDocument.defaultView;
s=dv.getComputedStyle(_17,null);
if(!s&&_17.style){
_17.style.display="";
s=dv.getComputedStyle(_17,null);
}
}
return s||{};
};
}else{
if(d.isIE){
gcs=function(_18){
return _18.nodeType==1?_18.currentStyle:{};
};
}else{
gcs=function(_19){
return _19.nodeType==1?_19.ownerDocument.defaultView.getComputedStyle(_19,null):{};
};
}
}
dojo.getComputedStyle=gcs;
if(!d.isIE){
d._toPixelValue=function(_1a,_1b){
return parseFloat(_1b)||0;
};
}else{
d._toPixelValue=function(_1c,_1d){
if(!_1d){
return 0;
}
if(_1d=="medium"){
return 4;
}
if(_1d.slice&&_1d.slice(-2)=="px"){
return parseFloat(_1d);
}
with(_1c){
var _1e=style.left;
var _1f=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_1d;
_1d=style.pixelLeft;
}
catch(e){
_1d=0;
}
style.left=_1e;
runtimeStyle.left=_1f;
}
return _1d;
};
}
var px=d._toPixelValue;
var _20="DXImageTransform.Microsoft.Alpha";
var af=function(n,f){
try{
return n.filters.item(_20);
}
catch(e){
return f?{}:null;
}
};
dojo._getOpacity=d.isIE?function(_21){
try{
return af(_21).Opacity/100;
}
catch(e){
return 1;
}
}:function(_22){
return gcs(_22).opacity;
};
dojo._setOpacity=d.isIE?function(_23,_24){
var ov=_24*100;
_23.style.zoom=1;
af(_23,1).Enabled=!(_24==1);
if(!af(_23)){
_23.style.filter+=" progid:"+_20+"(Opacity="+ov+")";
}else{
af(_23,1).Opacity=ov;
}
if(_23.nodeName.toLowerCase()=="tr"){
d.query("> td",_23).forEach(function(i){
d._setOpacity(i,_24);
});
}
return _24;
}:function(_25,_26){
return _25.style.opacity=_26;
};
var _27={left:true,top:true};
var _28=/margin|padding|width|height|max|min|offset/;
var _29=function(_2a,_2b,_2c){
_2b=_2b.toLowerCase();
if(d.isIE){
if(_2c=="auto"){
if(_2b=="height"){
return _2a.offsetHeight;
}
if(_2b=="width"){
return _2a.offsetWidth;
}
}
if(_2b=="fontweight"){
switch(_2c){
case 700:
return "bold";
case 400:
default:
return "normal";
}
}
}
if(!(_2b in _27)){
_27[_2b]=_28.test(_2b);
}
return _27[_2b]?px(_2a,_2c):_2c;
};
var _2d=d.isIE?"styleFloat":"cssFloat",_2e={"cssFloat":_2d,"styleFloat":_2d,"float":_2d};
dojo.style=function(_2f,_30,_31){
var n=_5(_2f),_32=arguments.length,op=(_30=="opacity");
_30=_2e[_30]||_30;
if(_32==3){
return op?d._setOpacity(n,_31):n.style[_30]=_31;
}
if(_32==2&&op){
return d._getOpacity(n);
}
var s=gcs(n);
if(_32==2&&typeof _30!="string"){
for(var x in _30){
d.style(_2f,x,_30[x]);
}
return s;
}
return (_32==1)?s:_29(n,_30,s[_30]||n.style[_30]);
};
dojo._getPadExtents=function(n,_33){
var s=_33||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);
return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};
};
dojo._getBorderExtents=function(n,_34){
var ne="none",s=_34||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);
return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};
};
dojo._getPadBorderExtents=function(n,_35){
var s=_35||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);
return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};
};
dojo._getMarginExtents=function(n,_36){
var s=_36||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);
if(d.isWebKit&&(s.position!="absolute")){
r=l;
}
return {l:l,t:t,w:l+r,h:t+b};
};
dojo._getMarginBox=function(_37,_38){
var s=_38||gcs(_37),me=d._getMarginExtents(_37,s);
var l=_37.offsetLeft-me.l,t=_37.offsetTop-me.t,p=_37.parentNode;
if(d.isMoz){
var sl=parseFloat(s.left),st=parseFloat(s.top);
if(!isNaN(sl)&&!isNaN(st)){
l=sl,t=st;
}else{
if(p&&p.style){
var pcs=gcs(p);
if(pcs.overflow!="visible"){
var be=d._getBorderExtents(p,pcs);
l+=be.l,t+=be.t;
}
}
}
}else{
if(d.isOpera||(d.isIE>7&&!d.isQuirks)){
if(p){
be=d._getBorderExtents(p);
l-=be.l;
t-=be.t;
}
}
}
return {l:l,t:t,w:_37.offsetWidth+me.w,h:_37.offsetHeight+me.h};
};
dojo._getContentBox=function(_39,_3a){
var s=_3a||gcs(_39),pe=d._getPadExtents(_39,s),be=d._getBorderExtents(_39,s),w=_39.clientWidth,h;
if(!w){
w=_39.offsetWidth,h=_39.offsetHeight;
}else{
h=_39.clientHeight,be.w=be.h=0;
}
if(d.isOpera){
pe.l+=be.l;
pe.t+=be.t;
}
return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};
};
dojo._getBorderBox=function(_3b,_3c){
var s=_3c||gcs(_3b),pe=d._getPadExtents(_3b,s),cb=d._getContentBox(_3b,s);
return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};
};
dojo._setBox=function(_3d,l,t,w,h,u){
u=u||"px";
var s=_3d.style;
if(!isNaN(l)){
s.left=l+u;
}
if(!isNaN(t)){
s.top=t+u;
}
if(w>=0){
s.width=w+u;
}
if(h>=0){
s.height=h+u;
}
};
dojo._isButtonTag=function(_3e){
return _3e.tagName=="BUTTON"||_3e.tagName=="INPUT"&&(_3e.getAttribute("type")||"").toUpperCase()=="BUTTON";
};
dojo._usesBorderBox=function(_3f){
var n=_3f.tagName;
return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(_3f);
};
dojo._setContentSize=function(_40,_41,_42,_43){
if(d._usesBorderBox(_40)){
var pb=d._getPadBorderExtents(_40,_43);
if(_41>=0){
_41+=pb.w;
}
if(_42>=0){
_42+=pb.h;
}
}
d._setBox(_40,NaN,NaN,_41,_42);
};
dojo._setMarginBox=function(_44,_45,_46,_47,_48,_49){
var s=_49||gcs(_44),bb=d._usesBorderBox(_44),pb=bb?_4a:d._getPadBorderExtents(_44,s);
if(d.isWebKit){
if(d._isButtonTag(_44)){
var ns=_44.style;
if(_47>=0&&!ns.width){
ns.width="4px";
}
if(_48>=0&&!ns.height){
ns.height="4px";
}
}
}
var mb=d._getMarginExtents(_44,s);
if(_47>=0){
_47=Math.max(_47-pb.w-mb.w,0);
}
if(_48>=0){
_48=Math.max(_48-pb.h-mb.h,0);
}
d._setBox(_44,_45,_46,_47,_48);
};
var _4a={l:0,t:0,w:0,h:0};
dojo.marginBox=function(_4b,box){
var n=_5(_4b),s=gcs(n),b=box;
return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);
};
dojo.contentBox=function(_4c,box){
var n=_5(_4c),s=gcs(n),b=box;
return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);
};
var _4d=function(_4e,_4f){
if(!(_4e=(_4e||0).parentNode)){
return 0;
}
var val,_50=0,_51=d.body();
while(_4e&&_4e.style){
if(gcs(_4e).position=="fixed"){
return 0;
}
val=_4e[_4f];
if(val){
_50+=val-0;
if(_4e==_51){
break;
}
}
_4e=_4e.parentNode;
}
return _50;
};
dojo._docScroll=function(){
var n=d.global;
return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));
};
dojo._isBodyLtr=function(){
return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";
};
dojo._getIeDocumentElementOffset=function(){
var de=d.doc.documentElement;
if(d.isIE<8){
var r=de.getBoundingClientRect();
var l=r.left,t=r.top;
if(d.isIE<7){
l+=de.clientLeft;
t+=de.clientTop;
}
return {x:l<0?0:l,y:t<0?0:t};
}else{
return {x:0,y:0};
}
};
dojo._fixIeBiDiScrollLeft=function(_52){
var dd=d.doc;
if(d.isIE<8&&!d._isBodyLtr()){
var de=d.isQuirks?dd.body:dd.documentElement;
return _52+de.clientWidth-de.scrollWidth;
}
return _52;
};
dojo._abs=dojo.position=function(_53,_54){
var db=d.body(),dh=db.parentNode,ret;
_53=_5(_53);
if(_53["getBoundingClientRect"]){
ret=_53.getBoundingClientRect();
ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};
if(d.isIE){
var _55=d._getIeDocumentElementOffset();
ret.x-=_55.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);
ret.y-=_55.y+(d.isQuirks?db.clientTop+db.offsetTop:0);
}else{
if(d.isFF==3){
var cs=gcs(dh);
ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);
ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);
}
}
}else{
ret={x:0,y:0,w:_53.offsetWidth,h:_53.offsetHeight};
if(_53["offsetParent"]){
ret.x-=_4d(_53,"scrollLeft");
ret.y-=_4d(_53,"scrollTop");
var _56=_53;
do{
var n=_56.offsetLeft,t=_56.offsetTop;
ret.x+=isNaN(n)?0:n;
ret.y+=isNaN(t)?0:t;
cs=gcs(_56);
if(_56!=_53){
if(d.isMoz){
ret.x+=2*px(_56,cs.borderLeftWidth);
ret.y+=2*px(_56,cs.borderTopWidth);
}else{
ret.x+=px(_56,cs.borderLeftWidth);
ret.y+=px(_56,cs.borderTopWidth);
}
}
if(d.isMoz&&cs.position=="static"){
var _57=_56.parentNode;
while(_57!=_56.offsetParent){
var pcs=gcs(_57);
if(pcs.position=="static"){
ret.x+=px(_56,pcs.borderLeftWidth);
ret.y+=px(_56,pcs.borderTopWidth);
}
_57=_57.parentNode;
}
}
_56=_56.offsetParent;
}while((_56!=dh)&&_56);
}else{
if(_53.x&&_53.y){
ret.x+=isNaN(_53.x)?0:_53.x;
ret.y+=isNaN(_53.y)?0:_53.y;
}
}
}
if(_54){
var _58=d._docScroll();
ret.x+=_58.x;
ret.y+=_58.y;
}
return ret;
};
dojo.coords=function(_59,_5a){
var n=_5(_59),s=gcs(n),mb=d._getMarginBox(n,s);
var abs=d.position(n,_5a);
mb.x=abs.x;
mb.y=abs.y;
return mb;
};
var _5b={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_5c={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_5d={innerHTML:1,className:1,htmlFor:d.isIE,value:1};
var _5e=function(_5f){
return _5c[_5f.toLowerCase()]||_5f;
};
var _60=function(_61,_62){
var _63=_61.getAttributeNode&&_61.getAttributeNode(_62);
return _63&&_63.specified;
};
dojo.hasAttr=function(_64,_65){
var lc=_65.toLowerCase();
return _5d[_5b[lc]||_65]||_60(_5(_64),_5c[lc]||_65);
};
var _66={},_67=0,_68=dojo._scopeName+"attrid",_69={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};
dojo.attr=function(_6a,_6b,_6c){
_6a=_5(_6a);
var _6d=arguments.length,_6e;
if(_6d==2&&typeof _6b!="string"){
for(var x in _6b){
d.attr(_6a,x,_6b[x]);
}
return _6a;
}
var lc=_6b.toLowerCase(),_6f=_5b[lc]||_6b,_70=_5d[_6f],_71=_5c[lc]||_6b;
if(_6d==3){
do{
if(_6f=="style"&&typeof _6c!="string"){
d.style(_6a,_6c);
break;
}
if(_6f=="innerHTML"){
if(d.isIE&&_6a.tagName.toLowerCase() in _69){
d.empty(_6a);
_6a.appendChild(d._toDom(_6c,_6a.ownerDocument));
}else{
_6a[_6f]=_6c;
}
break;
}
if(d.isFunction(_6c)){
var _72=d.attr(_6a,_68);
if(!_72){
_72=_67++;
d.attr(_6a,_68,_72);
}
if(!_66[_72]){
_66[_72]={};
}
var h=_66[_72][_6f];
if(h){
d.disconnect(h);
}else{
try{
delete _6a[_6f];
}
catch(e){
}
}
_66[_72][_6f]=d.connect(_6a,_6f,_6c);
break;
}
if(_70||typeof _6c=="boolean"){
_6a[_6f]=_6c;
break;
}
_6a.setAttribute(_71,_6c);
}while(false);
return _6a;
}
_6c=_6a[_6f];
if(_70&&typeof _6c!="undefined"){
return _6c;
}
if(_6f!="href"&&(typeof _6c=="boolean"||d.isFunction(_6c))){
return _6c;
}
return _60(_6a,_71)?_6a.getAttribute(_71):null;
};
dojo.removeAttr=function(_73,_74){
_5(_73).removeAttribute(_5e(_74));
};
dojo.getNodeProp=function(_75,_76){
_75=_5(_75);
var lc=_76.toLowerCase(),_77=_5b[lc]||_76;
if((_77 in _75)&&_77!="href"){
return _75[_77];
}
var _78=_5c[lc]||_76;
return _60(_75,_78)?_75.getAttribute(_78):null;
};
dojo.create=function(tag,_79,_7a,pos){
var doc=d.doc;
if(_7a){
_7a=_5(_7a);
doc=_7a.ownerDocument;
}
if(typeof tag=="string"){
tag=doc.createElement(tag);
}
if(_79){
d.attr(tag,_79);
}
if(_7a){
d.place(tag,_7a,pos);
}
return tag;
};
d.empty=d.isIE?function(_7b){
_7b=_5(_7b);
for(var c;c=_7b.lastChild;){
d.destroy(c);
}
}:function(_7c){
_5(_7c).innerHTML="";
};
var _7d={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_7e=/<\s*([\w\:]+)/,_7f={},_80=0,_81="__"+d._scopeName+"ToDomId";
for(var _82 in _7d){
var tw=_7d[_82];
tw.pre=_82=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";
tw.post="</"+tw.reverse().join("></")+">";
}
d._toDom=function(_83,doc){
doc=doc||d.doc;
var _84=doc[_81];
if(!_84){
doc[_81]=_84=++_80+"";
_7f[_84]=doc.createElement("div");
}
_83+="";
var _85=_83.match(_7e),tag=_85?_85[1].toLowerCase():"",_86=_7f[_84],_87,i,fc,df;
if(_85&&_7d[tag]){
_87=_7d[tag];
_86.innerHTML=_87.pre+_83+_87.post;
for(i=_87.length;i;--i){
_86=_86.firstChild;
}
}else{
_86.innerHTML=_83;
}
if(_86.childNodes.length==1){
return _86.removeChild(_86.firstChild);
}
df=doc.createDocumentFragment();
while(fc=_86.firstChild){
df.appendChild(fc);
}
return df;
};
var _88="className";
dojo.hasClass=function(_89,_8a){
return ((" "+_5(_89)[_88]+" ").indexOf(" "+_8a+" ")>=0);
};
var _8b=/\s+/,a1=[""],_8c=function(s){
if(typeof s=="string"||s instanceof String){
if(s.indexOf(" ")<0){
a1[0]=s;
return a1;
}else{
return s.split(_8b);
}
}
return s;
};
dojo.addClass=function(_8d,_8e){
_8d=_5(_8d);
_8e=_8c(_8e);
var cls=" "+_8d[_88]+" ";
for(var i=0,len=_8e.length,c;i<len;++i){
c=_8e[i];
if(c&&cls.indexOf(" "+c+" ")<0){
cls+=c+" ";
}
}
_8d[_88]=d.trim(cls);
};
dojo.removeClass=function(_8f,_90){
_8f=_5(_8f);
var cls;
if(_90!==undefined){
_90=_8c(_90);
cls=" "+_8f[_88]+" ";
for(var i=0,len=_90.length;i<len;++i){
cls=cls.replace(" "+_90[i]+" "," ");
}
cls=d.trim(cls);
}else{
cls="";
}
if(_8f[_88]!=cls){
_8f[_88]=cls;
}
};
dojo.toggleClass=function(_91,_92,_93){
if(_93===undefined){
_93=!d.hasClass(_91,_92);
}
d[_93?"addClass":"removeClass"](_91,_92);
};
})();
}

dojo.provide("lconn.sand.nls.RecommendWidget")._built=true;
dojo.provide("lconn.sand.nls.RecommendWidget.en");
lconn.sand.nls.RecommendWidget.en={"ARIA_PAGING":"Paging","REMOVE":"Remove","COMMUNITY":"Community","NUM_PEOPLE_IN_COMMON":"${0} related people","ACTIVITY":"Activity","NUM_PERSON_IN_COMMON":"${0} related person","TITLE_RECOMMEND":"Recommendations:","NUM_TAGS_IN_COMMON":"${0} related tags","PAGE_POSITION":"${0} - ${1} of ${2}","TAGS":"Tags: ","DIALOG_RELATED_PEOPLE":"Related People","LOADING":"Loading...","GENERIC_ERROR":"An error occurred while displaying content. Contact your system administrator.","ARIA_PAGE_POSITION":"Showing items ${0} through ${1} of ${2}","DIALOG_RELATED_TAGS":"Related Tags","NUM_TAG_IN_COMMON":"${0} related tag","NR1":"There are no current recommendations for you.","NR2":"As you create content and connect to people, recommendations will start to appear.","UNAVAILABLE":"Your recommendations cannot currently be retrieved.","DIALOG_RELATED_PEOPLE_CLOSE":"Close Related People","NEXT":"Next","RECOMMENDATIONS_TITLE":"Your Recommendations","BLOG_ENTRY":"Blog entry","BOOKMARK":"Bookmark","PREVIOUS":"Previous","DISCUSSION_TOPIC":"Discussion topic","FILE":"File","DIALOG_RELATED_TAGS_CLOSE":"Close Related Tags","LINKACCESSDESCRIPTION":"Click on the link for this recommendation to open it in a new window","WIKI_PAGE":"Wiki page"};

;dojo.cache("lconn.sand", "templates/RecommendWidget.html", "<div dojoAttachPoint=\"root\" class=\"topContainer\"> <div class=\"lotusTable\" dojoAttachPoint=\"recommendErrorNode\" style=\"display:none\"> <img class=\"lconnSprite lconnSprite-iconWarning16\" src=\"${blankIcon}\" role=\"presentation\" alt=\"\"/>&nbsp;&nbsp;<span class=\"lotusMeta\">${_resourceBundle.GENERIC_ERROR}</span> </div> <div dojoAttachPoint=\"recommendLoading\"> <center>${_resourceBundle.LOADING}</center> </div> <div dojoAttachPoint=\"boardingNode\" style=\"display:none\"></div> <div dojoAttachPoint=\"welcomeNode\" style=\"display:none;\"> <span>${_resourceBundle.NR1}</span> </div> <span class=\"lotusAccess\" id=\"lconnRecommendLinkDescription\">${_resourceBundle.LINKACCESSDESCRIPTION}</span> <div dojoAttachPoint=\"recommendContainer\" style=\"display: none; padding:0px 3px 0px 3px;\" role=\"list\"> </div> <div class=\"lotusSectionFooter\" dojoAttachPoint=\"pagingFooter\"> <div class=\"lotusPaging\" aria-label=\"${_resourceBundle.ARIA_PAGING}\" role=\"navigation\"> <div class=\"lotusLeft\" aria-label=\"${_resourceBundle.ARIA_PAGE_POSITION}\" title=\"${_resourceBundle.ARIA_PAGE_POSITION}\" dojoAttachPoint=\"pagePositionDiv\">${_resourceBundle.PAGE_POSITION}</div> <ul class=\"lotusRight lotusInlinelist\"> <li class=\"lotusFirst\"> <a href=\"javascript:void(0);\" alt=\"${_resourceBundle.PREVIOUS}\" title=\"${_resourceBundle.PREVIOUS}\" dojoAttachEvent=\"onclick:pagePrevious\" dojoAttachPoint=\"prevLink\">${_resourceBundle.PREVIOUS}</a> <span class=\"meta\" dojoAttachPoint=\"prevLinkText\">${_resourceBundle.PREVIOUS}</span> </li> <li> <a href=\"javascript:void(0);\" alt=\"${_resourceBundle.NEXT}\" title=\"${_resourceBundle.NEXT}\" dojoAttachEvent=\"onclick:pageNext\" dojoAttachPoint=\"nextLink\">${_resourceBundle.NEXT}</a> <span class=\"meta\" dojoAttachPoint=\"nextLinkText\">${_resourceBundle.NEXT}</span> </li> </ul> </div> </div></div>");

;dojo.cache("lconn.sand", "xslt/recommend.xsl", "<?xml version=\"1.0\" encoding=\"utf-8\"?><xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:ibmss=\"http://www.ibm.com/search/social/2011\" xmlns:ibmsc=\"http://www.ibm.com/search/content/2010\" xmlns:openSearch=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:relevance=\"http://a9.com/-/opensearch/extensions/relevance/1.0/\" xmlns:snx=\"http://www.ibm.com/xmlns/prod/sn\" xmlns:spelling=\"http://a9.com/-/opensearch/extensions/spelling/1.0/\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" exclude-result-prefixes=\"xhtml atom xsl atom ibmss ibmsc openSearch relevance snx spelling\"> <xsl:output method=\"html\" encoding=\"utf-8\" /> <xsl:param name=\"activity\"/> <xsl:param name=\"blog\"/> <xsl:param name=\"bookmark\"/> <xsl:param name=\"community\"/> <xsl:param name=\"file\"/> <xsl:param name=\"forum\"/> <xsl:param name=\"wiki\"/> <xsl:param name=\"blankIcon\"/> <xsl:param name=\"tic\"/> <xsl:param name=\"pic\"/> <xsl:param name=\"profileUrl\"/> <xsl:param name=\"remove\"/> <xsl:template match=\"/atom:feed\"> <xsl:call-template name=\"recommendEntry\"/> </xsl:template> <xsl:template name=\"recommendEntry\"> <style> <xsl:attribute name=\"type\">text/css</xsl:attribute> div.lotusRecommendEntry.entryBody{ display:block !important; margin: 0px 0px 0px 0px; } .lotusui30 .lotusTable .lotusRecommendEntry h4 { font-size: 1em; } </style> <div class=\"totalResults\"> <xsl:value-of select=\"count(atom:entry)\"/> </div> <div role=\"list\"> <table class=\"lotusTable\" cellspacing=\"0\" role=\"presentation\"> <xsl:for-each select=\"atom:entry\"> <tr class=\"{atom:id} rec\"> <td> <div role=\"listitem\"> <div class=\"lotusLeft\"> <xsl:call-template name=\"iconChooser\"/> </div> <div class=\"lotusRecommendEntry entryBody\" style=\"display:inline-block;padding-left:4px;padding-right:4px;overflow:hidden;word-wrap:break-word;\"> <div class=\"lotusLeft\" style=\"width:90%\"> <h4> <a target=\"_blank\" aria-describedby=\"lconnRecommendLinkDescription\"> <xsl:attribute name=\"href\"> <xsl:value-of select=\"atom:link/@href\"/> </xsl:attribute> <xsl:attribute name=\"title\"> <xsl:value-of select=\"atom:title\"/> </xsl:attribute> <xsl:if test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='files' or atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='wikis:file'\"> <xsl:attribute name=\"dir\">ltr</xsl:attribute> </xsl:if> <xsl:value-of select=\"atom:title\"/> </a> </h4> <xsl:if test=\"ibmss:entity_evidence[@type='tag']\"> <div> <a href=\"javascript:void(0);\" class=\"person sand_tic lotusAction\" action=\"{atom:id}\" role=\"button\" aria-haspopup=\"true\"><xsl:value-of select=\"count(ibmss:entity_evidence[@type='tag'])\"/></a> <div style=\"display:none;\" class=\"tic_evidence {atom:id}\"> <div role=\"list\"> <xsl:for-each select=\"ibmss:entity_evidence[@type='tag']\"><span role=\"listitem\"><xsl:value-of select=\"@id\"/></span><xsl:if test=\"position()!=last()\">, </xsl:if></xsl:for-each> </div> </div> </div> </xsl:if> <xsl:if test=\"ibmss:entity_evidence[@type='personUserID']\"> <div> <a href=\"javascript:void(0);\" class=\"person sand_pic lotusAction\" action=\"{atom:id}\" role=\"button\" aria-haspopup=\"true\"><xsl:value-of select=\"count(ibmss:entity_evidence[@type='personUserID'])\"/></a> <div style=\"display:none;\" class=\"pic_evidence {atom:id}\"> <ul class=\"lotusList\"> <xsl:for-each select=\"ibmss:entity_evidence[@type='personUserID']\"> <li class=\"lotusLeft\"> <span class=\"vcard\"> <xsl:choose> <xsl:when test=\"string-length($profileUrl) = 0\"> <span class=\"fn\" style=\"white-space:nowrap\"> <xsl:value-of select=\"text()\"/> </span> </xsl:when> <xsl:otherwise> <a class=\"fn\" style=\"white-space:nowrap\"> <xsl:attribute name=\"href\"> <xsl:value-of select=\"$profileUrl\"/><xsl:value-of select=\"@id\"/> </xsl:attribute> <xsl:value-of select=\"text()\"/> </a> </xsl:otherwise> </xsl:choose> <span class=\"x-lconn-userid\" style=\"display:none;\"><xsl:value-of select=\"@id\"/></span> </span> </li> </xsl:for-each> </ul> </div> </div> </xsl:if> </div> <div class=\"lotusRight\"> <a role=\"button\" tabindex=\"-1\" href=\"javascript:;\" class=\"lotusAccess feedback\"> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> </a> <a role=\"button\" href=\"javascript:;\" class=\"lotusDelete sprite feedback\" style=\"visibility: hidden; margin-top:2px;\"> <xsl:attribute name=\"aria-label\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"title\"><xsl:value-of select=\"$remove\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> <img role=\"presentation\"> <xsl:attribute name=\"src\"><xsl:value-of select=\"$blankIcon\"/></xsl:attribute> <xsl:attribute name=\"action\"><xsl:value-of select=\"atom:id\"/></xsl:attribute> <xsl:attribute name=\"alt\"><xsl:value-of select=\"$remove\"/></xsl:attribute> </img> <span class=\"lotusAltText\">X</span> </a> </div> </div> </div> </td> </tr> </xsl:for-each> </table> </div> </xsl:template> <xsl:template name=\"iconChooser\"> <img> <xsl:attribute name=\"src\"> <xsl:value-of select=\"$blankIcon\"/> </xsl:attribute> <xsl:choose> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='blogs'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconBlogs16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$blog\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='files'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"ibmsc:field[@id='fileExtension']\"> lconn-ftype16 lconn-ftype16-<xsl:value-of select=\"ibmsc:field[@id='fileExtension']\"/> </xsl:when> <xsl:otherwise>lconnSprite lconnSprite-iconFiles16</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$file\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='forums'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconForums16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$forum\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='wikis'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"ibmsc:field[@id='fileExtension']\"> lconn-ftype16 lconn-ftype16-{ibmsc:field[@id='fileExtension']} </xsl:when> <xsl:otherwise>lconnSprite lconnSprite-iconWikis16</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$wiki\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='dogear'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconBookmarks16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$bookmark\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='activities'\"> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconActivities16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$activity\"/> </xsl:attribute> </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities'\"> <xsl:attribute name=\"class\"> <xsl:choose> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:feed'\"> lconnSprite lconnSprite-iconFeed16 </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:forum'\"> lconnSprite lconnSprite-iconForums16 </xsl:when> <xsl:when test=\"atom:category[@scheme='http://www.ibm.com/xmlns/prod/sn/component']/@term='communities:bookmark'\"> lconnSprite lconnSprite-iconBookmarks16 </xsl:when> <xsl:otherwise> lconnSprite lconnSprite-iconCommunities16 </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$community\"/> </xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name=\"class\"> lconnSprite lconnSprite-iconCommunities16 </xsl:attribute> <xsl:attribute name=\"alt\"> <xsl:value-of select=\"$community\"/> </xsl:attribute> </xsl:otherwise> </xsl:choose> </img> </xsl:template></xsl:stylesheet>");

;if(!dojo._hasResource["lconn.sand.RecommendWidget"]){
dojo._hasResource["lconn.sand.RecommendWidget"]=true;
dojo.provide("lconn.sand.RecommendWidget");
dojo.require("dojo.string");
dojo.require("dojo.date.locale");
dojo.require("dojo.cookie");
dojo.require("dojo.number");
dojo.require("dojox.date.posix");
dojo.require("dojox.xml.parser");
dojo.require("dojo._base.html");
dojo.require("com.ibm.oneui.util.Url");
dojo.require("com.ibm.oneui.util.proxy");
dojo.require("lconn.core.HelpLauncher");
dojo.require("lconn.core.xslt");
dojo.require("lconn.core.config.services");
dojo.require("lconn.core.util._XSLCache");
dojo.requireLocalization("lconn.sand","ui");
dojo.requireLocalization("lconn.sand","RecommendWidget");
dojo.declare("lconn.sand.RecommendWidget",[dijit._Widget,dijit._Templated,dijit._Container],{_resourceBundle:null,templatePath:dojo.moduleUrl("lconn.sand","templates/RecommendWidget.html"),remoteUrl:"",feedbackUrl:"",sourceList:"",blankIcon:"",tt:null,page:0,xhrErrorHandler:null,errorHtmlContainerElemId:null,profileViewURL:"",lastMod:"",currentUserId:null,_xslCache:new (dojo.declare("",[lconn.core.util._XSLCache],{xslStrings:{"recommend.xsl":{templatePath:dojo.moduleUrl("lconn.sand","xslt/recommend.xsl")}}})),postCreate:function(){
var _1=lconn.core.config.services.search;
if(com.ibm.oneui.util.Url.secure){
var _2=_1.secureUrl;
}else{
var _2=_1.url;
}
this.feedbackUrl=_2+"/api/feedback";
var _3=_2+"/atom/social/recommend";
var _4="pageSize=15&locale="+dojo.locale+"&diversityboost=1.0f&dateboost=1.0f&randomize=true";
if(!this.sourceList||this.sourceList==""){
this.remoteUrl=_3+"?"+_4;
}else{
this.sourceList=this.sourceList.replace(new RegExp(", ","g"),",");
var _5=this.sourceList.split(",");
dojo.forEach(_5,function(_6,i){
if(_6=="communities"){
_5[i]="Source/communities/entry";
}else{
_5[i]="Source/"+_6;
}
});
var _7={type:"category",values:_5};
this.remoteUrl=_3+"?constraint="+dojo.toJson(_7)+"&"+_4;
}
var _8=lconn.core.config.services.profiles;
if(_8){
if(com.ibm.oneui.util.Url.secure){
this.profileViewURL=_8.secureUrl+"/html/profileView.do?userid=";
}else{
this.profileViewURL=_8.url+"/html/profileView.do?userid=";
}
}
this.recommendLoading.style.display="";
this.welcomeNode.id=this.id+"_welcomeNode";
if(this.errorHtmlContainerElemId==null){
this.errorHtmlContainerElemId=this.welcomeNode.id;
}
},postMixInProperties:function(){
if(this.blankIcon==""){
this.blankIcon=djConfig.blankGif;
}
this._resourceBundle=dojo.i18n.getLocalization("lconn.sand","RecommendWidget");
},handleAsyncRequest:function(_9,_a){
if(_9!=null){
var _b=dojox.xml.parser.parse(_9);
var _c="";
var _d="";
if(dojo._isBodyLtr()){
_d="true";
}else{
_d="false";
}
var _e=this._xslCache.getXslDoc("recommend.xsl");
_c=lconn.core.xslt.transform(_b,_e,null,[["activity",this._resourceBundle.ACTIVITY],["blog",this._resourceBundle.BLOG_ENTRY],["bookmark",this._resourceBundle.BOOKMARK],["community",this._resourceBundle.COMMUNITY],["file",this._resourceBundle.FILE],["wiki",this._resourceBundle.WIKI_PAGE],["forum",this._resourceBundle.DISCUSSION_TOPIC],["blankIcon",this.blankIcon],["tic",this._resourceBundle.NUM_TAG_IN_COMMON],["pic",this._resourceBundle.NUM_PEOPLE_IN_COMMON],["profileUrl",this.profileViewURL],["remove",this._resourceBundle.REMOVE]],true);
if(_c!=""){
this.boardingNode.innerHTML=_c;
var _f=dojo.query(".totalResults",this.boardingNode);
var _10=_f[0].innerHTML;
_f.orphan();
this.pageStart(0);
if(_10==0){
this.recommendLoading.style.display="none";
this.recommendErrorNode.style.display="none";
this.welcomeNode.style.display="";
this.hidePaging();
}else{
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="none";
this.recommendLoading.style.display="none";
this.recommendContainer.style.display="";
}
}else{
this.recommendLoading.style.display="none";
this.recommendErrorNode.style.display="none";
this.welcomeNode.style.display="";
this.hidePaging();
}
}
},foo:function(evt){
alert("foo!");
},Recommend:function(){
this.recommendLoading.style.display="";
this.hidePaging();
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="none";
this.recommendContainer.style.display="none";
var nlm=dojo.cookie("lconn.sand.lastmod");
if(typeof (nlm)!="undefined"||nlm!=null){
this.lastMod=nlm;
}else{
this.lastMod=new Date().getTime();
dojo.cookie("lconn.sand.lastmod",this.lastMod,{expires:7});
}
this.fetchRecommendations();
},fetchRecommendations:function(){
var _11={htmlContainerElemId:this.errorHtmlContainerElemId,url:com.ibm.oneui.util.proxy(this.remoteUrl),handleAs:"text",timeout:30000,content:{lastMod:this.lastMod,uid:this.currentUserId}};
var req=dojo.xhrGet(_11);
req.addCallback(dojo.hitch(this,"handleAsyncRequest"));
req.addErrback(dojo.hitch(this,"handleError",req.ioArgs));
},setContent:function(_12){
if(_12==""){
this.welcomeNode.display="none";
this.hidePaging();
return;
}else{
this.recommendContainer.innerHTML=_12;
var _13=dojo.query(".rec",this.recommendContainer);
var _14=true;
dojo.forEach(_13,function(_15){
if(_14&&dojo.style(_15,"display")!="none"){
_14=false;
dojo.addClass(_15,"lotusFirst");
}
var _16=function(evt){
dojo.query(".lotusDelete.feedback",this.recommendContainer).style("visibility","hidden");
var _17=dojo.query(".lotusDelete.feedback",this);
_17.style("visibility","visible");
};
var _18=function(evt){
dojo.query(".lotusDelete.feedback",this.recommendContainer).style("visibility","hidden");
};
dojo.connect(_15,"onmouseenter",_16);
dojo.connect(_15,"onmouseleave",_18);
var _19=dojo.query("h4 a, .sand_tic, .sand_pic",_15);
_19.connect("onfocus",_15,_16);
var _1a=dojo.query("a.feedback",_15);
_1a.connect("onclick",this,"handleFeedback");
_1a.connect("onblur",_15,_18);
this._formatEvidenceLinks(_15);
},this);
}
},_formatEvidenceLinks:function(_1b){
var tic=dojo.query(".sand_tic",_1b);
if(tic.length>0){
var _1c=tic[0];
var _1d=dojo.query(".tic_evidence",_1b);
var _1e=_1d[0].childNodes[0];
this._formatEvidenceLink(_1c,this._resourceBundle.NUM_TAG_IN_COMMON,this._resourceBundle.NUM_TAGS_IN_COMMON,_1e,this._resourceBundle.DIALOG_RELATED_TAGS,this._resourceBundle.DIALOG_RELATED_TAGS_CLOSE);
}
var pic=dojo.query(".sand_pic",_1b);
if(pic.length>0){
var _1c=pic[0];
var _1d=dojo.query(".pic_evidence",_1b);
var _1e=_1d[0].childNodes[0];
try{
SemTagSvc.parseDom(null,_1e);
}
catch(e){
}
this._formatEvidenceLink(_1c,this._resourceBundle.NUM_PERSON_IN_COMMON,this._resourceBundle.NUM_PEOPLE_IN_COMMON,_1e,this._resourceBundle.DIALOG_RELATED_PEOPLE,this._resourceBundle.DIALOG_RELATED_PEOPLE_CLOSE);
}
},_formatEvidenceLink:function(_1f,_20,_21,_22,_23,_24){
if(_1f){
var _25=dojo.attr(_1f,"innerHTML");
if(_25=="1"){
var _26=dojo.string.substitute(_20,[_25]);
}else{
var _26=dojo.string.substitute(_21,[_25]);
}
dojo.attr(_1f,"innerHTML",_26);
return lconn.core.HelpLauncher.createHelpLink(_1f,"",_22,{HELP:_23,CLOSE:_24},true);
}
},handleError:function(_27,_28,evt){
if(typeof (this.xhrErrorHandler)=="function"){
this.xhrErrorHandler(_28,_27);
}else{
this.displayError(_28);
}
},displayError:function(_29){
if(_29&&_29.status===503){
dojo.attr(this.recommendErrorNode,"innerHTML",this._resourceBundle.UNAVAILABLE);
}
this.recommendLoading.style.display="none";
this.recommendContainer.style.display="none";
this.welcomeNode.style.display="none";
this.recommendErrorNode.style.display="";
this.hidePaging();
},hidePaging:function(){
dojo.style(this.pagingFooter,"display","none");
},handleFeedback:function(evt){
var _2a;
if(evt==null){
_2a=window.event.srcElement;
}else{
_2a=evt.target;
}
if(_2a.nodeName!="A"){
_2a=_2a.parentNode;
}
var _2b=_2a.getAttribute("action").replace(/:/g,"\\:");
var _2c=dojo.query("."+_2b,this.recommendContainer);
_2c.orphan();
_2c=dojo.query("."+_2b,this.boardingNode);
_2c.orphan();
var _2d={url:com.ibm.oneui.util.proxy(this.feedbackUrl),handleAs:"text",timeout:30000,content:{client:"recommend",itemid:_2a.getAttribute("action"),action:"remove"}};
var req=dojo.xhrGet(_2d);
this.lastMod=new Date().getTime();
dojo.cookie("lconn.sand.lastmod",this.lastMod,{expires:7});
},pageNext:function(){
if(this.page<2){
this.pageStart(this.page+1);
}
},pagePrevious:function(){
if(this.page>0){
this.pageStart(this.page-1);
}
},pageStart:function(_2e){
var _2f=dojo.query(".rec",this.boardingNode);
var _30=(_2e*5)+1;
if(_2f.length>=_30+5){
var _31=_30+4;
}else{
var _31=_2f.length;
}
dojo.attr(this.pagePositionDiv,"innerHTML",dojo.string.substitute(this._resourceBundle.PAGE_POSITION,[_30,_31,_2f.length]));
var _32=dojo.string.substitute(this._resourceBundle.ARIA_PAGE_POSITION,[_30,_31,_2f.length]);
dojo.attr(this.pagePositionDiv,"aria-label",_32);
dojo.attr(this.pagePositionDiv,"title",_32);
dojo.style(this.pagingFooter,"display","");
if(_2e==0){
this.prevLink.style.display="none";
this.prevLinkText.style.display="";
}else{
this.prevLink.style.display="";
this.prevLinkText.style.display="none";
}
for(var i=0;i<_2f.length;i++){
_2f[i].style.display="none";
}
if(_2f.length>((_2e*5)+5)){
this.nextLink.style.display="";
this.nextLinkText.style.display="none";
for(var i=_2e*5;i<((_2e*5)+5);i++){
_2f[i].style.display="";
}
}else{
this.nextLink.style.display="none";
this.nextLinkText.style.display="";
for(var i=_2e*5;i<_2f.length;i++){
_2f[i].style.display="";
}
}
this.setContent(this.boardingNode.innerHTML);
this.page=_2e;
}});
}


;if(!dojo._hasResource["lconn.sand.RecommendWrapped"]){
dojo._hasResource["lconn.sand.RecommendWrapped"]=true;
dojo.provide("lconn.sand.RecommendWrapped");
dojo.requireLocalization("lconn.sand","ui");
dojo.declare("lconn.sand.RecommendWrapped",null,{userid:null,onLoad:function(){
var _1=this.iContext.getElementById("_"+this.iContext.widgetId+"_root");
var _2=this.iContext.getUserProfile().getItemValue("userid");
var _3=dojo.i18n.getLocalization("lconn.sand","ui");
var _4=this.iContext.getiWidgetAttributes();
var _5=this.iContext.io.rewriteURI(_4.getItemValue("sandUIRoot"));
var _6=this.iContext.io.rewriteURI(_4.getItemValue("sandBackEndRoot"));
var _7=_4.getItemValue("sourceList");
var _8=this.iContext.io.rewriteURI(_4.getItemValue("ApiUrl"));
var _9=_5+"js_src/lconn/sand";
dojo.registerModulePath("lconn.sand",_9);
dojo.require("lconn.sand.sandAll");
dojo.require("lconn.sand.RecommendWidget");
var _a=_4.getItemValue("navContentLocation");
var _b={remoteUrl:_8,sourceList:_7,blankIcon:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),currentUserId:_2};
var _c=_4.getItemValue("xhrErrorHandlerAsString");
var _d=_4.getItemValue("errorHtmlContainerElemId");
if(_d){
_b.errorHtmlContainerElemId=_d;
}else{
_b.errorHtmlContainerElemId="_sand_recomComm_root";
}
if(_c){
_b.xhrErrorHandler=dojo.getObject(_c);
}
this.recommendWidget=new lconn.sand.RecommendWidget(_b);
dojo.place(this.recommendWidget.domNode,_1,"last");
this.recommendWidget.Recommend();
},showMessage:function(_e,_f){
_e.innerHTML=_f;
if(arguments[2]){
for(var i=0;i<arguments[2].length;i++){
arguments[2][i].style.display="none";
}
}
_e.style.display="block";
}});
}


;if(!dojo._hasResource["lconn.comm.communitiesWidgets"]){
dojo._hasResource["lconn.comm.communitiesWidgets"]=true;
dojo.provide("lconn.comm.communitiesWidgets");
dojo.require("lconn.core.WidgetPlacement");
dojo.require("lconn.core.mumOverride");
dojo.require("lconn.core.AdditionalInfo");
dojo.require("lconn.core.applicationPalette");
dojo.require("lconn.core.paletteOneUI.Palette");
dojo.require("lconn.core.paletteOneUI.dnd.avatar");
dojo.require("lconn.core.paletteOneUI.dnd.Source");
dojo.require("lconn.core.feedReader");
dojo.require("lconn.core.subcommunityNav");
dojo.require("lconn.core.ActivityList");
dojo.require("lconn.comm.ronin.AjaxRequestsHandler");
dojo.require("lconn.comm.ronin.extendedData");
dojo.require("lconn.comm.ronin.feedMapping");
dojo.require("lconn.comm.ronin.feedType");
dojo.require("lconn.comm.ronin.post");
dojo.require("lconn.comm.ronin.roninService");
dojo.require("lconn.comm.ronin.thread");
dojo.require("lconn.comm.ronin.utils");
dojo.require("lconn.comm.communityMembers.CommunityMembers");
dojo.require("lconn.sand.RecommendWrapped");
}



window['_js_modules']=(window['_js_modules']||[]).concat(['lconn.comm.communitiesWidgets.js']);
