From d8ffa23a425a7de0376461da8f959fff4a302273 Mon Sep 17 00:00:00 2001 From: Dileesha Rajapakse Date: Thu, 20 Jul 2017 22:11:15 +0530 Subject: [PATCH] Fixing Device Type search filter --- .../devicemgt/app/pages/cdmf.page.devices/public/js/listing.js | 2 +- .../public/js/dataTables.extended.serversidepaging.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 c7518e5723..7eb0463e46 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 @@ -313,7 +313,7 @@ function loadDevices(searchType, searchParam) { }, { targets: 4, - data: 'deviceType', + data: 'type', class: 'remove-padding-top viewEnabledIcon', render: function (status, type, row, meta) { return getDeviceTypeLabel(row.deviceType); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js index d461776f24..e98cf7bebb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.serversidepaging.js @@ -174,10 +174,11 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter var titles = []; column.nodes().unique().sort().each(function (d, j) { var title = $(d).attr('data-display'); + var searchVal = $(d).attr('data-search'); if ($.inArray(title, titles) < 0) { titles.push(title); if (title !== undefined) { - select.append('') + select.append('') } } });