Index: jquery_update.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jquery_update/jquery_update.info,v
retrieving revision 1.4
diff -u -r1.4 jquery_update.info
--- jquery_update.info	1 Aug 2008 15:03:57 -0000	1.4
+++ jquery_update.info	7 Dec 2008 08:18:35 -0000
@@ -2,4 +2,6 @@
 name = jQuery Update
 description = Updates Drupal to use the latest version of jQuery.
 package = User interface
-core = 6.x
+core = 7.x
+files[] = jquery_update.module
+files[] = jquery_update.install
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jquery_update/README.txt,v
retrieving revision 1.2
diff -u -r1.2 README.txt
--- README.txt	21 May 2008 05:04:45 -0000	1.2
+++ README.txt	7 Dec 2008 08:18:35 -0000
@@ -34,5 +34,5 @@
 
 2. Enable the module at Administer >> Site building >> Modules.
 
-3. That's it. :) Thanks to the new theme system in Drupal 6.x+, you no longer
-   need to copy files around. Hooray!
+3. That's it. :) Thanks to the new JavaScript system in Drupal 7.x+, you no longer
+   need to mess with your theme. Hooray!
Index: jquery_update.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jquery_update/jquery_update.install,v
retrieving revision 1.3
diff -u -r1.3 jquery_update.install
--- jquery_update.install	21 Jun 2008 23:01:08 -0000	1.3
+++ jquery_update.install	7 Dec 2008 08:18:35 -0000
@@ -25,25 +25,6 @@
 }
 
 /**
- * Implementation of hook_install().
- */
-function jquery_update_install() {
-  // Set the module's weight high so that it runs after other modules.
-  db_query("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
-}
-
-/**
- * Set module's weight high so that it runs after other modules.
- */
-function jquery_update_update_6100() {
-  $ret = array();
-
-  $ret[] = update_sql("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
-
-  return $ret;
-}
-
-/**
  * Implementation of hook_uninstall().
  */
 function jquery_update_uninstall() {
Index: jquery_update.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jquery_update/jquery_update.module,v
retrieving revision 1.5
diff -u -r1.5 jquery_update.module
--- jquery_update.module	21 Jun 2008 23:01:08 -0000	1.5
+++ jquery_update.module	7 Dec 2008 08:18:35 -0000
@@ -12,73 +12,6 @@
 define('JQUERY_UPDATE_REPLACE_PATH', drupal_get_path('module', 'jquery_update') . '/replace');
 
 /**
- * Array of jQuery files to replace if jQuery is loaded.
- */
-function jquery_update_get_replacements() {
-  return array(
-    'module' => array(
-      'misc/farbtastic/farbtastic.js' => 'farbtastic.js',
-    ),
-  );
-}
-
-/**
- * Implementation of hook_theme_registry_alter().
- *
- * Make jQuery Update's page preprocess function run *after* everything else's,
- * so that a theme can't call drupal_get_js() and mess everything up.
- */
-function jquery_update_theme_registry_alter(&$theme_registry) {
-  if (isset($theme_registry['page'])) {
-    // If jquery_update's preprocess function is there already, remove it.
-    if ($key = array_search('jquery_update_preprocess_page', $theme_registry['page']['preprocess functions'])) {
-      unset($theme_registry['page']['preprocess functions'][$key]);
-    }
-    // Now tack it on at the end so it runs after everything else.
-    $theme_registry['page']['preprocess functions'][] = 'jquery_update_preprocess_page';
-  } 
-}
-
-/**
- * Implementation of moduleName_preprocess_hook().
- *
- * Replace Drupal core's jquery.js with the new one from jQuery Update module.
- */
-function jquery_update_preprocess_page(&$variables) {
-  // Only do this for pages that have JavaScript on them.
-  if (!empty($variables['scripts'])) {
-  
-    // Perform the logic if either jQuery Update's jquery.js is newer than
-    // core's, or if we're using a different compression type.
-    if (variable_get('jquery_update_replace', TRUE) ||
-        variable_get('jquery_update_compression_type', 'pack') != 'pack') {
-      // Get an array of all the JavaScript files loaded by Drupal on this page.
-      $scripts = drupal_add_js();
-
-      // Replace jquery.js first.
-      $new_jquery = array(jquery_update_jquery_path() => $scripts['core']['misc/jquery.js']);
-      $scripts['core'] = array_merge($new_jquery, $scripts['core']);
-      unset($scripts['core']['misc/jquery.js']);
-
-      // Loop through each of the required replacements.
-      foreach (jquery_update_get_replacements() as $type => $replacements) {
-        foreach ($replacements as $find => $replace) {
-          // If the file to replace is loaded on this page...
-          if (isset($scripts[$type][$find])) {
-            // Create a new entry for the replacement file, and unset the original one.
-            $replace = JQUERY_UPDATE_REPLACE_PATH . '/' . $replace;
-            $scripts[$type][$replace] = $scripts[$type][$find];
-            unset($scripts[$type][$find]);
-          }
-        }
-      } 
-
-      $variables['scripts'] = drupal_get_js('header', $scripts);
-    }
-  }
-}
-
-/**
  * Return the version of jQuery that is installed.
  *
  * This can be used by other modules' hook_requirements() to ensure that the
@@ -105,6 +38,13 @@
 }
 
 /**
+ * Implementation of hook_js_alter().
+ */
+function jquery_update_js_alter(&$javascript) {
+  $javascript['misc/jquery.js']['data'] = jquery_update_jquery_path();
+}
+
+/**
  * Implementation of hook_flush_caches().
  */
 function jquery_update_flush_caches() {
@@ -113,7 +53,7 @@
   $jquery_core_version = jquery_update_get_version('misc/jquery.js');
 
   // Set a variable according to whether core's version needs to be replaced.
-  $replace = version_compare($jquery_core_version, $jquery_update_version, '<');
+  $replace = version_compare($jquery_core_version, $jquery_update_version, '<=');
   variable_set('jquery_update_replace', $replace);
 }
 
Index: replace/farbtastic.js
===================================================================
RCS file: replace/farbtastic.js
diff -N replace/farbtastic.js
--- replace/farbtastic.js	19 Nov 2008 03:12:46 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,269 +0,0 @@
-// $Id: farbtastic.js,v 1.2 2008/11/19 03:12:46 mfer Exp $
-// Farbtastic 1.2
-
-jQuery.fn.farbtastic = function (callback) {
-  $.farbtastic(this, callback);
-  return this;
-};
-
-jQuery.farbtastic = function (container, callback) {
-  var container = $(container).get(0);
-  return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback));
-};
-
-jQuery._farbtastic = function (container, callback) {
-  // Store farbtastic object
-  var fb = this;
-
-  // Insert markup
-  $(container).html('<div class="farbtastic"><div class="color"></div><div class="wheel"></div><div class="overlay"></div><div class="h-marker marker"></div><div class="sl-marker marker"></div></div>');
-  var e = $('.farbtastic', container);
-  fb.wheel = $('.wheel', container).get(0);
-  // Dimensions
-  fb.radius = 84;
-  fb.square = 100;
-  fb.width = 194;
-
-  // Fix background PNGs in IE6
-  if (navigator.appVersion.match(/MSIE [0-6]\./)) {
-    $('*', e).each(function () {
-      if (this.currentStyle.backgroundImage != 'none') {
-        var image = this.currentStyle.backgroundImage;
-        image = this.currentStyle.backgroundImage.substring(5, image.length - 2);
-        $(this).css({
-          'backgroundImage': 'none',
-          'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
-        });
-      }
-    });
-  }
-
-  /**
-   * Link to the given element(s) or callback.
-   */
-  fb.linkTo = function (callback) {
-    // Unbind previous nodes
-    if (typeof fb.callback == 'object') {
-      $(fb.callback).unbind('keyup', fb.updateValue);
-    }
-
-    // Reset color
-    fb.color = null;
-
-    // Bind callback or elements
-    if (typeof callback == 'function') {
-      fb.callback = callback;
-    }
-    else if (typeof callback == 'object' || typeof callback == 'string') {
-      fb.callback = $(callback);
-      fb.callback.bind('keyup', fb.updateValue);
-      if (fb.callback.get(0).value) {
-        fb.setColor(fb.callback.get(0).value);
-      }
-    }
-    return this;
-  };
-  fb.updateValue = function (event) {
-    if (this.value && this.value != fb.color) {
-      fb.setColor(this.value);
-    }
-  };
-
-  /**
-   * Change color with HTML syntax #123456
-   */
-  fb.setColor = function (color) {
-    var unpack = fb.unpack(color);
-    if (fb.color != color && unpack) {
-      fb.color = color;
-      fb.rgb = unpack;
-      fb.hsl = fb.RGBToHSL(fb.rgb);
-      fb.updateDisplay();
-    }
-    return this;
-  };
-
-  /**
-   * Change color with HSL triplet [0..1, 0..1, 0..1]
-   */
-  fb.setHSL = function (hsl) {
-    fb.hsl = hsl;
-    fb.rgb = fb.HSLToRGB(hsl);
-    fb.color = fb.pack(fb.rgb);
-    fb.updateDisplay();
-    return this;
-  };
-
-  /////////////////////////////////////////////////////
-
-  /**
-   * Retrieve the coordinates of the given event relative to the center
-   * of the widget.
-   */
-  fb.widgetCoords = function (event) {
-    var offset = $(fb.wheel).offset();
-    return { x: (event.pageX - offset.left) - fb.width / 2, y: (event.pageY - offset.top) - fb.width / 2 };
-  };
-
-  /**
-   * Mousedown handler
-   */
-  fb.mousedown = function (event) {
-    // Capture mouse
-    if (!document.dragging) {
-      $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup);
-      document.dragging = true;
-    }
-
-    // Check which area is being dragged
-    var pos = fb.widgetCoords(event);
-    fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square;
-
-    // Process
-    fb.mousemove(event);
-    return false;
-  };
-
-  /**
-   * Mousemove handler
-   */
-  fb.mousemove = function (event) {
-    // Get coordinates relative to color picker center
-    var pos = fb.widgetCoords(event);
-
-    // Set new HSL parameters
-    if (fb.circleDrag) {
-      var hue = Math.atan2(pos.x, -pos.y) / 6.28;
-      if (hue < 0) hue += 1;
-      fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]);
-    }
-    else {
-      var sat = Math.max(0, Math.min(1, -(pos.x / fb.square) + .5));
-      var lum = Math.max(0, Math.min(1, -(pos.y / fb.square) + .5));
-      fb.setHSL([fb.hsl[0], sat, lum]);
-    }
-    return false;
-  };
-
-  /**
-   * Mouseup handler
-   */
-  fb.mouseup = function () {
-    // Uncapture mouse
-    $(document).unbind('mousemove', fb.mousemove);
-    $(document).unbind('mouseup', fb.mouseup);
-    document.dragging = false;
-  };
-
-  /**
-   * Update the markers and styles
-   */
-  fb.updateDisplay = function () {
-    // Markers
-    var angle = fb.hsl[0] * 6.28;
-    $('.h-marker', e).css({
-      left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px',
-      top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px'
-    });
-
-    $('.sl-marker', e).css({
-      left: Math.round(fb.square * (.5 - fb.hsl[1]) + fb.width / 2) + 'px',
-      top: Math.round(fb.square * (.5 - fb.hsl[2]) + fb.width / 2) + 'px'
-    });
-
-    // Saturation/Luminance gradient
-    $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5])));
-
-    // Linked elements or callback
-    if (typeof fb.callback == 'object') {
-      // Set background/foreground color
-      $(fb.callback).css({
-        backgroundColor: fb.color,
-        color: fb.hsl[2] > 0.5 ? '#000' : '#fff'
-      });
-
-      // Change linked value
-      $(fb.callback).each(function() {
-        if (this.value && this.value != fb.color) {
-          this.value = fb.color;
-        }
-      });
-    }
-    else if (typeof fb.callback == 'function') {
-      fb.callback.call(fb, fb.color);
-    }
-  };
-
-  /* Various color utility functions */
-  fb.pack = function (rgb) {
-    var r = Math.round(rgb[0] * 255);
-    var g = Math.round(rgb[1] * 255);
-    var b = Math.round(rgb[2] * 255);
-    return '#' + (r < 16 ? '0' : '') + r.toString(16) +
-           (g < 16 ? '0' : '') + g.toString(16) +
-           (b < 16 ? '0' : '') + b.toString(16);
-  };
-
-  fb.unpack = function (color) {
-    if (color.length == 7) {
-      return [parseInt('0x' + color.substring(1, 3)) / 255,
-        parseInt('0x' + color.substring(3, 5)) / 255,
-        parseInt('0x' + color.substring(5, 7)) / 255];
-    }
-    else if (color.length == 4) {
-      return [parseInt('0x' + color.substring(1, 2)) / 15,
-        parseInt('0x' + color.substring(2, 3)) / 15,
-        parseInt('0x' + color.substring(3, 4)) / 15];
-    }
-  };
-
-  fb.HSLToRGB = function (hsl) {
-    var m1, m2, r, g, b;
-    var h = hsl[0], s = hsl[1], l = hsl[2];
-    m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s;
-    m1 = l * 2 - m2;
-    return [this.hueToRGB(m1, m2, h+0.33333),
-        this.hueToRGB(m1, m2, h),
-        this.hueToRGB(m1, m2, h-0.33333)];
-  };
-
-  fb.hueToRGB = function (m1, m2, h) {
-    h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);
-    if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;
-    if (h * 2 < 1) return m2;
-    if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;
-    return m1;
-  };
-
-  fb.RGBToHSL = function (rgb) {
-    var min, max, delta, h, s, l;
-    var r = rgb[0], g = rgb[1], b = rgb[2];
-    min = Math.min(r, Math.min(g, b));
-    max = Math.max(r, Math.max(g, b));
-    delta = max - min;
-    l = (min + max) / 2;
-    s = 0;
-    if (l > 0 && l < 1) {
-      s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));
-    }
-    h = 0;
-    if (delta > 0) {
-      if (max == r && max != g) h += (g - b) / delta;
-      if (max == g && max != b) h += (2 + (b - r) / delta);
-      if (max == b && max != r) h += (4 + (r - g) / delta);
-      h /= 6;
-    }
-    return [h, s, l];
-  };
-
-  // Install mousedown handler (the others are set on the document on-demand)
-  $('*', e).mousedown(fb.mousedown);
-
-    // Init color
-  fb.setColor('#000000');
-
-  // Set linked elements/callback
-  if (callback) {
-    fb.linkTo(callback);
-  }
-};
\ No newline at end of file
