From 9e9860d6c0c2bcddec58af1257e9b015cbfb949c Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 11 Jan 2021 09:06:21 -0600 Subject: [PATCH] replace mootools getelement and addevent --- web/skins/classic/views/js/zone.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/web/skins/classic/views/js/zone.js b/web/skins/classic/views/js/zone.js index 3b8c08d3a..67ff28d1d 100644 --- a/web/skins/classic/views/js/zone.js +++ b/web/skins/classic/views/js/zone.js @@ -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();