| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 2 /** 3 * Move a block in the blocks table from one region to another via select list. 4 * 5 * This behavior is dependent on the tableDrag behavior, since it uses the 6 * objects initialized in that behavior to update the row. 7 */ 8 Drupal.behaviors.termDrag = function(context) { 9 var table = $('#taxonomy', context); 10 var tableDrag = Drupal.tableDrag.taxonomy; // Get the blocks tableDrag object. 11 var rows = $('tr', table).size(); 12 13 // When a row is swapped, keep previous and next page classes set. 14 tableDrag.row.prototype.onSwap = function(swappedRow) { 15 $('tr.taxonomy-term-preview', table).removeClass('taxonomy-term-preview'); 16 $('tr.taxonomy-term-divider-top', table).removeClass('taxonomy-term-divider-top'); 17 $('tr.taxonomy-term-divider-bottom', table).removeClass('taxonomy-term-divider-bottom'); 18 19 if (Drupal.settings.taxonomy.backPeddle) { 20 for (var n = 0; n < Drupal.settings.taxonomy.backPeddle; n++) { 21 $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview'); 22 } 23 $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle - 1]).addClass('taxonomy-term-divider-top'); 24 $(table[0].tBodies[0].rows[Drupal.settings.taxonomy.backPeddle]).addClass('taxonomy-term-divider-bottom'); 25 } 26 27 if (Drupal.settings.taxonomy.forwardPeddle) { 28 for (var n = rows - Drupal.settings.taxonomy.forwardPeddle - 1; n < rows - 1; n++) { 29 $(table[0].tBodies[0].rows[n]).addClass('taxonomy-term-preview'); 30 } 31 $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 2]).addClass('taxonomy-term-divider-top'); 32 $(table[0].tBodies[0].rows[rows - Drupal.settings.taxonomy.forwardPeddle - 1]).addClass('taxonomy-term-divider-bottom'); 33 } 34 }; 35 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |