From 3983780f7f7c2f561e62e63f1b45152d8f9c1040 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 20 Jan 2017 15:09:00 +0530 Subject: [PATCH] Fix for multiple advance search element --- .../app/pages/cdmf.page.devices/public/js/listing.js | 8 ++++++-- 1 file changed, 6 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 cbd7a51911..a65de8a6da 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 @@ -460,8 +460,12 @@ function loadDevices(searchType, searchParam) { $("#loading-content").remove(); attachDeviceEvents(); - $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') - .after('Advance Search') + if($('.advance-search').length < 1){ + $(this).closest('.dataTables_wrapper').find('div[id$=_filter] input') + .after('Advance Search'); + } + }, { "placeholder": "Search By Device Name", "searchKey": "name"