? modules/js_test_module.zip.txt Index: misc/ahah.js =================================================================== RCS file: /cvs/drupal/drupal/misc/ahah.js,v retrieving revision 1.8 diff -u -p -r1.8 ahah.js --- misc/ahah.js 12 Feb 2008 13:52:33 -0000 1.8 +++ misc/ahah.js 4 Oct 2008 23:50:49 -0000 @@ -1,4 +1,5 @@ // $Id: ahah.js,v 1.8 2008/02/12 13:52:33 dries Exp $ +(function($) { /** * Provides AJAX-like page updating via AHAH (Asynchronous HTML and HTTP). @@ -136,7 +137,7 @@ Drupal.ahah.prototype.beforeSubmit = fun else if (this.progress.type == 'throbber') { this.progress.element = $('
 
'); if (this.progress.message) { - $('.throbber', this.progress.element).after('
' + this.progress.message + '
') + $('.throbber', this.progress.element).after('
' + this.progress.message + '
'); } $(this.element).after(this.progress.element); } @@ -223,3 +224,5 @@ Drupal.ahah.prototype.error = function ( // Re-enable the element. $(this.element).removeClass('progess-disabled').attr('disabled', false); }; + +})(jQuery); Index: misc/autocomplete.js =================================================================== RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v retrieving revision 1.23 diff -u -p -r1.23 autocomplete.js --- misc/autocomplete.js 4 Jan 2008 11:53:21 -0000 1.23 +++ misc/autocomplete.js 4 Oct 2008 23:50:50 -0000 @@ -1,4 +1,5 @@ // $Id: autocomplete.js,v 1.23 2008/01/04 11:53:21 goba Exp $ +(function($) { /** * Attaches the autocomplete behavior to all required fields @@ -296,3 +297,5 @@ Drupal.ACDB.prototype.cancel = function( if (this.timer) clearTimeout(this.timer); this.searchString = ''; }; + +})(jQuery); Index: misc/batch.js =================================================================== RCS file: /cvs/drupal/drupal/misc/batch.js,v retrieving revision 1.4 diff -u -p -r1.4 batch.js --- misc/batch.js 21 Oct 2007 18:59:01 -0000 1.4 +++ misc/batch.js 4 Oct 2008 23:50:50 -0000 @@ -1,4 +1,5 @@ // $Id: batch.js,v 1.4 2007/10/21 18:59:01 goba Exp $ +(function($) { /** * Attaches the batch behavior to progress bars. @@ -36,3 +37,5 @@ Drupal.behaviors.batch = function (conte progress.startMonitoring(uri+'&op=do', 10); }); }; + +})(jQuery); Index: misc/collapse.js =================================================================== RCS file: /cvs/drupal/drupal/misc/collapse.js,v retrieving revision 1.17 diff -u -p -r1.17 collapse.js --- misc/collapse.js 29 Jan 2008 10:58:25 -0000 1.17 +++ misc/collapse.js 4 Oct 2008 23:50:50 -0000 @@ -1,4 +1,5 @@ // $Id: collapse.js,v 1.17 2008/01/29 10:58:25 goba Exp $ +(function($) { /** * Toggle the visibility of a fieldset using smooth animations @@ -75,3 +76,5 @@ Drupal.behaviors.collapse = function (co .addClass('collapse-processed'); }); }; + +})(jQuery); Index: misc/drupal.js =================================================================== RCS file: /cvs/drupal/drupal/misc/drupal.js,v retrieving revision 1.45 diff -u -p -r1.45 drupal.js --- misc/drupal.js 25 Jun 2008 07:45:03 -0000 1.45 +++ misc/drupal.js 4 Oct 2008 23:50:50 -0000 @@ -2,6 +2,11 @@ var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} }; +// Allow other JavaScript libraries to use $. +jQuery.noConflict(); + +(function($) { + /** * Set the variable that indicates if JavaScript behaviors should be applied */ @@ -261,7 +266,7 @@ Drupal.ahahError = function(xmlhttp, uri var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status }); } return message; -} +}; // Global Killswitch on the element if (Drupal.jsEnabled) { @@ -292,3 +297,5 @@ Drupal.theme.prototype = { return '' + Drupal.checkPlain(str) + ''; } }; + +})(jQuery); Index: misc/form.js =================================================================== RCS file: /cvs/drupal/drupal/misc/form.js,v retrieving revision 1.1 diff -u -p -r1.1 form.js --- misc/form.js 12 Sep 2007 18:29:32 -0000 1.1 +++ misc/form.js 4 Oct 2008 23:50:50 -0000 @@ -1,4 +1,5 @@ // $Id: form.js,v 1.1 2007/09/12 18:29:32 goba Exp $ +(function($) { Drupal.behaviors.multiselectSelector = function() { // Automatically selects the right radio button in a multiselect control. @@ -8,3 +9,5 @@ Drupal.behaviors.multiselectSelector = f .attr('checked', true); }); }; + +})(jQuery); Index: misc/progress.js =================================================================== RCS file: /cvs/drupal/drupal/misc/progress.js,v retrieving revision 1.20 diff -u -p -r1.20 progress.js --- misc/progress.js 4 Jan 2008 11:53:21 -0000 1.20 +++ misc/progress.js 4 Oct 2008 23:50:50 -0000 @@ -1,4 +1,5 @@ // $Id: progress.js,v 1.20 2008/01/04 11:53:21 goba Exp $ +(function($) { /** * A progressbar object. Initialized with the given id. Must be inserted into @@ -105,3 +106,5 @@ Drupal.progressBar.prototype.displayErro this.errorCallback(this); } }; + +})(jQuery); Index: misc/tabledrag.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v retrieving revision 1.19 diff -u -p -r1.19 tabledrag.js --- misc/tabledrag.js 18 Sep 2008 18:37:29 -0000 1.19 +++ misc/tabledrag.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: tabledrag.js,v 1.19 2008/09/18 18:37:29 webchick Exp $ +(function($) { /** * Drag and drop table rows with field manipulation. @@ -319,7 +320,7 @@ Drupal.tableDrag.prototype.makeDraggable var groupHeight = 0; nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false); if (nextGroup) { - $(nextGroup.group).each(function () {groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight}); + $(nextGroup.group).each(function () { groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight; }); nextGroupRow = $(nextGroup.group).filter(':last').get(0); self.rowObject.swap('after', nextGroupRow); // No need to check for indentation, 0 is the only valid one. @@ -955,7 +956,7 @@ Drupal.tableDrag.prototype.row.prototype } return {'min':minIndent, 'max':maxIndent}; -} +}; /** * Indent a row within the legal bounds of the table. @@ -1019,7 +1020,7 @@ Drupal.tableDrag.prototype.row.prototype // Either add immediately if this is a flat table, or check to ensure // that this row has the same level of indentaiton. if (this.indentEnabled) { - var checkRowIndentation = $('.indentation', checkRow).length + var checkRowIndentation = $('.indentation', checkRow).length; } if (!(this.indentEnabled) || (checkRowIndentation == rowIndentation)) { @@ -1094,3 +1095,5 @@ Drupal.theme.prototype.tableDragIndentat Drupal.theme.prototype.tableDragChangedWarning = function () { return '
' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t("Changes made in this table will not be saved until the form is submitted.") + '
'; }; + +})(jQuery); Index: misc/tableheader.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tableheader.js,v retrieving revision 1.17 diff -u -p -r1.17 tableheader.js --- misc/tableheader.js 30 Sep 2008 06:02:05 -0000 1.17 +++ misc/tableheader.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: tableheader.js,v 1.17 2008/09/30 06:02:05 webchick Exp $ +(function($) { Drupal.tableHeaderDoScroll = function() { if (typeof(Drupal.tableHeaderOnScroll)=='function') { @@ -111,3 +112,5 @@ Drupal.behaviors.tableHeader = function }; $(window).resize(resize); }; + +})(jQuery); Index: misc/tableselect.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tableselect.js,v retrieving revision 1.8 diff -u -p -r1.8 tableselect.js --- misc/tableselect.js 19 Nov 2007 12:15:16 -0000 1.8 +++ misc/tableselect.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: tableselect.js,v 1.8 2007/11/19 12:15:16 goba Exp $ +(function($) { Drupal.behaviors.tableSelect = function (context) { $('form table:has(th.select-all):not(.tableSelect-processed)', context).each(Drupal.tableSelect); @@ -85,3 +86,5 @@ Drupal.tableSelectRange = function(from, } } }; + +})(jQuery); Index: misc/teaser.js =================================================================== RCS file: /cvs/drupal/drupal/misc/teaser.js,v retrieving revision 1.12 diff -u -p -r1.12 teaser.js --- misc/teaser.js 9 Jan 2008 12:10:04 -0000 1.12 +++ misc/teaser.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: teaser.js,v 1.12 2008/01/09 12:10:04 goba Exp $ +(function($) { /** * Auto-attach for teaser behavior. @@ -94,3 +95,5 @@ Drupal.behaviors.teaser = function(conte }); }; + +})(jQuery); Index: misc/textarea.js =================================================================== RCS file: /cvs/drupal/drupal/misc/textarea.js,v retrieving revision 1.23 diff -u -p -r1.23 textarea.js --- misc/textarea.js 6 Feb 2008 19:38:26 -0000 1.23 +++ misc/textarea.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: textarea.js,v 1.23 2008/02/06 19:38:26 dries Exp $ +(function($) { Drupal.behaviors.textarea = function(context) { $('textarea.resizable:not(.textarea-processed)', context).each(function() { @@ -34,3 +35,5 @@ Drupal.behaviors.textarea = function(con } }); }; + +})(jQuery); Index: misc/farbtastic/farbtastic.js =================================================================== RCS file: /cvs/drupal/drupal/misc/farbtastic/farbtastic.js,v retrieving revision 1.5 diff -u -p -r1.5 farbtastic.js --- misc/farbtastic/farbtastic.js 12 Jun 2008 19:49:10 -0000 1.5 +++ misc/farbtastic/farbtastic.js 4 Oct 2008 23:50:51 -0000 @@ -1,5 +1,6 @@ // $Id: farbtastic.js,v 1.5 2008/06/12 19:49:10 dries Exp $ // Farbtastic 1.2 +(function($) { jQuery.fn.farbtastic = function (callback) { $.farbtastic(this, callback); @@ -312,4 +313,6 @@ jQuery._farbtastic = function (container if (callback) { fb.linkTo(callback); } -}; \ No newline at end of file +}; + +})(jQuery); Index: modules/block/block.js =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.js,v retrieving revision 1.3 diff -u -p -r1.3 block.js --- modules/block/block.js 15 May 2008 21:30:02 -0000 1.3 +++ modules/block/block.js 4 Oct 2008 23:50:51 -0000 @@ -1,4 +1,5 @@ // $Id: block.js,v 1.3 2008/05/15 21:30:02 dries Exp $ +(function($) { /** * Move a block in the blocks table from one region to another via select list. @@ -93,3 +94,5 @@ Drupal.behaviors.blockDrag = function(co }); }; }; + +})(jQuery); Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.469 diff -u -p -r1.469 book.module --- modules/book/book.module 27 Sep 2008 20:37:00 -0000 1.469 +++ modules/book/book.module 4 Oct 2008 23:50:52 -0000 @@ -375,7 +375,7 @@ function _book_parent_select($book_link) function _book_add_form_elements(&$form, $node) { // Need this for AJAX. $form['#cache'] = TRUE; - drupal_add_js("if (Drupal.jsEnabled) { $(document).ready(function() { $('#edit-book-pick-book').css('display', 'none'); }); }", 'inline'); + drupal_add_js("if (Drupal.jsEnabled) { jQuery(document).ready(function() { jQuery('#edit-book-pick-book').css('display', 'none'); }); }", 'inline'); $form['book'] = array( '#type' => 'fieldset', Index: modules/color/color.js =================================================================== RCS file: /cvs/drupal/drupal/modules/color/color.js,v retrieving revision 1.7 diff -u -p -r1.7 color.js --- modules/color/color.js 19 May 2008 19:36:41 -0000 1.7 +++ modules/color/color.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: color.js,v 1.7 2008/05/19 19:36:41 dries Exp $ +(function($) { Drupal.behaviors.color = function (context) { // This behavior attaches by ID, so is only valid once on a page. @@ -249,3 +250,5 @@ Drupal.behaviors.color = function (conte // Render preview. preview(); }; + +})(jQuery); Index: modules/comment/comment.js =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.js,v retrieving revision 1.6 diff -u -p -r1.6 comment.js --- modules/comment/comment.js 14 May 2008 13:12:40 -0000 1.6 +++ modules/comment/comment.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: comment.js,v 1.6 2008/05/14 13:12:40 dries Exp $ +(function($) { Drupal.behaviors.comment = function(context) { var parts = new Array("name", "homepage", "mail"); @@ -33,3 +34,5 @@ Drupal.comment.getCookie = function(name return returnValue; }; + +})(jQuery); Index: modules/openid/openid.js =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.js,v retrieving revision 1.6 diff -u -p -r1.6 openid.js --- modules/openid/openid.js 30 Jan 2008 22:11:22 -0000 1.6 +++ modules/openid/openid.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: openid.js,v 1.6 2008/01/30 22:11:22 goba Exp $ +(function($) { Drupal.behaviors.openid = function (context) { var $loginElements = $("#edit-name-wrapper, #edit-pass-wrapper, li.openid-link"); @@ -36,3 +37,5 @@ Drupal.behaviors.openid = function (cont return false; }); }; + +})(jQuery); Index: modules/profile/profile.js =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.js,v retrieving revision 1.2 diff -u -p -r1.2 profile.js --- modules/profile/profile.js 8 Dec 2007 14:06:22 -0000 1.2 +++ modules/profile/profile.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: profile.js,v 1.2 2007/12/08 14:06:22 goba Exp $ +(function($) { /** * Add functionality to the profile drag and drop table. @@ -52,3 +53,5 @@ Drupal.behaviors.profileDrag = function( } }; }; + +})(jQuery); Index: modules/simpletest/simpletest.js =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.js,v retrieving revision 1.3 diff -u -p -r1.3 simpletest.js --- modules/simpletest/simpletest.js 14 Sep 2008 22:34:25 -0000 1.3 +++ modules/simpletest/simpletest.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: simpletest.js,v 1.3 2008/09/14 22:34:25 webchick Exp $ +(function($) { /** * Add the cool table collapsing on the testing overview page. @@ -22,14 +23,14 @@ Drupal.behaviors.simpleTestMenuCollapse } else { Drupal.settings.simpleTest[self.attr('id')].clickActive = false; - } + }; } toggleTrs(trs_formatted, (direction ? 'pop' : 'shift'), (direction ? 'fadeOut' : 'fadeIn')); Drupal.settings.simpleTest[$(this).attr('id')].imageDirection = !direction; $(this).html(Drupal.settings.simpleTest.images[(direction? 0 : 1)]); } }); -} +}; /** * Select/deselect all the inner checkboxes when the outer checkboxes are @@ -68,4 +69,6 @@ Drupal.behaviors.simpleTestSelectAll = f } $(this).append(checkbox); }); -}; \ No newline at end of file +}; + +})(jQuery); Index: modules/system/system.js =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.js,v retrieving revision 1.15 diff -u -p -r1.15 system.js --- modules/system/system.js 8 Feb 2008 02:50:19 -0000 1.15 +++ modules/system/system.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: system.js,v 1.15 2008/02/08 02:50:19 dries Exp $ +(function($) { /** * Internal function to check using Ajax if clean URLs can be enabled on the @@ -70,11 +71,11 @@ Drupal.cleanURLsInstallCheck = function( * use the same value. In the installer this is used to populate the * administrator e-mail address with the same value as the site e-mail address. */ -Drupal.behaviors.copyFieldValue = function (context) { +Drupal.behaviors.copyFieldValue = function(context) { for (var sourceId in Drupal.settings.copyFieldValue) { // Get the list of target fields. targetIds = Drupal.settings.copyFieldValue[sourceId]; - if (!$('#'+ sourceId + '.copy-field-values-processed').size(), context) { + if (!$('#'+ sourceId + '.copy-field-values-processed', context).size()) { // Add the behavior to update target fields on blur of the primary field. sourceField = $('#' + sourceId); sourceField.bind('blur', function() { @@ -111,3 +112,5 @@ Drupal.behaviors.dateTime = function(con // Trigger the event handler to show the form input if necessary. $('select.date-format', context).trigger('change'); }; + +})(jQuery); Index: modules/taxonomy/taxonomy.js =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.js,v retrieving revision 1.2 diff -u -p -r1.2 taxonomy.js --- modules/taxonomy/taxonomy.js 16 Dec 2007 10:36:53 -0000 1.2 +++ modules/taxonomy/taxonomy.js 4 Oct 2008 23:50:52 -0000 @@ -1,4 +1,5 @@ // $Id: taxonomy.js,v 1.2 2007/12/16 10:36:53 goba Exp $ +(function($) { /** * Move a block in the blocks table from one region to another via select list. @@ -34,3 +35,5 @@ Drupal.behaviors.termDrag = function(con } }; }; + +})(jQuery); Index: modules/user/user.js =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.js,v retrieving revision 1.6 diff -u -p -r1.6 user.js --- modules/user/user.js 12 Sep 2007 18:29:32 -0000 1.6 +++ modules/user/user.js 4 Oct 2008 23:50:53 -0000 @@ -1,4 +1,5 @@ // $Id: user.js,v 1.6 2007/09/12 18:29:32 goba Exp $ +(function($) { /** * Attach handlers to evaluate the strength of any password fields and to check @@ -186,3 +187,4 @@ Drupal.behaviors.userSettings = function }); }; +})(jQuery); Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.924 diff -u -p -r1.924 user.module --- modules/user/user.module 21 Sep 2008 15:08:39 -0000 1.924 +++ modules/user/user.module 4 Oct 2008 23:50:54 -0000 @@ -2388,7 +2388,7 @@ function user_register() { drupal_add_js(' // Global Killswitch if (Drupal.jsEnabled) { - $(document).ready(function() { + jQuery(document).ready(function() { Drupal.setDefaultTimezone(); }); }', 'inline');