Move all files to 2017/
This commit is contained in:
parent
ac7370f67f
commit
2875863330
15717 changed files with 0 additions and 0 deletions
42
2017/web/core/modules/taxonomy/taxonomy.js
Normal file
42
2017/web/core/modules/taxonomy/taxonomy.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* DO NOT EDIT THIS FILE.
|
||||
* See the following change record for more information,
|
||||
* https://www.drupal.org/node/2815083
|
||||
* @preserve
|
||||
**/
|
||||
|
||||
(function ($, Drupal) {
|
||||
Drupal.behaviors.termDrag = {
|
||||
attach: function attach(context, settings) {
|
||||
var backStep = settings.taxonomy.backStep;
|
||||
var forwardStep = settings.taxonomy.forwardStep;
|
||||
|
||||
var tableDrag = Drupal.tableDrag.taxonomy;
|
||||
var $table = $('#taxonomy');
|
||||
var rows = $table.find('tr').length;
|
||||
|
||||
tableDrag.row.prototype.onSwap = function (swappedRow) {
|
||||
$table.find('tr.taxonomy-term-preview').removeClass('taxonomy-term-preview');
|
||||
$table.find('tr.taxonomy-term-divider-top').removeClass('taxonomy-term-divider-top');
|
||||
$table.find('tr.taxonomy-term-divider-bottom').removeClass('taxonomy-term-divider-bottom');
|
||||
|
||||
var tableBody = $table[0].tBodies[0];
|
||||
if (backStep) {
|
||||
for (var n = 0; n < backStep; n++) {
|
||||
$(tableBody.rows[n]).addClass('taxonomy-term-preview');
|
||||
}
|
||||
$(tableBody.rows[backStep - 1]).addClass('taxonomy-term-divider-top');
|
||||
$(tableBody.rows[backStep]).addClass('taxonomy-term-divider-bottom');
|
||||
}
|
||||
|
||||
if (forwardStep) {
|
||||
for (var k = rows - forwardStep - 1; k < rows - 1; k++) {
|
||||
$(tableBody.rows[k]).addClass('taxonomy-term-preview');
|
||||
}
|
||||
$(tableBody.rows[rows - forwardStep - 2]).addClass('taxonomy-term-divider-top');
|
||||
$(tableBody.rows[rows - forwardStep - 1]).addClass('taxonomy-term-divider-bottom');
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
})(jQuery, Drupal);
|
Reference in a new issue