From ebad678bab7dd0e8717466faecf0dbbec8bc598d Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Wed, 5 Oct 2016 15:08:34 +0530 Subject: [PATCH] Datatables serverside paging redirection bug fix --- .../public/js/dataTables.extended.serversidepaging.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 4f4a01efc7..3dc7ce83d0 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 @@ -35,7 +35,7 @@ $.fn.datatables_extended_serverside_paging = function (settings , url, dataFilte // EMM related function if (InitiateViewOption) { - $(".viewEnabledIcon").bind("click", InitiateViewOption); + $(document).on('click','.viewEnabledIcon',InitiateViewOption); } var deviceType; @@ -239,14 +239,14 @@ $.fn.datatables_extended_serverside_paging = function (settings , url, dataFilte $(button).addClass("active").html('Cancel'); $(button).parent().next().children("button").removeClass("disabled"); // EMM related code - $(".viewEnabledIcon").unbind("click"); + $(document).off('click','.viewEnabledIcon'); //--- End of EMM related codes } else if ($(button).html() == 'Cancel') { thisTable.removeClass("table-selectable"); $(button).addClass("active").html('Select'); $(button).parent().next().children().addClass("disabled"); // EMM related function - $(".viewEnabledIcon").bind("click", InitiateViewOption); + $(document).on('click','.viewEnabledIcon',InitiateViewOption); //--- End of EMM related codes } });