source: sipes/cord/modules/taxonomy/taxonomy.js @ 8a8efa8

stableversion-3.0
Last change on this file since 8a8efa8 was b354002, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio del cord

  • Propiedad mode establecida a 100755
File size: 1.7 KB
Línea 
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 */
8Drupal.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};
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.