From cba8f5243ee32eb468ed1190b261785e655fe709 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Thu, 22 Jun 2017 17:07:59 +0530 Subject: [PATCH] Fix for removed device selection in datatable --- .../app/pages/cdmf.page.devices/public/js/listing.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js index 007cb4e01c6..c7518e57238 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.devices/public/js/listing.js @@ -404,7 +404,13 @@ function loadDevices(searchType, searchParam) { ]; var fnCreatedRow = function (row, data, dataIndex) { - $(row).attr('data-type', 'selectable'); + + if(data.status != "REMOVED"){ + $(row).attr('data-type', 'selectable'); + }else{ + $(row).attr('data-type', 'non-selectable'); + } + $(row).attr('data-deviceid', htmlspecialchars(data.deviceIdentifier)); $(row).attr('data-devicetype', htmlspecialchars(data.deviceType)); $(row).attr('data-url', context + '/device/' + htmlspecialchars(data.deviceType) + '?id=' + htmlspecialchars(data.deviceIdentifier));