From 48337ee16cc40fd2f60506c38693f68ade7b2fc2 Mon Sep 17 00:00:00 2001 From: thusithakalugamage Date: Tue, 11 Oct 2016 18:35:47 +0530 Subject: [PATCH 1/3] [EMM-1618] - related improvements on remaining occurences --- .../app/pages/cdmf.page.devices/public/js/listing.js | 5 +++-- .../app/pages/cdmf.page.groups/public/js/listing.js | 3 ++- .../app/pages/cdmf.page.policies/public/js/policy-list.js | 5 +++-- .../app/pages/cdmf.page.roles/public/js/role-listing.js | 2 +- .../devicemgt/app/pages/cdmf.page.users/public/js/listing.js | 5 +++-- .../cdmf.unit.role.edit.permission/public/js/bottomJs.js | 3 ++- 6 files changed, 14 insertions(+), 9 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 820b183646..0e384c7016 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 @@ -525,9 +525,10 @@ function showPopup() { * hide popup function. */ function hidePopup() { - $(modalPopupContent).html(''); + $(modalPopupContent).html(""); + $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right', '0px'); + $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js index d3a5c5cc73..8ac28822d9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.groups/public/js/listing.js @@ -275,7 +275,8 @@ function showPopup() { * hide popup function. */ function hidePopup() { - $(modalPopupContent).html(''); + $(modalPopupContent).html(""); + $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/public/js/policy-list.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/public/js/policy-list.js index 65445b3929..219250b6ea 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/public/js/policy-list.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.policies/public/js/policy-list.js @@ -91,9 +91,10 @@ function showPopup() { * hide popup function. */ function hidePopup() { - $(modalPopupContent).html(''); + $(modalPopupContent).html(""); + $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right', '0px'); + $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js index d5cb812ce2..6ac6050de2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/js/role-listing.js @@ -72,7 +72,7 @@ function showPopup() { function hidePopup() { $(modalPopupContent).html(''); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right', '0px'); + $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index 43d6de1a83..f43d257bbf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -73,9 +73,10 @@ function showPopup() { * hide popup function. */ function hidePopup() { - $(modalPopupContent).html(''); + $(modalPopupContent).html(""); + $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right', '0px'); + $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js index af3a8e5629..553f885773 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/public/js/bottomJs.js @@ -39,7 +39,8 @@ var apiBasePath = "/api/device-mgt/v1.0"; * hide popup function. */ function hidePopup() { - $(modalPopupContent).html(''); + $(modalPopupContent).html(""); + $(modalPopupContent).removeClass("operation-data"); $(modalPopup).modal('hide'); $('body').removeClass('modal-open').css('padding-right','0px'); $('.modal-backdrop').remove(); From 47ca8942b61cb72df1bbae577888eac3908e8a6d Mon Sep 17 00:00:00 2001 From: thusithakalugamage Date: Fri, 14 Oct 2016 14:11:49 +0530 Subject: [PATCH 2/3] resolving conflicts - removing deprecated modal related methods --- .../cdmf.page.users/public/js/listing.js | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index d14157243c..b7843fb74b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -39,9 +39,6 @@ $(function () { }); var apiBasePath = "/api/device-mgt/v1.0"; -var modalPopup = ".modal"; -var modalPopupContainer = modalPopup + " .modal-content"; -var modalPopupContent = modalPopup + " .modal-content"; var body = "body"; /** @@ -54,31 +51,6 @@ $(document).on('draw.dt', function () { $(".icon .text").res_text(0.2); }); -/* - * set popup maximum height function. - */ -function setPopupMaxHeight() { - $(modalPopupContent).css('max-height', ($(body).height() - ($(body).height() / 100 * 30))); - $(modalPopupContainer).css('margin-top', (-($(modalPopupContainer).height() / 2))); -} - -/* - * show popup function. - */ -function showPopup() { - $(modalPopup).modal('show'); -} - -/* - * hide popup function. - */ -function hidePopup() { - $(modalPopupContent).html(""); - $(modalPopupContent).removeClass("operation-data"); - $(modalPopup).modal('hide'); - $('body').removeClass('modal-open').css('padding-right','0px'); - $('.modal-backdrop').remove(); -} /** * Following click function would execute @@ -271,9 +243,6 @@ function removeUser(username) { ); }); - $("a#remove-user-cancel-link").click(function () { - hidePopup(); - }); } /** From 3aae81d9e431e51241da9829b1405b6807cb8ae8 Mon Sep 17 00:00:00 2001 From: thusithakalugamage Date: Fri, 14 Oct 2016 14:16:53 +0530 Subject: [PATCH 3/3] resolving conflicts - removing deprecated modal related methods --- .../devicemgt/app/pages/cdmf.page.users/public/js/listing.js | 1 - 1 file changed, 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js index b7843fb74b..d8dc9d4860 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.users/public/js/listing.js @@ -51,7 +51,6 @@ $(document).on('draw.dt', function () { $(".icon .text").res_text(0.2); }); - /** * Following click function would execute * when a user clicks on "Invite" link