? jquery.patch ? jquery.pathc ? log ? replace_dollar_function.rb Index: misc/autocomplete.js =================================================================== RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v retrieving revision 1.17 diff -u -p -r1.17 autocomplete.js --- misc/autocomplete.js 9 Jan 2007 07:31:04 -0000 1.17 +++ misc/autocomplete.js 17 Apr 2007 19:44:43 -0000 @@ -5,14 +5,14 @@ */ Drupal.autocompleteAutoAttach = function () { var acdb = []; - $('input.autocomplete').each(function () { + jQuery('input.autocomplete').each(function () { var uri = this.value; if (!acdb[uri]) { acdb[uri] = new Drupal.ACDB(uri); } - var input = $('#' + this.id.substr(0, this.id.length - 13)) + var input = jQuery('#' + this.id.substr(0, this.id.length - 13)) .attr('autocomplete', 'OFF')[0]; - $(input.form).submit(Drupal.autocompleteSubmit); + jQuery(input.form).submit(Drupal.autocompleteSubmit); new Drupal.jsAC(input, acdb[uri]); }); } @@ -22,7 +22,7 @@ Drupal.autocompleteAutoAttach = function * and closes the suggestions popup when doing so. */ Drupal.autocompleteSubmit = function () { - return $('#autocomplete').each(function () { + return jQuery('#autocomplete').each(function () { this.owner.hidePopup(); }).size() == 0; } @@ -35,7 +35,7 @@ Drupal.jsAC = function (input, db) { this.input = input; this.db = db; - $(this.input) + jQuery(this.input) .keydown(function (event) { return ac.onkeydown(this, event); }) .keyup(function (event) { ac.onkeyup(this, event) }) .blur(function () { ac.hidePopup(); ac.db.cancel(); }); @@ -113,7 +113,7 @@ Drupal.jsAC.prototype.selectDown = funct this.highlight(this.selected.nextSibling); } else { - var lis = $('li', this.popup); + var lis = jQuery('li', this.popup); if (lis.size() > 0) { this.highlight(lis.get(0)); } @@ -134,9 +134,9 @@ Drupal.jsAC.prototype.selectUp = functio */ Drupal.jsAC.prototype.highlight = function (node) { if (this.selected) { - $(this.selected).removeClass('selected'); + jQuery(this.selected).removeClass('selected'); } - $(node).addClass('selected'); + jQuery(node).addClass('selected'); this.selected = node; } @@ -144,7 +144,7 @@ Drupal.jsAC.prototype.highlight = functi * Unhighlights a suggestion */ Drupal.jsAC.prototype.unhighlight = function (node) { - $(node).removeClass('selected'); + jQuery(node).removeClass('selected'); this.selected = false; } @@ -160,7 +160,7 @@ Drupal.jsAC.prototype.hidePopup = functi var popup = this.popup; if (popup) { this.popup = null; - $(popup).fadeOut('fast', function() { $(popup).remove(); }); + jQuery(popup).fadeOut('fast', function() { jQuery(popup).remove(); }); } this.selected = false; } @@ -171,18 +171,18 @@ Drupal.jsAC.prototype.hidePopup = functi Drupal.jsAC.prototype.populatePopup = function () { // Show popup if (this.popup) { - $(this.popup).remove(); + jQuery(this.popup).remove(); } this.selected = false; this.popup = document.createElement('div'); this.popup.id = 'autocomplete'; this.popup.owner = this; - $(this.popup).css({ + jQuery(this.popup).css({ marginTop: this.input.offsetHeight +'px', width: (this.input.offsetWidth - 4) +'px', display: 'none' }); - $(this.input).before(this.popup); + jQuery(this.input).before(this.popup); // Do search this.db.owner = this; @@ -203,22 +203,22 @@ Drupal.jsAC.prototype.found = function ( var ac = this; for (key in matches) { var li = document.createElement('li'); - $(li) + jQuery(li) .html('
'+ matches[key] +'
') .mousedown(function () { ac.select(this); }) .mouseover(function () { ac.highlight(this); }) .mouseout(function () { ac.unhighlight(this); }); li.autocompleteValue = key; - $(ul).append(li); + jQuery(ul).append(li); } // Show popup with matches, if any if (this.popup) { if (ul.childNodes.length > 0) { - $(this.popup).empty().append(ul).show(); + jQuery(this.popup).empty().append(ul).show(); } else { - $(this.popup).css({visibility: 'hidden'}); + jQuery(this.popup).css({visibility: 'hidden'}); this.hidePopup(); } } @@ -227,12 +227,12 @@ Drupal.jsAC.prototype.found = function ( Drupal.jsAC.prototype.setStatus = function (status) { switch (status) { case 'begin': - $(this.input).addClass('throbbing'); + jQuery(this.input).addClass('throbbing'); break; case 'cancel': case 'error': case 'found': - $(this.input).removeClass('throbbing'); + jQuery(this.input).removeClass('throbbing'); break; } } @@ -299,5 +299,5 @@ Drupal.ACDB.prototype.cancel = function( // Global Killswitch if (Drupal.jsEnabled) { - $(document).ready(Drupal.autocompleteAutoAttach); + jQuery(document).ready(Drupal.autocompleteAutoAttach); } Index: misc/collapse.js =================================================================== RCS file: /cvs/drupal/drupal/misc/collapse.js,v retrieving revision 1.11 diff -u -p -r1.11 collapse.js --- misc/collapse.js 28 Feb 2007 20:29:38 -0000 1.11 +++ misc/collapse.js 17 Apr 2007 19:44:43 -0000 @@ -4,13 +4,13 @@ * Toggle the visibility of a fieldset using smooth animations */ Drupal.toggleFieldset = function(fieldset) { - if ($(fieldset).is('.collapsed')) { - var content = $('> div', fieldset).hide(); - $(fieldset).removeClass('collapsed'); + if (jQuery(fieldset).is('.collapsed')) { + var content = jQuery('> div', fieldset).hide(); + jQuery(fieldset).removeClass('collapsed'); content.slideDown(300, function() { // Make sure we open to height auto - $(this).css('height', 'auto'); + jQuery(this).css('height', 'auto'); Drupal.collapseScrollIntoView(this.parentNode); this.parentNode.animating = false; }); @@ -20,8 +20,8 @@ Drupal.toggleFieldset = function(fieldse } } else { - var content = $('> div', fieldset).slideUp('medium', function() { - $(this.parentNode).addClass('collapsed'); + var content = jQuery('> div', fieldset).slideUp('medium', function() { + jQuery(this.parentNode).addClass('collapsed'); this.parentNode.animating = false; }); } @@ -31,8 +31,8 @@ Drupal.toggleFieldset = function(fieldse * Scroll a given fieldset into view as much as possible. */ Drupal.collapseScrollIntoView = function (node) { - var h = self.innerHeight || document.documentElement.clientHeight || $('body')[0].clientHeight || 0; - var offset = self.pageYOffset || document.documentElement.scrollTop || $('body')[0].scrollTop || 0; + var h = self.innerHeight || document.documentElement.clientHeight || jQuery('body')[0].clientHeight || 0; + var offset = self.pageYOffset || document.documentElement.scrollTop || jQuery('body')[0].scrollTop || 0; var pos = Drupal.absolutePosition(node); var fudge = 55; if (pos.y + node.offsetHeight + fudge > h + offset) { @@ -46,26 +46,26 @@ Drupal.collapseScrollIntoView = function // Global Killswitch if (Drupal.jsEnabled) { - $(document).ready(function() { - $('fieldset.collapsible > legend').each(function() { - var fieldset = $(this.parentNode); + jQuery(document).ready(function() { + jQuery('fieldset.collapsible > legend').each(function() { + var fieldset = jQuery(this.parentNode); // Expand if there are errors inside - if ($('input.error, textarea.error, select.error', fieldset).size() > 0) { + if (jQuery('input.error, textarea.error, select.error', fieldset).size() > 0) { fieldset.removeClass('collapsed'); } // Turn the legend into a clickable link and wrap the contents of the fieldset // in a div for easier animation var text = this.innerHTML; - $(this).empty().append($(''+ text +'').click(function() { - var fieldset = $(this).parents('fieldset:first')[0]; + jQuery(this).empty().append(jQuery(''+ text +'').click(function() { + var fieldset = jQuery(this).parents('fieldset:first')[0]; // Don't animate multiple times if (!fieldset.animating) { fieldset.animating = true; Drupal.toggleFieldset(fieldset); } return false; - })).after($('
').append(fieldset.children(':not(legend)'))); + })).after(jQuery('
').append(fieldset.children(':not(legend)'))); }); }); } Index: misc/drupal.js =================================================================== RCS file: /cvs/drupal/drupal/misc/drupal.js,v retrieving revision 1.30 diff -u -p -r1.30 drupal.js --- misc/drupal.js 9 Apr 2007 13:58:02 -0000 1.30 +++ misc/drupal.js 17 Apr 2007 19:44:43 -0000 @@ -46,7 +46,7 @@ Drupal.redirectFormButton = function (ur // Set iframe handler for later window.iframeHandler = function () { - var iframe = $('#redirect-target').get(0); + var iframe = jQuery('#redirect-target').get(0); // Restore form submission button.form.action = action; button.form.target = target; @@ -135,7 +135,7 @@ Drupal.parseJson = function (data) { * Create an invisible iframe for form submissions. */ Drupal.createIframe = function () { - if ($('#redirect-holder').size()) { + if (jQuery('#redirect-holder').size()) { return; } // Note: some browsers require the literal name/id attributes on the tag, @@ -143,9 +143,9 @@ Drupal.createIframe = function () { window.iframeHandler = function () {}; var div = document.createElement('div'); div.id = 'redirect-holder'; - $(div).html(''); + jQuery(div).html(''); var iframe = div.firstChild; - $(iframe) + jQuery(iframe) .attr({ name: 'redirect-target', id: 'redirect-target' @@ -156,14 +156,14 @@ Drupal.createIframe = function () { width: '1px', visibility: 'hidden' }); - $('body').append(div); + jQuery('body').append(div); }; /** * Delete the invisible iframe */ Drupal.deleteIframe = function () { - $('#redirect-holder').remove(); + jQuery('#redirect-holder').remove(); }; /** @@ -173,21 +173,21 @@ Drupal.deleteIframe = function () { Drupal.freezeHeight = function () { Drupal.unfreezeHeight(); var div = document.createElement('div'); - $(div).css({ + jQuery(div).css({ position: 'absolute', top: '0px', left: '0px', width: '1px', - height: $('body').css('height') + height: jQuery('body').css('height') }).attr('id', 'freeze-height'); - $('body').append(div); + jQuery('body').append(div); }; /** * Unfreeze the body height */ Drupal.unfreezeHeight = function () { - $('#freeze-height').remove(); + jQuery('#freeze-height').remove(); }; /** Index: misc/progress.js =================================================================== RCS file: /cvs/drupal/drupal/misc/progress.js,v retrieving revision 1.14 diff -u -p -r1.14 progress.js --- misc/progress.js 14 Dec 2006 14:21:36 -0000 1.14 +++ misc/progress.js 17 Apr 2007 19:44:44 -0000 @@ -20,7 +20,7 @@ Drupal.progressBar = function (id, updat this.element = document.createElement('div'); this.element.id = id; this.element.className = 'progress'; - $(this.element).html('
'+ + jQuery(this.element).html('
'+ '
 
'+ '
'); } @@ -30,10 +30,10 @@ Drupal.progressBar = function (id, updat */ Drupal.progressBar.prototype.setProgress = function (percentage, message) { if (percentage >= 0 && percentage <= 100) { - $('div.filled', this.element).css('width', percentage +'%'); - $('div.percentage', this.element).html(percentage +'%'); + jQuery('div.filled', this.element).css('width', percentage +'%'); + jQuery('div.percentage', this.element).html(percentage +'%'); } - $('div.message', this.element).html(message); + jQuery('div.message', this.element).html(message); if (this.updateCallback) { this.updateCallback(percentage, message, this); } @@ -100,7 +100,7 @@ Drupal.progressBar.prototype.displayErro error.className = 'error'; error.innerHTML = string; - $(this.element).before(error).hide(); + jQuery(this.element).before(error).hide(); if (this.errorCallback) { this.errorCallback(this); Index: misc/tableheader.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tableheader.js,v retrieving revision 1.2 diff -u -p -r1.2 tableheader.js --- misc/tableheader.js 7 Apr 2007 03:03:40 -0000 1.2 +++ misc/tableheader.js 17 Apr 2007 19:44:44 -0000 @@ -6,34 +6,34 @@ if (Drupal.jsEnabled) { var cells = []; // Attach to all headers. - $(document).ready(function() { + jQuery(document).ready(function() { var z = 0; - $('table thead').each(function () { + jQuery('table thead').each(function () { // Find table height. - var table = $(this).parent('table')[0]; - var height = $(table).addClass('sticky-table').height(); + var table = jQuery(this).parent('table')[0]; + var height = jQuery(table).addClass('sticky-table').height(); var i = 0; // Find all header cells. - $('th', this).each(function () { + jQuery('th', this).each(function () { // Ensure each cell has an element in it. - var html = $(this).html(); + var html = jQuery(this).html(); if (html == ' ') { html = ' '; } - if ($(this).children().size() == 0) { + if (jQuery(this).children().size() == 0) { html = ''+ html +''; } // Clone and wrap cell contents in sticky wrapper that overlaps the cell's padding. - $('').prependTo(this); - var div = $('div.sticky-header', this).css({ - 'marginLeft': '-'+ $(this).css('paddingLeft'), - 'marginRight': '-'+ $(this).css('paddingRight'), - 'paddingLeft': $(this).css('paddingLeft'), - 'paddingTop': $(this).css('paddingTop'), - 'paddingBottom': $(this).css('paddingBottom'), + jQuery('').prependTo(this); + var div = jQuery('div.sticky-header', this).css({ + 'marginLeft': '-'+ jQuery(this).css('paddingLeft'), + 'marginRight': '-'+ jQuery(this).css('paddingRight'), + 'paddingLeft': jQuery(this).css('paddingLeft'), + 'paddingTop': jQuery(this).css('paddingTop'), + 'paddingBottom': jQuery(this).css('paddingBottom'), 'z-index': ++z })[0]; cells.push(div); @@ -45,8 +45,8 @@ if (Drupal.jsEnabled) { ref = table; div.wide = true; } - $(div).css('width', parseInt($(ref).width()) - - parseInt($(div).css('paddingLeft')) +'px'); + jQuery(div).css('width', parseInt(jQuery(ref).width()) + - parseInt(jQuery(div).css('paddingLeft')) +'px'); // Get position and store. div.cell = this; @@ -59,20 +59,20 @@ if (Drupal.jsEnabled) { // Track scrolling. var scroll = function() { - $(cells).each(function () { + jQuery(cells).each(function () { // Fetch scrolling position. var scroll = document.documentElement.scrollTop || document.body.scrollTop; var offset = scroll - this.stickyPosition - 4; if (offset > 0 && offset < this.stickyMax - 100) { - $(this).css('visibility', 'visible'); + jQuery(this).css('visibility', 'visible'); } else { - $(this).css('visibility', 'hidden'); + jQuery(this).css('visibility', 'hidden'); } }); }; - $(window).scroll(scroll); - $(document.documentElement).scroll(scroll); + jQuery(window).scroll(scroll); + jQuery(document.documentElement).scroll(scroll); // Track resizing. var time = null; @@ -84,11 +84,11 @@ if (Drupal.jsEnabled) { time = setTimeout(function () { // Precalculate table heights - $('table.sticky-table').each(function () { - this.height = $(this).height(); + jQuery('table.sticky-table').each(function () { + this.height = jQuery(this).height(); }) - $(cells).each(function () { + jQuery(cells).each(function () { // Get position. this.stickyPosition = Drupal.absolutePosition(this.cell).y; this.stickyMax = this.table.height; @@ -99,13 +99,13 @@ if (Drupal.jsEnabled) { // Resize the first cell to fit the table. ref = this.table; } - $(this).css('width', parseInt($(ref).width()) - - parseInt($(this).css('paddingLeft')) +'px'); + jQuery(this).css('width', parseInt(jQuery(ref).width()) + - parseInt(jQuery(this).css('paddingLeft')) +'px'); }); // Reset timer time = null; }, 250); }; - $(window).resize(resize); + jQuery(window).resize(resize); } Index: misc/tableselect.js =================================================================== RCS file: /cvs/drupal/drupal/misc/tableselect.js,v retrieving revision 1.1 diff -u -p -r1.1 tableselect.js --- misc/tableselect.js 21 Nov 2006 08:16:39 -0000 1.1 +++ misc/tableselect.js 17 Apr 2007 19:44:44 -0000 @@ -5,35 +5,35 @@ Drupal.tableSelect = function() { var table = this, selectAll, checkboxes, lastChecked, settings = Drupal.settings.tableSelect; // Store the select all checkbox in a variable as we need it quite often. - selectAll = $('').attr('title', settings.selectAll).click(function() { + selectAll = jQuery('').attr('title', settings.selectAll).click(function() { // Loop through all checkboxes and set their state to the select all checkbox' state. checkboxes.each(function() { this.checked = selectAll[0].checked; // Either add or remove the selected class based on the state of the check all checkbox. - $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); + jQuery(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); }); // Update the title and the state of the check all box. selectAll.attr('title', selectAll[0].checked ? settings.selectNone : settings.selectAll); }); // Find all with class select-all, and insert the check all checkbox. - $('th.select-all', table).prepend(selectAll); + jQuery('th.select-all', table).prepend(selectAll); // For each of the checkboxes within the table. - checkboxes = $('td input:checkbox', table).click(function(e) { + checkboxes = jQuery('td input:checkbox', table).click(function(e) { // Either add or remove the selected class based on the state of the check all checkbox. - $(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); + jQuery(this).parents('tr:first')[ this.checked ? 'addClass' : 'removeClass' ]('selected'); // If this is a shift click, we need to highlight everything in the range. // Also make sure that we are actually checking checkboxes over a range and // that a checkbox has been checked or unchecked before. if (e.shiftKey && lastChecked && lastChecked != e.target) { // We use the checkbox's parent TR to do our range searching. - Drupal.tableSelectRange($(e.target).parents('tr')[0], $(lastChecked).parents('tr')[0], e.target.checked); + Drupal.tableSelectRange(jQuery(e.target).parents('tr')[0], jQuery(lastChecked).parents('tr')[0], e.target.checked); } // If all checkboxes are checked, make sure the select-all one is checked too, otherwise keep unchecked. - selectAll[0].checked = (checkboxes.length == $(checkboxes).filter(':checked').length); + selectAll[0].checked = (checkboxes.length == jQuery(checkboxes).filter(':checked').length); // Set the title to the current action. selectAll.attr('title', selectAll[0].checked ? settings.selectNone : settings.selectAll); @@ -52,8 +52,8 @@ Drupal.tableSelectRange = function(from, if (i.nodeType != 1) continue; // Either add or remove the selected class based on the state of the target checkbox. - $(i)[ state ? 'addClass' : 'removeClass' ]('selected'); - $('input:checkbox', i).each(function() { + jQuery(i)[ state ? 'addClass' : 'removeClass' ]('selected'); + jQuery('input:checkbox', i).each(function() { this.checked = state; }); @@ -61,7 +61,7 @@ Drupal.tableSelectRange = function(from, // If we are at the end of the range, stop. if (i == to) break; } - // A faster alternative to doing $(i).filter(to).length. + // A faster alternative to doing jQuery(i).filter(to).length. else if (jQuery.filter(to, [i]).r.length) break; } @@ -69,7 +69,7 @@ Drupal.tableSelectRange = function(from, // Global Killswitch if (Drupal.jsEnabled) { - $(document).ready(function() { - $('form table[th.select-all]').each(Drupal.tableSelect); + jQuery(document).ready(function() { + jQuery('form table[th.select-all]').each(Drupal.tableSelect); }); } Index: misc/textarea.js =================================================================== RCS file: /cvs/drupal/drupal/misc/textarea.js,v retrieving revision 1.14 diff -u -p -r1.14 textarea.js --- misc/textarea.js 10 Apr 2007 11:24:16 -0000 1.14 +++ misc/textarea.js 17 Apr 2007 19:44:44 -0000 @@ -1,27 +1,27 @@ // $Id: textarea.js,v 1.14 2007/04/10 11:24:16 dries Exp $ Drupal.textareaAttach = function() { - $('textarea.resizable:not(.processed)').each(function() { - var textarea = $(this).addClass('processed'), staticOffset = null; + jQuery('textarea.resizable:not(.processed)').each(function() { + var textarea = jQuery(this).addClass('processed'), staticOffset = null; - // When wrapping the text area, work around an IE margin bug. See: - // http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout - $(this).wrap('
') - .parent().append($('
').mousedown(startDrag)); + // When wrapping the text area, work around an IE margin bug. See: + // http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout + jQuery(this).wrap('
') + .parent().append(jQuery('
').mousedown(startDrag)); // Inherit visibility - if ($(this).is(':hidden')) { - $(this).parent().hide(); - $(this).show(); + if (jQuery(this).is(':hidden')) { + jQuery(this).parent().hide(); + jQuery(this).show(); } - var grippie = $('div.grippie', $(this).parent())[0]; - grippie.style.marginRight = (grippie.offsetWidth - $(this)[0].offsetWidth) +'px'; + var grippie = jQuery('div.grippie', jQuery(this).parent())[0]; + grippie.style.marginRight = (grippie.offsetWidth - jQuery(this)[0].offsetWidth) +'px'; function startDrag(e) { staticOffset = textarea.height() - Drupal.mousePosition(e).y; textarea.css('opacity', 0.25); - $(document).mousemove(performDrag).mouseup(endDrag); + jQuery(document).mousemove(performDrag).mouseup(endDrag); return false; } @@ -31,13 +31,13 @@ Drupal.textareaAttach = function() { } function endDrag(e) { - $(document).unbind("mousemove"); - $(document).unbind("mouseup"); + jQuery(document).unbind("mousemove"); + jQuery(document).unbind("mouseup"); textarea.css('opacity', 1); } }); } if (Drupal.jsEnabled) { - $(document).ready(Drupal.textareaAttach); + jQuery(document).ready(Drupal.textareaAttach); } Index: misc/update.js =================================================================== RCS file: /cvs/drupal/drupal/misc/update.js,v retrieving revision 1.10 diff -u -p -r1.10 update.js --- misc/update.js 27 Dec 2006 14:11:45 -0000 1.10 +++ misc/update.js 17 Apr 2007 19:44:44 -0000 @@ -1,9 +1,9 @@ // $Id: update.js,v 1.10 2006/12/27 14:11:45 unconed Exp $ if (Drupal.jsEnabled) { - $(document).ready(function() { - $('#edit-has-js').each(function() { this.value = 1; }); - $('#progress').each(function () { + jQuery(document).ready(function() { + jQuery('#edit-has-js').each(function() { this.value = 1; }); + jQuery('#progress').each(function () { var holder = this; // Success: redirect to the summary. @@ -18,14 +18,14 @@ if (Drupal.jsEnabled) { var errorCallback = function (pb) { var div = document.createElement('p'); div.className = 'error'; - $(div).html('An unrecoverable error has occured. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the update summary'); - $(holder).prepend(div); - $('#wait').hide(); + jQuery(div).html('An unrecoverable error has occured. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the update summary'); + jQuery(holder).prepend(div); + jQuery('#wait').hide(); } var progress = new Drupal.progressBar('updateprogress', updateCallback, "POST", errorCallback); progress.setProgress(-1, 'Starting updates'); - $(holder).append(progress.element); + jQuery(holder).append(progress.element); progress.startMonitoring('update.php?op=do_update', 0); }); }); Index: misc/upload.js =================================================================== RCS file: /cvs/drupal/drupal/misc/upload.js,v retrieving revision 1.11 diff -u -p -r1.11 upload.js --- misc/upload.js 31 Aug 2006 23:31:25 -0000 1.11 +++ misc/upload.js 17 Apr 2007 19:44:44 -0000 @@ -4,7 +4,7 @@ * Attaches the upload behaviour to the upload form. */ Drupal.uploadAutoAttach = function() { - $('input.upload').each(function () { + jQuery('input.upload').each(function () { var uri = this.value; // Extract the base name from the id (edit-attach-url -> attach). var base = this.id.substring(5, this.id.length - 4); @@ -24,7 +24,7 @@ Drupal.jsUpload = function(uri, button, this.button = '#'+ button; this.wrapper = '#'+ wrapper; this.hide = '#'+ hide; - Drupal.redirectFormButton(uri, $(this.button).get(0), this); + Drupal.redirectFormButton(uri, jQuery(this.button).get(0), this); } /** @@ -37,18 +37,18 @@ Drupal.jsUpload.prototype.onsubmit = fun var hide = this.hide; var el = this.progress.element; - var offset = $(hide).get(0).offsetHeight; - $(el).css({ + var offset = jQuery(hide).get(0).offsetHeight; + jQuery(el).css({ width: '28em', height: offset +'px', paddingTop: '10px', display: 'none' }); - $(hide).css('position', 'absolute'); + jQuery(hide).css('position', 'absolute'); - $(hide).after(el); - $(el).fadeIn('slow'); - $(hide).fadeOut('slow'); + jQuery(hide).after(el); + jQuery(el).fadeIn('slow'); + jQuery(hide).fadeOut('slow'); } /** @@ -57,38 +57,38 @@ Drupal.jsUpload.prototype.onsubmit = fun Drupal.jsUpload.prototype.oncomplete = function (data) { // Remove old form Drupal.freezeHeight(); // Avoid unnecessary scrolling - $(this.wrapper).html(''); + jQuery(this.wrapper).html(''); // Place HTML into temporary div var div = document.createElement('div'); - $(div).html(data); + jQuery(div).html(data); // If uploading the first attachment fade in everything - if ($('tr', div).size() == 2) { + if (jQuery('tr', div).size() == 2) { // Replace form and re-attach behaviour - $(div).hide(); - $(this.wrapper).append(div); - $(div).fadeIn('slow'); + jQuery(div).hide(); + jQuery(this.wrapper).append(div); + jQuery(div).fadeIn('slow'); Drupal.uploadAutoAttach(); } // Else fade in only the last table row else { // Hide form and last table row - $('table tr:last-of-type td', div).hide(); + jQuery('table tr:last-of-type td', div).hide(); // Note: workaround because jQuery's #id selector does not work outside of 'document' - // Should be: $(this.hide, div).hide(); + // Should be: jQuery(this.hide, div).hide(); var hide = this.hide; - $('div', div).each(function() { + jQuery('div', div).each(function() { if (('#'+ this.id) == hide) { this.style.display = 'none'; } }); // Replace form, fade in items and re-attach behaviour - $(this.wrapper).append(div); - $('table tr:last-of-type td', div).fadeIn('slow'); - $(this.hide, div).fadeIn('slow'); + jQuery(this.wrapper).append(div); + jQuery('table tr:last-of-type td', div).fadeIn('slow'); + jQuery(this.hide, div).fadeIn('slow'); Drupal.uploadAutoAttach(); } Drupal.unfreezeHeight(); @@ -100,10 +100,10 @@ Drupal.jsUpload.prototype.oncomplete = f Drupal.jsUpload.prototype.onerror = function (error) { alert('An error occurred:\n\n'+ error); // Remove progressbar - $(this.progress.element).remove(); + jQuery(this.progress.element).remove(); this.progress = null; // Undo hide - $(this.hide).css({ + jQuery(this.hide).css({ position: 'static', left: '0px' }); @@ -112,5 +112,5 @@ Drupal.jsUpload.prototype.onerror = func // Global killswitch if (Drupal.jsEnabled) { - $(document).ready(Drupal.uploadAutoAttach); + jQuery(document).ready(Drupal.uploadAutoAttach); } Index: misc/farbtastic/farbtastic.js =================================================================== RCS file: /cvs/drupal/drupal/misc/farbtastic/farbtastic.js,v retrieving revision 1.3 diff -u -p -r1.3 farbtastic.js --- misc/farbtastic/farbtastic.js 10 Jan 2007 07:03:48 -0000 1.3 +++ misc/farbtastic/farbtastic.js 17 Apr 2007 19:44:45 -0000 @@ -7,7 +7,7 @@ jQuery.fn.farbtastic = function (callbac }; jQuery.farbtastic = function (container, callback) { - var container = $(container).get(0); + var container = jQuery(container).get(0); return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); } @@ -16,9 +16,9 @@ jQuery._farbtastic = function (container var fb = this; // Insert markup - $(container).html('
'); - var e = $('.farbtastic', container); - fb.wheel = $('.wheel', container).get(0); + jQuery(container).html('
'); + var e = jQuery('.farbtastic', container); + fb.wheel = jQuery('.wheel', container).get(0); // Dimensions fb.radius = 84; fb.square = 100; @@ -26,11 +26,11 @@ jQuery._farbtastic = function (container // Fix background PNGs in IE6 if (navigator.appVersion.match(/MSIE [0-6]\./)) { - $('*', e).each(function () { + jQuery('*', e).each(function () { if (this.currentStyle.backgroundImage != 'none') { var image = this.currentStyle.backgroundImage; image = this.currentStyle.backgroundImage.substring(5, image.length - 2); - $(this).css({ + jQuery(this).css({ 'backgroundImage': 'none', 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" }); @@ -44,7 +44,7 @@ jQuery._farbtastic = function (container fb.linkTo = function (callback) { // Unbind previous nodes if (typeof fb.callback == 'object') { - $(fb.callback).unbind('keyup', fb.updateValue); + jQuery(fb.callback).unbind('keyup', fb.updateValue); } // Reset color @@ -55,7 +55,7 @@ jQuery._farbtastic = function (container fb.callback = callback; } else if (typeof callback == 'object' || typeof callback == 'string') { - fb.callback = $(callback); + fb.callback = jQuery(callback); fb.callback.bind('keyup', fb.updateValue); if (fb.callback.get(0).value) { fb.setColor(fb.callback.get(0).value); @@ -144,8 +144,8 @@ jQuery._farbtastic = function (container else { // Use absolute coordinates var pos = fb.absolutePosition(reference); - x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; - y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; + x = (event.pageX || 0*(event.clientX + jQuery('html').get(0).scrollLeft)) - pos.x; + y = (event.pageY || 0*(event.clientY + jQuery('html').get(0).scrollTop)) - pos.y; } // Subtract distance to middle return { x: x - fb.width / 2, y: y - fb.width / 2 }; @@ -157,7 +157,7 @@ jQuery._farbtastic = function (container fb.mousedown = function (event) { // Capture mouse if (!document.dragging) { - $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); + jQuery(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); document.dragging = true; } @@ -196,8 +196,8 @@ jQuery._farbtastic = function (container */ fb.mouseup = function () { // Uncapture mouse - $(document).unbind('mousemove', fb.mousemove); - $(document).unbind('mouseup', fb.mouseup); + jQuery(document).unbind('mousemove', fb.mousemove); + jQuery(document).unbind('mouseup', fb.mouseup); document.dragging = false; } @@ -207,29 +207,29 @@ jQuery._farbtastic = function (container fb.updateDisplay = function () { // Markers var angle = fb.hsl[0] * 6.28; - $('.h-marker', e).css({ + jQuery('.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({ + jQuery('.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]))); + jQuery('.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({ + jQuery(fb.callback).css({ backgroundColor: fb.color, color: fb.hsl[2] > 0.5 ? '#000' : '#fff' }); // Change linked value - $(fb.callback).each(function() { + jQuery(fb.callback).each(function() { if (this.value && this.value != fb.color) { this.value = fb.color; } @@ -317,7 +317,7 @@ jQuery._farbtastic = function (container } // Install mousedown handler (the others are set on the document on-demand) - $('*', e).mousedown(fb.mousedown); + jQuery('*', e).mousedown(fb.mousedown); // Init color fb.setColor('#000000'); Index: modules/color/color.js =================================================================== RCS file: /cvs/drupal/drupal/modules/color/color.js,v retrieving revision 1.2 diff -u -p -r1.2 color.js --- modules/color/color.js 13 Apr 2007 07:33:23 -0000 1.2 +++ modules/color/color.js 17 Apr 2007 19:44:45 -0000 @@ -1,16 +1,16 @@ // $Id: color.js,v 1.2 2007/04/13 07:33:23 dries Exp $ if (Drupal.jsEnabled) { - $(document).ready(function () { - var form = $('#color_scheme_form .color-form'); + jQuery(document).ready(function () { + var form = jQuery('#color_scheme_form .color-form'); var inputs = []; var hooks = []; var locks = []; var focused = null; // Add Farbtastic - $(form).prepend('
'); - var farb = $.farbtastic('#placeholder'); + jQuery(form).prepend('
'); + var farb = jQuery.farbtastic('#placeholder'); // Decode reference colors to HSL var reference = Drupal.settings.color.reference; @@ -19,8 +19,8 @@ if (Drupal.jsEnabled) { } // Build preview - $('#preview').append('
'); - var gradient = $('#preview #gradient'); + jQuery('#preview').append('
'); + var gradient = jQuery('#preview #gradient'); var h = parseInt(gradient.css('height')) / 10; for (i = 0; i < h; ++i) { gradient.append('
'); @@ -28,14 +28,14 @@ if (Drupal.jsEnabled) { // Fix preview background in IE6 if (navigator.appVersion.match(/MSIE [0-6]\./)) { - var e = $('#preview #img')[0]; + var e = jQuery('#preview #img')[0]; var image = e.currentStyle.backgroundImage; e.style.backgroundImage = 'none'; e.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image.substring(5, image.length - 2) + "')"; } // Set up colorscheme selector - $('#edit-scheme', form).change(function () { + jQuery('#edit-scheme', form).change(function () { var colors = this.options[this.selectedIndex].value; if (colors != '') { colors = colors.split(','); @@ -51,11 +51,11 @@ if (Drupal.jsEnabled) { */ function preview() { // Solid background - $('#preview', form).css('backgroundColor', inputs[0].value); + jQuery('#preview', form).css('backgroundColor', inputs[0].value); // Text preview - $('#text', form).css('color', inputs[4].value); - $('#text a, #text h2', form).css('color', inputs[1].value); + jQuery('#text', form).css('color', inputs[4].value); + jQuery('#text a, #text h2', form).css('color', inputs[1].value); // Set up gradient var top = farb.unpack(inputs[2].value); @@ -68,7 +68,7 @@ if (Drupal.jsEnabled) { var accum = top; // Render gradient lines - $('#gradient > div', form).each(function () { + jQuery('#gradient > div', form).each(function () { for (i in accum) { accum[i] += delta[i]; } @@ -129,7 +129,7 @@ if (Drupal.jsEnabled) { */ function callback(input, color, propagate, colorscheme) { // Set background/foreground color - $(input).css({ + jQuery(input).css({ backgroundColor: color, color: farb.RGBToHSL(farb.unpack(color))[2] > 0.5 ? '#000' : '#fff' }); @@ -142,12 +142,12 @@ if (Drupal.jsEnabled) { if (propagate) { var i = input.i; for (j = i + 1; ; ++j) { - if (!locks[j - 1] || $(locks[j - 1]).is('.unlocked')) break; + if (!locks[j - 1] || jQuery(locks[j - 1]).is('.unlocked')) break; var matched = shift_color(color, reference[input.key], reference[inputs[j].key]); callback(inputs[j], matched, false); } for (j = i - 1; ; --j) { - if (!locks[j] || $(locks[j]).is('.unlocked')) break; + if (!locks[j] || jQuery(locks[j]).is('.unlocked')) break; var matched = shift_color(color, reference[input.key], reference[inputs[j].key]); callback(inputs[j], matched, false); } @@ -168,7 +168,7 @@ if (Drupal.jsEnabled) { * Reset the color scheme selector. */ function resetScheme() { - $('#edit-scheme', form).each(function () { + jQuery('#edit-scheme', form).each(function () { this.selectedIndex = this.options.length - 1; }); } @@ -177,7 +177,7 @@ if (Drupal.jsEnabled) { function focus() { var input = this; // Remove old bindings - focused && $(focused).unbind('keyup', farb.updateValue) + focused && jQuery(focused).unbind('keyup', farb.updateValue) .unbind('keyup', preview).unbind('keyup', resetScheme) .parent().removeClass('item-selected'); @@ -185,12 +185,12 @@ if (Drupal.jsEnabled) { focused = this; farb.linkTo(function (color) { callback(input, color, true, false) }); farb.setColor(this.value); - $(focused).keyup(farb.updateValue).keyup(preview).keyup(resetScheme) + jQuery(focused).keyup(farb.updateValue).keyup(preview).keyup(resetScheme) .parent().addClass('item-selected'); } // Initialize color fields - $('#palette input.form-text', form) + jQuery('#palette input.form-text', form) .each(function () { // Extract palette field name this.key = this.id.substring(13); @@ -201,42 +201,42 @@ if (Drupal.jsEnabled) { // Add lock var i = inputs.length; if (inputs.length) { - var lock = $('
').toggle( + var lock = jQuery('
').toggle( function () { - $(this).addClass('unlocked'); - $(hooks[i - 1]).attr('class', - locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook' + jQuery(this).addClass('unlocked'); + jQuery(hooks[i - 1]).attr('class', + locks[i - 2] && jQuery(locks[i - 2]).is(':not(.unlocked)') ? 'hook up' : 'hook' ); - $(hooks[i]).attr('class', - locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook down' : 'hook' + jQuery(hooks[i]).attr('class', + locks[i] && jQuery(locks[i]).is(':not(.unlocked)') ? 'hook down' : 'hook' ); }, function () { - $(this).removeClass('unlocked'); - $(hooks[i - 1]).attr('class', - locks[i - 2] && $(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down' + jQuery(this).removeClass('unlocked'); + jQuery(hooks[i - 1]).attr('class', + locks[i - 2] && jQuery(locks[i - 2]).is(':not(.unlocked)') ? 'hook both' : 'hook down' ); - $(hooks[i]).attr('class', - locks[i] && $(locks[i]).is(':not(.unlocked)') ? 'hook both' : 'hook up' + jQuery(hooks[i]).attr('class', + locks[i] && jQuery(locks[i]).is(':not(.unlocked)') ? 'hook both' : 'hook up' ); } ); - $(this).after(lock); + jQuery(this).after(lock); locks.push(lock); } // Add hook - var hook = $('
'); - $(this).after(hook); + var hook = jQuery('
'); + jQuery(this).after(hook); hooks.push(hook); - $(this).parent().find('.lock').click(); + jQuery(this).parent().find('.lock').click(); this.i = i; inputs.push(this); }) .focus(focus); - $('#palette label', form) + jQuery('#palette label', form) // Focus first color focus.call(inputs[0]); Index: modules/system/system.js =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.js,v retrieving revision 1.2 diff -u -p -r1.2 system.js --- modules/system/system.js 13 Apr 2007 07:33:23 -0000 1.2 +++ modules/system/system.js 17 Apr 2007 19:44:45 -0000 @@ -9,18 +9,18 @@ */ Drupal.cleanURLsSettingsCheck = function() { var url = location.pathname +"admin/settings/clean-urls"; - $("#clean-url .description span").html('
'+ Drupal.settings.cleanURL.testing +"
"); - $("#clean-url p").hide(); - $.ajax({url: location.protocol +"//"+ location.hostname + url, type: "GET", data: " ", complete: function(response) { - $("#testing").toggle(); + jQuery("#clean-url .description span").html('
'+ Drupal.settings.cleanURL.testing +"
"); + jQuery("#clean-url p").hide(); + jQuery.ajax({url: location.protocol +"//"+ location.hostname + url, type: "GET", data: " ", complete: function(response) { + jQuery("#testing").toggle(); if (response.status == 200) { // Check was successful. - $("#clean-url input.form-radio").attr("disabled", ""); - $("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.success +"
"); + jQuery("#clean-url input.form-radio").attr("disabled", ""); + jQuery("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.success +"
"); } else { // Check failed. - $("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.failure +"
"); + jQuery("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.failure +"
"); } }}); } Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.468 diff -u -p -r1.468 system.module --- modules/system/system.module 17 Apr 2007 07:19:39 -0000 1.468 +++ modules/system/system.module 17 Apr 2007 19:44:49 -0000 @@ -629,7 +629,7 @@ function system_clean_url_settings() { drupal_add_js(' // Global Killswitch if (Drupal.jsEnabled) { - $(document).ready(function() { + jQuery(document).ready(function() { Drupal.cleanURLsSettingsCheck(); }); }', 'inline');