<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,8 @@ class Admin::PageAttributesController &lt; ApplicationController
     respond_to do |format|
       format.js do
         @page_attribute = PageAttribute.new(params[:page_attribute])
-        render(:partial =&gt; 'page_attribute_row', :object =&gt; @page_attribute, :layout =&gt; false)
+        render(:partial =&gt; 'page_attribute_row', :object =&gt; @page_attribute,
+               :locals =&gt; {:page_attribute_row_counter =&gt; params[:index]}, :layout =&gt; false )
       end
     end
   end</diff>
      <filename>app/controllers/admin/page_attributes_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 #add-page-attribute-popup.popup{:style =&gt; &quot;display: none&quot;}
   #page-attribute-busy.busy{:style =&gt; &quot;display: none&quot;}= image 'spinner.gif'
   %h3 Add Attribute
-  - form_remote_tag(:url =&gt; admin_page_attributes_path, :update =&gt; &quot;page-attributes-fieldset&quot;, :position =&gt; :bottom, :loading =&gt; 'page-attribute_loading()', :success =&gt; 'page_attribute_added()', :condition =&gt; 'valid_page_attribute_name()', :html =&gt; {:method =&gt; :post}) do
+  - remote_form_for([:admin, PageAttribute.new], :update =&gt; &quot;page-attributes-fieldset&quot;, :position =&gt; :bottom, :loading =&gt; 'page-attribute_loading()', :success =&gt; 'page_attribute_added()', :condition =&gt; 'valid_page_attribute_name()', :html =&gt; {:method =&gt; :post}) do
     %div
-      = hidden_field_tag 'index', @index, :id =&gt; 'page-attribute-index-field'
+      = hidden_field_tag 'index', @page.page_attributes.size, :id =&gt; 'page-attribute-index-field'
       = text_field_tag &quot;page_attribute[name]&quot;, &quot;&quot;, :id =&gt; 'page-attribute-name-field', :maxlength =&gt; 100
       = select_tag &quot;page_attribute[class_name]&quot;, options_for_select(PageAttribute.descendants.map {|c| [c.display_name, c.name]})
       = submit_tag &quot;Add&quot;, :id =&gt; 'add-page-attribute-button'</diff>
      <filename>app/views/admin/page_attributes/_add_page_attribute_popup.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -23,9 +23,9 @@ function page_attribute_loading() {
 }
 
 function page_attribute_added(response) {
-  console.log($('add-page-attribute-popup'));
   $('page-attribute-name-field').value = &quot;&quot;;
   $('add-page-attribute-popup').hide();
+  $('page-attribute-index-field').value = parseInt($('page-attribute-index-field').value) + 1;
 }
 
 function page_attribute_removed(id) {</diff>
      <filename>public/javascripts/admin/page_attributes.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c88e86eae0566371fae64fa89237163c52b4bbb1</id>
    </parent>
  </parents>
  <author>
    <name>Josh French</name>
    <email>josh@vitamin-j.com</email>
  </author>
  <url>http://github.com/jfrench/radiant-page-attributes/commit/2e9a29eb0f96643526286c81ea040ab32181bfbc</url>
  <id>2e9a29eb0f96643526286c81ea040ab32181bfbc</id>
  <committed-date>2008-11-02T16:16:13-08:00</committed-date>
  <authored-date>2008-11-02T16:16:13-08:00</authored-date>
  <message>Carry page attribute count into new partial</message>
  <tree>238bee6d98b3b7bf0aa5ce39d612d44fe9afbf8a</tree>
  <committer>
    <name>Josh French</name>
    <email>josh@vitamin-j.com</email>
  </committer>
</commit>
