From 68840eae94e60fc09c4f5d6263693f8ef91dd7e2 Mon Sep 17 00:00:00 2001 From: kamidu Date: Thu, 6 Oct 2016 22:38:47 +0530 Subject: [PATCH] Fix for EMM-1680 --- .../app/units/mdm.unit.device.view/public/js/device-detail.js | 4 +++- .../devicemgt/app/units/mdm.unit.device.view/view.js | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js index 65b3fe27d..4188fc60b 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/device-detail.js @@ -311,7 +311,9 @@ var InitiateViewOption = null; $(document).ready(function () { $(".device-detail-body").removeClass("hidden"); $("#loading-content").remove(); - loadOperationBar(deviceType, ownership, operationBarModeConstants.SINGLE); + if ($("#tabs").data("status") !=== false) { + loadOperationBar(deviceType, ownership, operationBarModeConstants.SINGLE); + } loadOperationsLog(false); loadApplicationsList(); loadPolicyCompliance(); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js index a5505e8f0..7c482e7b8 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js @@ -50,9 +50,13 @@ function onRequest(context) { if (filteredDeviceData["enrolmentInfo"]["status"]) { viewModel["status"] = filteredDeviceData["enrolmentInfo"]["status"]; viewModel.isActive = false ; + viewModel.isNotRemoved = true; if (filteredDeviceData["enrolmentInfo"]["status"]== "ACTIVE") { viewModel.isActive = true ; } + if (filteredDeviceData["enrolmentInfo"]["status"]== "REMOVED") { + viewModel.isNotRemoved = false ; + } } if (filteredDeviceData["enrolmentInfo"]["owner"]) { viewModel["owner"] = filteredDeviceData["enrolmentInfo"]["owner"];