<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>public/images/icons/ajax-loader.gif</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -59,7 +59,7 @@ class MessagesController &lt; ApplicationController
 
   def create
     
-    if params[&quot;commit&quot;] == &quot;Send to all&quot; and current_person.admin?
+    if params[&quot;all_people&quot;] and current_person.admin?
       # Send messages to all (active) people.
       messages = Person.all_active.inject([]) do |messages, person|
         message = Message.new(params[:message].merge(:sender =&gt; current_person,
@@ -119,6 +119,15 @@ class MessagesController &lt; ApplicationController
       format.html { redirect_to messages_url }
     end
   end
+  
+  def preview
+  	render :update do |page|
+		page['preview_area'].
+			replace_html(display(params[:message][:content])).
+			visual_effect :blind_down
+		page['message_submit'].activate
+	end
+  end
 
   private
   </diff>
      <filename>app/controllers/messages_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ class PeopleController &lt; ApplicationController
   
   skip_before_filter :require_activation, :only =&gt; :verify
   skip_before_filter :admin_warning, :only =&gt; [ :show, :update ]
-  before_filter :login_required, :only =&gt; [ :show, :edit, :update ]
+  before_filter :login_required, :only =&gt; [ :show, :edit, :update, :preview ]
   before_filter :correct_user_required, :only =&gt; [ :edit, :update ]
   before_filter :setup
   
@@ -93,9 +93,15 @@ class PeopleController &lt; ApplicationController
           flash[:success] = 'Profile updated!'
           format.html { redirect_to(@person) }
         else
-          if preview?
-            @preview = @person.description = params[:person][:description]
-          end
+          #if preview?
+          #  @preview = @person.description = params[:person][:description]
+          #end
+		  format.js { 
+			render :update do |page|
+				page.replace_html 'preview_area', display(params[:person][:description])
+				page.visual_effect :highlight
+			end
+		  }
           format.html { render :action =&gt; &quot;edit&quot; }
         end
       when 'password_edit'
@@ -113,6 +119,16 @@ class PeopleController &lt; ApplicationController
     end
   end
   
+  def preview
+	sleep 3
+	raise &quot;fuck&quot;
+	render :update do |page|
+		page['preview_area'].
+			replace_html(display(params[:person][:description])).
+			visual_effect :blind_down
+	end
+  end
+  
   def common_contacts
     @person = Person.find(params[:id])
     @common_connections = @person.common_connections_with(current_person,
@@ -129,10 +145,11 @@ class PeopleController &lt; ApplicationController
     end
   
     def correct_user_required
+	  logger.info params.inspect
       redirect_to home_url unless Person.find(params[:id]) == current_person
     end
     
     def preview?
-      params[&quot;commit&quot;] == &quot;Preview&quot;
+      params[&quot;preview&quot;]
     end
 end</diff>
      <filename>app/controllers/people_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,7 +32,7 @@ class PhotosController &lt; ApplicationController
       flash[:error] = &quot;Your browser doesn't appear to support file uploading&quot;
       redirect_to edit_person_url(current_person) and return
     end
-    if params[:commit] == &quot;Cancel&quot;
+    if params[:cancel]
       redirect_to edit_person_url(current_person) and return
     end
     person_data = { :person =&gt; current_person,</diff>
      <filename>app/controllers/photos_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -53,6 +53,15 @@ class PostsController &lt; ApplicationController
       end
     end
   end
+  
+  def preview
+	render :update do |page|
+		page['preview_area'].
+			replace_html(display(params[:post][:body])).
+			visual_effect :blind_down
+		page['post_submit'].activate
+	end
+  end
 
   def update
     respond_to do |format|</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,13 +55,21 @@
     &lt;br /&gt;
 
     &lt;div class=&quot;form_row&quot;&gt;
+	  &lt;div id=&quot;preview_area&quot;&gt;&lt;/div&gt;
       &lt;label for=&quot;about&quot;&gt;About&lt;/label&gt;
       &lt;br /&gt;
       &lt;p&gt;&lt;%= formatting_note %&gt;&lt;/p&gt;
 
       &lt;%= f.text_area :about, :rows =&gt; 10 %&gt;
     &lt;/div&gt;
-    
+	&lt;br /&gt;
+	
+	&lt;div class=&quot;form_row&quot;&gt;
+		&lt;%= submit_to_remote 'preview_btn', 'Preview', 
+			:url =&gt;  { :action =&gt; 'preview' }, 
+			:html =&gt; { :class =&gt; 'button', :id =&gt; 'preview' } %&gt;
+    &lt;/div&gt;
+	
     &lt;br /&gt;
 
     &lt;div class=&quot;form_row&quot;&gt;
@@ -71,7 +79,7 @@
     &lt;/div&gt;
 
     &lt;div class=&quot;form_row&quot;&gt;
-      &lt;%= f.submit &quot;Update&quot;, :class =&gt; &quot;button&quot; %&gt;
+      &lt;%= f.submit &quot;Update&quot;, :class =&gt; &quot;button&quot; %&gt;	   
     &lt;/div&gt;
       or &lt;%= link_to &quot;Cancel&quot;, admin_preferences_path %&gt;
   &lt;% end %&gt;</diff>
      <filename>app/views/admin/preferences/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,8 @@
     &lt;%= javascript_include_tag :defaults %&gt;
   &lt;/head&gt;
   &lt;body class=&quot;&lt;%= @body %&gt;&quot;&gt;
+	&lt;div id=&quot;loaging_area&quot;&gt;&lt;%= image_tag('icons/ajax-loader.gif', :alt =&gt; &quot;Loading...&quot;) %&gt; Loading...&lt;/div&gt;
+	&lt;div id=&quot;error_area&quot;&gt;Error&lt;/div&gt;
     &lt;div id=&quot;header-wrap&quot;&gt;
       &lt;div id=&quot;header&quot;&gt;
         &lt;h1&gt;</diff>
      <filename>app/views/layouts/application.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,8 @@
 
 &lt;%- column_div :type =&gt; :primary do -%&gt;
 
+  &lt;div id=&quot;preview_area&quot;&gt;&lt;/div&gt;
+
   &lt;p&gt;&lt;%= formatting_note %&gt;&lt;/p&gt;
 
   &lt;%= error_messages_for :message %&gt;
@@ -39,10 +41,13 @@
     &lt;/div&gt;
     &lt;div class=&quot;form_row&quot;&gt;
       &lt;%= f.submit &quot;Send!&quot;, :class =&gt; &quot;button&quot;, :id =&gt; &quot;message_submit&quot; %&gt;
+	  &lt;%= submit_to_remote 'preview_btn', 'Preview', 
+			:url =&gt;  { :action =&gt; 'preview' }, 
+			:html =&gt; { :class =&gt; 'button', :id =&gt; 'preview' } %&gt;
       &lt;%= f.submit &quot;Preview&quot;, :class =&gt; &quot;button&quot;, :id =&gt; &quot;preview&quot; %&gt;
       &lt;%= f.submit &quot;Cancel&quot;, :class =&gt; &quot;button&quot;, :id =&gt; &quot;cancel&quot; %&gt;
       &lt;%- if current_person?(@recipient) and current_person.admin? -%&gt;
-        &lt;%= f.submit &quot;Send to all&quot;, :class =&gt; &quot;button&quot;, :id =&gt; &quot;all_people&quot; %&gt;
+        &lt;%= f.submit &quot;Send to all&quot;, :class =&gt; &quot;button&quot;, :id =&gt; &quot;all_people&quot;, :name =&gt; &quot;all_people&quot; %&gt;
       &lt;%- end -%&gt;
     &lt;/div&gt;
   &lt;% end %&gt;</diff>
      <filename>app/views/messages/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,150 +1,161 @@
-&lt;%- column_div :type =&gt; :primary do -%&gt;
-  &lt;h2&gt;Edit profile&lt;/h2&gt;
-
-  &lt;div id=&quot;profile_edit&quot;&gt;
-
-  &lt;h3&gt;Personal details&lt;/h3&gt;
-
-    &lt;%= error_messages_for :person %&gt;
-    
-    &lt;% form_for @person do |f| %&gt;
-
-      &lt;div class=&quot;form_row&quot;&gt;
-        &lt;label for=&quot;person_name&quot;&gt;Name&lt;/label&gt;
-        &lt;%= f.text_field :name, :maxlength =&gt; Person::MAX_NAME %&gt;
-      &lt;/div&gt;
-  
-      &lt;div class=&quot;form_row&quot;&gt;
-        &lt;label for=&quot;person_description&quot;&gt;Description
-        &lt;/label&gt;
-    
-        &lt;%- unless @preview.nil? -%&gt;
-          &lt;%= display @preview %&gt;
-        &lt;%- end -%&gt;
-        
-        &lt;p&gt;&lt;%= formatting_note %&gt;&lt;/p&gt;
-        &lt;%= f.text_area :description %&gt;
-      &lt;/div&gt;
-
-      &lt;div class=&quot;form_row&quot;&gt;
-        &lt;label for=&quot;person_email&quot;&gt;Email&lt;/label&gt;
-        &lt;%= f.text_field :email, :maxlength =&gt; Person::MAX_EMAIL %&gt;
-      &lt;/div&gt;
-      
-      &lt;%- if global_prefs.email_notifications? -%&gt;
-      
-        &lt;br /&gt;
-      
-        &lt;h3&gt;Email notification preferences&lt;/h3&gt;
-      
-        &lt;p&gt;
-          You will receive email notifications
-          for each event type whose box is checked.
-        &lt;/p&gt;
-        
-      
-        &lt;div class=&quot;form_row&quot;&gt;
-          &lt;p&gt;
-          &lt;label for=&quot;connection_notifications&quot;
-                 class=&quot;checkbox&quot;&gt;Connections:&lt;/label&gt;
-          &lt;%= f.check_box :connection_notifications %&gt;
-          &lt;/p&gt;
-          &lt;p&gt;
-          &lt;label for=&quot;message_notifications&quot;
-                 class=&quot;checkbox&quot;&gt;Messages:&lt;/label&gt;
-          &lt;%= f.check_box :message_notifications %&gt;
-          &lt;/p&gt;
-          &lt;p&gt;
-          &lt;label for=&quot;wall_comment_notifications&quot;
-                 class=&quot;checkbox&quot;&gt;Wall comments:&lt;/label&gt;
-          &lt;%= f.check_box :wall_comment_notifications %&gt;
-          &lt;/p&gt;
-          &lt;p&gt;
-          &lt;label for=&quot;blog_comment_notifications&quot;
-                 class=&quot;checkbox&quot;&gt;Blog comments:&lt;/label&gt;
-          &lt;%= f.check_box :blog_comment_notifications %&gt;
-          &lt;/p&gt;
-        &lt;/div&gt;
-      &lt;%- end -%&gt;
-      
-      &lt;br /&gt;
-  
-      &lt;div class=&quot;form_row&quot;&gt;
-        &lt;%= f.submit &quot;Update&quot;, :class =&gt; &quot;button&quot; %&gt;
-        &lt;%= f.submit &quot;Preview&quot;, :id =&gt; &quot;preview&quot;, :class =&gt; &quot;button&quot; %&gt;
-      &lt;/div&gt;
-      &lt;input type=&quot;hidden&quot; name=&quot;type&quot; value=&quot;info_edit&quot; /&gt;
-  &lt;% end %&gt;
-
-  &lt;br /&gt;
-
-  &lt;h3&gt;Photos&lt;/h3&gt;
-  
-    &lt;% if @person.photos.empty? %&gt;
-      &lt;%= image_tag @person.thumbnail %&gt;
-    &lt;% else %&gt;
-    &lt;table&gt;
-      &lt;% @person.sorted_photos.collect_every(N_COLUMNS) do |row| %&gt;
-      &lt;tr&gt;
-      &lt;% row.each do |photo| %&gt;
-        &lt;td  style=&quot;padding-left: 1em;&quot;&gt;
-          &lt;%= image_tag photo.public_filename(:thumbnail) %&gt;
-        &lt;/td&gt;
-      &lt;% end %&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;% row.each do |photo| %&gt;
-        &lt;td style=&quot;padding-left: 1em;&quot;&gt;
-          &lt;% if photo.primary? %&gt;
-            primary
-          &lt;% else %&gt;
-            &lt;%= link_to &quot;select&quot;, photo_path(photo),
-                                          :method =&gt; :put %&gt;
-          &lt;% end %&gt;
-          |
-          &lt;%= link_to image_tag(&quot;icons/close.gif&quot;), photo_path(photo),
-                                               :method =&gt; :delete %&gt;
-        &lt;/td&gt;
-        &lt;% end %&gt;
-      &lt;/tr&gt;
-      &lt;% end %&gt;
-    &lt;/table&gt;
-    &lt;% end %&gt;
-    &lt;br /&gt;
-    &lt;%= button_to &quot;Add a photo&quot;, new_photo_path, :class =&gt; &quot;button&quot; %&gt;
-  &lt;/div&gt;
-
-  &lt;br /&gt;
-
-  &lt;% form_for @person, :html =&gt; { :id =&gt; &quot;change_password&quot; } do |f| %&gt;
-
-    &lt;h3&gt;Change Password&lt;/h3&gt;
-
-    &lt;div class=&quot;form_row&quot;&gt;
-      &lt;label for=&quot;password&quot;&gt;Current Password&lt;/label&gt;
-      &lt;%= f.password_field :verify_password,
-                           :maxlength =&gt; Person::MAX_PASSWORD %&gt;
-    &lt;/div&gt;
-
-    &lt;div class=&quot;form_row&quot;&gt;
-      &lt;label for=&quot;password&quot;&gt;New Password&lt;/label&gt;
-      &lt;%= f.password_field :new_password,
-                           :maxlength =&gt; Person::MAX_PASSWORD %&gt;
-    &lt;/div&gt;
-
-    &lt;div class=&quot;form_row&quot;&gt;
-      &lt;label for=&quot;password_confirmation&quot;&gt;Confirm Password&lt;/label&gt;
-      &lt;%= f.password_field :password_confirmation, 
-                           :maxlength =&gt; Person::MAX_PASSWORD,
-                           :value =&gt; &quot;&quot; %&gt;
-    &lt;/div&gt;
-    &lt;div class=&quot;form_row&quot;&gt;
-      &lt;%= submit_tag 'Change password', :class =&gt; &quot;button&quot; %&gt;
-    &lt;/div&gt;
-    &lt;input type=&quot;hidden&quot; name=&quot;type&quot; value=&quot;password_edit&quot; /&gt;
-  &lt;% end %&gt;
-&lt;%- end -%&gt;
-
-&lt;%- column_div :type =&gt; :secondary do -%&gt;
-  &lt;%= render :partial =&gt; 'searches/box' %&gt;
-&lt;%- end -%&gt;
\ No newline at end of file
+&lt;%- column_div :type =&gt; :primary do -%&gt;
+  &lt;h2&gt;Edit profile&lt;/h2&gt;
+
+  &lt;div id=&quot;profile_edit&quot;&gt;
+
+  &lt;h3&gt;Personal details&lt;/h3&gt;
+
+    &lt;%= error_messages_for :person %&gt;
+    
+    &lt;% form_for @person do |f| %&gt;
+
+      &lt;div class=&quot;form_row&quot;&gt;
+        &lt;label for=&quot;person_name&quot;&gt;Name&lt;/label&gt;
+        &lt;%= f.text_field :name, :maxlength =&gt; Person::MAX_NAME %&gt;
+      &lt;/div&gt;
+  
+      &lt;div class=&quot;form_row&quot;&gt;
+        &lt;label for=&quot;person_description&quot;&gt;Description
+        &lt;/label&gt;
+    
+		&lt;div id=&quot;preview_area&quot;&gt;&lt;/div&gt;
+        
+        &lt;p&gt;&lt;%= formatting_note %&gt;&lt;/p&gt;
+        &lt;%= f.text_area :description %&gt;
+      &lt;/div&gt;
+
+      &lt;div class=&quot;form_row&quot;&gt;
+        &lt;label for=&quot;person_email&quot;&gt;Email&lt;/label&gt;
+        &lt;%= f.text_field :email, :maxlength =&gt; Person::MAX_EMAIL %&gt;
+      &lt;/div&gt;
+      
+      &lt;%- if global_prefs.email_notifications? -%&gt;
+      
+        &lt;br /&gt;
+      
+        &lt;h3&gt;Email notification preferences&lt;/h3&gt;
+      
+        &lt;p&gt;
+          You will receive email notifications
+          for each event type whose box is checked.
+        &lt;/p&gt;
+        
+      
+        &lt;div class=&quot;form_row&quot;&gt;
+          &lt;p&gt;
+          &lt;label for=&quot;connection_notifications&quot;
+                 class=&quot;checkbox&quot;&gt;Connections:&lt;/label&gt;
+          &lt;%= f.check_box :connection_notifications %&gt;
+          &lt;/p&gt;
+          &lt;p&gt;
+          &lt;label for=&quot;message_notifications&quot;
+                 class=&quot;checkbox&quot;&gt;Messages:&lt;/label&gt;
+          &lt;%= f.check_box :message_notifications %&gt;
+          &lt;/p&gt;
+          &lt;p&gt;
+          &lt;label for=&quot;wall_comment_notifications&quot;
+                 class=&quot;checkbox&quot;&gt;Wall comments:&lt;/label&gt;
+          &lt;%= f.check_box :wall_comment_notifications %&gt;
+          &lt;/p&gt;
+          &lt;p&gt;
+          &lt;label for=&quot;blog_comment_notifications&quot;
+                 class=&quot;checkbox&quot;&gt;Blog comments:&lt;/label&gt;
+          &lt;%= f.check_box :blog_comment_notifications %&gt;
+          &lt;/p&gt;
+        &lt;/div&gt;
+      &lt;%- end -%&gt;
+      
+      &lt;br /&gt;
+  
+      &lt;div class=&quot;form_row&quot;&gt;
+        &lt;%= f.submit &quot;Update&quot;, :class =&gt; &quot;button&quot; %&gt;
+		&lt;% 
+			update = {} 
+			failure = &quot;&quot;
+			if development?
+				update[:failure] = &quot;content&quot;
+			else
+				failure = &quot;$('error_area').style.display = 'inline';&quot;
+			end
+		%&gt;
+		&lt;%= submit_to_remote 'preview_btn', 'Preview', 
+			:url =&gt;  { :action =&gt; 'preview', :id =&gt; @person }, 
+			:html =&gt; { :class =&gt; 'button', :id =&gt; 'preview' },
+			:update =&gt; update,
+			:failure =&gt; failure %&gt;
+      &lt;/div&gt;
+      &lt;input type=&quot;hidden&quot; name=&quot;type&quot; value=&quot;info_edit&quot; /&gt;
+  &lt;% end %&gt;
+
+  &lt;br /&gt;
+
+  &lt;h3&gt;Photos&lt;/h3&gt;
+  
+    &lt;% if @person.photos.empty? %&gt;
+      &lt;%= image_tag @person.thumbnail %&gt;
+    &lt;% else %&gt;
+    &lt;table&gt;
+      &lt;% @person.sorted_photos.collect_every(N_COLUMNS) do |row| %&gt;
+      &lt;tr&gt;
+      &lt;% row.each do |photo| %&gt;
+        &lt;td  style=&quot;padding-left: 1em;&quot;&gt;
+          &lt;%= image_tag photo.public_filename(:thumbnail) %&gt;
+        &lt;/td&gt;
+      &lt;% end %&gt;
+      &lt;/tr&gt;
+      &lt;tr&gt;
+        &lt;% row.each do |photo| %&gt;
+        &lt;td style=&quot;padding-left: 1em;&quot;&gt;
+          &lt;% if photo.primary? %&gt;
+            primary
+          &lt;% else %&gt;
+            &lt;%= link_to &quot;select&quot;, photo_path(photo),
+                                          :method =&gt; :put %&gt;
+          &lt;% end %&gt;
+          |
+          &lt;%= link_to image_tag(&quot;icons/close.gif&quot;), photo_path(photo),
+                                               :method =&gt; :delete %&gt;
+        &lt;/td&gt;
+        &lt;% end %&gt;
+      &lt;/tr&gt;
+      &lt;% end %&gt;
+    &lt;/table&gt;
+    &lt;% end %&gt;
+    &lt;br /&gt;
+    &lt;%= button_to &quot;Add a photo&quot;, new_photo_path, :class =&gt; &quot;button&quot; %&gt;
+  &lt;/div&gt;
+
+  &lt;br /&gt;
+
+  &lt;% form_for @person, :html =&gt; { :id =&gt; &quot;change_password&quot; } do |f| %&gt;
+
+    &lt;h3&gt;Change Password&lt;/h3&gt;
+
+    &lt;div class=&quot;form_row&quot;&gt;
+      &lt;label for=&quot;password&quot;&gt;Current Password&lt;/label&gt;
+      &lt;%= f.password_field :verify_password,
+                           :maxlength =&gt; Person::MAX_PASSWORD %&gt;
+    &lt;/div&gt;
+
+    &lt;div class=&quot;form_row&quot;&gt;
+      &lt;label for=&quot;password&quot;&gt;New Password&lt;/label&gt;
+      &lt;%= f.password_field :new_password,
+                           :maxlength =&gt; Person::MAX_PASSWORD %&gt;
+    &lt;/div&gt;
+
+    &lt;div class=&quot;form_row&quot;&gt;
+      &lt;label for=&quot;password_confirmation&quot;&gt;Confirm Password&lt;/label&gt;
+      &lt;%= f.password_field :password_confirmation, 
+                           :maxlength =&gt; Person::MAX_PASSWORD,
+                           :value =&gt; &quot;&quot; %&gt;
+    &lt;/div&gt;
+    &lt;div class=&quot;form_row&quot;&gt;
+      &lt;%= submit_tag 'Change password', :class =&gt; &quot;button&quot; %&gt;
+    &lt;/div&gt;
+    &lt;input type=&quot;hidden&quot; name=&quot;type&quot; value=&quot;password_edit&quot; /&gt;
+  &lt;% end %&gt;
+&lt;%- end -%&gt;
+
+&lt;%- column_div :type =&gt; :secondary do -%&gt;
+  &lt;%= render :partial =&gt; 'searches/box' %&gt;
+&lt;%- end -%&gt;</diff>
      <filename>app/views/people/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,6 @@
   &lt;/div&gt;
   &lt;div class=&quot;form_field&quot;&gt;
     &lt;%= submit_tag 'Update' %&gt;
-    &lt;%= f.submit &quot;Cancel&quot;, :id =&gt; &quot;cancel&quot; %&gt;
+    &lt;%= f.submit &quot;Cancel&quot;, :id =&gt; &quot;cancel&quot;, :name =&gt; &quot;cancel&quot; %&gt;
   &lt;/div&gt;
-&lt;% end -%&gt;
\ No newline at end of file
+&lt;% end -%&gt;</diff>
      <filename>app/views/photos/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,6 @@
   &lt;/div&gt;
   &lt;div class=&quot;form_field&quot;&gt;
     &lt;%= submit_tag 'Upload', :class =&gt; &quot;button&quot; %&gt;
-    &lt;%= f.submit &quot;Cancel&quot;, :id =&gt; &quot;cancel&quot;, :class =&gt; &quot;button&quot; %&gt;
+    &lt;%= f.submit &quot;Cancel&quot;, :id =&gt; &quot;cancel&quot;, :class =&gt; &quot;button&quot;, :name =&gt; &quot;Cancel&quot; %&gt;
   &lt;/div&gt;
-&lt;% end -%&gt;
\ No newline at end of file
+&lt;% end -%&gt;</diff>
      <filename>app/views/photos/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,8 @@
 
   &lt;h3&gt;Add new post&lt;/h3&gt;
 
+  &lt;div id=&quot;preview_area&quot;&gt;&lt;/div&gt;
+  
   &lt;p&gt;&lt;%= formatting_note %&gt;&lt;/p&gt;
 
   &lt;%= error_messages_for :post %&gt;
@@ -19,6 +21,9 @@
 
     &lt;div class=&quot;form_row&quot;&gt;
       &lt;%= f.submit &quot;Submit&quot;, :class =&gt; &quot;button&quot; %&gt;
+	  &lt;%= submit_to_remote 'preview_btn', 'Preview', 
+			:url =&gt;  { :controller =&gt; 'posts', :action =&gt; 'preview', :forum_id =&gt; @forum, :topic_id =&gt; @topic  }, 
+			:html =&gt; { :class =&gt; 'button', :id =&gt; 'preview' } %&gt;
     &lt;/div&gt;
   &lt;% end %&gt;
 </diff>
      <filename>app/views/topics/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -4,12 +4,12 @@
 # pid_file: location of the server's pid file (relative to RAILS_ROOT)
 # log_file: log file (default: RAILS_ROOT/log/ferret_server.log
 # log_level: log level for the server's logger
-production:
-  host: localhost
-  port: 9010
-  pid_file: log/ferret.pid
-  log_file: log/ferret_server.log
-  log_level: warn
+#production:
+  #host: localhost
+  #port: 9010
+  #pid_file: log/ferret.pid
+  #log_file: log/ferret_server.log
+  #log_level: warn
 
 # aaf won't try to use the DRb server in environments that are not 
 # configured here.</diff>
      <filename>config/ferret_server.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,14 @@
-// Place your application-specific JavaScript functions and classes here
-// This file is automatically included by javascript_include_tag :defaults
+
+// Generic callbacks that work across all Ajax requests 
+Ajax.Responders.register({
+    onCreate: function() {
+		if (Ajax.activeRequestCount === 1) {
+			$('loaging_area').style.display = 'inline';
+		}
+    },
+    onComplete: function() {
+		if (Ajax.activeRequestCount === 0) {
+			$('loaging_area').hide();
+		}
+    }
+});</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -316,4 +316,40 @@ strong { font-weight: bold; }
 .loud       { color: #000; }
 .highlight  { background:#ff0; }
 .added      { background:#060; color: #fff; }
-.removed    { background:#900; color: #fff; }
\ No newline at end of file
+.removed    { background:#900; color: #fff; }
+
+#loaging_area {
+	background-color:#FFF6BF;
+	border-color:#FFD324;
+	color:#514721;
+	border-width: 0 2px 2px 2px;
+	border-style: solid;
+	
+	padding: 0.1em 0.5em 0.1em 0.5em;
+	
+	left:50%;
+	margin-left:-26px;
+	position:fixed;
+	top:0pt;
+	z-index:10000;	
+	
+	display:none;
+}
+
+#error_area {
+	background:#FBE3E4 none repeat scroll 0% 0%;
+	border-color:#FBC2C4;
+	color:#8A1F11;
+	border-width: 0 2px 2px 2px;
+	border-style: solid;
+
+	padding: 0.1em 0.5em 0.1em 0.5em;
+	
+	left:50%;
+	margin-left:-26px;
+	position:fixed;
+	top:0pt;
+	z-index:10001;	
+	
+	display:none;
+}
\ No newline at end of file</diff>
      <filename>public/stylesheets/typography.css</filename>
    </modified>
    <modified>
      <diff>@@ -78,7 +78,7 @@ describe MessagesController do
         post :create, :message =&gt; { :subject =&gt; &quot;The subject&quot;,
                                     :content =&gt; &quot;Hey there!&quot; },
                       :person_id =&gt; @other_person,
-                      :commit =&gt; &quot;Send to all&quot;
+                      :all_people =&gt; &quot;Send to all&quot;
       end.should change(Message, :count).by(Person.active.length)
     end
     
@@ -137,4 +137,4 @@ describe MessagesController do
       assigns(:message).should be_reply
     end.should change(Message, :count).by(1)
   end
-end
\ No newline at end of file
+end</diff>
      <filename>spec/controllers/messages_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,7 @@ describe PhotosController do
     end
     
     it &quot;should handle cancellation and doesn't report about problem&quot; do
-      post :create, :commit =&gt; &quot;Cancel&quot;, :photo =&gt; { :uploaded_data =&gt; nil }
+      post :create, :cancel =&gt; &quot;Cancel&quot;, :photo =&gt; { :uploaded_data =&gt; nil }
       response.should redirect_to(edit_person_url(@person))
       flash[:error].should be_nil
     end</diff>
      <filename>spec/controllers/photos_controller_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>264ae4e53753ec705ed3dc68cb615c8dc4ef9db6</id>
    </parent>
    <parent>
      <id>93da5b953a8072255c029acea3f812fad13796c3</id>
    </parent>
  </parents>
  <author>
    <name>Pavel Valodzka</name>
    <email>pavel@valodzka.name</email>
  </author>
  <url>http://github.com/valodzka/insoshi/commit/0e29f505c4c978efa533d91fb16c79c96cb1f74f</url>
  <id>0e29f505c4c978efa533d91fb16c79c96cb1f74f</id>
  <committed-date>2008-05-23T15:32:34-07:00</committed-date>
  <authored-date>2008-05-23T15:32:34-07:00</authored-date>
  <message>Merge branch 'valodzka' of git@github.com:valodzka/insoshi into valodzka

Conflicts:

	app/views/people/edit.html.erb</message>
  <tree>cc9572b251b8afafc4d792da48bc470d1aa6b9c7</tree>
  <committer>
    <name>Pavel Valodzka</name>
    <email>pavel@valodzka.name</email>
  </committer>
</commit>
