summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.js3
-rw-r--r--modules/book/book.module2
-rw-r--r--modules/color/color.js3
-rw-r--r--modules/comment/comment.js3
-rw-r--r--modules/node/content_types.js5
-rw-r--r--modules/openid/openid.js3
-rw-r--r--modules/profile/profile.js3
-rw-r--r--modules/simpletest/simpletest.js5
-rw-r--r--modules/simpletest/tests/common.test4
-rw-r--r--modules/system/system.js7
-rw-r--r--modules/taxonomy/taxonomy.js3
-rw-r--r--modules/user/user.js5
12 files changed, 39 insertions, 7 deletions
diff --git a/modules/block/block.js b/modules/block/block.js
index eeb9306e0..c9c00fab2 100644
--- a/modules/block/block.js
+++ b/modules/block/block.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Move a block in the blocks table from one region to another via select list.
@@ -95,3 +96,5 @@ Drupal.behaviors.blockDrag = {
};
}
};
+
+})(jQuery);
diff --git a/modules/book/book.module b/modules/book/book.module
index f2ffb7177..9ef7cecbb 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -415,7 +415,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(function() { jQuery('#edit-book-pick-book').css('display', 'none'); }); }", 'inline');
$form['book'] = array(
'#type' => 'fieldset',
diff --git a/modules/color/color.js b/modules/color/color.js
index 89c94dc37..ff2e51952 100644
--- a/modules/color/color.js
+++ b/modules/color/color.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
Drupal.behaviors.color = {
attach: function(context) {
@@ -251,3 +252,5 @@ Drupal.behaviors.color = {
preview();
}
};
+
+})(jQuery);
diff --git a/modules/comment/comment.js b/modules/comment/comment.js
index b951f4211..acd450200 100644
--- a/modules/comment/comment.js
+++ b/modules/comment/comment.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
Drupal.behaviors.comment = {
attach: function(context) {
@@ -35,3 +36,5 @@ Drupal.comment.getCookie = function(name) {
return returnValue;
};
+
+})(jQuery);
diff --git a/modules/node/content_types.js b/modules/node/content_types.js
index 61ff33493..7f6ff3a2d 100644
--- a/modules/node/content_types.js
+++ b/modules/node/content_types.js
@@ -1,3 +1,6 @@
+// $Id$
+(function($) {
+
Drupal.behaviors.contentTypes = {
attach: function() {
if ($('#edit-type').val() == $('#edit-name').val().toLowerCase().replace(/[^a-z0-9]+/g, '_').replace(/_+/g, '_') || $('#edit-type').val() == '') {
@@ -22,3 +25,5 @@ Drupal.behaviors.contentTypes = {
}
}
};
+
+})(jQuery);
diff --git a/modules/openid/openid.js b/modules/openid/openid.js
index eeb84300d..1511348c8 100644
--- a/modules/openid/openid.js
+++ b/modules/openid/openid.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
Drupal.behaviors.openid = {
attach: function(context) {
@@ -38,3 +39,5 @@ Drupal.behaviors.openid = {
});
}
};
+
+})(jQuery);
diff --git a/modules/profile/profile.js b/modules/profile/profile.js
index d14be4b7d..7668e0ac5 100644
--- a/modules/profile/profile.js
+++ b/modules/profile/profile.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Add functionality to the profile drag and drop table.
@@ -54,3 +55,5 @@ Drupal.behaviors.profileDrag = {
};
}
};
+
+})(jQuery); \ No newline at end of file
diff --git a/modules/simpletest/simpletest.js b/modules/simpletest/simpletest.js
index efdc28366..9026de11b 100644
--- a/modules/simpletest/simpletest.js
+++ b/modules/simpletest/simpletest.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Add the cool table collapsing on the testing overview page.
@@ -76,7 +77,7 @@ Drupal.behaviors.simpleTestSelectAll = {
});
}
$(groupCheckbox).attr('checked', (checkedTests == testCheckboxes.length));
- }
+ };
// Have the single-test checkboxes follow the group checkbox.
groupCheckbox.change(function() {
@@ -99,3 +100,5 @@ Drupal.behaviors.simpleTestSelectAll = {
});
}
};
+
+})(jQuery);
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 3aa248e6b..1bd40c27e 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -445,7 +445,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test adding inline scripts.
*/
function testAddInline() {
- $inline = '$(document).ready(function(){});';
+ $inline = 'jQuery(function(){});';
$javascript = drupal_add_js($inline, array('type' => 'inline', 'scope' => 'footer'));
$this->assertTrue(array_key_exists('misc/jquery.js', $javascript), t('jQuery is added when inline scripts are added.'));
$data = end($javascript);
@@ -456,7 +456,7 @@ class JavaScriptTestCase extends DrupalWebTestCase {
* Test drupal_get_js() with a footer scope.
*/
function testFooterHTML() {
- $inline = '$(document).ready(function(){});';
+ $inline = 'jQuery(function(){});';
drupal_add_js($inline, array('type' => 'inline', 'scope' => 'footer'));
$javascript = drupal_get_js('footer');
$this->assertTrue(strpos($javascript, $inline) > 0, t('Rendered JavaScript footer returns the inline code.'));
diff --git a/modules/system/system.js b/modules/system/system.js
index 514dfb40a..8a47c3d10 100644
--- a/modules/system/system.js
+++ b/modules/system/system.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Internal function to check using Ajax if clean URLs can be enabled on the
@@ -80,7 +81,7 @@ Drupal.behaviors.copyFieldValue = {
for (var sourceId in Drupal.settings.copyFieldValue) {
// Get the list of target fields.
targetIds = Drupal.settings.copyFieldValue[sourceId];
- if (!$('#'+ sourceId + '.copy-field-values-processed').size(), context) {
+ if (!$('#'+ sourceId + '.copy-field-values-processed', context).size()) {
// Add the behavior to update target fields on blur of the primary field.
sourceField = $('#' + sourceId);
sourceField.bind('blur', function() {
@@ -131,4 +132,6 @@ Drupal.behaviors.poweredByPreview = {
$('img.powered-by-preview').attr('src', path);
});
}
-}; \ No newline at end of file
+};
+
+})(jQuery); \ No newline at end of file
diff --git a/modules/taxonomy/taxonomy.js b/modules/taxonomy/taxonomy.js
index bbf1f5c47..2ea68eb08 100644
--- a/modules/taxonomy/taxonomy.js
+++ b/modules/taxonomy/taxonomy.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Move a block in the blocks table from one region to another via select list.
@@ -36,3 +37,5 @@ Drupal.behaviors.termDrag = {
};
}
};
+
+})(jQuery);
diff --git a/modules/user/user.js b/modules/user/user.js
index 926a92137..0d3727a66 100644
--- a/modules/user/user.js
+++ b/modules/user/user.js
@@ -1,4 +1,5 @@
// $Id$
+(function($) {
/**
* Attach handlers to evaluate the strength of any password fields and to check
@@ -76,7 +77,7 @@ Drupal.behaviors.password = {
else {
confirmResult.css({ visibility: "hidden" });
}
- }
+ };
// Monitor keyup and blur events.
// Blur must be used because a mouse paste does not trigger keyup.
@@ -171,3 +172,5 @@ Drupal.behaviors.userSettings = {
});
}
};
+
+})(jQuery);