? jquery_noconflict.js
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.97
diff -u -p -r1.97 install.php
--- install.php 26 Nov 2007 16:36:42 -0000 1.97
+++ install.php 27 Nov 2007 14:16:58 -0000
@@ -689,7 +689,7 @@ function install_tasks($profile, $task)
drupal_add_js('
// Global Killswitch
if (Drupal.jsEnabled) {
- $(document).ready(function() {
+ jQuery(document).ready(function() {
Drupal.cleanURLsInstallCheck();
Drupal.setDefaultTimezone();
});
Index: misc/ahah.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ahah.js,v
retrieving revision 1.6
diff -u -p -r1.6 ahah.js
--- misc/ahah.js 19 Nov 2007 10:05:48 -0000 1.6
+++ misc/ahah.js 27 Nov 2007 14:17:04 -0000
@@ -17,15 +17,15 @@
*/
Drupal.behaviors.ahah = function(context) {
for (var base in Drupal.settings.ahah) {
- if (!$('#'+ base + '.ahah-processed').size()) {
+ if (!jQuery('#'+ base + '.ahah-processed').size()) {
var element_settings = Drupal.settings.ahah[base];
- $(element_settings.selector).each(function() {
+ jQuery(element_settings.selector).each(function() {
element_settings.element = this;
var ahah = new Drupal.ahah(base, element_settings);
});
- $('#'+ base).addClass('ahah-processed');
+ jQuery('#'+ base).addClass('ahah-processed');
}
}
};
@@ -62,7 +62,7 @@ Drupal.ahah = function(base, element_set
}
// Record the form action and target, needed for iFrame file uploads.
- var form = $(this.element).parents('form');
+ var form = jQuery(this.element).parents('form');
this.form_action = form.attr('action');
this.form_target = form.attr('target');
this.form_encattr = form.attr('encattr');
@@ -94,8 +94,8 @@ Drupal.ahah = function(base, element_set
};
// Bind the ajaxSubmit function to the element event.
- $(element_settings.element).bind(element_settings.event, function() {
- $(element_settings.element).parents('form').ajaxSubmit(options);
+ jQuery(element_settings.element).bind(element_settings.event, function() {
+ jQuery(element_settings.element).parents('form').ajaxSubmit(options);
return false;
});
};
@@ -105,7 +105,7 @@ Drupal.ahah = function(base, element_set
*/
Drupal.ahah.prototype.beforeSubmit = function (form_values, element, options) {
// Disable the element that received the change.
- $(this.element).addClass('progress-disabled').attr('disabled', true);
+ jQuery(this.element).addClass('progress-disabled').attr('disabled', true);
// Insert progressbar or throbber.
if (this.progress.type == 'bar') {
@@ -116,16 +116,16 @@ Drupal.ahah.prototype.beforeSubmit = fun
if (this.progress.url) {
progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
}
- this.progress.element = $(progressBar.element).addClass('ahah-progress ahah-progress-bar');
+ this.progress.element = jQuery(progressBar.element).addClass('ahah-progress ahah-progress-bar');
this.progress.object = progressBar;
- $(this.element).after(this.progress.element);
+ jQuery(this.element).after(this.progress.element);
}
else if (this.progress.type == 'throbber') {
- this.progress.element = $('
');
+ this.progress.element = jQuery('');
if (this.progress.message) {
- $('.throbber', this.progress.element).after('' + this.progress.message + '
')
+ jQuery('.throbber', this.progress.element).after('' + this.progress.message + '
')
}
- $(this.element).after(this.progress.element);
+ jQuery(this.element).after(this.progress.element);
}
};
@@ -133,11 +133,11 @@ Drupal.ahah.prototype.beforeSubmit = fun
* Handler for the form redirection completion.
*/
Drupal.ahah.prototype.success = function (response, status) {
- var wrapper = $(this.wrapper);
- var form = $(this.element).parents('form');
- // Manually insert HTML into the jQuery object, using $() directly crashes
+ var wrapper = jQuery(this.wrapper);
+ var form = jQuery(this.element).parents('form');
+ // Manually insert HTML into the jQuery object, using jQuery() directly crashes
// Safari with long string lengths. http://dev.jquery.com/ticket/1152
- var new_content = $('
').html(response.data);
+ var new_content = jQuery('
').html(response.data);
// Restore the previous action and target to the form.
form.attr('action', this.form_action);
@@ -146,12 +146,12 @@ Drupal.ahah.prototype.success = function
// Remove the progress element.
if (this.progress.element) {
- $(this.progress.element).remove();
+ jQuery(this.progress.element).remove();
}
if (this.progress.object) {
this.progress.object.stopMonitoring();
}
- $(this.element).removeClass('progress-disabled').attr('disabled', false);
+ jQuery(this.element).removeClass('progress-disabled').attr('disabled', false);
// Add the new content to the page.
Drupal.freezeHeight();
@@ -170,13 +170,13 @@ Drupal.ahah.prototype.success = function
// 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 (($.browser.safari && $("tr.ahah-new-content", new_content).size() > 0)) {
+ if ((jQuery.browser.safari && jQuery("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();
+ else if (jQuery('.ahah-new-content', new_content).size() > 0) {
+ jQuery('.ahah-new-content', new_content).hide();
new_content.show();
- $(".ahah-new-content", new_content)[this.showEffect](this.showSpeed);
+ jQuery(".ahah-new-content", new_content)[this.showEffect](this.showSpeed);
}
else if (this.showEffect != 'show') {
new_content[this.showEffect](this.showSpeed);
@@ -200,13 +200,13 @@ Drupal.ahah.prototype.error = function (
element.parent('form').attr( { action: this.form_action, target: this.form_target} );
// Remove the progress element.
if (this.progress.element) {
- $(this.progress.element).remove();
+ jQuery(this.progress.element).remove();
}
if (this.progress.object) {
this.progress.object.stopMonitoring();
}
// Undo hide.
- $(this.wrapper).show();
+ jQuery(this.wrapper).show();
// Re-enable the element.
- $(this.element).removeClass('progess-disabled').attr('disabled', false);
+ jQuery(this.element).removeClass('progess-disabled').attr('disabled', false);
};
Index: misc/autocomplete.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v
retrieving revision 1.22
diff -u -p -r1.22 autocomplete.js
--- misc/autocomplete.js 21 Oct 2007 18:59:01 -0000 1.22
+++ misc/autocomplete.js 27 Nov 2007 14:17:04 -0000
@@ -5,16 +5,16 @@
*/
Drupal.behaviors.autocomplete = function (context) {
var acdb = [];
- $('input.autocomplete:not(.autocomplete-processed)', context).each(function () {
+ jQuery('input.autocomplete:not(.autocomplete-processed)', context).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]);
- $(this).addClass('autocomplete-processed');
+ jQuery(this).addClass('autocomplete-processed');
});
};
@@ -23,7 +23,7 @@ Drupal.behaviors.autocomplete = 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;
};
@@ -36,7 +36,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(); });
@@ -114,7 +114,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));
}
@@ -135,9 +135,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;
};
@@ -145,7 +145,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;
};
@@ -161,7 +161,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;
};
@@ -172,18 +172,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;
@@ -204,22 +204,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();
}
}
@@ -228,12 +228,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;
}
};
@@ -267,7 +267,7 @@ Drupal.ACDB.prototype.search = function
db.owner.setStatus('begin');
// Ajax GET request for autocompletion
- $.ajax({
+ jQuery.ajax({
type: "GET",
url: db.uri +'/'+ Drupal.encodeURIComponent(searchString),
dataType: 'json',
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 27 Nov 2007 14:17:04 -0000
@@ -5,10 +5,10 @@
*/
Drupal.behaviors.batch = function (context) {
// This behavior attaches by ID, so is only valid once on a page.
- if ($('#progress.batch-processed').size()) {
+ if (jQuery('#progress.batch-processed').size()) {
return;
}
- $('#progress', context).addClass('batch-processed').each(function () {
+ jQuery('#progress', context).addClass('batch-processed').each(function () {
var holder = this;
var uri = Drupal.settings.batch.uri;
var initMessage = Drupal.settings.batch.initMessage;
@@ -25,14 +25,14 @@ Drupal.behaviors.batch = function (conte
var errorCallback = function (pb) {
var div = document.createElement('p');
div.className = 'error';
- $(div).html(errorMessage);
- $(holder).prepend(div);
- $('#wait').hide();
+ jQuery(div).html(errorMessage);
+ jQuery(holder).prepend(div);
+ jQuery('#wait').hide();
};
var progress = new Drupal.progressBar('updateprogress', updateCallback, "POST", errorCallback);
progress.setProgress(-1, initMessage);
- $(holder).append(progress.element);
+ jQuery(holder).append(progress.element);
progress.startMonitoring(uri+'&op=do', 10);
});
};
Index: misc/collapse.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/collapse.js,v
retrieving revision 1.16
diff -u -p -r1.16 collapse.js
--- misc/collapse.js 12 Sep 2007 18:29:32 -0000 1.16
+++ misc/collapse.js 27 Nov 2007 14:17:04 -0000
@@ -4,9 +4,9 @@
* Toggle the visibility of a fieldset using smooth animations
*/
Drupal.toggleFieldset = function(fieldset) {
- if ($(fieldset).is('.collapsed')) {
- var content = $('> div', fieldset);
- $(fieldset).removeClass('collapsed');
+ if (jQuery(fieldset).is('.collapsed')) {
+ var content = jQuery('> div', fieldset);
+ jQuery(fieldset).removeClass('collapsed');
content.hide();
content.slideDown( {
duration: 'fast',
@@ -22,8 +22,8 @@ Drupal.toggleFieldset = function(fieldse
});
}
else {
- var content = $('> div', fieldset).slideUp('fast', function() {
- $(this.parentNode).addClass('collapsed');
+ var content = jQuery('> div', fieldset).slideUp('fast', function() {
+ jQuery(this.parentNode).addClass('collapsed');
this.parentNode.animating = false;
});
}
@@ -33,9 +33,9 @@ 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 posY = $(node).offset().top;
+ 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 posY = jQuery(node).offset().top;
var fudge = 55;
if (posY + node.offsetHeight + fudge > h + offset) {
if (node.offsetHeight > h) {
@@ -47,18 +47,18 @@ Drupal.collapseScrollIntoView = function
};
Drupal.behaviors.collapse = function (context) {
- $('fieldset.collapsible > legend:not(.collapse-processed)', context).each(function() {
- var fieldset = $(this.parentNode);
+ jQuery('fieldset.collapsible > legend:not(.collapse-processed)', context).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;
@@ -66,7 +66,7 @@ Drupal.behaviors.collapse = function (co
}
return false;
}))
- .after($('
')
+ .after(jQuery('
')
.append(fieldset.children(':not(legend)')))
.addClass('collapse-processed');
});
Index: misc/drupal.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.js,v
retrieving revision 1.40
diff -u -p -r1.40 drupal.js
--- misc/drupal.js 5 Oct 2007 09:35:08 -0000 1.40
+++ misc/drupal.js 27 Nov 2007 14:17:04 -0000
@@ -199,21 +199,21 @@ Drupal.parseJson = function (data) {
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();
};
/**
@@ -253,7 +253,7 @@ if (Drupal.jsEnabled) {
// 'js enabled' cookie
document.cookie = 'has_js=1; path=/';
// Attach all behaviors.
- $(document).ready(Drupal.attachBehaviors);
+ jQuery(document).ready(Drupal.attachBehaviors);
}
/**
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 27 Nov 2007 14:17:04 -0000
@@ -2,9 +2,9 @@
Drupal.behaviors.multiselectSelector = function() {
// Automatically selects the right radio button in a multiselect control.
- $('.multiselect select:not(.multiselectSelector-processed)')
+ jQuery('.multiselect select:not(.multiselectSelector-processed)')
.addClass('multiselectSelector-processed').change(function() {
- $('.multiselect input:radio[value="'+ this.id.substr(5) +'"]')
+ jQuery('.multiselect input:radio[value="'+ this.id.substr(5) +'"]')
.attr('checked', true);
});
};
Index: misc/progress.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/progress.js,v
retrieving revision 1.19
diff -u -p -r1.19 progress.js
--- misc/progress.js 21 Oct 2007 18:59:01 -0000 1.19
+++ misc/progress.js 27 Nov 2007 14:17:04 -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);
}
@@ -68,7 +68,7 @@ Drupal.progressBar.prototype.sendPing =
var pb = this;
// When doing a post request, you need non-null data. Otherwise a
// HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
- $.ajax({
+ jQuery.ajax({
type: this.method,
url: this.uri,
data: '',
@@ -99,7 +99,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/tabledrag.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v
retrieving revision 1.6
diff -u -p -r1.6 tabledrag.js
--- misc/tabledrag.js 27 Nov 2007 13:10:24 -0000 1.6
+++ misc/tabledrag.js 27 Nov 2007 14:17:05 -0000
@@ -13,16 +13,16 @@
*/
Drupal.behaviors.tableDrag = function(context) {
for (var base in Drupal.settings.tableDrag) {
- if (!$('#' + base + '.tabledrag-processed').size(), context) {
+ if (!jQuery('#' + base + '.tabledrag-processed').size(), context) {
var tableSettings = Drupal.settings.tableDrag[base];
- $('#' + base).filter(':not(.tabledrag-processed)').each(function() {
+ jQuery('#' + base).filter(':not(.tabledrag-processed)').each(function() {
// Create the new tableDrag instance. Save in the Drupal variable
// to allow other scripts access to the object.
Drupal.tableDrag[base] = new Drupal.tableDrag(this, tableSettings);
});
- $('#' + base).addClass('tabledrag-processed');
+ jQuery('#' + base).addClass('tabledrag-processed');
}
}
};
@@ -74,21 +74,21 @@ Drupal.tableDrag = function(table, table
// Find the width of indentations to measure mouse movements against.
// Because the table doesn't need to start with any indentations, we
// manually create an empty div, check it's width, then remove.
- var indent = $(Drupal.theme('tableDragIndentation')).appendTo('body');
+ var indent = jQuery(Drupal.theme('tableDragIndentation')).appendTo('body');
this.indentAmount = parseInt(indent.css('width'));
indent.remove();
}
// Make each applicable row draggable.
- $('tr.draggable', table).each(function() { self.makeDraggable(this); });
+ jQuery('tr.draggable', table).each(function() { self.makeDraggable(this); });
// Hide columns containing affected form elements.
this.hideColumns();
// Add mouse bindings to the document. The self variable is passed along
// as event handlers do not have direct access to the tableDrag object.
- $(document).bind('mousemove', function(event) { self.dragRow(event, self); });
- $(document).bind('mouseup', function(event) { self.dropRow(event, self); });
+ jQuery(document).bind('mousemove', function(event) { self.dragRow(event, self); });
+ jQuery(document).bind('mouseup', function(event) { self.dropRow(event, self); });
};
/**
@@ -99,9 +99,9 @@ Drupal.tableDrag.prototype.hideColumns =
for (var group in this.tableSettings) {
// Find the first field in this group.
for (var d in this.tableSettings[group]) {
- if ($('.' + this.tableSettings[group][d]['target'], this.table).size()) {
+ if (jQuery('.' + this.tableSettings[group][d]['target'], this.table).size()) {
var hidden = this.tableSettings[group][d]['hidden'];
- var field = $('.' + this.tableSettings[group][d]['target'] + ':first', this.table);
+ var field = jQuery('.' + this.tableSettings[group][d]['target'] + ':first', this.table);
var cell = field.parents('td:first, th:first');
break;
}
@@ -109,11 +109,11 @@ Drupal.tableDrag.prototype.hideColumns =
// Hide the column containing this field.
if (hidden && cell[0] && cell.css('display') != 'none') {
// Add 1 to our indexes. The nth-child selector is 1 based, not 0 based.
- var columnIndex = $('td', field.parents('tr:first')).index(cell.get(0)) + 1;
- var headerIndex = $('td:not(:hidden)', field.parents('tr:first')).index(cell.get(0)) + 1;
- $('tbody tr', this.table).each(function() {
+ var columnIndex = jQuery('td', field.parents('tr:first')).index(cell.get(0)) + 1;
+ var headerIndex = jQuery('td:not(:hidden)', field.parents('tr:first')).index(cell.get(0)) + 1;
+ jQuery('tbody tr', this.table).each(function() {
// Find and hide the cell in the table body.
- var cell = $('td:nth-child('+ columnIndex +')', this);
+ var cell = jQuery('td:nth-child('+ columnIndex +')', this);
if (cell.size()) {
cell.css('display', 'none');
}
@@ -121,13 +121,13 @@ Drupal.tableDrag.prototype.hideColumns =
// Reduce the colspan on the first cell to prevent the cell from
// overshooting the table.
else {
- cell = $('td:first', this);
+ cell = jQuery('td:first', this);
cell.attr('colspan', cell.attr('colspan') - 1);
}
});
- $('thead tr', this.table).each(function() {
+ jQuery('thead tr', this.table).each(function() {
// Remove table header cells entirely (Safari doesn't hide properly).
- var th = $('th:nth-child('+ headerIndex +')', this);
+ var th = jQuery('th:nth-child('+ headerIndex +')', this);
if (th.size()) {
th.remove();
}
@@ -140,7 +140,7 @@ Drupal.tableDrag.prototype.hideColumns =
* Find the target used within a particular row and group.
*/
Drupal.tableDrag.prototype.rowSettings = function(group, row) {
- var field = $('.' + group, row);
+ var field = jQuery('.' + group, row);
for (delta in this.tableSettings[group]) {
var targetClass = this.tableSettings[group][delta]['target'];
if (field.is('.' + targetClass)) {
@@ -161,21 +161,21 @@ Drupal.tableDrag.prototype.makeDraggable
var self = this;
// Create the handle.
- var handle = $('
');
+ var handle = jQuery('
');
// Insert the handle after indentations (if any).
- if ($('td:first .indentation:last', item).after(handle).size()) {
+ if (jQuery('td:first .indentation:last', item).after(handle).size()) {
// Update the total width of indentation in this entire table.
- self.indentCount = Math.max($('.indentation', item).size(), self.indentCount);
+ self.indentCount = Math.max(jQuery('.indentation', item).size(), self.indentCount);
}
else {
- $('td:first', item).prepend(handle);
+ jQuery('td:first', item).prepend(handle);
}
// Add hover action for the handle.
handle.hover(function() {
- self.dragObject == null ? $(this).addClass('tabledrag-handle-hover') : null;
+ self.dragObject == null ? jQuery(this).addClass('tabledrag-handle-hover') : null;
}, function() {
- self.dragObject == null ? $(this).removeClass('tabledrag-handle-hover') : null;
+ self.dragObject == null ? jQuery(this).removeClass('tabledrag-handle-hover') : null;
});
// Add the mousedown action for the handle.
@@ -190,7 +190,7 @@ Drupal.tableDrag.prototype.makeDraggable
// If there's a lingering row object from the keyboard, remove its focus.
if (self.rowObject) {
- $('a.tabledrag-handle', self.rowObject.element).blur();
+ jQuery('a.tabledrag-handle', self.rowObject.element).blur();
}
// Create a new rowObject for manipulation of this row.
@@ -201,18 +201,18 @@ Drupal.tableDrag.prototype.makeDraggable
self.table.bottomY = self.table.topY + self.table.offsetHeight;
// Add classes to the handle and row.
- $(this).addClass('tabledrag-handle-hover');
- $(item).addClass('drag');
+ jQuery(this).addClass('tabledrag-handle-hover');
+ jQuery(item).addClass('drag');
// Set the document to use the move cursor during drag.
- $('body').addClass('drag');
+ jQuery('body').addClass('drag');
if (self.oldRowElement) {
- $(self.oldRowElement).removeClass('drag-previous');
+ jQuery(self.oldRowElement).removeClass('drag-previous');
}
// Hack for IE6 that flickers uncontrollably if select lists are moved.
if (navigator.userAgent.indexOf('MSIE 6.') != -1) {
- $('select', this.table).css('display', 'none');
+ jQuery('select', this.table).css('display', 'none');
}
// Hack for Konqueror, prevent the blur handler from firing.
@@ -231,13 +231,13 @@ Drupal.tableDrag.prototype.makeDraggable
// Similar to the hover event, add a class when the handle is focused.
handle.focus(function() {
- $(this).addClass('tabledrag-handle-hover');
+ jQuery(this).addClass('tabledrag-handle-hover');
self.safeBlur = true;
});
// Remove the handle class on blur and fire the same function as a mouseup.
handle.blur(function(event) {
- $(this).removeClass('tabledrag-handle-hover');
+ jQuery(this).removeClass('tabledrag-handle-hover');
if (self.rowObject && self.safeBlur) {
event.data = { tableDrag: self };
self.dropRow(event, self);
@@ -260,9 +260,9 @@ Drupal.tableDrag.prototype.makeDraggable
break;
case 38: // Up arrow.
case 63232: // Safari up arrow.
- var previousRow = $(self.rowObject.element).prev('tr').get(0);
- while (previousRow && $(previousRow).is(':hidden')) {
- previousRow = $(previousRow).prev('tr').get(0);
+ var previousRow = jQuery(self.rowObject.element).prev('tr').get(0);
+ while (previousRow && jQuery(previousRow).is(':hidden')) {
+ previousRow = jQuery(previousRow).prev('tr').get(0);
}
if (previousRow) {
self.safeBlur = false; // Do not allow the onBlur cleanup.
@@ -272,7 +272,7 @@ Drupal.tableDrag.prototype.makeDraggable
self.rowObject.swap('before', previousRow);
window.scrollBy(0, -parseInt(item.offsetHeight));
}
- else if (self.table.tBodies[0].rows[0] != previousRow || $(previousRow).is('.draggable')) {
+ else if (self.table.tBodies[0].rows[0] != previousRow || jQuery(previousRow).is('.draggable')) {
self.rowObject.swap('before', previousRow);
self.rowObject.indent(-1);
window.scrollBy(0, -parseInt(item.offsetHeight));
@@ -287,9 +287,9 @@ Drupal.tableDrag.prototype.makeDraggable
break;
case 40: // Down arrow.
case 63233: // Safari down arrow.
- var nextRow = $(self.rowObject.group).filter(':last').next('tr').get(0);
- while (nextRow && $(nextRow).is(':hidden')) {
- nextRow = $(nextRow).next('tr').get(0);
+ var nextRow = jQuery(self.rowObject.group).filter(':last').next('tr').get(0);
+ while (nextRow && jQuery(nextRow).is(':hidden')) {
+ nextRow = jQuery(nextRow).next('tr').get(0);
}
if (nextRow) {
self.safeBlur = false; // Do not allow the onBlur cleanup.
@@ -309,9 +309,9 @@ Drupal.tableDrag.prototype.makeDraggable
}
if (self.rowObject && self.rowObject.changed == true) {
- $(item).addClass('drag');
+ jQuery(item).addClass('drag');
if (self.oldRowElement) {
- $(self.oldRowElement).removeClass('drag-previous');
+ jQuery(self.oldRowElement).removeClass('drag-previous');
}
self.oldRowElement = item;
self.restripeTable();
@@ -425,7 +425,7 @@ Drupal.tableDrag.prototype.dropRow = fun
self.rowObject.markChanged();
if (self.changed == false) {
- $(Drupal.theme('tableDragChangedWarning')).insertAfter(self.table).hide().fadeIn('slow');
+ jQuery(Drupal.theme('tableDragChangedWarning')).insertAfter(self.table).hide().fadeIn('slow');
self.changed = true;
}
}
@@ -434,9 +434,9 @@ Drupal.tableDrag.prototype.dropRow = fun
self.rowObject.removeIndentClasses();
}
if (self.oldRowElement) {
- $(self.oldRowElement).removeClass('drag-previous');
+ jQuery(self.oldRowElement).removeClass('drag-previous');
}
- $(droppedRow).removeClass('drag').addClass('drag-previous');
+ jQuery(droppedRow).removeClass('drag').addClass('drag-previous');
self.oldRowElement = droppedRow;
self.onDrop();
self.rowObject = null;
@@ -444,15 +444,15 @@ Drupal.tableDrag.prototype.dropRow = fun
// Functionality specific only to mouseup event.
if (self.dragObject != null) {
- $('.tabledrag-handle', droppedRow).removeClass('tabledrag-handle-hover');
+ jQuery('.tabledrag-handle', droppedRow).removeClass('tabledrag-handle-hover');
self.dragObject = null;
- $('body').removeClass('drag');
+ jQuery('body').removeClass('drag');
clearInterval(self.scrollInterval);
// Hack for IE6 that flickers uncontrollably if select lists are moved.
if (navigator.userAgent.indexOf('MSIE 6.') != -1) {
- $('select', this.table).css('display', 'block');
+ jQuery('select', this.table).css('display', 'block');
}
}
};
@@ -551,8 +551,8 @@ Drupal.tableDrag.prototype.findDropTarge
// We've may have found the row the mouse just passed over, but it doesn't
// take into account hidden rows. Skip backwards until we find a draggable
// row.
- while ($(row).is(':hidden') && $(row).prev('tr').is(':hidden')) {
- row = $(row).prev('tr').get(0);
+ while (jQuery(row).is(':hidden') && jQuery(row).prev('tr').is(':hidden')) {
+ row = jQuery(row).prev('tr').get(0);
}
return row;
}
@@ -593,12 +593,12 @@ Drupal.tableDrag.prototype.updateField =
}
// Siblings are easy, check previous and next rows.
else if (rowSettings.relationship == 'sibling') {
- var previousRow = $(changedRow).prev('tr').get(0);
- var nextRow = $(changedRow).next('tr').get(0);
+ var previousRow = jQuery(changedRow).prev('tr').get(0);
+ var nextRow = jQuery(changedRow).next('tr').get(0);
var sourceRow = changedRow;
- if ($(previousRow).is('.draggable') && $('.' + group, previousRow).length) {
+ if (jQuery(previousRow).is('.draggable') && jQuery('.' + group, previousRow).length) {
if (this.indentEnabled) {
- if ($('.indentations', previousRow).size() == $('.indentations', changedRow)) {
+ if (jQuery('.indentations', previousRow).size() == jQuery('.indentations', changedRow)) {
sourceRow = previousRow;
}
}
@@ -606,9 +606,9 @@ Drupal.tableDrag.prototype.updateField =
sourceRow = previousRow;
}
}
- else if ($(nextRow).is('.draggable') && $('.' + group, nextRow).length) {
+ else if (jQuery(nextRow).is('.draggable') && jQuery('.' + group, nextRow).length) {
if (this.indentEnabled) {
- if ($('.indentations', nextRow).size() == $('.indentations', changedRow)) {
+ if (jQuery('.indentations', nextRow).size() == jQuery('.indentations', changedRow)) {
sourceRow = nextRow;
}
}
@@ -620,8 +620,8 @@ Drupal.tableDrag.prototype.updateField =
// Parents, look up the tree until we find a field not in this group.
// Go up as many parents as indentations in the changed row.
else if (rowSettings.relationship == 'parent') {
- var previousRow = $(changedRow).prev('tr');
- while (previousRow.length && $('.indentation', previousRow).length >= this.rowObject.indents) {
+ var previousRow = jQuery(changedRow).prev('tr');
+ while (previousRow.length && jQuery('.indentation', previousRow).length >= this.rowObject.indents) {
previousRow = previousRow.prev('tr');
}
// If we found a row.
@@ -634,9 +634,9 @@ Drupal.tableDrag.prototype.updateField =
// Use the first row in the table as source, because it's garanteed to
// be at the root level. Find the first item, then compare this row
// against it as a sibling.
- sourceRow = $('tr.draggable:first').get(0);
+ sourceRow = jQuery('tr.draggable:first').get(0);
if (sourceRow == this.rowObject.element) {
- sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
+ sourceRow = jQuery(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
}
var useSibling = true;
}
@@ -655,16 +655,16 @@ Drupal.tableDrag.prototype.updateField =
}
var targetClass = '.' + rowSettings.target;
- var targetElement = $(targetClass, changedRow).get(0);
+ var targetElement = jQuery(targetClass, changedRow).get(0);
// Check if a target element exists in this row.
if (targetElement) {
var sourceClass = '.' + rowSettings.source;
- var sourceElement = $(sourceClass, sourceRow).get(0);
+ var sourceElement = jQuery(sourceClass, sourceRow).get(0);
switch (rowSettings.action) {
case 'depth':
// Get the depth of the target row.
- targetElement.value = $('.indentation', $(sourceElement).parents('tr:first')).size();
+ targetElement.value = jQuery('.indentation', jQuery(sourceElement).parents('tr:first')).size();
break;
case 'match':
// Update the value.
@@ -672,21 +672,21 @@ Drupal.tableDrag.prototype.updateField =
break;
case 'order':
var siblings = this.rowObject.findSiblings(rowSettings);
- if ($(targetElement).is('select')) {
+ if (jQuery(targetElement).is('select')) {
// Get a list of acceptable values.
var values = new Array();
- $('option', targetElement).each(function() {
+ jQuery('option', targetElement).each(function() {
values.push(this.value);
});
// Populate the values in the siblings.
- $(targetClass, siblings).each(function() {
+ jQuery(targetClass, siblings).each(function() {
this.value = values.shift();
});
}
else {
// Assume a numeric input field.
- var weight = parseInt($(targetClass, siblings[0]).val()) || 0;
- $(targetClass, siblings).each(function() {
+ var weight = parseInt(jQuery(targetClass, siblings[0]).val()) || 0;
+ jQuery(targetClass, siblings).each(function() {
this.value = weight;
weight++;
});
@@ -702,8 +702,8 @@ Drupal.tableDrag.prototype.updateField =
* may have had.
*/
Drupal.tableDrag.prototype.copyDragClasses = function(sourceRow, targetRow, group) {
- var sourceElement = $('.' + group, sourceRow);
- var targetElement = $('.' + group, targetRow);
+ var sourceElement = jQuery('.' + group, sourceRow);
+ var targetElement = jQuery('.' + group, targetRow);
if (sourceElement.length && targetElement.length) {
targetElement[0].className = sourceElement[0].className;
}
@@ -748,7 +748,7 @@ Drupal.tableDrag.prototype.setScroll = f
Drupal.tableDrag.prototype.restripeTable = function() {
// :even and :odd are reversed because jquery counts from 0 and
// we count from 1, so we're out of sync.
- $('tr.draggable', this.table)
+ jQuery('tr.draggable', this.table)
.filter(':odd').filter('.odd')
.removeClass('odd').addClass('even')
.end().end()
@@ -788,20 +788,20 @@ Drupal.tableDrag.prototype.row = functio
this.element = tableRow;
this.method = method;
this.group = new Array(tableRow);
- this.groupDepth = $('.indentation', tableRow).size();
+ this.groupDepth = jQuery('.indentation', tableRow).size();
this.changed = false;
- this.table = $(tableRow).parents('table:first').get(0);
+ this.table = jQuery(tableRow).parents('table:first').get(0);
this.indentEnabled = indentEnabled;
this.maxDepth = maxDepth;
this.direction = ''; // Direction the row is being moved.
if (this.indentEnabled) {
- this.indents = $('.indentation', tableRow).size();
+ this.indents = jQuery('.indentation', tableRow).size();
this.children = this.findChildren(addClasses);
- this.group = $.merge(this.group, this.children);
+ this.group = jQuery.merge(this.group, this.children);
// Find the depth of this entire group.
for (var n = 0; n < this.group.length; n++) {
- this.groupDepth = Math.max($('.indentation', this.group[n]).size(), this.groupDepth);
+ this.groupDepth = Math.max(jQuery('.indentation', this.group[n]).size(), this.groupDepth);
}
}
};
@@ -814,25 +814,25 @@ Drupal.tableDrag.prototype.row = functio
*/
Drupal.tableDrag.prototype.row.prototype.findChildren = function(addClasses) {
var parentIndentation = this.indents;
- var currentRow = $(this.element, this.table).next('tr.draggable');
+ var currentRow = jQuery(this.element, this.table).next('tr.draggable');
var rows = new Array();
var child = 0;
while (currentRow.length) {
- var rowIndentation = $('.indentation', currentRow).length;
+ var rowIndentation = jQuery('.indentation', currentRow).length;
// A greater indentation indicates this is a child.
if (rowIndentation > parentIndentation) {
child++;
rows.push(currentRow[0]);
if (addClasses) {
- $('.indentation', currentRow).each(function(indentNum) {
+ jQuery('.indentation', currentRow).each(function(indentNum) {
if (child == 1 && (indentNum == parentIndentation)) {
- $(this).addClass('tree-child-first');
+ jQuery(this).addClass('tree-child-first');
}
if (indentNum == parentIndentation) {
- $(this).addClass('tree-child');
+ jQuery(this).addClass('tree-child');
}
else if (indentNum > parentIndentation) {
- $(this).addClass('tree-child-horizontal');
+ jQuery(this).addClass('tree-child-horizontal');
}
});
}
@@ -843,7 +843,7 @@ Drupal.tableDrag.prototype.row.prototype
currentRow = currentRow.next('tr.draggable');
}
if (addClasses && rows.length) {
- $('.indentation:nth-child(' + (parentIndentation + 1) + ')', rows[rows.length - 1]).addClass('tree-child-last');
+ jQuery('.indentation:nth-child(' + (parentIndentation + 1) + ')', rows[rows.length - 1]).addClass('tree-child-last');
}
return rows;
};
@@ -859,9 +859,9 @@ Drupal.tableDrag.prototype.row.prototype
*/
Drupal.tableDrag.prototype.row.prototype.isValidSwap = function(row, indentDiff) {
if (this.indentEnabled) {
- var rowIndents = $('.indentation', row).size();
- var prevIndents = $('.indentation', $(row).prev('tr')).size();
- var nextIndents = $('.indentation', $(row).next('tr')).size();
+ var rowIndents = jQuery('.indentation', row).size();
+ var prevIndents = jQuery('.indentation', jQuery(row).prev('tr')).size();
+ var nextIndents = jQuery('.indentation', jQuery(row).next('tr')).size();
if (
(this.direction == 'down') && (
@@ -885,7 +885,7 @@ Drupal.tableDrag.prototype.row.prototype
if (this.table.tBodies[0].rows[0] == row) {
// Do not let the first row contain indentations
// or let an un-draggable first row have anything put before it.
- if ((this.indents + indentDiff) > 0 || $(row).is(':not(.draggable)')) {
+ if ((this.indents + indentDiff) > 0 || jQuery(row).is(':not(.draggable)')) {
return false;
}
}
@@ -902,7 +902,7 @@ Drupal.tableDrag.prototype.row.prototype
* DOM element what will be swapped with the row group.
*/
Drupal.tableDrag.prototype.row.prototype.swap = function(position, row) {
- $(row)[position](this.group);
+ jQuery(row)[position](this.group);
this.changed = true;
this.onSwap(row);
};
@@ -916,9 +916,9 @@ Drupal.tableDrag.prototype.row.prototype
*/
Drupal.tableDrag.prototype.row.prototype.indent = function(indentDiff) {
if (indentDiff > 0) {
- var prevRow = $(this.group).filter(':first').prev('tr').get(0);
+ var prevRow = jQuery(this.group).filter(':first').prev('tr').get(0);
if (prevRow) {
- var prevIndent = $('.indentation', $(this.group).filter(':first').prev('tr')).size();
+ var prevIndent = jQuery('.indentation', jQuery(this.group).filter(':first').prev('tr')).size();
indentDiff = Math.min(prevIndent - this.indents + 1, indentDiff);
}
else {
@@ -926,7 +926,7 @@ Drupal.tableDrag.prototype.row.prototype
}
}
else {
- var nextIndent = $('.indentation', $(this.group).filter(':last').next('tr')).size();
+ var nextIndent = jQuery('.indentation', jQuery(this.group).filter(':last').next('tr')).size();
indentDiff = Math.max(nextIndent - this.indents, indentDiff);
}
@@ -938,11 +938,11 @@ Drupal.tableDrag.prototype.row.prototype
for (var n = 1; n <= Math.abs(indentDiff); n++) {
// Add or remove indentations.
if (indentDiff < 0) {
- $('.indentation:first', this.group).remove();
+ jQuery('.indentation:first', this.group).remove();
this.indents--;
}
else {
- $('td:first', this.group).prepend(Drupal.theme('tableDragIndentation'));
+ jQuery('td:first', this.group).prepend(Drupal.theme('tableDragIndentation'));
this.indents++;
}
}
@@ -969,14 +969,14 @@ Drupal.tableDrag.prototype.row.prototype
var directions = new Array('prev', 'next');
var rowIndentation = this.indents;
for (var d in directions) {
- var checkRow = $(this.element)[directions[d]]();
+ var checkRow = jQuery(this.element)[directions[d]]();
while (checkRow.length) {
// Check that the sibling contains a similar target field.
- if ($('.' + rowSettings.target, checkRow)) {
+ if (jQuery('.' + rowSettings.target, checkRow)) {
// 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 = jQuery('.indentation', checkRow).length
}
if (!(this.indentEnabled) || (checkRowIndentation == rowIndentation)) {
@@ -990,7 +990,7 @@ Drupal.tableDrag.prototype.row.prototype
else {
break;
}
- checkRow = $(checkRow)[directions[d]]();
+ checkRow = jQuery(checkRow)[directions[d]]();
}
// Since siblings are added in reverse order for previous, reverse the
// completed list of previous siblings. Add the current row and continue.
@@ -1007,7 +1007,7 @@ Drupal.tableDrag.prototype.row.prototype
*/
Drupal.tableDrag.prototype.row.prototype.removeIndentClasses = function() {
for (n in this.children) {
- $('.indentation', this.children[n])
+ jQuery('.indentation', this.children[n])
.removeClass('tree-child')
.removeClass('tree-child-first')
.removeClass('tree-child-last')
@@ -1020,8 +1020,8 @@ Drupal.tableDrag.prototype.row.prototype
*/
Drupal.tableDrag.prototype.row.prototype.markChanged = function() {
var marker = Drupal.theme('tableDragChangedMarker');
- var cell = $('td:first', this.element);
- if ($('span.tabledrag-changed', cell).length == 0) {
+ var cell = jQuery('td:first', this.element);
+ if (jQuery('span.tabledrag-changed', cell).length == 0) {
cell.append(marker);
}
};
Index: misc/tableheader.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tableheader.js,v
retrieving revision 1.9
diff -u -p -r1.9 tableheader.js
--- misc/tableheader.js 2 Oct 2007 07:09:51 -0000 1.9
+++ misc/tableheader.js 27 Nov 2007 14:17:05 -0000
@@ -10,32 +10,32 @@ Drupal.behaviors.tableHeader = function
var cells = [];
var z = 0;
- $('table thead:not(.tableHeader-processed)', context).each(function () {
+ jQuery('table thead:not(.tableHeader-processed)', context).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);
@@ -47,33 +47,33 @@ Drupal.behaviors.tableHeader = function
ref = table;
div.wide = true;
}
- $(div).width(Math.max(0, $(ref).width() - parseInt($(div).css('paddingLeft'))));
+ jQuery(div).width(Math.max(0, jQuery(ref).width() - parseInt(jQuery(div).css('paddingLeft'))));
// Get position and store.
div.cell = this;
div.table = table;
div.stickyMax = height;
- div.stickyPosition = $(this).offset().top;
+ div.stickyPosition = jQuery(this).offset().top;
});
- $(this).addClass('tableHeader-processed');
+ jQuery(this).addClass('tableHeader-processed');
});
// 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;
@@ -85,13 +85,13 @@ Drupal.behaviors.tableHeader = function
time = setTimeout(function () {
// Precalculate table heights
- $('table.sticky-table').each(function () {
- this.savedHeight = $(this).height();
+ jQuery('table.sticky-table').each(function () {
+ this.savedHeight = jQuery(this).height();
});
- $('table.sticky-table div.sticky-header').each(function () {
+ jQuery('table.sticky-table div.sticky-header').each(function () {
// Get position.
- this.stickyPosition = $(this.cell).offset().top;
+ this.stickyPosition = jQuery(this.cell).offset().top;
this.stickyMax = this.table.savedHeight;
// Reflow the cell.
@@ -100,12 +100,12 @@ Drupal.behaviors.tableHeader = function
// Resize the first cell to fit the table.
ref = this.table;
}
- $(this).width(Math.max(0, $(ref).width() - parseInt($(this).css('paddingLeft'))));
+ jQuery(this).width(Math.max(0, jQuery(ref).width() - parseInt(jQuery(this).css('paddingLeft'))));
});
// 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.8
diff -u -p -r1.8 tableselect.js
--- misc/tableselect.js 19 Nov 2007 12:15:16 -0000 1.8
+++ misc/tableselect.js 27 Nov 2007 14:17:05 -0000
@@ -1,12 +1,12 @@
// $Id: tableselect.js,v 1.8 2007/11/19 12:15:16 goba Exp $
Drupal.behaviors.tableSelect = function (context) {
- $('form table:has(th.select-all):not(.tableSelect-processed)', context).each(Drupal.tableSelect);
+ jQuery('form table:has(th.select-all):not(.tableSelect-processed)', context).each(Drupal.tableSelect);
};
Drupal.tableSelect = function() {
// Do not add a "Select all" checkbox if there are no rows with checkboxes in the table
- if ($('td input:checkbox', this).size() == 0) {
+ if (jQuery('td input:checkbox', this).size() == 0) {
return;
}
@@ -14,20 +14,20 @@ Drupal.tableSelect = function() {
var table = this, checkboxes, lastChecked;
var strings = { 'selectAll': Drupal.t('Select all rows in this table'), 'selectNone': Drupal.t('Deselect all rows in this table') };
var updateSelectAll = function(state) {
- $('th.select-all input:checkbox', table).each(function() {
- $(this).attr('title', state ? strings.selectNone : strings.selectAll);
+ jQuery('th.select-all input:checkbox', table).each(function() {
+ jQuery(this).attr('title', state ? strings.selectNone : strings.selectAll);
this.checked = state;
});
};
// Find all with class select-all, and insert the check all checkbox.
- $('th.select-all', table).prepend($(' ').attr('title', strings.selectAll)).click(function(event) {
- if ($(event.target).is('input:checkbox')) {
+ jQuery('th.select-all', table).prepend(jQuery(' ').attr('title', strings.selectAll)).click(function(event) {
+ if (jQuery(event.target).is('input:checkbox')) {
// Loop through all checkboxes and set their state to the select all checkbox' state.
checkboxes.each(function() {
this.checked = event.target.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.
updateSelectAll(event.target.checked);
@@ -35,25 +35,25 @@ Drupal.tableSelect = function() {
});
// 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.
- updateSelectAll((checkboxes.length == $(checkboxes).filter(':checked').length));
+ updateSelectAll((checkboxes.length == jQuery(checkboxes).filter(':checked').length));
// Keep track of the last checked checkbox.
lastChecked = e.target;
});
- $(this).addClass('tableSelect-processed');
+ jQuery(this).addClass('tableSelect-processed');
};
Drupal.tableSelectRange = function(from, to, state) {
@@ -68,8 +68,8 @@ Drupal.tableSelectRange = function(from,
}
// 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;
});
@@ -79,7 +79,7 @@ Drupal.tableSelectRange = function(from,
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;
}
Index: misc/teaser.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/teaser.js,v
retrieving revision 1.10
diff -u -p -r1.10 teaser.js
--- misc/teaser.js 13 Nov 2007 14:04:08 -0000 1.10
+++ misc/teaser.js 27 Nov 2007 14:17:05 -0000
@@ -11,15 +11,15 @@ Drupal.behaviors.teaser = function(conte
return;
}
- $('textarea.teaser:not(.teaser-processed)', context).each(function() {
- var teaser = $(this).addClass('teaser-processed');
+ jQuery('textarea.teaser:not(.teaser-processed)', context).each(function() {
+ var teaser = jQuery(this).addClass('teaser-processed');
// Move teaser textarea before body, and remove its form-item wrapper.
- var body = $('#'+ Drupal.settings.teaser[this.id]);
- var checkbox = $('#'+ Drupal.settings.teaserCheckbox[this.id]).parent();
+ var body = jQuery('#'+ Drupal.settings.teaser[this.id]);
+ var checkbox = jQuery('#'+ Drupal.settings.teaserCheckbox[this.id]).parent();
var parent = teaser[0].parentNode;
- $(body).before(teaser);
- $(parent).remove();
+ jQuery(body).before(teaser);
+ jQuery(parent).remove();
function trim(text) {
return text.replace(/^\s+/g, '').replace(/\s+$/g, '');
@@ -31,12 +31,12 @@ Drupal.behaviors.teaser = function(conte
body.val(trim(teaser.val()) +'\r\n\r\n'+ trim(body.val()));
}
// Hide and disable teaser
- $(teaser).attr('disabled', 'disabled');
- $(teaser).parent().slideUp('fast');
+ jQuery(teaser).attr('disabled', 'disabled');
+ jQuery(teaser).parent().slideUp('fast');
// Change label
- $(this).val(Drupal.t('Split summary at cursor'));
+ jQuery(this).val(Drupal.t('Split summary at cursor'));
// Show separate teaser checkbox
- $(checkbox).hide();
+ jQuery(checkbox).hide();
}
// Split the teaser from the body.
@@ -50,32 +50,32 @@ Drupal.behaviors.teaser = function(conte
teaser[0].value = trim(text.slice(0, split));
body[0].value = trim(text.slice(split));
// Reveal and enable teaser
- $(teaser).attr('disabled', '');
- $(teaser).parent().slideDown('fast');
+ jQuery(teaser).attr('disabled', '');
+ jQuery(teaser).parent().slideDown('fast');
// Change label
- $(this).val(Drupal.t('Join summary'));
+ jQuery(this).val(Drupal.t('Join summary'));
// Show separate teaser checkbox
- $(checkbox).show();
+ jQuery(checkbox).show();
}
// Add split/join button.
- var button = $('
');
- var include = $('#'+ this.id.substring(0, this.id.length - 2) +'include');
- $(include).parent().parent().before(button);
+ var button = jQuery('
');
+ var include = jQuery('#'+ this.id.substring(0, this.id.length - 2) +'include');
+ jQuery(include).parent().parent().before(button);
// Extract the teaser from the body, if set. Otherwise, stay in joined mode.
var text = body.val().split('', 2);
if (text.length == 2) {
teaser[0].value = trim(text[0]);
body[0].value = trim(text[1]);
- $(teaser).attr('disabled', '');
- $('input', button).val(Drupal.t('Join summary')).toggle(join_teaser, split_teaser);
- $(teaser).show();
+ jQuery(teaser).attr('disabled', '');
+ jQuery('input', button).val(Drupal.t('Join summary')).toggle(join_teaser, split_teaser);
+ jQuery(teaser).show();
}
else {
- $(teaser).hide();
- $('input', button).val(Drupal.t('Split summary at cursor')).toggle(split_teaser, join_teaser);
- $(checkbox).hide();
+ jQuery(teaser).hide();
+ jQuery('input', button).val(Drupal.t('Split summary at cursor')).toggle(split_teaser, join_teaser);
+ jQuery(checkbox).hide();
}
});
Index: misc/textarea.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/textarea.js,v
retrieving revision 1.19
diff -u -p -r1.19 textarea.js
--- misc/textarea.js 23 Nov 2007 11:45:37 -0000 1.19
+++ misc/textarea.js 27 Nov 2007 14:17:05 -0000
@@ -1,8 +1,8 @@
// $Id: textarea.js,v 1.19 2007/11/23 11:45:37 goba Exp $
Drupal.behaviors.textarea = function(context) {
- $('textarea.resizable:not(.textarea-processed)', context).each(function() {
- var textarea = $(this).addClass('textarea-processed'), staticOffset = null;
+ jQuery('textarea.resizable:not(.textarea-processed)', context).each(function() {
+ var textarea = jQuery(this).addClass('textarea-processed'), staticOffset = null;
// Make sure that teaser.js has done its magic before converting this textarea.
if (Drupal.behaviors.teaser && textarea.is(('.teaser:not(.teaser-processed)'))) {
@@ -11,22 +11,22 @@ Drupal.behaviors.textarea = function(con
// 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));
+ jQuery(this).wrap('
')
+ .parent().append(jQuery('
').mousedown(startDrag));
// Inherit visibility
- if ($(this).is('[@disabled]')) {
- $(this).parent().hide();
- $(this).show();
+ if (jQuery(this).is('[@disabled]')) {
+ 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() - e.pageY;
textarea.css('opacity', 0.25);
- $(document).mousemove(performDrag).mouseup(endDrag);
+ jQuery(document).mousemove(performDrag).mouseup(endDrag);
return false;
}
@@ -36,8 +36,8 @@ Drupal.behaviors.textarea = function(con
}
function endDrag(e) {
- $(document).unbind("mousemove");
- $(document).unbind("mouseup");
+ jQuery(document).unbind("mousemove");
+ jQuery(document).unbind("mouseup");
textarea.css('opacity', 1);
}
});
Index: misc/farbtastic/farbtastic.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/farbtastic/farbtastic.js,v
retrieving revision 1.4
diff -u -p -r1.4 farbtastic.js
--- misc/farbtastic/farbtastic.js 1 Jun 2007 09:05:45 -0000 1.4
+++ misc/farbtastic/farbtastic.js 27 Nov 2007 14:17:05 -0000
@@ -2,12 +2,12 @@
// Farbtastic 1.2
jQuery.fn.farbtastic = function (callback) {
- $.farbtastic(this, callback);
+ jQuery.farbtastic(this, callback);
return this;
};
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');
@@ -326,4 +326,4 @@ jQuery._farbtastic = function (container
if (callback) {
fb.linkTo(callback);
}
-};
\ No newline at end of file
+};
Index: modules/block/block.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.js,v
retrieving revision 1.1
diff -u -p -r1.1 block.js
--- modules/block/block.js 14 Nov 2007 09:49:30 -0000 1.1
+++ modules/block/block.js 27 Nov 2007 14:17:05 -0000
@@ -7,7 +7,7 @@
* objects initialized in that behavior to update the row.
*/
Drupal.behaviors.blockDrag = function(context) {
- var table = $('table#blocks');
+ var table = jQuery('table#blocks');
var tableDrag = Drupal.tableDrag.blocks; // Get the blocks tableDrag object.
// Add a handler for when a row is swapped, update empty regions.
@@ -23,11 +23,11 @@ Drupal.behaviors.blockDrag = function(co
// Add a handler so when a row is dropped, update fields dropped into new regions.
tableDrag.onDrop = function() {
dragObject = this;
- if ($(dragObject.rowObject.element).prev('tr').is('.region-message')) {
- var regionRow = $(dragObject.rowObject.element).prev('tr').get(0);
+ if (jQuery(dragObject.rowObject.element).prev('tr').is('.region-message')) {
+ var regionRow = jQuery(dragObject.rowObject.element).prev('tr').get(0);
var regionName = regionRow.className.replace(/([^ ]+[ ]+)*region-([^ ]+)-message([ ]+[^ ]+)*/, '$2');
- var regionField = $('select.block-region-select', dragObject.rowObject.element);
- var weightField = $('select.block-weight', dragObject.rowObject.element);
+ var regionField = jQuery('select.block-region-select', dragObject.rowObject.element);
+ var weightField = jQuery('select.block-weight', dragObject.rowObject.element);
var oldRegionName = weightField[0].className.replace(/([^ ]+[ ]+)*block-weight-([^ ]+)([ ]+[^ ]+)*/, '$2');
if (!regionField.is('.block-region-'+ regionName)) {
@@ -39,29 +39,29 @@ Drupal.behaviors.blockDrag = function(co
};
// Add the behavior to each region select list.
- $('select.block-region-select:not(.blockregionselect-processed)', context).each(function() {
- $(this).change(function(event) {
+ jQuery('select.block-region-select:not(.blockregionselect-processed)', context).each(function() {
+ jQuery(this).change(function(event) {
// Make our new row and select field.
- var row = $(this).parents('tr:first');
- var select = $(this);
+ var row = jQuery(this).parents('tr:first');
+ var select = jQuery(this);
tableDrag.rowObject = new tableDrag.row(row);
// Find the correct region and insert the row as the first in the region.
- $('tr.region-message', table).each(function() {
- if ($(this).is('.region-' + select[0].value + '-message')) {
+ jQuery('tr.region-message', table).each(function() {
+ if (jQuery(this).is('.region-' + select[0].value + '-message')) {
// Add the new row and remove the old one.
- $(this).after(row);
+ jQuery(this).after(row);
// Manually update weights and restripe.
tableDrag.updateFields(row.get(0));
tableDrag.rowObject.changed = true;
if (tableDrag.oldRowElement) {
- $(tableDrag.oldRowElement).removeClass('drag-previous');
+ jQuery(tableDrag.oldRowElement).removeClass('drag-previous');
}
tableDrag.oldRowElement = row.get(0);
tableDrag.restripeTable();
tableDrag.rowObject.markChanged();
tableDrag.oldRowElement = row;
- $(row).addClass('drag-previous');
+ jQuery(row).addClass('drag-previous');
}
});
@@ -70,25 +70,25 @@ Drupal.behaviors.blockDrag = function(co
// Remove focus from selectbox.
select.get(0).blur();
});
- $(this).addClass('blockregionselect-processed');
+ jQuery(this).addClass('blockregionselect-processed');
});
var checkEmptyRegions = function(table, rowObject) {
- $('tr.region-message', table).each(function() {
+ jQuery('tr.region-message', table).each(function() {
// If the dragged row is in this region, but above the message row, swap it down one space.
- if ($(this).prev('tr').get(0) == rowObject.element) {
+ if (jQuery(this).prev('tr').get(0) == rowObject.element) {
// Prevent a recursion problem when using the keyboard to move rows up.
if ((rowObject.method != 'keyboard' || rowObject.direction == 'down')) {
rowObject.swap('after', this);
}
}
// This region has become empty
- if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').size() == 0) {
- $(this).removeClass('region-populated').addClass('region-empty');
+ if (jQuery(this).next('tr').is(':not(.draggable)') || jQuery(this).next('tr').size() == 0) {
+ jQuery(this).removeClass('region-populated').addClass('region-empty');
}
// This region has become populated.
- else if ($(this).is('.region-empty')) {
- $(this).removeClass('region-empty').addClass('region-populated');
+ else if (jQuery(this).is('.region-empty')) {
+ jQuery(this).removeClass('region-empty').addClass('region-populated');
}
});
};
Index: modules/book/book.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.js,v
retrieving revision 1.3
diff -u -p -r1.3 book.js
--- modules/book/book.js 12 Sep 2007 18:29:32 -0000 1.3
+++ modules/book/book.js 27 Nov 2007 14:17:06 -0000
@@ -2,15 +2,15 @@
Drupal.behaviors.bookSelect = function(context) {
// This behavior attaches by ID, so is only valid once on a page.
- if ($('#edit-book-bid.book-select-processed').size()) {
+ if (jQuery('#edit-book-bid.book-select-processed').size()) {
return;
}
// Hide the button in the node form, since it's not needed when JS is enabled.
- $('#edit-book-pick-book').css('display', 'none');
+ jQuery('#edit-book-pick-book').css('display', 'none');
// Binds a function to the keyup and change actions of the book select to
// retrieve parent options. Mark as processed so this binding is only done once.
- $('#edit-book-bid')
+ jQuery('#edit-book-bid')
.keyup(Drupal.bookFillSelect)
.change(Drupal.bookFillSelect)
.addClass('book-select-processed');
@@ -22,14 +22,14 @@ Drupal.bookFillSelect = function() {
// Create a progress bar and substitute it for the parent select.
pb = new Drupal.progressBar('book_progress');
pb.setProgress(-1, Drupal.t('Updating parents...'));
- $('#edit-book-plid-wrapper').html(pb.element);
+ jQuery('#edit-book-plid-wrapper').html(pb.element);
- $.ajax({
- url: Drupal.settings.book.formCallback +'/'+ $('#'+ Drupal.settings.book.formId +' input[name=form_build_id]').val() +'/'+ $('#edit-book-bid').val(),
+ jQuery.ajax({
+ url: Drupal.settings.book.formCallback +'/'+ jQuery('#'+ Drupal.settings.book.formId +' input[name=form_build_id]').val() +'/'+ jQuery('#edit-book-bid').val(),
dataType: 'json',
success: function(data) {
// Insert the new select, and remove the progress bar.
- $('#edit-book-plid-wrapper').after(data['book']).remove();
+ jQuery('#edit-book-plid-wrapper').after(data['book']).remove();
}
});
};
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.448
diff -u -p -r1.448 book.module
--- modules/book/book.module 26 Nov 2007 16:36:43 -0000 1.448
+++ modules/book/book.module 27 Nov 2007 14:17:06 -0000
@@ -363,7 +363,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.6
diff -u -p -r1.6 color.js
--- modules/color/color.js 12 Sep 2007 18:29:32 -0000 1.6
+++ modules/color/color.js 27 Nov 2007 14:17:06 -0000
@@ -2,18 +2,18 @@
Drupal.behaviors.color = function (context) {
// This behavior attaches by ID, so is only valid once on a page.
- if ($('#color_scheme_form .color-form.color-processed').size()) {
+ if (jQuery('#color_scheme_form .color-form.color-processed').size()) {
return;
}
- var form = $('#color_scheme_form .color-form', context);
+ var form = jQuery('#color_scheme_form .color-form', context);
var inputs = [];
var hooks = [];
var locks = [];
var focused = null;
// Add Farbtastic
- $(form).prepend('
').addClass('color-processed');
- var farb = $.farbtastic('#placeholder');
+ jQuery(form).prepend('
').addClass('color-processed');
+ var farb = jQuery.farbtastic('#placeholder');
// Decode reference colors to HSL
var reference = Drupal.settings.color.reference;
@@ -22,10 +22,10 @@ Drupal.behaviors.color = function (conte
}
// Build preview
- $('#preview:not(.color-processed)')
+ jQuery('#preview:not(.color-processed)')
.append('
')
.addClass('color-processed');
- var gradient = $('#preview #gradient');
+ var gradient = jQuery('#preview #gradient');
var h = parseInt(gradient.css('height')) / 10;
for (i = 0; i < h; ++i) {
gradient.append('
');
@@ -33,14 +33,14 @@ Drupal.behaviors.color = function (conte
// 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(',');
@@ -56,11 +56,11 @@ Drupal.behaviors.color = function (conte
*/
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);
@@ -73,7 +73,7 @@ Drupal.behaviors.color = function (conte
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];
}
@@ -134,7 +134,7 @@ Drupal.behaviors.color = function (conte
*/
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'
});
@@ -147,12 +147,12 @@ Drupal.behaviors.color = function (conte
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);
}
@@ -173,7 +173,7 @@ Drupal.behaviors.color = function (conte
* Reset the color scheme selector.
*/
function resetScheme() {
- $('#edit-scheme', form).each(function () {
+ jQuery('#edit-scheme', form).each(function () {
this.selectedIndex = this.options.length - 1;
});
}
@@ -182,7 +182,7 @@ Drupal.behaviors.color = function (conte
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');
@@ -190,12 +190,12 @@ Drupal.behaviors.color = function (conte
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);
@@ -206,42 +206,42 @@ Drupal.behaviors.color = function (conte
// 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/comment/comment.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.js,v
retrieving revision 1.5
diff -u -p -r1.5 comment.js
--- modules/comment/comment.js 12 Sep 2007 18:29:32 -0000 1.5
+++ modules/comment/comment.js 27 Nov 2007 14:17:06 -0000
@@ -6,7 +6,7 @@ Drupal.behaviors.comment = function (con
for (i=0;i<3;i++) {
cookie = Drupal.comment.getCookie('comment_info_' + parts[i]);
if (cookie != '') {
- $("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context)
+ jQuery("#comment-form input[name=" + parts[i] + "]:not(.comment-processed)", context)
.val(cookie)
.addClass('comment-processed');
}
Index: modules/openid/openid.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.js,v
retrieving revision 1.4
diff -u -p -r1.4 openid.js
--- modules/openid/openid.js 20 Nov 2007 10:00:04 -0000 1.4
+++ modules/openid/openid.js 27 Nov 2007 14:17:11 -0000
@@ -1,38 +1,38 @@
// $Id: openid.js,v 1.4 2007/11/20 10:00:04 goba Exp $
Drupal.behaviors.openid = function (context) {
- var $loginElements = $("#edit-name-wrapper, #edit-pass-wrapper, a.openid-link");
- var $openidElements = $("#edit-openid-url-wrapper, a.user-link");
+ var $loginElements = jQuery("#edit-name-wrapper, #edit-pass-wrapper, a.openid-link");
+ var $openidElements = jQuery("#edit-openid-url-wrapper, a.user-link");
// This behavior attaches by ID, so is only valid once on a page.
- if (!$("#edit-openid-url.openid-processed").size() && $("#edit-openid-url").val()) {
- $("#edit-openid-url").addClass('openid-processed');
+ if (!jQuery("#edit-openid-url.openid-processed").size() && jQuery("#edit-openid-url").val()) {
+ jQuery("#edit-openid-url").addClass('openid-processed');
$loginElements.hide();
// Use .css("display", "block") instead of .show() to be Konqueror friendly.
$openidElements.css("display", "block");
}
- $("a.openid-link:not(.openid-processed)", context)
+ jQuery("a.openid-link:not(.openid-processed)", context)
.addClass('openid-processed')
.click( function() {
$loginElements.hide();
$openidElements.css("display", "block");
// Remove possible error message.
- $("#edit-name, #edit-pass").removeClass("error");
- $("div.messages.error").hide();
+ jQuery("#edit-name, #edit-pass").removeClass("error");
+ jQuery("div.messages.error").hide();
// Set focus on OpenID URL field.
- $("#edit-openid-url")[0].focus();
+ jQuery("#edit-openid-url")[0].focus();
return false;
});
- $("a.user-link:not(.openid-processed)", context)
+ jQuery("a.user-link:not(.openid-processed)", context)
.addClass('openid-processed')
.click(function() {
$openidElements.hide();
$loginElements.css("display", "block");
// Clear OpenID URL field and remove possible error message.
- $("#edit-openid-url").val('').removeClass("error");
- $("div.messages.error").css("display", "block");
+ jQuery("#edit-openid-url").val('').removeClass("error");
+ jQuery("div.messages.error").css("display", "block");
// Set focus on username field.
- $("#edit-name")[0].focus();
+ jQuery("#edit-name")[0].focus();
return false;
});
};
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.250
diff -u -p -r1.250 poll.module
--- modules/poll/poll.module 26 Nov 2007 11:44:03 -0000 1.250
+++ modules/poll/poll.module 27 Nov 2007 14:17:11 -0000
@@ -637,7 +637,7 @@ function poll_view_results(&$node, $teas
*/
function theme_poll_choices($form) {
// Change the button title to reflect the behavior when using JavaScript.
- drupal_add_js('if (Drupal.jsEnabled) { $(document).ready(function() { $("#edit-poll-more").val("'. t('Add another choice') .'"); }); }', 'inline');
+ drupal_add_js('if (Drupal.jsEnabled) { jQuery(document).ready(function() { jQuery("#edit-poll-more").val("'. t('Add another choice') .'"); }); }', 'inline');
$rows = array();
$headers = array(
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.13
diff -u -p -r1.13 system.js
--- modules/system/system.js 27 Oct 2007 11:32:05 -0000 1.13
+++ modules/system/system.js 27 Nov 2007 14:17:13 -0000
@@ -11,27 +11,27 @@ Drupal.behaviors.cleanURLsSettingsCheck
// This behavior attaches by ID, so is only valid once on a page.
// Also skip if we are on an install page, as Drupal.cleanURLsInstallCheck will handle
// the processing.
- if ($("#clean-url.clean-url-processed, #clean-url.install").size()) {
+ if (jQuery("#clean-url.clean-url-processed, #clean-url.install").size()) {
return;
}
var url = location.pathname +"admin/settings/clean-urls/check";
- $("#clean-url .description span").html(''+ Drupal.t('Testing clean URLs...') +"
");
- $("#clean-url p").hide();
- $.ajax({
+ jQuery("#clean-url .description span").html(''+ Drupal.t('Testing clean URLs...') +"
");
+ jQuery("#clean-url p").hide();
+ jQuery.ajax({
url: location.protocol +"//"+ location.host + url,
dataType: 'json',
success: function () {
// Check was successful.
- $("#clean-url input.form-radio").attr("disabled", false);
- $("#clean-url .description span").append(''+ Drupal.t('Your server has been successfully tested to support this feature.') +"
");
- $("#testing").toggle();
+ jQuery("#clean-url input.form-radio").attr("disabled", false);
+ jQuery("#clean-url .description span").append(''+ Drupal.t('Your server has been successfully tested to support this feature.') +"
");
+ jQuery("#testing").toggle();
},
error: function() {
// Check failed.
- $("#clean-url .description span").append(''+ Drupal.t('Your system configuration does not currently support this feature. The
handbook page on Clean URLs has additional troubleshooting information.') +"
");
+ jQuery("#clean-url .description span").append(''+ Drupal.t('Your system configuration does not currently support this feature. The
handbook page on Clean URLs has additional troubleshooting information.') +"
");
}
});
- $("#clean-url").addClass('clean-url-processed');
+ jQuery("#clean-url").addClass('clean-url-processed');
};
/**
@@ -43,23 +43,23 @@ Drupal.behaviors.cleanURLsSettingsCheck
*/
Drupal.cleanURLsInstallCheck = function() {
var url = location.protocol +"//"+ location.host + location.pathname.replace(/\/[^\/]*$/, "/") +"admin/settings/clean-urls/check";
- $("#clean-url .description").append(''+ Drupal.settings.cleanURL.testing +"
");
- $("#clean-url.install").css("display", "block");
- $.ajax({
+ jQuery("#clean-url .description").append(''+ Drupal.settings.cleanURL.testing +"
");
+ jQuery("#clean-url.install").css("display", "block");
+ jQuery.ajax({
url: url,
dataType: 'json',
success: function () {
// Check was successful.
- $("#clean-url input.form-radio").attr("disabled", false);
- $("#clean-url .description span").append(''+ Drupal.settings.cleanURL.success +"
");
- $("#clean-url input.form-radio").attr("checked", 1);
+ jQuery("#clean-url input.form-radio").attr("disabled", false);
+ jQuery("#clean-url .description span").append(''+ Drupal.settings.cleanURL.success +"
");
+ jQuery("#clean-url input.form-radio").attr("checked", 1);
},
error: function() {
// Check failed.
- $("#clean-url .description span").append(''+ Drupal.settings.cleanURL.failure +"
");
+ jQuery("#clean-url .description span").append(''+ Drupal.settings.cleanURL.failure +"
");
}
});
- $("#clean-url").addClass('clean-url-processed');
+ jQuery("#clean-url").addClass('clean-url-processed');
};
/**
@@ -71,12 +71,12 @@ Drupal.behaviors.copyFieldValue = functi
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 (!jQuery('#'+ sourceId + '.copy-field-values-processed').size(), context) {
// Add the behavior to update target fields on blur of the primary field.
- sourceField = $('#' + sourceId);
+ sourceField = jQuery('#' + sourceId);
sourceField.bind('blur', function() {
for (var delta in targetIds) {
- var targetField = $('#'+ targetIds[delta]);
+ var targetField = jQuery('#'+ targetIds[delta]);
if (targetField.val() == '') {
targetField.val(this.value);
}
@@ -92,19 +92,19 @@ Drupal.behaviors.copyFieldValue = functi
*/
Drupal.behaviors.dateTime = function(context) {
// Show/hide custom format depending on the select's value.
- $('select.date-format:not(.date-time-processed)', context).change(function() {
- $(this).addClass('date-time-processed').parents("div.date-container").children("div.custom-container")[$(this).val() == "custom" ? "show" : "hide"]();
+ jQuery('select.date-format:not(.date-time-processed)', context).change(function() {
+ jQuery(this).addClass('date-time-processed').parents("div.date-container").children("div.custom-container")[jQuery(this).val() == "custom" ? "show" : "hide"]();
});
// Attach keyup handler to custom format inputs.
- $('input.custom-format:not(.date-time-processed)', context).addClass('date-time-processed').keyup(function() {
- var input = $(this);
+ jQuery('input.custom-format:not(.date-time-processed)', context).addClass('date-time-processed').keyup(function() {
+ var input = jQuery(this);
var url = Drupal.settings.dateTime.lookup +(Drupal.settings.dateTime.lookup.match(/\?q=/) ? "&format=" : "?format=") + Drupal.encodeURIComponent(input.val());
- $.getJSON(url, function(data) {
- $("div.description span", input.parent()).html(data);
+ jQuery.getJSON(url, function(data) {
+ jQuery("div.description span", input.parent()).html(data);
});
});
// Trigger the event handler to show the form input if necessary.
- $('select.date-format', context).trigger('change');
+ jQuery('select.date-format', context).trigger('change');
};
Index: modules/taxonomy/taxonomy.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.js,v
retrieving revision 1.1
diff -u -p -r1.1 taxonomy.js
--- modules/taxonomy/taxonomy.js 26 Nov 2007 19:46:52 -0000 1.1
+++ modules/taxonomy/taxonomy.js 27 Nov 2007 14:17:14 -0000
@@ -7,30 +7,30 @@
* objects initialized in that behavior to update the row.
*/
Drupal.behaviors.termDrag = function(context) {
- var table = $('#taxonomy', context);
+ var table = jQuery('#taxonomy', context);
var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object.
- var rows = $('tr', table).size();
+ var rows = jQuery('tr', table).size();
// When a row is swapped, keep previous and next page classes set.
tableDrag.row.prototype.onSwap = function(swappedRow) {
- $('tr.taxonomy-term-preview', table).removeClass('taxonomy-term-preview');
- $('tr.taxonomy-term-divider-top', table).removeClass('taxonomy-term-divider-top');
- $('tr.taxonomy-term-divider-bottom', table).removeClass('taxonomy-term-divider-bottom');
+ jQuery('tr.taxonomy-term-preview', table).removeClass('taxonomy-term-preview');
+ jQuery('tr.taxonomy-term-divider-top', table).removeClass('taxonomy-term-divider-top');
+ jQuery('tr.taxonomy-term-divider-bottom', table).removeClass('taxonomy-term-divider-bottom');
if (Drupal.settings.taxonomy.backPeddle) {
for (var n = 0; n < Drupal.settings.taxonomy.backPeddle; n++) {
- $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
+ jQuery(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
}
- $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top');
- $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle]).addClass('taxonomy-term-divider-bottom');
+ jQuery(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top');
+ jQuery(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle]).addClass('taxonomy-term-divider-bottom');
}
if (Drupal.settings.taxonomy.forwardPeddle) {
for (var n = rows - Drupal.settings.taxonomy.forwardPeddle - 1; n < rows - 1; n++) {
- $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
+ jQuery(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview');
}
- $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top');
- $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom');
+ jQuery(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top');
+ jQuery(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom');
}
};
};
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 27 Nov 2007 14:17:15 -0000
@@ -6,28 +6,28 @@
*/
Drupal.behaviors.password = function(context) {
var translate = Drupal.settings.password;
- $("input.password-field:not(.password-processed)", context).each(function() {
- var passwordInput = $(this).addClass('password-processed');
- var parent = $(this).parent();
+ jQuery("input.password-field:not(.password-processed)", context).each(function() {
+ var passwordInput = jQuery(this).addClass('password-processed');
+ var parent = jQuery(this).parent();
// Wait this number of milliseconds before checking password.
var monitorDelay = 700;
// Add the password strength layers.
- $(this).after(''+ translate.strengthTitle +' ').parent();
- var passwordStrength = $("span.password-strength", parent);
- var passwordResult = $("span.password-result", passwordStrength);
+ jQuery(this).after(''+ translate.strengthTitle +' ').parent();
+ var passwordStrength = jQuery("span.password-strength", parent);
+ var passwordResult = jQuery("span.password-result", passwordStrength);
parent.addClass("password-parent");
// Add the password confirmation layer.
- var outerItem = $(this).parent().parent();
- $("input.password-confirm", outerItem).after(''+ translate["confirmTitle"] +' ').parent().addClass("confirm-parent");
- var confirmInput = $("input.password-confirm", outerItem);
- var confirmResult = $("span.password-confirm", outerItem);
- var confirmChild = $("span", confirmResult);
+ var outerItem = jQuery(this).parent().parent();
+ jQuery("input.password-confirm", outerItem).after(''+ translate["confirmTitle"] +' ').parent().addClass("confirm-parent");
+ var confirmInput = jQuery("input.password-confirm", outerItem);
+ var confirmResult = jQuery("span.password-confirm", outerItem);
+ var confirmChild = jQuery("span", confirmResult);
// Add the description box at the end.
- $(confirmInput).parent().after('
');
- var passwordDescription = $("div.password-description", $(this).parent().parent()).hide();
+ jQuery(confirmInput).parent().after('
');
+ var passwordDescription = jQuery("div.password-description", jQuery(this).parent().parent()).hide();
// Check the password fields.
var passwordCheck = function () {
@@ -172,7 +172,7 @@ Drupal.evaluatePasswordStrength = functi
*/
Drupal.setDefaultTimezone = function() {
var offset = new Date().getTimezoneOffset() * -60;
- $("#edit-date-default-timezone, #edit-user-register-timezone").val(offset);
+ jQuery("#edit-date-default-timezone, #edit-user-register-timezone").val(offset);
};
/**
@@ -181,8 +181,8 @@ Drupal.setDefaultTimezone = function() {
* "Picture support" radio buttons.
*/
Drupal.behaviors.userSettings = function (context) {
- $('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
- $('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
+ jQuery('div.user-admin-picture-radios input[type=radio]:not(.userSettings-processed)', context).addClass('userSettings-processed').click(function () {
+ jQuery('div.user-admin-picture-settings', context)[['hide', 'show'][this.value]]();
});
};
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.868
diff -u -p -r1.868 user.module
--- modules/user/user.module 26 Nov 2007 16:36:44 -0000 1.868
+++ modules/user/user.module 27 Nov 2007 14:17:15 -0000
@@ -2286,7 +2286,7 @@ function user_register() {
drupal_add_js('
// Global Killswitch
if (Drupal.jsEnabled) {
- $(document).ready(function() {
+ jQuery(document).ready(function() {
Drupal.setDefaultTimezone();
});
}', 'inline');