<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>public/jquery.alerts/images/help.gif</filename>
    </added>
    <added>
      <filename>public/jquery.alerts/images/important.gif</filename>
    </added>
    <added>
      <filename>public/jquery.alerts/images/info.gif</filename>
    </added>
    <added>
      <filename>public/jquery.alerts/images/title.gif</filename>
    </added>
    <added>
      <filename>public/jquery.alerts/jquery.alerts.css</filename>
    </added>
    <added>
      <filename>public/jquery.alerts/jquery.alerts.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -4,9 +4,9 @@ class Admin::TaxonsController &lt; Admin::BaseController
   before_filter :load_object, :only =&gt; [:selected, :available, :remove]
   belongs_to :product
   
-  create.wants.js {render :text =&gt; @taxon.to_json()}
+  create.wants.html {render :text =&gt; @taxon.id}
   update.wants.html {render :text =&gt; @taxon.name}
-  destroy.wants.js {render :text =&gt; &quot;&quot;}
+  destroy.wants.html {render :text =&gt; &quot;&quot;}
   
   create.before do 
     @taxon.taxonomy_id = params[:taxonomy_id]</diff>
      <filename>app/controllers/admin/taxons_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,16 @@
 	&lt;%= stylesheet_link_tag '/jsTree/source/tree_component.css' %&gt;
 	&lt;%= javascript_include_tag '/jsTree/source/_lib.js' %&gt;
 	&lt;%= javascript_include_tag '/jsTree/source/tree_component.js' %&gt;
-
+	
+	&lt;%= javascript_include_tag '/jquery.alerts/jquery.alerts.js' %&gt;
+	&lt;%= stylesheet_link_tag '/jquery.alerts/jquery.alerts.css' %&gt;
+ 
   &lt;%= javascript_tag &quot;var AUTH_TOKEN = #{form_authenticity_token.inspect};&quot; if protect_against_forgery? %&gt; 
-  &lt;%= javascript_tag &quot;var taxonomy_id = #{@taxonomy.id};&quot; %&gt; 
+  &lt;%= javascript_tag &quot;var taxonomy_id = #{@taxonomy.id}; 
+    var loading = '#{t('loading')}'; 
+    var new_taxon = '#{t('new_taxon')}';
+    var server_error = '#{t('server_error')}';
+    var taxonomy_tree_error = '#{t('taxonomy_tree_error')}';&quot; 
+  %&gt; 
   &lt;%= javascript_include_tag 'taxonomy' %&gt;
-&lt;% end %&gt;
+&lt;% end %&gt;
\ No newline at end of file</diff>
      <filename>app/views/admin/taxonomies/_js_head.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;ul&gt;
   &lt;% taxon.children.each do |child| %&gt;
-    &lt;li id=&quot;&lt;%= child.id %&gt;&quot;&gt;
+    &lt;li id=&quot;&lt;%= child.id %&gt;&quot; rel=&quot;taxon&quot;&gt;
       &lt;a href=&quot;#&quot;&gt;&lt;%= child.name %&gt;&lt;/a&gt;
       &lt;% if child.children.length &gt; 0 %&gt;
         &lt;%= render :partial =&gt; &quot;taxon&quot;, :locals =&gt; {:taxon =&gt; child} %&gt;</diff>
      <filename>app/views/admin/taxonomies/_taxon.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -4,19 +4,24 @@
 
 &lt;h1&gt;Edit Taxonomy&lt;/h1&gt;
 
+&lt;p id=&quot;ajax_error&quot; class=&quot;errorExplanation&quot; style=&quot;display:none;&quot;&gt;&lt;/p&gt;
+
 &lt;% form_for(:taxon, :url =&gt; admin_taxonomy_url, :html =&gt; { :method =&gt; :put }) do |f| %&gt;
   &lt;%= render :partial =&gt; 'form', :locals =&gt; {:f =&gt; f} %&gt;
 	  &lt;div&gt;
 	    &lt;label&gt;&lt;%= t(&quot;tree&quot;)%&gt;&lt;/label&gt;&lt;br /&gt;
       &lt;div id=&quot;taxonomy_tree&quot; class=&quot;tree&quot;&gt;
         &lt;ul&gt;
-          &lt;li id=&quot;&lt;%= @taxonomy.root.id %&gt;&quot; class=&quot;open&quot;&gt;
+          &lt;li id=&quot;&lt;%= @taxonomy.root.id %&gt;&quot; class=&quot;open&quot; rel=&quot;root&quot;&gt;
             &lt;a href=&quot;#&quot;&gt;&lt;%= @taxonomy.root.name %&gt;&lt;/a&gt;
             &lt;%= render :partial =&gt; &quot;taxon&quot;, :locals =&gt; {:taxon =&gt; @taxonomy.root} %&gt;
           &lt;/li&gt;
         &lt;/ul&gt;
       &lt;/div&gt;
   	&lt;/div&gt;
+  	&lt;p id=&quot;progress&quot; style=&quot;display:none;&quot;&gt;
+      &lt;img src=&quot;/images/spinner.gif?1234540747&quot; alt=&quot;Spinner&quot; style=&quot;vertical-align:bottom;&quot;/&gt; &lt;%= t('updating') %&gt;..
+    &lt;/p&gt;
     &lt;p&gt;&lt;br/&gt;&lt;small&gt;* Right click a child in the tree to access the menu for adding, deleting or sorting a child.&lt;/small&gt;&lt;/p&gt;
 
 	&lt;p class=&quot;form-buttons&quot;&gt;</diff>
      <filename>app/views/admin/taxonomies/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -250,10 +250,6 @@ da:
   expiration_year: &quot;Expiration Year&quot;
   extension: Extension
   extensions: Extensions
-  ext_tax_calculator_tax_rates: &quot;Moms satser&quot;
-  ext_tax_calculator_tax_rates_description: &quot;Moms satser per geografisk omr&#229;de og produkt kategori.&quot;
-  ext_tax_calculator_tax_settings: &quot;Moms indstillinger&quot;
-  ext_tax_calculator_tax_settings_description: &quot;V&#230;lg om priser skal vises med eller uden moms.&quot;
   filename: Filename
   final_confirmation: &quot;Final Confirmation&quot;
   first_name: &quot;First Name&quot;
@@ -294,6 +290,7 @@ da:
   listing_reports: &quot;Listing Reports&quot;
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: &quot;Listing Users&quot;
+  loading: Loading
   locale_changed: &quot;Locale Changed&quot;
   log_in: &quot;Log In&quot;
   logged_in_as: &quot;Logged in as&quot;
@@ -332,6 +329,7 @@ da:
   new_state: &quot;New State&quot;
   new_tax_category: &quot;New Tax Category&quot;
   new_tax_rate: &quot;New Tax Rate&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;New User&quot;
   new_variant: &quot;New Variant&quot;
@@ -424,6 +422,7 @@ da:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: &quot;Ship Address&quot;
   shipment: Shipment
@@ -446,8 +445,6 @@ da:
   show_incomplete_orders: &quot;Show Incomplete Orders&quot;
   show_only_complete_orders: &quot;Only show complete orders&quot;
   show_out_of_stock_products: &quot;Show out-of-stock products&quot;
-  show_price_inc_vat: &quot;Pris inkl. moms&quot;
-  show_price_incl_vat: &quot;Vis pris inkl. moms&quot;
   sign_up: &quot;Sign up&quot;
   site_name: &quot;Site Name&quot;
   site_url: &quot;Site URL&quot;
@@ -479,12 +476,12 @@ da:
   tax_categories: &quot;Tax Categories&quot;
   tax_categories_setting_description: &quot;Set up tax categories to identify which products should be taxable.&quot;
   tax_category: &quot;Tax Category&quot;
-  tax_settings: &quot;Moms indstillinger&quot;
   tax_total: &quot;Tax Total&quot;
   tax_type: &quot;Tax Type&quot;
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: &quot;Dansk (DK)&quot;
@@ -502,6 +499,7 @@ da:
   update: Update
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully:
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Use Different Shipping Address&quot;</diff>
      <filename>config/locales/da.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ de:
   listing_reports: Berichte
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: Benutzer
+  loading: Loading
   locale_changed: &quot;Sprache ge&#228;ndert&quot;
   log_in: Anmelden
   logged_in_as: &quot;Angemldet unter&quot;
@@ -328,6 +329,7 @@ de:
   new_state: &quot;Neues Bundesland&quot;
   new_tax_category: &quot;Neue Steuer-Kategorie&quot;
   new_tax_rate: &quot;Neuer Steuersatz&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;Neuer Benutzer&quot;
   new_variant: &quot;Neue Variante&quot;
@@ -420,6 +422,7 @@ de:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: Lieferadresse
   shipment: Shipment
@@ -478,6 +481,7 @@ de:
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Vielen Dank f&#252;r ihre Bestellung&quot;
   this_file_language: Deutsch
@@ -495,6 +499,7 @@ de:
   update: Speichern
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;Erfolgreich aktualisiert&quot;
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Andere Lieferaddresse verwenden&quot;</diff>
      <filename>config/locales/de.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ en-GB:
   listing_reports: &quot;Listing Reports&quot;
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: &quot;Listing Users&quot;
+  loading: Loading
   locale_changed: &quot;Locale Changed&quot;
   log_in: &quot;Log In&quot;
   logged_in_as: &quot;Logged in as&quot;
@@ -328,6 +329,7 @@ en-GB:
   new_state: &quot;New State&quot;
   new_tax_category: &quot;New Tax Category&quot;
   new_tax_rate: &quot;New Tax Rate&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;New User&quot;
   new_variant: &quot;New Variant&quot;
@@ -420,6 +422,7 @@ en-GB:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: &quot;Ship Address&quot;
   shipment: Shipment
@@ -478,6 +481,7 @@ en-GB:
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: &quot;English (UK)&quot;
@@ -495,6 +499,7 @@ en-GB:
   update: Update
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully:
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Use Different Shipping Address&quot;</diff>
      <filename>config/locales/en-GB.yml</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,6 @@ en-US:
   abbreviation: Abbreviation
   access_denied: &quot;Access Denied&quot;
   account: Account
-  new_taxon: &quot;New Taxon&quot;
-  loading: Loading
   account_updated: &quot;Account updated!&quot;        
   action: Action
   actions: 
@@ -292,6 +290,7 @@ en-US:
   listing_reports: &quot;Listing Reports&quot;
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: &quot;Listing Users&quot;
+  loading: Loading
   locale_changed: &quot;Locale Changed&quot;
   log_in: &quot;Log In&quot;
   logged_in_as: &quot;Logged in as&quot;
@@ -330,6 +329,7 @@ en-US:
   new_state: &quot;New State&quot;
   new_tax_category: &quot;New Tax Category&quot;
   new_tax_rate: &quot;New Tax Rate&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;New User&quot;
   new_variant: &quot;New Variant&quot;
@@ -422,6 +422,7 @@ en-US:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: &quot;Ship Address&quot;
   shipment: Shipment
@@ -480,6 +481,7 @@ en-US:
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: &quot;English (US)&quot;
@@ -497,6 +499,7 @@ en-US:
   update: Update
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;Updated Successfully&quot;
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Use Different Shipping Address&quot;</diff>
      <filename>config/locales/en-US.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ es:
   listing_reports: &quot;Listado de reportes&quot;
   listing_tax_categories: &quot;Listado de Taxons&quot;
   listing_users: &quot;Listado de usuarios&quot;
+  loading: Loading
   locale_changed: &quot;Se ha cambiado el idioma&quot;
   log_in: &quot;Iniciar sesi&#243;n&quot;
   logged_in_as: &quot;Identificado como&quot;
@@ -328,6 +329,7 @@ es:
   new_state: &quot;Nueva provincia&quot;
   new_tax_category: &quot;Nueva categor&#237;a&quot;
   new_tax_rate: &quot;Nuevo iipo impositivo&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;Nuevo usuario&quot;
   new_variant: &quot;Nueva Variante&quot;
@@ -420,6 +422,7 @@ es:
   send_copy_of_orders_mails_to: Envia una copia de todos los correos de pedidos a         
   send_mails_as: Enviar correos como
   send_order_mails_as: Enviar correos de pedidos como
+  server_error: &quot;The server returned an error&quot;
   ship: enviar
   ship_address: &quot;Direccion de envio&quot;
   shipment: Envio
@@ -478,6 +481,7 @@ es:
   taxon: Taxon
   taxonomies: Taxonomias
   taxonomies_setting_description: &quot;Crear y manejar taxonomias&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Gracias por su pedido&quot;
   this_file_language: &quot;Espa&#241;ol (Espa&#241;a)&quot;
@@ -495,6 +499,7 @@ es:
   update: Actualizar
   update_password: &quot;Actualiza mi contrase&#241;a y dejame entrar&quot;                    
   updated_successfully: &quot;Actualizado correctamente&quot;
+  updating: Updating
   use_as_shipping_address: Usar como direccion de envio
   use_billing_address: Usar la direccion de facturacion
   use_different_shipping_address: &quot;Usar una direcci&#243;n de env&#237;o diferente&quot;</diff>
      <filename>config/locales/es.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ fr-FR:
   listing_reports: &quot;Liste des statistiques&quot;
   listing_tax_categories: &quot;Liste des cat&#233;gories de taxes&quot;
   listing_users: &quot;Liste des utilisateurs&quot;
+  loading: Loading
   locale_changed: &quot;Locale chang&#233;e&quot;
   log_in: &quot;S'identifier&quot;
   logged_in_as: &quot;Identifi&#233; en tant que&quot;
@@ -328,6 +329,7 @@ fr-FR:
   new_state: &quot;Nouvelle r&#233;gion&quot;
   new_tax_category: &quot;Nouvelle cat&#233;gorie de taxes&quot;
   new_tax_rate: &quot;Nouvelle taxe&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;Nouvel utilisateur&quot;
   new_variant: &quot;Nouvelle gamme&quot;
@@ -420,6 +422,7 @@ fr-FR:
   send_copy_of_orders_mails_to: Envoyer une copie des commandes email &#224;
   send_mails_as: Envoyer des mails en tant que
   send_order_mails_as: Envoyer des commandes email en tant que
+  server_error: &quot;The server returned an error&quot;
   ship: livraison
   ship_address: &quot;Adresse de livraison&quot;
   shipment: Livraison
@@ -478,6 +481,7 @@ fr-FR:
   taxon: Taxon
   taxonomies: Arborescence
   taxonomies_setting_description: &quot;Cr&#233;ation et gestion des Arborescence&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Arborescence
   thank_you_for_your_order: &quot;Merci de nous avoir fait confiance. Imprimez cette page de confirmation pour vos archives.&quot;
   this_file_language: &quot;Fran&#231;ais (FR)&quot;
@@ -495,6 +499,7 @@ fr-FR:
   update: Mise &#224; jour
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;Mise &#224; jour effectu&#233;e avec succ&#232;s&quot;
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Utiliser une adresse de facturation diff&#233;rente&quot;</diff>
      <filename>config/locales/fr-FR.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ it:
   listing_reports: Report
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: Utente
+  loading: Loading
   locale_changed: &quot;Locale Changed&quot;
   log_in: Login
   logged_in_as: &quot;Loggato con&quot;
@@ -328,6 +329,7 @@ it:
   new_state: &quot;New State&quot;
   new_tax_category: &quot;New Tax Category&quot;
   new_tax_rate: &quot;New Tax Rate&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;Nuovo utente&quot;
   new_variant: &quot;Nuova variante&quot;
@@ -420,6 +422,7 @@ it:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: &quot;Indirizzo di consegna&quot;
   shipment: Shipment
@@ -478,6 +481,7 @@ it:
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: Italian
@@ -495,6 +499,7 @@ it:
   update: Salva
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully:
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Altro indirizzo di consegna&quot;</diff>
      <filename>config/locales/it.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ nb-NO:
   listing_reports: &quot;Rapporter&quot;
   listing_tax_categories: &quot;Momskategorier&quot;
   listing_users: &quot;Brukere&quot;
+  loading: Loading
   locale_changed: &quot;Endret spr&#229;k&quot;
   log_in: &quot;Logg inn&quot;
   logged_in_as: &quot;Innlogget som&quot;
@@ -328,6 +329,7 @@ nb-NO:
   new_state: &quot;Ny stat&quot;
   new_tax_category: &quot;Ny momskategori&quot;
   new_tax_rate: &quot;Nytt momsniv&#229;&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;Ny klassifikasjon&quot;
   new_user: &quot;Ny bruker&quot;
   new_variant: &quot;Ny variant&quot;
@@ -420,6 +422,7 @@ nb-NO:
   send_copy_of_orders_mails_to: &quot;Send kopi av alle ordre-eposter til&quot;
   send_mails_as: &quot;Send epost som&quot;
   send_order_mails_as: &quot;Send ordre-epost som&quot;
+  server_error: &quot;The server returned an error&quot;
   ship: send
   ship_address: &quot;Leveringsadresse&quot;
   shipment: Leveranse
@@ -478,6 +481,7 @@ nb-NO:
   taxon: Klasse
   taxonomies: Klassifikasjoner
   taxonomies_setting_description: &quot;Konfigurer klassifikasjoner.&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Klasser
   thank_you_for_your_order: &quot;Takk for bestillingen. Vennligst skriv ut og ta vare p&#229; denne bekreftelsen.&quot;
   this_file_language: &quot;Norsk&quot;
@@ -495,6 +499,7 @@ nb-NO:
   update: Oppdater
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;Oppdatert&quot;  
+  updating: Updating
   use_as_shipping_address: &quot;Bruk som leveringsadresse&quot;
   use_billing_address: &quot;Bruk fakturaadressen&quot;
   use_different_shipping_address: &quot;Bruk en annen leveringsadresse&quot;</diff>
      <filename>config/locales/nb-NO.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ nl-BE:
   listing_reports: &quot;Lijst Rapporten&quot;
   listing_tax_categories: &quot;Lijst BTW categorie&#235;n&quot;
   listing_users: &quot;Lijst Gebruikers&quot;
+  loading: Loading
   locale_changed: &quot;Regionale Instellingen Gewijzigd&quot;
   log_in: &quot;Aanmelden&quot;
   logged_in_as: &quot;Aangemeld als&quot;
@@ -328,6 +329,7 @@ nl-BE:
   new_state: &quot;Nieuwe Status&quot;
   new_tax_category: &quot;Nieuwe BTW Categorie&quot;
   new_tax_rate: &quot;Nieuw BTW Tarief&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;Nieuwe Taxonomie&quot;
   new_user: &quot;Nieuwe Gebruiker&quot;
   new_variant: &quot;Nieuwe Variant&quot;
@@ -420,6 +422,7 @@ nl-BE:
   send_copy_of_orders_mails_to: &quot;Zend kopie van bestelmails naar&quot;      
   send_mails_as: &quot;Zend mail als&quot;                    
   send_order_mails_as: &quot;Zend bestelmaild als&quot;
+  server_error: &quot;The server returned an error&quot;
   ship: Verzenden
   ship_address: &quot;Afleveringssadres&quot;
   shipment: Verzending
@@ -478,6 +481,7 @@ nl-BE:
   taxon: Taxon
   taxonomies: Taxonomie&#235;n
   taxonomies_setting_description: &quot;Aanmaken en wijzigen taxonomie&#235;n&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Hartelijk dank voor uw bestelling. U kan deze pagina afdrukken als bewijs van bestelling.&quot;
   this_file_language: &quot;Nederlands (BE)&quot;
@@ -495,6 +499,7 @@ nl-BE:
   update: Updaten
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;Succesvol Aangepast&quot;
+  updating: Updating
   use_as_shipping_address: &quot;Gebruik als afleveringsadres&quot;
   use_billing_address: &quot;Gebruik als factuuradres&quot;
   use_different_shipping_address: &quot;Ander afleveringsadres gebruiken&quot;</diff>
      <filename>config/locales/nl-BE.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ pl:
   listing_reports: &quot;Lista raport&#243;w&quot;
   listing_tax_categories: &quot;Listing Tax Categories&quot;
   listing_users: &quot;Lista u&#380;ytkownik&#243;w&quot;
+  loading: Loading
   locale_changed: &quot;Locale Changed&quot;
   log_in: Zaloguj
   logged_in_as: &quot;Zalogowany jako&quot;
@@ -328,6 +329,7 @@ pl:
   new_state: &quot;Nowy stan&quot;
   new_tax_category: &quot;Nowa kategoria podatkowa&quot;
   new_tax_rate: &quot;New Tax Rate&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;New Taxonomy&quot;
   new_user: &quot;Nowy u&#380;ytkownik&quot;
   new_variant: &quot;Nowy wariant&quot;
@@ -420,6 +422,7 @@ pl:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: wy&#347;lij
   ship_address: &quot;Adres Dostawy&quot;
   shipment: Shipment
@@ -478,6 +481,7 @@ pl:
   taxon: Taxon
   taxonomies: Taxonomies
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: Polski
@@ -495,6 +499,7 @@ pl:
   update: Aktualizuj
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully:
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;U&#380;yj innego adresy dostawy&quot;</diff>
      <filename>config/locales/pl.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ pt-BR:
   listing_reports: &quot;Listando Relat&#243;rios&quot;
   listing_tax_categories: &quot;Listando Categorias de Impostos&quot;
   listing_users: &quot;Listando Usu&#225;rios&quot;
+  loading: Loading
   locale_changed: &quot;Localiza&#231;&#227;o Modificada&quot;
   log_in: Entre
   logged_in_as: &quot;Logado como&quot;
@@ -328,6 +329,7 @@ pt-BR:
   new_state: &quot;Novo Estado&quot;
   new_tax_category: &quot;Nova Categoria de Imposto&quot;
   new_tax_rate: &quot;Nova Taxa de Imposto&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;Nova Taxonomia&quot;
   new_user: &quot;Novo Usu&#225;rio&quot;
   new_variant: &quot;Nova Variante&quot;
@@ -420,6 +422,7 @@ pt-BR:
   send_copy_of_orders_mails_to: Enviar C&#243;pia de Emails de Pedidos Para
   send_mails_as: Enviar Emails como
   send_order_mails_as: Enviar Emails de Pedidos como
+  server_error: &quot;The server returned an error&quot;
   ship: entregar
   ship_address: &quot;Endere&#231;o da Entrega&quot;
   shipment: Entrega
@@ -478,6 +481,7 @@ pt-BR:
   taxon: Grupo de Taxonomia
   taxonomies: Taxonomias
   taxonomies_setting_description: &quot;Criar e gerenciar taxonomias&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Grupos de Taxonomias
   thank_you_for_your_order: &quot;Obrigado por sua compra. Por favor, imprima uma c&#243;pia desta p&#225;gina de confirma&#231;&#227;o para seu controle.&quot;
   this_file_language: &quot;Portugu&#234;s (Brasil)&quot;
@@ -495,6 +499,7 @@ pt-BR:
   update: Atualizar
   update_password: &quot;Atualizar minha senha e fazer meu login&quot;
   updated_successfully: &quot;Atualizado com Sucesso&quot;
+  updating: Updating
   use_as_shipping_address: Use como Endere&#231;o de Entrega
   use_billing_address: Use como Endere&#231;o de Cobran&#231;a
   use_different_shipping_address: &quot;Use um Endere&#231;o de Entrega Diferente&quot;</diff>
      <filename>config/locales/pt-BR.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ pt-PT:
   listing_reports: &quot;Listando Relat&#243;rios&quot;
   listing_tax_categories: &quot;Listando Categorias de IVA&quot;
   listing_users: &quot;Listando Utilizadores&quot;
+  loading: Loading
   locale_changed: &quot;Localiza&#231;&#227;o Alterada&quot;
   log_in: Entre
   logged_in_as: &quot;Registado como&quot;
@@ -328,6 +329,7 @@ pt-PT:
   new_state: &quot;Novo Estado&quot;
   new_tax_category: &quot;Nova Categoria de IVA&quot;
   new_tax_rate: &quot;Nova Taxa de IVA&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;Nova Taxonomia&quot;
   new_user: &quot;Novo Utilizador&quot;
   new_variant: &quot;Nova Variante&quot;
@@ -420,6 +422,7 @@ pt-PT:
   send_copy_of_orders_mails_to: Send Copy of Order Mails To         
   send_mails_as: Send Mails As                    
   send_order_mails_as: Send Order Mails As   
+  server_error: &quot;The server returned an error&quot;
   ship: ship
   ship_address: &quot;Endere&#231;o da Entrega&quot;
   shipment: Distribui&#231;&#227;o
@@ -478,6 +481,7 @@ pt-PT:
   taxon: Taxon
   taxonomies: Taxonomias
   taxonomies_setting_description: &quot;Criar e gerir taxonomias&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: Taxons
   thank_you_for_your_order: &quot;Obrigado por sua compra. Por favor, imprima uma c&#243;pia desta p&#225;gina de confirma&#231;&#227;o para seu controle.&quot;
   this_file_language: &quot;Portugu&#234;s&quot;
@@ -495,6 +499,7 @@ pt-PT:
   update: Actualizar
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: Actualizado com sucesso
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;Use um Endere&#231;o de Entrega Diferente&quot;</diff>
      <filename>config/locales/pt-PT.yml</filename>
    </modified>
    <modified>
      <diff>@@ -290,6 +290,7 @@ ru-RU:
   listing_reports: &quot;&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1086;&#1090;&#1095;&#1077;&#1090;&#1086;&#1074;&quot;
   listing_tax_categories: &quot;&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1082;&#1072;&#1090;&#1077;&#1075;&#1086;&#1088;&#1080;&#1081; &#1085;&#1072;&#1083;&#1086;&#1075;&#1086;&#1074;&quot;
   listing_users: &quot;&#1057;&#1087;&#1080;&#1089;&#1086;&#1082; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1077;&#1081;&quot;
+  loading: Loading
   locale_changed: &quot;&#1051;&#1086;&#1082;&#1072;&#1083;&#1100; &#1080;&#1079;&#1084;&#1077;&#1085;&#1077;&#1085;&#1072;&quot;
   log_in: &quot;&#1047;&#1072;&#1081;&#1090;&#1080;&quot;
   logged_in_as: &quot;&#1055;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100;&quot;
@@ -328,6 +329,7 @@ ru-RU:
   new_state: &quot;&#1053;&#1086;&#1074;&#1072;&#1103; &#1086;&#1073;&#1083;&#1072;&#1089;&#1090;&#1100;&quot;
   new_tax_category: &quot;&#1053;&#1086;&#1074;&#1072;&#1103; &#1082;&#1072;&#1090;&#1077;&#1075;&#1086;&#1088;&#1080;&#1103; &#1085;&#1072;&#1083;&#1086;&#1075;&#1086;&#1074;&quot;
   new_tax_rate: &quot;&#1053;&#1086;&#1074;&#1072;&#1103; &#1089;&#1090;&#1072;&#1074;&#1082;&#1072; &#1085;&#1072;&#1083;&#1086;&#1075;&#1072;&quot;
+  new_taxon: &quot;New Taxon&quot;
   new_taxonomy: &quot;&#1053;&#1086;&#1074;&#1072;&#1103; &#1090;&#1072;&#1082;&#1089;&#1086;&#1085;&#1086;&#1084;&#1080;&#1103;&quot;
   new_user: &quot;&#1053;&#1086;&#1074;&#1099;&#1081; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100;&quot;
   new_variant: &quot;&#1053;&#1086;&#1074;&#1099;&#1081; &#1074;&#1072;&#1088;&#1080;&#1072;&#1085;&#1090;&quot;
@@ -420,6 +422,7 @@ ru-RU:
   send_copy_of_orders_mails_to: &#1054;&#1090;&#1089;&#1099;&#1083;&#1072;&#1090;&#1100; &#1082;&#1086;&#1087;&#1080;&#1080; &#1074;&#1089;&#1077;&#1093; &#1087;&#1080;&#1089;&#1077;&#1084; &#1089; &#1079;&#1072;&#1082;&#1072;&#1079;&#1072;&#1084;&#1080; &#1085;&#1072;
   send_mails_as: &#1054;&#1090;&#1089;&#1099;&#1083;&#1072;&#1090;&#1100; &#1087;&#1086;&#1095;&#1090;&#1091; &#1082;&#1072;&#1082;
   send_order_mails_as: &#1054;&#1090;&#1089;&#1099;&#1083;&#1072;&#1090;&#1100; &#1087;&#1086;&#1095;&#1090;&#1091; &#1089; &#1079;&#1072;&#1082;&#1072;&#1079;&#1072;&#1084;&#1080; &#1082;&#1072;&#1082;
+  server_error: &quot;The server returned an error&quot;
   ship: &#1076;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;
   ship_address: &quot;Ship Address&quot;
   shipment: &#1044;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1072;
@@ -478,6 +481,7 @@ ru-RU:
   taxon: &#1058;&#1072;&#1082;&#1089;&#1086;&#1085;
   taxonomies: &#1058;&#1072;&#1082;&#1089;&#1086;&#1085;&#1086;&#1085;&#1086;&#1084;&#1080;&#1080;
   taxonomies_setting_description: &quot;Create and manage taxonomies&quot;
+  taxonomy_tree_error: &quot;The requested change has not been accepted and the tree has been returned to its previous state, please try again.&quot;
   taxons: &#1058;&#1072;&#1082;&#1089;&#1086;&#1085;&#1099;
   thank_you_for_your_order: &quot;Thank you for your business.  Please print out a copy of this confirmation page for your records.&quot;
   this_file_language: &quot;&#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; (RU)&quot;
@@ -495,6 +499,7 @@ ru-RU:
   update: &#1048;&#1079;&#1084;&#1077;&#1085;&#1080;&#1090;&#1100;
   update_password: &quot;Update my password and log me in&quot;                    
   updated_successfully: &quot;&#1059;&#1089;&#1087;&#1077;&#1096;&#1085;&#1072; &#1080;&#1079;&#1084;&#1077;&#1085;&#1077;&#1085;&#1072;&quot;
+  updating: Updating
   use_as_shipping_address: Use as Shipping Address
   use_billing_address: Use Billing Address
   use_different_shipping_address: &quot;&#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1100; &#1076;&#1088;&#1091;&#1075;&#1086;&#1081; &#1072;&#1076;&#1088;&#1077;&#1089; &#1076;&#1086;&#1089;&#1090;&#1072;&#1074;&#1082;&#1080;&quot;</diff>
      <filename>config/locales/ru-RU.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,26 @@
 var base_url = &quot;/admin/taxonomies/&quot; + taxonomy_id + &quot;/taxons/&quot;;
+var creating = false;
+var delete_confirmed = false;
+var last_rollback = null;
 
-var handle_move = function(li, target, droppped) {
+
+var show_progress = function(){
+	$(&quot;#progress&quot;).show();
+	$(&quot;#ajax_error&quot;).hide();
+}
+
+var hide_progress = function(){
+	$(&quot;#progress&quot;).hide();
+}
+
+var handle_ajax_error = function(XMLHttpRequest, textStatus, errorThrown){
+	$.tree_rollback(last_rollback);
+	$(&quot;#progress&quot;).hide();
+	$(&quot;#ajax_error&quot;).show().html(&quot;&lt;strong&gt;&quot; + server_error + &quot;&lt;/strong&gt;&lt;br/&gt;&quot; + taxonomy_tree_error);
+};
+
+var handle_move = function(li, target, droppped, tree, rb) {
+	last_rollback = rb;
   var position = $(li).prevAll().length;
 
   var parent = -1;
@@ -16,7 +36,10 @@ var handle_move = function(li, target, droppped) {
   $.ajax({
     type: &quot;POST&quot;,
     url: base_url + li.id,
-    data: ({_method: &quot;put&quot;, &quot;taxon[parent_id]&quot;: parent.id, &quot;taxon[position]&quot;: position, authenticity_token: AUTH_TOKEN})        
+    data: ({_method: &quot;put&quot;, &quot;taxon[parent_id]&quot;: parent.id, &quot;taxon[position]&quot;: position, authenticity_token: AUTH_TOKEN}),
+		beforeSend: show_progress,
+    error: handle_ajax_error,
+		success: hide_progress
   });
         
   return true
@@ -26,14 +49,77 @@ var handle_dblclick = function(li, tree) {
   tree.rename();
 };
 
-var handle_rename = function(li) {
+var handle_create = function(parent, sib, created, tree, rb){
+	last_rollback = rb;
+	creating=true;	
+};
+
+var handle_created = function(id,result) {
+	hide_progress();
+	
+	$.tree_reference('taxonomy_tree').selected.attr('id', id);
+}
+
+var handle_rename = function(li, bl, tree, rb) {
   var name = $(li).children()[0].text;
   
-  $.ajax({
+	if (creating){
+		//actually creating new
+		var position = $(li).prevAll().length;
+		var parent = $(li).parents()[1];
+	  
+		$.ajax({
+	    type: &quot;POST&quot;,
+	    url: base_url,
+	    data: ({&quot;taxon[name]&quot;: name, &quot;taxon[parent_id]&quot;: parent.id, &quot;taxon[position]&quot;: position, authenticity_token: AUTH_TOKEN}),
+	    beforeSend: show_progress,
+			error: handle_ajax_error,
+	  	success: handle_created
+	  });	
+	
+		creating = false;
+	}else{
+		//just renaming
+		last_rollback = rb;
+		
+	  $.ajax({
+	    type: &quot;POST&quot;,
+	    url: base_url + li.id,
+	    data: ({_method: &quot;put&quot;, &quot;taxon[name]&quot;: name, authenticity_token: AUTH_TOKEN}),
+	    beforeSend: show_progress,
+			error: handle_ajax_error,
+			success: hide_progress        
+	  });
+	}
+};
+
+var handle_before_delete = function(li){
+
+	if (!delete_confirmed){
+		jConfirm('Are you sure you want to delete this taxon?', 'Confirm Taxon Deletion', function(r) {
+			if(r){
+				delete_confirmed = true;
+				$.tree_reference('taxonomy_tree').remove(li);
+			}
+		});
+	}
+	
+	return delete_confirmed;
+};
+
+var handle_delete = function(li, tree, rb){
+	last_rollback = rb;
+		
+	$.ajax({
     type: &quot;POST&quot;,
     url: base_url + li.id,
-    data: ({_method: &quot;put&quot;, &quot;taxon[name]&quot;: name, authenticity_token: AUTH_TOKEN})        
+    data: ({_method: &quot;delete&quot;, authenticity_token: AUTH_TOKEN}),
+   	beforeSend: show_progress,
+		error: handle_ajax_error,
+		success: hide_progress		
   });
+
+	delete_confirmed = false;
 };
 
 conf = { 
@@ -45,7 +131,7 @@ conf = {
             label   : &quot;Create&quot;, 
             icon    : &quot;create.png&quot;,
             visible : function (NODE, TREE_OBJ) { if(NODE.length != 1) return false; return TREE_OBJ.check(&quot;creatable&quot;, NODE); }, 
-            action  : function (NODE, TREE_OBJ) { TREE_OBJ.create(false, TREE_OBJ.get_node(NODE)); } 
+            action  : function (NODE, TREE_OBJ) { TREE_OBJ.create({ attributes : { 'rel' : 'taxon' } }, TREE_OBJ.get_node(NODE)); } 
         },
         &quot;separator&quot;,
         { 
@@ -81,23 +167,28 @@ conf = {
     ]
   },
   lang : {
-         new_node    : &quot;&lt;%= t('new_taxon') %&gt;&quot;,
-         loading     : &quot;&lt;%= t('loading') %&gt; ...&quot;
+         new_node    : new_taxon,
+         loading     : loading + &quot;...&quot;
   },
   rules : {
     droppable : [ &quot;tree-drop&quot; ],
     multiple : true,
-    deletable : &quot;all&quot;,
-    draggable : &quot;all&quot;
+    deletable : [&quot;taxon&quot;],
+    draggable : [&quot;taxon&quot;],
+	 	dragrules : [ &quot;taxon * taxon&quot;, &quot;taxon inside root&quot;, ],
   },
   callback : {
     onmove: handle_move,
     ondblclk: handle_dblclick,
-    onrename: handle_rename
+    onrename: handle_rename,
+		oncreate: handle_create,
+		beforedelete: handle_before_delete,
+		ondelete: handle_delete
   }
 };
 
 $(document).ready(function(){
+	
   tax_tree = $.tree_create();
   tax_tree.init($(&quot;#taxonomy_tree&quot;), $.extend({},conf));
   </diff>
      <filename>public/javascripts/taxonomy.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0c35872d78bc867f9f28c5464d8b32e0fce74127</id>
    </parent>
  </parents>
  <author>
    <name>Brian Quinn</name>
    <email>briandquinn@gmail.com</email>
  </author>
  <url>http://github.com/railsdog/spree/commit/a8cad91cb9e0d4478ad4ca2f9e495c1e3892d631</url>
  <id>a8cad91cb9e0d4478ad4ca2f9e495c1e3892d631</id>
  <committed-date>2009-05-22T09:50:56-07:00</committed-date>
  <authored-date>2009-05-22T09:50:56-07:00</authored-date>
  <message>Added more handlers for creating / renaming / updating taxons, with progress indicators and error handling</message>
  <tree>2515c279830e33abe3d8a9f82e0a63427fc4d087</tree>
  <committer>
    <name>Brian Quinn</name>
    <email>briandquinn@gmail.com</email>
  </committer>
</commit>
