From 551d77bd6293b50d0a945a0fd67fb45dacaf9e39 Mon Sep 17 00:00:00 2001 From: harshanl Date: Tue, 30 Aug 2016 16:58:25 +0530 Subject: [PATCH 01/27] Refactored OperationMgr code --- .../operation/mgt/OperationManagerImpl.java | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index bf09bd367c..bd2b6d6f52 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -415,31 +415,24 @@ public class OperationManagerImpl implements OperationManager { try { OperationManagementDAOFactory.openConnection(); - org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO. - getNextOperation( - enrolmentId); + org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO.getNextOperation( + enrolmentId); if (dtoOperation != null) { - if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND. - equals(dtoOperation - .getType())) { + if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType() + )) { org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation; commandOperation = (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO. - getOperation( - dtoOperation - .getId()); + getOperation(dtoOperation.getId()); dtoOperation.setEnabled(commandOperation.isEnabled()); - } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG. - equals(dtoOperation - .getType())) { + } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation. + getType())) { dtoOperation = configOperationDAO.getOperation(dtoOperation.getId()); - } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE. - equals(dtoOperation - .getType())) { + } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation. + getType())) { dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId()); - } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY. - equals(dtoOperation - .getType())) { + } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.POLICY.equals(dtoOperation. + getType())) { dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId()); } operation = OperationDAOUtil.convertOperation(dtoOperation); From 1ed621391631cf87a0d09efbbb53598135677a5a Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Thu, 1 Sep 2016 10:51:38 +0530 Subject: [PATCH 02/27] Modal Changes added --- .../app/layouts/cdmf.layout.default.hbs | 26 ++++++++++--------- .../public/js/certificate-listing.js | 8 +++--- .../cdmf.page.devices/public/js/listing.js | 8 +++--- .../cdmf.page.groups/public/js/listing.js | 6 ++--- .../public/js/policy-list.js | 8 +++--- .../cdmf.page.users/public/js/listing.js | 8 +++--- .../app/units/cdmf.unit.lib.qrcode/qrcode.hbs | 14 +++++----- .../public/js/policy-priority.js | 6 ++--- .../public/js/bottomJs.js | 6 ++--- .../public/js/role-listing.js | 6 ++--- .../public/js/user-menu.js | 6 ++--- .../uuf.unit.theme/public/css/theme-wso2.css | 2 +- 12 files changed, 53 insertions(+), 51 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs index 57f7736618..4357f5518f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs @@ -30,21 +30,23 @@ under the License. --}} -
-
-
- - - - - GO BACK -
-
- + + {{defineZone "header"}} 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 d911d7fb45..72a0130adf 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 @@ -12,9 +12,9 @@ $(function () { $(sortableElem).disableSelection(); }); -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; var isInit = true; @@ -34,7 +34,7 @@ function setPopupMaxHeight() { * show popup function. */ function showPopup() { - $(modalPopup).show(); + $(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 7c55d710fb..206324b618 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 @@ -438,9 +438,9 @@ $(document).ready(function () { }); -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; /* @@ -455,7 +455,7 @@ function setPopupMaxHeight() { * show popup function. */ function showPopup() { - $(modalPopup).show(); + $(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 1c16e3dfd1..86b9f72194 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 @@ -251,9 +251,9 @@ $(document).ready(function () { }); -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; /* 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 2ea6a2ccfd..4e51426a94 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 @@ -61,9 +61,9 @@ var sortElements = function () { * Modal related stuff are as follows. */ -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; /* @@ -81,7 +81,7 @@ function setPopupMaxHeight() { * show popup function. */ function showPopup() { - $(modalPopup).show(); + $(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 7d8ec0622d..836e8ca93a 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,9 @@ $(function () { }); var apiBasePath = "/api/device-mgt/v1.0"; -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; var isInit = true; $(".icon .text").res_text(0.2); @@ -58,7 +58,7 @@ function setPopupMaxHeight() { * show popup function. */ function showPopup() { - $(modalPopup).show(); + $(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.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 30912b71d4..d91380ee13 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 @@ -18,9 +18,9 @@ {{#zone "bottomJs"}} {{js "js/jquery.qrcode.min.js"}} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js index f6b5514d7e..d345754b29 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.priority/public/js/policy-priority.js @@ -30,9 +30,9 @@ if (saveNewPrioritiesButtonEnabled) { * Modal related stuff are as follows. */ -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; /* 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 7c778de040..a53a005785 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 @@ -28,8 +28,8 @@ * Tree view function * @return {Null} */ -var modalPopup = ".wr-modalpopup"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContent = modalPopup + " .modal-body"; var apiBasePath = "/api/device-mgt/v1.0"; @@ -45,7 +45,7 @@ function hidePopup() { * show popup function. */ function showPopup() { - $(modalPopup).show(); + $(modalPopup).modal('show'); setPopupMaxHeight(); } $.fn.tree_view = function(){ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js index afeb0a393e..844558ca36 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.listing/public/js/role-listing.js @@ -143,9 +143,9 @@ function loadRoles(searchQuery) { } -var modalPopup = ".wr-modalpopup"; -var modalPopupContainer = modalPopup + " .modalpopup-container"; -var modalPopupContent = modalPopup + " .modalpopup-content"; +var modalPopup = ".modal"; +var modalPopupContainer = modalPopup + " .modal-content"; +var modalPopupContent = modalPopup + " .modal-body"; var body = "body"; var isInit = true; 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 16a232b843..ec0f34ffe7 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 @@ -11,9 +11,9 @@ function inputIsValid(regExp, inputString) { } $(document).ready(function () { - var modalPopup = ".wr-modalpopup"; - // var modalPopupContainer = modalPopup + " .modalpopup-container"; - var modalPopupContent = modalPopup + " .modalpopup-content"; + var modalPopup = ".modal"; + // var modalPopupContainer = modalPopup + " .modal-content"; + var modalPopupContent = modalPopup + " .modal-body"; $("#change-password").click(function () { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css index a924b1bc28..5fe5c2e37d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/uuf-template-app/app/units/uuf.unit.theme/public/css/theme-wso2.css @@ -4945,7 +4945,7 @@ button.list-group-item-danger.active:focus { .panel { margin-bottom: 20px; - background-color: #fff; + background-color: none; border: 1px solid transparent; border-radius: 0; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); From 4a69e162b3362436597ab957fd4ea697e642036b Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Thu, 1 Sep 2016 12:09:24 +0530 Subject: [PATCH 03/27] Modal Changes added --- .../jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs | 1 - .../cdmf.page.certificates/public/js/certificate-listing.js | 2 +- .../devicemgt/app/pages/cdmf.page.devices/public/js/listing.js | 2 +- .../devicemgt/app/pages/cdmf.page.groups/public/js/listing.js | 2 +- .../app/pages/cdmf.page.policies/public/js/policy-list.js | 2 +- .../devicemgt/app/pages/cdmf.page.users/public/js/listing.js | 2 +- .../devicemgt/app/units/cdmf.unit.lib.qrcode/qrcode.hbs | 2 +- .../cdmf.unit.policy.priority/public/js/policy-priority.js | 2 +- .../units/cdmf.unit.role.edit.permission/public/js/bottomJs.js | 2 +- .../app/units/cdmf.unit.role.listing/public/js/role-listing.js | 2 +- 10 files changed, 9 insertions(+), 10 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs index 4357f5518f..e0b66efd3e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/layouts/cdmf.layout.default.hbs @@ -35,7 +35,6 @@ under the License. --}}