? .DS_Store
? content-type-js-302054-2.patch
? powered-by-preview.patch
? modules/node/content_types.js
? sites/default/files
? sites/default/settings.php
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.17
diff -u -p -r1.17 system.js
--- modules/system/system.js	20 Nov 2008 06:56:17 -0000	1.17
+++ modules/system/system.js	22 Nov 2008 04:09:15 -0000
@@ -120,3 +120,15 @@ Drupal.behaviors.dateTime = {
     $('select.date-format', context).trigger('change');
   }
 };
+
+/**
+ * Show the powered by Drupal image preview
+ */
+Drupal.behaviors.poweredByPreview = {
+  attach: function(context) {
+    $('#edit-color, #edit-size').change(function() {
+      var path = Drupal.settings.basePath + 'misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
+      $('img.powered-by-preview').attr('src', path);
+    });
+  }
+};
\ No newline at end of file
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.640
diff -u -p -r1.640 system.module
--- modules/system/system.module	21 Nov 2008 15:14:17 -0000	1.640
+++ modules/system/system.module	22 Nov 2008 04:09:15 -0000
@@ -822,6 +822,7 @@ function system_user_timezone(&$edit, &$
  * Generate a block with a promotional link to Drupal.org.
  */
 function system_block($op = 'list', $delta = '', $edit = NULL) {
+  $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
   switch ($op) {
     case 'list':
       $blocks['powered-by'] = array(
@@ -832,6 +833,7 @@ function system_block($op = 'list', $del
       );
       return $blocks;
     case 'configure':
+      drupal_add_js(drupal_get_path('module', 'system') .'/system.js');
       // Compile a list of fields to show
       $form['wrapper']['color'] = array(
         '#type' => 'select',
@@ -845,13 +847,17 @@ function system_block($op = 'list', $del
         '#default_value' => variable_get('drupal_badge_size', '80x15'),
         '#options' => array('80x15' => t('Small'), '88x31' => t('Medium'), '135x42' => t('Large')),
       );
+      $form['wrapper']['preview'] = array(
+        '#type' => 'item',
+        '#title' => 'Preview',
+        '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => 'powered-by-preview'), FALSE),
+      );
       return $form;
     case 'save':
       variable_set('drupal_badge_color', $edit['color']);
       variable_set('drupal_badge_size', $edit['size']);
       break;
     case 'view':
-      $image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
       $block['subject'] = NULL; // Don't display a title
       $block['content'] = theme('system_powered_by', $image_path);
       return $block;
