From 9dfcd757ad3c528d042879de5f2d4bb9c24ad63e Mon Sep 17 00:00:00 2001 From: Sameera Wickramasekara Date: Thu, 14 Sep 2017 15:15:51 +0530 Subject: [PATCH] Fixes for wso2/product-iots#1403 --- .../public/js/operation-mod.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js index 3ead46e63..c8a9ce6ee 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.operation-mod/public/js/operation-mod.js @@ -742,9 +742,12 @@ var androidOperationModule = function () { // only for app whitelisting and black listing if (operationCode == "APP-RESTRICTION" && key == "restrictedApplications") { + //remove elements before adding + $('[data-add-form-container="#restricted-applications-grid"]').empty(); + var i; for (i = 0; i < uiPayload.restrictedApplications.length; ++i) { - $("#restrictedapplication-list").append('' + + $('[data-add-form-container="#restricted-applications-grid"]').append('' + ''+ (i+1) +' ' + uiPayload.restrictedApplications[i].appName + ' ' + uiPayload.restrictedApplications[i].packageName + ''); }