<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -87,7 +87,7 @@ class ChatRoomsController &lt; ApplicationController
   def send_data
       render :juggernaut =&gt; {:type =&gt; :send_to_channels, :channels =&gt; [params[:id].to_i] } do |page|
         page.insert_html :bottom, 'chat_room', &quot;&lt;p&gt;#{current_user.login}: #{h params[:chat_input]}&lt;/p&gt;&quot;
-        page.call :scrollChatPanel
+        page.call :scrollChatPanel, 'chat_room'
       end
       render :nothing =&gt; true
   end</diff>
      <filename>app/controllers/chat_rooms_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,7 +36,7 @@ class ConnectionsController &lt; ApplicationController
   def update_chat_room(action)
     render :juggernaut =&gt; {:type =&gt; :send_to_channels, :channels =&gt; @channels } do |page|
       page.insert_html :bottom, 'chat_room', &quot;&lt;p style='color:green;font-size:20px;'&gt;#{@user.login} has #{action} the room&lt;/p&gt;&quot;
-      page.call :scrollChatPanel
+      page.call :scrollChatPanel, 'chat_room'
     end
   end
 end
\ No newline at end of file</diff>
      <filename>app/controllers/connections_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,22 @@
 class MessagesController &lt; ApplicationController
   def new_private_message
     @client_ids = [ current_user.id, params[:id].to_i ]
-    puts @client_ids
   end
   
   def send_private_message
     @client_ids = params[:client_ids].collect{|client_id| client_id.to_i } if params[:client_ids]
     
-    puts @client_ids
+    private_chat_room_id = 'private_chat_room_'+@client_ids.join('_')
+    private_chat_input_id = 'private_chat_input_'+@client_ids.join('_')
     
     render :juggernaut =&gt; {:type =&gt; :send_to_clients, :client_ids =&gt; @client_ids } do |page|  
           
-      page &lt;&lt; &quot;if ( $('private_chat_room') == null) {&quot;
+      page &lt;&lt; &quot;if ( $('#{private_chat_room_id}') == null) {&quot;
         page.insert_html :bottom, 'private_messages', create_private_message(@client_ids)
       page &lt;&lt; &quot;}&quot;
               
-      page.insert_html :bottom, 'private_chat_room', &quot;&lt;p&gt;#{current_user.login}: #{h params[:chat_input]}&lt;/p&gt;&quot;
-      page.call :scrollChatPanel, &quot;private_chat_room&quot;
+      page.insert_html :bottom, private_chat_room_id, &quot;&lt;p&gt;#{current_user.login}: #{h params[private_chat_input_id]}&lt;/p&gt;&quot;
+      page.call :scrollChatPanel, private_chat_room_id
     end
     
     render :nothing =&gt; true</diff>
      <filename>app/controllers/messages_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,14 @@
 module MessagesHelper
   def create_private_message(client_ids)
-    top =&quot;&lt;div class='private_message'&gt;&lt;div id='private_chat_room' class='private_chat_room scroller'&gt;&lt;/div&gt;&lt;div id='chat_form'&gt;&quot;
+    users = User.find(client_ids).collect{|user| user.login}.to_sentence
+    private_chat_room_id = 'private_chat_room_'+client_ids.join('_')
+    private_chat_input_id = 'private_chat_input_'+client_ids.join('_')
     
-    form = form_remote_tag(:url =&gt; { :action =&gt; :send_private_message, :client_ids =&gt; client_ids }, :complete =&gt; &quot;$('chat_input').value = ''&quot; )
+    top =&quot;&lt;div class='private_message'&gt;&lt;h3&gt;#{users}&lt;/h3&gt;&lt;div id='#{private_chat_room_id}' class='private_chat_room scroller'&gt;&lt;/div&gt;&lt;div id='chat_form'&gt;&quot;
     
-    text = text_field_tag( 'chat_input', '', { :size =&gt; '50', :id =&gt; 'chat_input'} )
+    form = form_remote_tag(:url =&gt; { :action =&gt; :send_private_message, :client_ids =&gt; client_ids }, :complete =&gt; &quot;$('#{private_chat_input_id}').value = ''&quot; )
+    
+    text = text_field_tag( private_chat_input_id, '', { :size =&gt; '50', :id =&gt; private_chat_input_id, :class=&gt; 'private_chat_input'} )
     
     submit = submit_tag &quot;Chat&quot;
     </diff>
      <filename>app/helpers/messages_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,4 @@
 	&lt;/form&gt;
 &lt;/div&gt;
 
-
+&lt;div id=&quot;private_messages&quot;&gt;&lt;/div&gt;
\ No newline at end of file</diff>
      <filename>app/views/chat_rooms/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -113,5 +113,5 @@ a:hover { color: #fff; background-color:#000; }
 }
 
 .private_chat_room{
-	height: 350px;
+	height: 300px;
 }
\ No newline at end of file</diff>
      <filename>public/stylesheets/scaffold.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>338e9657999fe4618ac3d24e8b8d4c1012e52bb4</id>
    </parent>
  </parents>
  <author>
    <name>Taylor Redden</name>
    <email>thredden21@tntech.edu</email>
  </author>
  <url>http://github.com/taelor/chat_sandbox/commit/9ca9f6458ddb4fb5261715e4c4a9c3d50a6b4cb1</url>
  <id>9ca9f6458ddb4fb5261715e4c4a9c3d50a6b4cb1</id>
  <committed-date>2008-08-11T20:01:41-07:00</committed-date>
  <authored-date>2008-08-11T20:01:41-07:00</authored-date>
  <message>Fixed minor chat problems, should be working great now</message>
  <tree>d2487e2df809620eb709450be1c4f2c77161e167</tree>
  <committer>
    <name>Taylor Redden</name>
    <email>thredden21@tntech.edu</email>
  </committer>
</commit>
