Commit 3c4f3f38 authored by Stan Hu's avatar Stan Hu

Simplify Geo Node admin code more

parent f1186e22
...@@ -38,13 +38,11 @@ class GeoNodeStatus { ...@@ -38,13 +38,11 @@ class GeoNodeStatus {
} }
toggleShowAdvancedStatus(e) { toggleShowAdvancedStatus(e) {
const element = $(e.currentTarget); const $element = $(e.currentTarget);
const closestStatus = element.closest('.advanced-geo-node-status-container').find('.advanced-status'); const $closestStatus = $element.closest('.advanced-geo-node-status-container').find('.advanced-status')
const currentlyActive = !closestStatus.hasClass('hide-status')
const togglerContainer = currentlyActive ? $('.toggler-inactive-container') : $('.toggler-active-container')
element.find('.fa').toggleClass('fa-angle-down').toggleClass('fa-angle-up'); $element.find('.fa').toggleClass('fa-angle-down').toggleClass('fa-angle-up');
closestStatus.toggleClass('hide-status'); $closestStatus.toggleClass('hide-status');
} }
getStatus() { getStatus() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment