summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-13 23:15:09 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-03-13 23:15:09 +0000
commitb77475baf5eee88f7ca08adaf53c7c5eda6aca58 (patch)
tree4a1bf4029dc06956ceaa9c7373dbabb85e4dc3d0 /modules/taxonomy
parent35794257c39c915f15c23b968cd9edd166a12696 (diff)
downloadbrdo-b77475baf5eee88f7ca08adaf53c7c5eda6aca58.tar.gz
brdo-b77475baf5eee88f7ca08adaf53c7c5eda6aca58.tar.bz2
#360081 by quicksketch: Stop using global variables for JavaScript settings.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/taxonomy/taxonomy.js b/modules/taxonomy/taxonomy.js
index 2ea68eb08..d047950df 100644
--- a/modules/taxonomy/taxonomy.js
+++ b/modules/taxonomy/taxonomy.js
@@ -8,7 +8,7 @@
* objects initialized in that behavior to update the row.
*/
Drupal.behaviors.termDrag = {
- attach: function(context) {
+ attach: function(context, settings) {
var table = $('#taxonomy', context);
var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object.
var rows = $('tr', table).size();
@@ -19,20 +19,20 @@ Drupal.behaviors.termDrag = {
$('tr.taxonomy-term-divider-top', table).removeClass('taxonomy-term-divider-top');
$('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++) {
+ if (settings.taxonomy.backPeddle) {
+ for (var n = 0; n < settings.taxonomy.backPeddle; n++) {
$(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');
+ $(table[0].tBodies[0].rows[settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top');
+ $(table[0].tBodies[0].rows[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++) {
+ if (settings.taxonomy.forwardPeddle) {
+ for (var n = rows - settings.taxonomy.forwardPeddle - 1; n < rows - 1; n++) {
$(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');
+ $(table[0].tBodies[0].rows[rows - settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top');
+ $(table[0].tBodies[0].rows[rows - settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom');
}
};
}