Index: /trunk/jmessenger/xsl/notificationNewUsers.xsl
===================================================================
--- /trunk/jmessenger/xsl/notificationNewUsers.xsl	(revision 2966)
+++ /trunk/jmessenger/xsl/notificationNewUsers.xsl	(revision 2969)
@@ -5,9 +5,11 @@
 	<xsl:param name="lang_1" />
 	<xsl:param name="lang_2" />
+	<xsl:param name="lang_3" />
+	<xsl:param name="lang_4" />
 		
-	
 	<xsl:template match="notification_new_users">
 		
 		<fieldset style="margin:3px; padding:5px;border:1px solid #cecece;">
+
 			<legend><xsl:value-of select="$lang_1"/></legend>
 			<label><xsl:value-of select="$lang_2"/></label>
@@ -15,88 +17,17 @@
 			<div style="border:1px solid #cecece; margin-top: 10px; height:210px; overflow-y:auto;">
 				<table style="width: 100%;">
-					<tr>
-						<td align="left" style="width: 60%;">teste1</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste2</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-					
-					<tr>
-						<td align="left" style="width: 60%;">teste3</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-					
-					<tr>
-						<td align="left" style="width: 60%;">teste4</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-					
-					<tr>
-						<td align="left" style="width: 60%;">teste5</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste6</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste7</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste8</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste9</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste10</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste11</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">teste12</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-
-					<tr>
-						<td align="left" style="width: 60%;">alexandreluizcorreia</td>
-						<td align="center" style="width: 20%;"><a>Autorizar</a></td>
-						<td align="center" style="width: 20%;"><a>Remover</a></td>
-					</tr>
-					
+					<xsl:for-each select="user">
+						<xsl:sort select="jid"/>
+						<tr>
+							<td align="left" style="width: 60%;"><xsl:value-of select="jid" /></td>
+							<td align="center" style="width: 20%;"><a style="cursor:pointer;" onclick="alert('{jid}' + '{index}');"><xsl:value-of select="$lang_3"/></a></td>
+							<td align="center" style="width: 20%;"><a style="cursor:pointer;" onclick="alert('{jid}' + '{index}');"><xsl:value-of select="$lang_4"/></a></td>
+						</tr>
+					</xsl:for-each>
 				</table>
 			</div>
 		
 		</fieldset>
-			
-			 
+		
 	</xsl:template>
 	
Index: /trunk/jmessenger/js/jscode/loadIM.js
===================================================================
--- /trunk/jmessenger/js/jscode/loadIM.js	(revision 2966)
+++ /trunk/jmessenger/js/jscode/loadIM.js	(revision 2969)
@@ -1155,11 +1155,38 @@
 	function windowNotificationNewUsers()
 	{
+		var _users = Xtools.xml('notification_new_users');
+		
+		for( var user in TrophyIM.rosterObj.roster )
+		{
+			if ( TrophyIM.rosterObj.roster[ user ].constructor == Function )
+				continue;
+
+			if( TrophyIM.rosterObj.roster[ user ].contact.jid != Base64.decode( loadscript.getUserCurrent().jid) )
+			{
+				var _subscription = TrophyIM.rosterObj.roster[user].contact.subscription;
+				
+				if ( _subscription == 'to' || _subscription == 'not-in-roster' )
+				{
+					var _user	= _users.createElement('user');
+					var _jid 	= _users.createElement('jid');
+					var _index	= _users.createElement('index');
+					_jid.appendChild( _users.createTextNode(TrophyIM.rosterObj.roster[user].contact.jid) );
+					_index.appendChild( _users.createTextNode("0"));
+					_user.appendChild( _jid );
+					_user.appendChild( _index );
+					_users.documentElement.appendChild( _user );
+				}
+			}
+		}
+		
 		var paramsNotification = 
 		{
 			'lang_1' : "Notificação",	
-			'lang_2' : "O(s) usuário(s) abaixo pedem sua autorização."	
+			'lang_2' : "O(s) usuário(s) abaixo pedem sua autorização.",
+			'lang_3' : "Autorizar",
+			'lang_4' : "Remover"
 		};
 		
-		var winLoginPage =
+		var winNotification =
 		{	
 			 id_window		: "window_notification_new_users",
@@ -1174,8 +1201,8 @@
 			 title			: "Expresso Messenger - Notificação de Novos Usuários",
 			 closeAction	: "remove",
-			 content		: Xtools.parse(Xtools.xml("notification_new_users"), "notificationNewUsers.xsl", paramsNotification)	
+			 content		: Xtools.parse( _users , "notificationNewUsers.xsl", paramsNotification )	
 		};
 
-		_winBuild( winLoginPage );
+		_winBuild( winNotification );
 	}
 	
