Index: modules/block/block.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.css,v
retrieving revision 1.4
diff -u -r1.4 block.css
--- modules/block/block.css	5 Oct 2007 09:35:09 -0000	1.4
+++ modules/block/block.css	8 Oct 2007 17:25:35 -0000
@@ -13,7 +13,7 @@
   padding: 3px;
 }
 #blocks select {
-  margin-right: 18px; /* LTR */
+  margin-right: 24px; /* LTR */
 }
 #blocks select.progress-disabled {
   margin-right: 0px; /* LTR */
@@ -21,18 +21,3 @@
 #blocks tr.ahah-new-content {
   background-color: #ffd;
 }
-#blocks .progress {
-  width: 15px;
-  height: 15px;
-  margin: -2px 0;
-}
-#blocks .progress .bar {
-  width: 15px;
-  height: 15px;
-  background: transparent url(../../misc/throbber.gif) no-repeat 0px -18px;
-  border: none;
-  float: left; /* LTR */
-}
-#blocks .progress .message {
-  display: none;
-}
Index: misc/ahah.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ahah.js,v
retrieving revision 1.3
diff -u -r1.3 ahah.js
--- misc/ahah.js	5 Oct 2007 09:35:08 -0000	1.3
+++ misc/ahah.js	8 Oct 2007 17:25:34 -0000
@@ -42,6 +42,7 @@
   this.wrapper = '#'+ element_settings.wrapper;
   this.effect = element_settings.effect;
   this.method = element_settings.method;
+  this.progress = element_settings.progress;
   if (this.effect == 'none') {
     this.showEffect = 'show';
     this.hideEffect = 'hide';
@@ -100,12 +101,25 @@
  * Handler for the form redirection submission.
  */
 Drupal.ahah.prototype.beforeSubmit = function (form_values, element, options) {
-  // Insert progressbar and stretch to take the same space.
-  this.progress = new Drupal.progressBar('ahah_progress');
-  this.progress.setProgress(-1, Drupal.t('Please wait...'));
+  // Disable the element that received the change.
+  $(this.element).addClass('progress-disabled').attr('disabled', true);
 
-  var progress_element = $(this.progress.element).addClass('ahah-progress');
-  $(this.element).addClass('progress-disabled').attr('disabled', true).after(progress_element);
+  // Insert progressbar or throbber.
+  if (this.progress.type == 'bar') {
+    var progressBar = new Drupal.progressBar('ahah-progress-' + this.element.id, this.progress.update_callback, this.progress.method, this.progress.error_callback);
+    if (this.progress.message) {
+      progressBar.setProgress(-1, this.progress.message);
+    }
+    this.progress.element = $(progressBar.element).addClass('ahah-progress');
+    $(this.element).after(this.progress.element);
+  }
+  else if (this.progress.type == 'throbber') {
+    this.progress.element = $('<div class="progress ahah-progress"><div class="throbber">&nbsp;</div></div>');
+    if (this.progress.message) {
+      $('.throbber', this.progress.element).after('<div class="message">' + this.progress.message + '</div>')
+    }
+    $(this.element).after(this.progress.element);
+  }
 };
 
 /**
@@ -114,7 +128,6 @@
 Drupal.ahah.prototype.success = function (response, status) {
   var wrapper = $(this.wrapper);
   var form = $(this.element).parents('form');
-  var progress_element = $(this.progress.element);
   // Manually insert HTML into the jQuery object, using $() directly crashes
   // Safari with long string lengths. http://dev.jquery.com/ticket/1152
   var new_content = $('<div></div>').html(response.data);
@@ -125,13 +138,10 @@
   this.form_encattr ? form.attr('target', this.form_encattr) : form.removeAttr('encattr');
 
   // Remove the progress element.
-  progress_element.remove();
-  $(this.element).removeClass('progess-disabled').attr('disabled', false);
-
-  // Hide the new content before adding to page.
-  if (this.showEffect != 'show') {
-    new_content.hide();
+  if (this.progress.element) {
+    $(this.progress.element).remove();
   }
+  $(this.element).removeClass('progress-disabled').attr('disabled', false);
 
   // Add the new content to the page.
   Drupal.freezeHeight();
@@ -142,10 +152,18 @@
     wrapper[this.method](new_content);
   }
 
+  // Immediately hide the new content if we're using any effects.
+  if (this.showEffect != 'show') {
+    new_content.hide();
+  }
+
   // Determine what effect use and what content will receive the effect, then
   // show the new content. For browser compatibility, Safari is excluded from
   // using effects on table rows.
-  if ($('.ahah-new-content', new_content).size() > 0 && !($.browser.safari && $("tr.ahah-new-content", new_content).size() > 0)) {
+  if (($.browser.safari && $("tr.ahah-new-content", new_content).size() > 0)) {
+    new_content.show();
+  }
+  else if ($('.ahah-new-content', new_content).size() > 0) {
     $('.ahah-new-content', new_content).hide();
     new_content.show();
     $(".ahah-new-content", new_content)[this.showEffect](this.showSpeed);
@@ -170,9 +188,10 @@
   alert(Drupal.t('An error occurred:\n\n@error', { '@error': error }));
   // Resore the previous action and target to the form.
   element.parent('form').attr( { action: this.form_action, target: this.form_target} );
-  // Remove progressbar.
-  $(this.progress.element).remove();
-  this.progress = null;
+  // Remove the progress element.
+  if (this.progress.element) {
+    $(this.progress.element).remove();
+  }
   // Undo hide.
   $(this.wrapper).show();
   // Re-enable the element.
Index: modules/system/system-rtl.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system-rtl.css,v
retrieving revision 1.4
diff -u -r1.4 system-rtl.css
--- modules/system/system-rtl.css	5 Oct 2007 09:35:09 -0000	1.4
+++ modules/system/system-rtl.css	8 Oct 2007 17:25:35 -0000
@@ -83,6 +83,9 @@
 .progress .percentage {
   float: left;
 }
+.progress .throbber {
+  float: right;
+}
 .progess-disabled {
   float: right;
 }
Index: modules/system/system.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.css,v
retrieving revision 1.35
diff -u -r1.35 system.css
--- modules/system/system.css	5 Oct 2007 09:35:09 -0000	1.35
+++ modules/system/system.css	8 Oct 2007 17:25:35 -0000
@@ -420,7 +420,7 @@
   border: 1px solid #00375a;
   width: 5em;
   height: 1.5em;
-  margin: 0.2em 0 0 0.2em;
+  margin: 0 0.2em;
 }
 .progress .filled {
   background: #0072b9;
@@ -431,6 +431,16 @@
 .progress .percentage {
   float: right; /* LTR */
 }
+.progress .throbber {
+  width: 15px;
+  height: 15px;
+  margin: 2px;
+  background: transparent url(../../misc/throbber.gif) no-repeat 0px -18px;
+  float: left; /* LTR */
+}
+tr .throbber {
+  margin: 0 2px;
+}
 .progress-disabled {
   float: left; /* LTR */
 }
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.228
diff -u -r1.228 form.inc
--- includes/form.inc	5 Oct 2007 09:35:08 -0000	1.228
+++ includes/form.inc	8 Oct 2007 17:25:34 -0000
@@ -1616,7 +1616,6 @@
   if (isset($element['#ahah']['path']) && isset($element['#ahah']['event']) && !isset($js_added[$element['#id']])) {
     drupal_add_js('misc/jquery.form.js');
     drupal_add_js('misc/ahah.js');
-    drupal_add_js('misc/progress.js');
 
     $ahah_binding = array(
       'url'   => url($element['#ahah']['path']),
@@ -1625,8 +1624,19 @@
       'selector' => empty($element['#ahah']['selector']) ? '#'. $element['#id'] : $element['#ahah']['selector'],
       'effect'   => empty($element['#ahah']['effect']) ? 'none' : $element['#ahah']['effect'],
       'method'   => empty($element['#ahah']['method']) ? 'replace' : $element['#ahah']['method'],
+      'progress' => empty($element['#ahah']['progress']) ? array('type' => 'throbber') : $element['#ahah']['progress'],
     );
 
+    // Convert a simple #ahah[progress] type string into an array.
+    if (is_string($ahah_binding['progress'])) {
+      $ahah_binding['progress'] = array('type' => $ahah_binding['progress']);
+    }
+
+    // Add progress.js if we're doing a bar display.
+    if ($ahah_binding['progress']['type'] == 'bar') {
+      drupal_add_js('misc/progress.js');
+    }
+
     drupal_add_js(array('ahah' => array($element['#id'] => $ahah_binding)), 'setting');
 
     $js_added[$element['#id']] = TRUE;
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.183
diff -u -r1.183 upload.module
--- modules/upload/upload.module	5 Oct 2007 09:35:09 -0000	1.183
+++ modules/upload/upload.module	8 Oct 2007 17:25:35 -0000
@@ -502,6 +502,7 @@
       '#ahah' => array(
         'path' => 'upload/js',
         'wrapper' => 'attach-wrapper',
+        'progress' => array('type' => 'bar', 'message' => t('Please wait...')),
       ),
       '#submit' => array('node_form_submit_build_node'),
     );
