rem: function createPanel( node ) { if( panelForIdentifier( node.getAttribute( "identifier" ) ) ) return;  var panel = new Object(); panel.id = node.getAttribute( "identifier" ); panel.name = node.getAttribute( "name" ); panel.server = node.getAttribute( "server" ); panel.type = node.getAttribute( "class" ); panel.newMessage = 0; panel.newHighlightMessage = 0; panel.active = false; panel.memberListVisible = false; panel.frame = document.createElement( "iframe" ); panel.listItem = document.createElement( "li" ); panels.push( panel );  panel.frame.id = "panel" + panel.id; panel.frame.className = "panel"; panel.frame.src = "/command/panelContents?panel=" + panel.id; if( panels.length > 1 ) panel.frame.style.setProperty( "visibility", "hidden", "" ); document.getElementById( "panels" ).appendChild( panel.frame );  panel.listItem.id = "listItem" + panel.id; panel.listItem.className = "listItem";  if( panel.type == "JVChatRoomPanel" ) { panel.listItem.className += " chatRoom"; panel.members = new Array(); panel.memberList = document.createElement( "ol" ); panel.memberList.className = "memberList"; panel.memberList.style.setProperty( "display", "none", "" );  var memberNode = null; var members = node.childNodes; for( var i = 0; i < members.length; i++ ) { memberNode = members[i];  var member = new Object(); member.name = memberNode.firstChild.nodeValue; member.nickname = memberNode.getAttribute( "nickname" ); member.hostmask = memberNode.getAttribute( "hostmask" ); member.identifier = memberNode.getAttribute( "identifier" ); member.buddy = memberNode.getAttribute( "buddy" ); member.type = memberNode.getAttribute( "class" ); member.self = ( memberNode.getAttribute( "self" ) == "yes" ); panel.members.push( member );  member.listItem = document.createElement( "li" ); member.listItem.title = member.hostmask; member.listItem.className = "listItem member" + ( member.type ? " " + member.type : "" ); member.listItem.appendChild( document.createTextNode( member.name ) ); panel.memberList.appendChild( member.listItem ); } } else if( panel.type == "JVDirectChatPanel" ) panel.listItem.className += " directChat";  panel.listItem.setAttribute( "onclick", "switchPanel(" + panel.id + ")" ); panel.listItem.setAttribute( "ondblclick", "toggleMemberList(event," + panel.id + ")" ); panel.listItem.appendChild( document.createTextNode( panel.name ) ); document.getElementById( "panelList" ).appendChild( panel.listItem ); if( panel.memberList ) document.getElementById( "panelList" ).appendChild( panel.memberList );  setTimeout( scrollToBottom, 50, panel.frame );  if( panels.length == 1 ) switchPanel( panel.id ); } 
add: ChatController.createPanel = function( node ) { var type = node.getAttribute( "class" ); if( type == "JVDirectChatPanel" ) return new DirectChatPanel( node ); else if( type == "JVChatRoomPanel" ) return new ChatRoomPanel( node ); return undefined; }; 
context: function createPanel( node ) {	if( panelForIdentifier( node.getAttribute( "identifier" ) ) ) return;	var panel = new Object();	panel.id = node.getAttribute( "identifier" );	panel.name = node.getAttribute( "name" );	panel.server = node.getAttribute( "server" );	panel.type = node.getAttribute( "class" );	panel.newMessage = 0;	panel.newHighlightMessage = 0;	panel.active = false;	panel.memberListVisible = false;	panel.frame = document.createElement( "iframe" );	panel.listItem = document.createElement( "li" );	panels.push( panel );	panel.frame.id = "panel" + panel.id;	panel.frame.className = "panel";	panel.frame.src = "/command/panelContents?panel=" + panel.id;	if( panels.length > 1 ) panel.frame.style.setProperty( "visibility", "hidden", "" );	document.getElementById( "panels" ).appendChild( panel.frame );	panel.listItem.id = "listItem" + panel.id;	panel.listItem.className = "listItem";	if( panel.type == "JVChatRoomPanel" ) {		panel.listItem.className += " chatRoom";		panel.members = new Array();		panel.memberList = document.createElement( "ol" );		panel.memberList.className = "memberList";		panel.memberList.style.setProperty( "display", "none", "" );		var memberNode = null;		var members = node.childNodes;		for( var i = 0; i < members.length; i++ ) {			memberNode = members[i];			var member = new Object();			member.name = memberNode.firstChild.nodeValue;			member.nickname = memberNode.getAttribute( "nickname" );			member.hostmask = memberNode.getAttribute( "hostmask" );			member.identifier = memberNode.getAttribute( "identifier" );			member.buddy = memberNode.getAttribute( "buddy" );			member.type = memberNode.getAttribute( "class" );			member.self = ( memberNode.getAttribute( "self" ) == "yes" );			panel.members.push( member );			member.listItem = document.createElement( "li" );			member.listItem.title = member.hostmask;			member.listItem.className = "listItem member" + ( member.type ? " " + member.type : "" );			member.listItem.appendChild( document.createTextNode( member.name ) );			panel.memberList.appendChild( member.listItem );		}	} else if( panel.type == "JVDirectChatPanel" ) panel.listItem.className += " directChat";	panel.listItem.setAttribute( "onclick", "switchPanel(" + panel.id + ")" );	panel.listItem.setAttribute( "ondblclick", "toggleMemberList(event," + panel.id + ")" );	panel.listItem.appendChild( document.createTextNode( panel.name ) );	document.getElementById( "panelList" ).appendChild( panel.listItem );	if( panel.memberList ) document.getElementById( "panelList" ).appendChild( panel.memberList );	setTimeout( scrollToBottom, 50, panel.frame );	if( panels.length == 1 ) switchPanel( panel.id );}
meta: 7556	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7556/09442003b6111b027a140c1f3383c1a924b1fa3f/common.js/clean/Plug-Ins/Web Interface/Resources/common.js