From f8fa314359e498b388369ccc8fee12bccb278c9e Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 5 Jul 2017 10:49:55 +0530 Subject: [PATCH] Fixing https://github.com/wso2/product-iots/issues/1096: Hiding table when no alerts avaialble --- .../units/cdmf.unit.geo-dashboard/public/js/geo_exit_fence.js | 1 + .../units/cdmf.unit.geo-dashboard/public/js/geo_stationary.js | 1 + .../app/units/cdmf.unit.geo-dashboard/public/js/geo_within.js | 1 + 3 files changed, 3 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_exit_fence.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_exit_fence.js index cdcfb415683..8169e136c13 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_exit_fence.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_exit_fence.js @@ -34,6 +34,7 @@ function initializeExit() { } } else{ $(".fence-not-exist").show(); + $("#exit-alert").hide(); } $('.viewGeoFenceRow td:not(:last-child)').click(function () { viewFence(this.parentElement,'Exit'); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_stationary.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_stationary.js index 6eee4234abc..99ddd9eecd5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_stationary.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_stationary.js @@ -38,6 +38,7 @@ function initStationaryAlert() { } } else{ $(".fence-not-exist").show(); + $("#stationary-alert-table").hide(); } $('.viewGeoFenceRow td:not(:last-child)').click(function () { viewFence(this.parentElement,'Stationery'); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_within.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_within.js index f4986075f5e..8640e05b8a3 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_within.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/geo_within.js @@ -34,6 +34,7 @@ function initializeWithin() { } } else{ $(".fence-not-exist").show(); + $("#within-alert").hide(); } $('.viewGeoFenceRow td:not(:last-child)').click(function () { viewFence(this.parentElement,'WithIn');