From f42215a926934fc937301cb2b6b99eb973d5f678 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Fri, 9 Sep 2016 11:37:41 +0530 Subject: [PATCH] Adding modal code changes --- .../public/js/certificate-listing.js | 1 - .../pages/cdmf.page.devices/public/js/listing.js | 1 - .../app/pages/cdmf.page.groups/public/js/listing.js | 1 - .../cdmf.page.policies/public/js/policy-list.js | 1 - .../app/pages/cdmf.page.users/public/js/listing.js | 5 +++-- .../app/units/cdmf.unit.lib.qrcode/qrcode.hbs | 1 - .../public/js/user-menu.js | 2 +- .../public/js/nav-menu.js | 13 +++++++------ 8 files changed, 11 insertions(+), 14 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/public/js/certificate-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/public/js/certificate-listing.js index a7241b9240..01acf088d1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/public/js/certificate-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.certificates/public/js/certificate-listing.js @@ -35,7 +35,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* 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 ce8117634a..571d8085ad 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 @@ -456,7 +456,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* 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 ba07b661a9..d3a5c5cc73 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 @@ -269,7 +269,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* 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 891a4ae12d..f9d8c14c2c 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 @@ -82,7 +82,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* 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 5aa17f26fe..2b6e717080 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 @@ -41,7 +41,7 @@ $(function () { var apiBasePath = "/api/device-mgt/v1.0"; var modalPopup = ".modal"; var modalPopupContainer = modalPopup + " .modal-content"; -var modalPopupContent = modalPopup + " .modal-body"; +var modalPopupContent = modalPopup + " .modal-content"; var body = "body"; $(".icon .text").res_text(0.2); @@ -58,7 +58,6 @@ function setPopupMaxHeight() { */ function showPopup() { $(modalPopup).modal('show'); - setPopupMaxHeight(); } /* @@ -67,6 +66,8 @@ function showPopup() { function hidePopup() { $(modalPopupContent).html(''); $(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/units/cdmf.unit.lib.qrcode/qrcode.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs index 501248ece8..d63ee90965 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs @@ -45,7 +45,6 @@ */ function showQRCodePopup() { $(modalPopup).modal('show'); - //setPopupMaxHeight(); } /* diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js index ec0f34ffe7..34bb5c1ddd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.header.user-menu/public/js/user-menu.js @@ -13,7 +13,7 @@ function inputIsValid(regExp, inputString) { $(document).ready(function () { var modalPopup = ".modal"; // var modalPopupContainer = modalPopup + " .modal-content"; - var modalPopupContent = modalPopup + " .modal-body"; + var modalPopupContent = modalPopup + " .modal-content"; $("#change-password").click(function () { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/public/js/nav-menu.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/public/js/nav-menu.js index c15f80b268..5f3605da38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/public/js/nav-menu.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.ui.navbar.nav-menu/public/js/nav-menu.js @@ -16,9 +16,9 @@ * under the License. */ -var modalPopup = ".wr-modalpopup", - modalPopupContainer = modalPopup + " .modalpopup-container", - modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-content"; var emmAdminBasePath = "/api/device-mgt/v1.0"; @@ -37,8 +37,7 @@ function setPopupMaxHeight() { * show popup function. */ function showPopup() { - $(modalPopup).show(); - setPopupMaxHeight(); + $(modalPopup).modal('show'); } /* @@ -47,7 +46,9 @@ function showPopup() { function hidePopup() { $(modalPopupContent).html(""); $(modalPopupContent).removeClass("operation-data"); - $(modalPopup).hide(); + $(modalPopup).modal('hide'); + $('body').removeClass('modal-open').css('padding-right','0px'); + $('.modal-backdrop').remove(); } var updateNotificationCount = function (data, textStatus, jqXHR) {