replace mootools getelement and addevent

This commit is contained in:
Andrew Bauer 2021-01-11 09:06:21 -06:00
parent 2094f78adf
commit 9e9860d6c0
1 changed files with 5 additions and 7 deletions

View File

@ -467,16 +467,14 @@ function drawZonePoints() {
});
}); // end $j.each point
var tables = document.getElementById('zonePoints').getElement('table').getElements('table');
tables.each( function(table) {
table.getElement('tbody').empty();
} );
var tables = $j('#zonePoints table table');
tables.find('tbody').empty();
for ( var i = 0; i < zone['Points'].length; i++ ) {
var row = document.createElement('tr');
row.id = 'row'+i;
row.addEvent('mouseover', highlightOn.bind(i, i));
row.addEvent('mouseout', highlightOff.bind(i, i));
$j(row).mouseover(highlightOn.bind(i, i));
$j(row).mouseout(highlightOn.bind(i, i));
var cell = document.createElement('td');
$j(cell).text(i+1).appendTo(row);
@ -533,7 +531,7 @@ function drawZonePoints() {
}
$j(cell).appendTo(row);
$j(row).appendTo(tables[i%tables.length].getElement('tbody'));
$j(row).appendTo(tables.eq((i%tables.length)).find('tbody'));
} // end foreach point
// Sets up the SVG polygon
updateZoneImage();