MediaWiki:Common.js: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 371: | Строка 371: | ||
rowspanCells.push({ cell: cell, rowIndex: rowIndex, rowspan: rowspan }); | rowspanCells.push({ cell: cell, rowIndex: rowIndex, rowspan: rowspan }); | ||
// Подсвечиваем строки, которые затрагивает ячейка с rowspan | // Подсвечиваем строки, которые затрагивает ячейка с rowspan | ||
var isRowspanHighlighted = false; | var isRowspanHighlighted = false; | ||
cell.addEventListener('mouseover', function() { | cell.addEventListener('mouseover', function() { | ||
if (!isRowspanHighlighted) { | if (!isRowspanHighlighted) { | ||
| Строка 393: | Строка 394: | ||
if (targetRow) { | if (targetRow) { | ||
Array.from(targetRow.children).forEach(function(targetCell) { | Array.from(targetRow.children).forEach(function(targetCell) { | ||
targetCell.style. | targetCell.style.removeProperty('background-color'); | ||
targetCell.style. | targetCell.style.removeProperty('color'); | ||
}); | }); | ||
} | } | ||
| Строка 421: | Строка 422: | ||
cell.addEventListener('mouseout', function() { | cell.addEventListener('mouseout', function() { | ||
cells.forEach(function(innerCell, innerIndex) { | cells.forEach(function(innerCell, innerIndex) { | ||
innerCell.style. | innerCell.style.removeProperty('background-color'); | ||
innerCell.style. | innerCell.style.removeProperty('color'); | ||
}); | }); | ||
| Строка 428: | Строка 429: | ||
rowspanCells.forEach(function(rowspanCell) { | rowspanCells.forEach(function(rowspanCell) { | ||
if (rowIndex >= rowspanCell.rowIndex && rowIndex < rowspanCell.rowIndex + rowspanCell.rowspan) { | if (rowIndex >= rowspanCell.rowIndex && rowIndex < rowspanCell.rowIndex + rowspanCell.rowspan) { | ||
rowspanCell.cell.style. | rowspanCell.cell.style.removeProperty('background-color'); | ||
rowspanCell.cell.style. | rowspanCell.cell.style.removeProperty('color'); | ||
} | } | ||
}); | }); | ||