summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-14 13:46:20 -0500
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-14 13:46:20 -0500
commit476843c25e4da2ac1c6c375b2ee6e2c0f97275ff (patch)
treee6f669d2c3bf52ec814276050db4ffcb45b32d50 /modules
parent5251e90c982b867d4bc25386b30f098f365cd52c (diff)
downloadbrdo-476843c25e4da2ac1c6c375b2ee6e2c0f97275ff.tar.gz
brdo-476843c25e4da2ac1c6c375b2ee6e2c0f97275ff.tar.bz2
Issue #1346914 by droplet: Use .length instead of jQuery.size().
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.js2
-rw-r--r--modules/file/file.js4
-rw-r--r--modules/openid/openid.js2
-rw-r--r--modules/profile/profile.js2
-rw-r--r--modules/simpletest/simpletest.js4
-rw-r--r--modules/taxonomy/taxonomy.js2
-rw-r--r--modules/user/user.js2
7 files changed, 9 insertions, 9 deletions
diff --git a/modules/block/block.js b/modules/block/block.js
index ce4995dca..e36737441 100644
--- a/modules/block/block.js
+++ b/modules/block/block.js
@@ -153,7 +153,7 @@ Drupal.behaviors.blockDrag = {
}
}
// This region has become empty.
- if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').size() == 0) {
+ if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').length == 0) {
$(this).removeClass('region-populated').addClass('region-empty');
}
// This region has become populated.
diff --git a/modules/file/file.js b/modules/file/file.js
index 1071384f8..827374c0f 100644
--- a/modules/file/file.js
+++ b/modules/file/file.js
@@ -96,7 +96,7 @@ Drupal.file = Drupal.file || {
// Check if we're working with an "Upload" button.
var $enabledFields = [];
- if ($(this).parents('div.form-managed-file').size() > 0) {
+ if ($(this).parents('div.form-managed-file').length > 0) {
$enabledFields = $(this).parents('div.form-managed-file').find('input.form-file');
}
@@ -120,7 +120,7 @@ Drupal.file = Drupal.file || {
progressBar: function (event) {
var clickedButton = this;
var $progressId = $(clickedButton).parents('div.form-managed-file').find('input.file-progress');
- if ($progressId.size()) {
+ if ($progressId.length) {
var originalName = $progressId.attr('name');
// Replace the name with the required identifier.
diff --git a/modules/openid/openid.js b/modules/openid/openid.js
index fdc97fa06..4a09e5a49 100644
--- a/modules/openid/openid.js
+++ b/modules/openid/openid.js
@@ -7,7 +7,7 @@ Drupal.behaviors.openid = {
var cookie = $.cookie('Drupal.visitor.openid_identifier');
// This behavior attaches by ID, so is only valid once on a page.
- if (!$('#edit-openid-identifier.openid-processed').size()) {
+ if (!$('#edit-openid-identifier.openid-processed').length) {
if (cookie) {
$('#edit-openid-identifier').val(cookie);
}
diff --git a/modules/profile/profile.js b/modules/profile/profile.js
index f842aa08a..f262560d2 100644
--- a/modules/profile/profile.js
+++ b/modules/profile/profile.js
@@ -24,7 +24,7 @@ Drupal.behaviors.profileDrag = {
}
}
// This category has become empty
- if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').size() == 0) {
+ if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').length == 0) {
$(this).removeClass('category-populated').addClass('category-empty');
}
// This category has become populated.
diff --git a/modules/simpletest/simpletest.js b/modules/simpletest/simpletest.js
index c33ef982a..18ba73480 100644
--- a/modules/simpletest/simpletest.js
+++ b/modules/simpletest/simpletest.js
@@ -16,7 +16,7 @@ Drupal.behaviors.simpleTestMenuCollapse = {
$('div.simpletest-image').click(function () {
var trs = $(this).parents('tbody').children('.' + settings.simpleTest[this.id].testClass);
var direction = settings.simpleTest[this.id].imageDirection;
- var row = direction ? trs.size() - 1 : 0;
+ var row = direction ? trs.length - 1 : 0;
// If clicked in the middle of expanding a group, stop so we can switch directions.
if (timeout) {
@@ -35,7 +35,7 @@ Drupal.behaviors.simpleTestMenuCollapse = {
}
}
else {
- if (row < trs.size()) {
+ if (row < trs.length) {
$(trs[row]).removeClass('js-hide').show();
row++;
timeout = setTimeout(rowToggle, 20);
diff --git a/modules/taxonomy/taxonomy.js b/modules/taxonomy/taxonomy.js
index cc9cdf7a6..1a0c7908a 100644
--- a/modules/taxonomy/taxonomy.js
+++ b/modules/taxonomy/taxonomy.js
@@ -10,7 +10,7 @@ Drupal.behaviors.termDrag = {
attach: function (context, settings) {
var table = $('#taxonomy', context);
var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object.
- var rows = $('tr', table).size();
+ var rows = $('tr', table).length;
// When a row is swapped, keep previous and next page classes set.
tableDrag.row.prototype.onSwap = function (swappedRow) {
diff --git a/modules/user/user.js b/modules/user/user.js
index 73af27e5d..042668d81 100644
--- a/modules/user/user.js
+++ b/modules/user/user.js
@@ -180,7 +180,7 @@ Drupal.behaviors.fieldUserRegistration = {
attach: function (context, settings) {
var $checkbox = $('form#field-ui-field-edit-form input#edit-instance-settings-user-register-form');
- if ($checkbox.size()) {
+ if ($checkbox.length) {
$('input#edit-instance-required', context).once('user-register-form-checkbox', function () {
$(this).bind('change', function (e) {
if ($(this).attr('checked')) {