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.policy.create/public/js/policy-create.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js index 1c1eefcfd..bcef26ec8 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.create/public/js/policy-create.js @@ -2793,20 +2793,28 @@ $(document).ready(function () { // $(advanceOperations).on('hidden.bs.collapse', function (event) { var collapsedFeatureBody = event.target.id; - var featureConfiguringSwitch = "#" + collapsedFeatureBody. - substr(0, collapsedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + var operation = collapsedFeatureBody.substr(0, collapsedFeatureBody.lastIndexOf("-")); + var featureConfiguringSwitch = "#" + operation + "-heading input[type=checkbox]"; + var featureConfiguredIcon = "#" + operation + "-configured"; if ($(featureConfiguringSwitch).prop("checked") == true) { $(featureConfiguringSwitch).prop("checked", false); } + if (!$(featureConfiguredIcon).hasClass("hidden")) { + $(featureConfiguredIcon).addClass("hidden"); + } }); $(advanceOperations).on('shown.bs.collapse', function (event) { var expandedFeatureBody = event.target.id; - var featureConfiguringSwitch = "#" + expandedFeatureBody. - substr(0, expandedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + var operation = expandedFeatureBody.substr(0, expandedFeatureBody.lastIndexOf("-")); + var featureConfiguringSwitch = "#" + operation + "-heading input[type=checkbox]"; + var featureConfiguredIcon = "#" + operation + "-configured"; if ($(featureConfiguringSwitch).prop("checked") == false) { $(featureConfiguringSwitch).prop("checked", true); } + if ($(featureConfiguredIcon).hasClass("hidden")) { + $(featureConfiguredIcon).removeClass("hidden"); + } }); // 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.policy.edit/public/js/edit.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js index 7c899b3cb..3e2728ca1 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.policy.edit/public/js/edit.js @@ -2556,20 +2556,28 @@ $(document).ready(function () { // $(advanceOperations).on('hidden.bs.collapse', function (event) { var collapsedFeatureBody = event.target.id; - var featureConfiguringSwitch = "#" + collapsedFeatureBody. - substr(0, collapsedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + var operation = collapsedFeatureBody.substr(0, collapsedFeatureBody.lastIndexOf("-")); + var featureConfiguringSwitch = "#" + operation + "-heading input[type=checkbox]"; + var featureConfiguredIcon = "#" + operation + "-configured"; if ($(featureConfiguringSwitch).prop("checked") == true) { $(featureConfiguringSwitch).prop("checked", false); } + if (!$(featureConfiguredIcon).hasClass("hidden")) { + $(featureConfiguredIcon).addClass("hidden"); + } }); $(advanceOperations).on('shown.bs.collapse', function (event) { var expandedFeatureBody = event.target.id; - var featureConfiguringSwitch = "#" + expandedFeatureBody. - substr(0, expandedFeatureBody.lastIndexOf("-")) + "-heading input[type=checkbox]"; + var operation = expandedFeatureBody.substr(0, expandedFeatureBody.lastIndexOf("-")); + var featureConfiguringSwitch = "#" + operation + "-heading input[type=checkbox]"; + var featureConfiguredIcon = "#" + operation + "-configured"; if ($(featureConfiguringSwitch).prop("checked") == false) { $(featureConfiguringSwitch).prop("checked", true); } + if ($(featureConfiguredIcon).hasClass("hidden")) { + $(featureConfiguredIcon).removeClass("hidden"); + } }); //