From 815d92bd27971f20235d4505a9c8841fc22ea1ba Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 13:25:08 +0530 Subject: [PATCH 01/10] Removed repeated 'be' in policy create. --- .../devicemgt/app/units/cdmf.unit.policy.create/create.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs index 5ef6bdedd5c..448a470c8bf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs @@ -69,7 +69,7 @@ + & Should be 1-to-30 characters long.
From 9ee5056967df948851782d64c1515788866e518a Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 14:52:57 +0530 Subject: [PATCH 02/10] Redirect to Permission listing after creating permission. --- .../cdmf.unit.role.edit.permission/permission.hbs | 13 +------------ .../public/js/bottomJs.js | 2 ++ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs index 8671888233a..30317ac0520 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit.permission/permission.hbs @@ -69,19 +69,8 @@ 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 315ab20d22d..0775eec6a15 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 @@ -184,6 +184,8 @@ $(document).ready(function () { // Refreshing with success message $("#role-create-form").addClass("hidden"); $("#role-created-msg").removeClass("hidden"); + setTimeout(function(){}, 1000); + window.location.href = "/devicemgt/roles"; } }, function (data) { var payload = JSON.parse(data.responseText); From bf789b91f302f8ed085b40602696e80d8ab308ac Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 14:58:24 +0530 Subject: [PATCH 03/10] Added user creation success modal. --- .../pages/cdmf.page.user.create/create.hbs | 26 +++++-------------- .../public/js/bottomJs.js | 8 +++++- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs index e69c9d4184f..183e124bfa9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/create.hbs @@ -16,7 +16,7 @@ under the License. }} {{unit "cdmf.unit.ui.title" pageTitle="User Management | Add User"}} - +{{unit "cdmf.unit.ui.modal"}} {{#zone "breadcrumbs"}}
  • @@ -122,26 +122,14 @@ - diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/public/js/bottomJs.js index 2ecada94ad4..c700b061991 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.edit/public/js/bottomJs.js @@ -248,6 +248,10 @@ $(document).ready(function () { // Refreshing with success message $("#user-create-form").addClass("hidden"); $("#user-created-msg").removeClass("hidden"); + setTimeout(function () { + window.location.href = "/devicemgt/users" + }, 1000); + } }, function (jqXHR) { var payload = JSON.parse(jqXHR.responseText); From d8a8f6adf72b112c1d2f28b88cf4ec2524b78c95 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 15:13:39 +0530 Subject: [PATCH 05/10] Restructured the setTimeout function. --- .../cdmf.unit.policy.create/public/js/policy-create.js | 6 ++++-- .../cdmf.unit.role.edit.permission/public/js/bottomJs.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js index a4d03689b64..de24dbca766 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js @@ -428,8 +428,10 @@ var savePolicy = function (policy, isActive, serviceURL) { $(".add-policy").addClass("hidden"); $(".policy-naming").addClass("hidden"); $(".policy-message").removeClass("hidden"); - setTimeout(function(){}, 1000); - window.location.href = "/devicemgt/policies"; + setTimeout(function(){ + window.location.href = "/devicemgt/policies"; + }, 1000); + }, function (data) { } 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 0775eec6a15..6d5c42e72d9 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 @@ -184,8 +184,10 @@ $(document).ready(function () { // Refreshing with success message $("#role-create-form").addClass("hidden"); $("#role-created-msg").removeClass("hidden"); - setTimeout(function(){}, 1000); - window.location.href = "/devicemgt/roles"; + setTimeout(function(){ + window.location.href = "/devicemgt/roles"; + }, 1000); + } }, function (data) { var payload = JSON.parse(data.responseText); From 80a08a274418201ae223fcc1a88fac80a6f3ba16 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 15:17:02 +0530 Subject: [PATCH 06/10] Redirect to Group Listing page after creating a Group. --- .../app/pages/cdmf.page.group.create/create.hbs | 13 +------------ .../cdmf.page.group.create/public/js/group-add.js | 3 +++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs index 9e6ee54a711..62cea7955e9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/create.hbs @@ -73,18 +73,7 @@

    Group was created successfully.

    -
    Please click "Add Another Group", if you wish to add another group or click - "View Group List" to complete the process and go back to the group list. -
    - - - - - - - Add Another Group - +
    You will be redirected to the Group Listing page in a moment.
    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js index 85b34decd95..59c27b321bc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js @@ -47,6 +47,9 @@ $(function () { if (resp.status == 201) { $("#group-create-form").addClass("hidden"); $("#group-created-msg").removeClass("hidden"); + setTimeout(function(){ + window.location.href = "/devicemgt/groups"; + }, 1000); } else { displayErrors(resp.status); } From c754b64653963f279e7a44151322ea0512e9c3e7 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 15:23:27 +0530 Subject: [PATCH 07/10] Redirect to Role Listing page after editing a Role. --- .../app/units/cdmf.unit.role.edit/edit.hbs | 15 +-------------- .../cdmf.unit.role.edit/public/js/bottomJs.js | 3 +++ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs index 979b5c14504..76fc1167765 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/edit.hbs @@ -73,20 +73,7 @@ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/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/public/js/bottomJs.js index 6ae0e8016f9..2d477591bd1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/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/public/js/bottomJs.js @@ -210,6 +210,9 @@ $(document).ready(function () { // Refreshing with success message $("#role-create-form").addClass("hidden"); $("#role-created-msg").removeClass("hidden"); + setTimeout(function(){ + window.location.href = "/devicemgt/roles"; + }, 1000); } }, function (data) { From 85b437a0f0ee383c6fcbe06e234d197bfcc8f5f7 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 15:35:44 +0530 Subject: [PATCH 08/10] Redirect to Policy Listing page after editing a policy. --- .../app/units/cdmf.unit.policy.edit/edit.hbs | 16 ++-------------- .../public/js/policy-edit.js | 6 ++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/edit.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/edit.hbs index 4abf440dc3a..e5822f5736e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/edit.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/edit.hbs @@ -35,20 +35,8 @@

    Policy is successfully re-configured.

    -
    Please click "Add Another Policy", if you wish to add another policy or click - "View policy list" to complete the process and go back to the policy list. -
    - - - - - - - Add another policy - +
    You will be redirected to Policy Listing page in a moment. +
    diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js index e2a7182b6ba..4bd3691b446 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js @@ -495,6 +495,9 @@ var updatePolicy = function (policy, state) { if (jqXHR.status == 200) { $(".add-policy").addClass("hidden"); $(".policy-message").removeClass("hidden"); + setTimeout(function(){ + window.location.href = "/devicemgt/policies"; + }, 1000); } }, // on error @@ -513,6 +516,9 @@ var updatePolicy = function (policy, state) { $(".add-policy").addClass("hidden"); $(".policy-naming").addClass("hidden"); $(".policy-message").removeClass("hidden"); + setTimeout(function(){ + window.location.href = "/devicemgt/policies"; + }, 1000); } }, // on error From adce200842b03c86312f0d2aa458056665c1afff Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 15:39:36 +0530 Subject: [PATCH 09/10] Typo fix in policy create js. --- .../devicemgt/app/units/cdmf.unit.policy.create/create.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs index 448a470c8bf..e7caea09d2c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/create.hbs @@ -69,7 +69,7 @@ + and should be 1-to-30 characters long.
    From a32cf8975737a1f1cd879945021031da15f48961 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Tue, 29 Aug 2017 17:06:12 +0530 Subject: [PATCH 10/10] Fixed formatting issues. --- .../app/pages/cdmf.page.group.create/public/js/group-add.js | 2 +- .../app/pages/cdmf.page.user.create/public/js/bottomJs.js | 4 ++-- .../units/cdmf.unit.policy.create/public/js/policy-create.js | 4 ++-- .../app/units/cdmf.unit.policy.edit/public/js/policy-edit.js | 4 ++-- .../cdmf.unit.role.edit.permission/public/js/bottomJs.js | 5 ++--- .../app/units/cdmf.unit.role.edit/public/js/bottomJs.js | 2 +- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js index 59c27b321bc..1684159e6d9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.group.create/public/js/group-add.js @@ -47,7 +47,7 @@ $(function () { if (resp.status == 201) { $("#group-create-form").addClass("hidden"); $("#group-created-msg").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/groups"; }, 1000); } else { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js index d67af04085e..28d4af3fdb2 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.user.create/public/js/bottomJs.js @@ -226,7 +226,7 @@ $(document).ready(function () { var firstname = firstnameInput.val(); var lastname = lastnameInput.val(); var emailAddress = $("input#emailAddress").val(); - var roles ; + var roles; if ($("#roles").length > 0) { roles = $("select#roles").val(); } @@ -287,7 +287,7 @@ $(document).ready(function () { modalDialog.content($("#modal-content-user-created").html()); modalDialog.footer(''); + ''); modalDialog.show(); generateQRCode("#user-created-msg .qr-code"); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js index de24dbca766..2c8cb74a4aa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.create/public/js/policy-create.js @@ -428,9 +428,9 @@ var savePolicy = function (policy, isActive, serviceURL) { $(".add-policy").addClass("hidden"); $(".policy-naming").addClass("hidden"); $(".policy-message").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/policies"; - }, 1000); + }, 1000); }, function (data) { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js index 4bd3691b446..6242ec3a555 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.policy.edit/public/js/policy-edit.js @@ -495,7 +495,7 @@ var updatePolicy = function (policy, state) { if (jqXHR.status == 200) { $(".add-policy").addClass("hidden"); $(".policy-message").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/policies"; }, 1000); } @@ -516,7 +516,7 @@ var updatePolicy = function (policy, state) { $(".add-policy").addClass("hidden"); $(".policy-naming").addClass("hidden"); $(".policy-message").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/policies"; }, 1000); } 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 6d5c42e72d9..4259195bb07 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 @@ -184,10 +184,9 @@ $(document).ready(function () { // Refreshing with success message $("#role-create-form").addClass("hidden"); $("#role-created-msg").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/roles"; - }, 1000); - + }, 1000); } }, function (data) { var payload = JSON.parse(data.responseText); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/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/public/js/bottomJs.js index 2d477591bd1..ee26b9d0b1a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.role.edit/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/public/js/bottomJs.js @@ -210,7 +210,7 @@ $(document).ready(function () { // Refreshing with success message $("#role-create-form").addClass("hidden"); $("#role-created-msg").removeClass("hidden"); - setTimeout(function(){ + setTimeout(function() { window.location.href = "/devicemgt/roles"; }, 1000); }