From 8c94e83431f3c8e028bad2f6a99175c5129407eb Mon Sep 17 00:00:00 2001 From: kamidu Date: Mon, 10 Oct 2016 18:27:53 +0530 Subject: [PATCH] Fix for Jira : EMM-1682 and EMM-1653 --- .../public/templates/role-listing.hbs | 36 ++++++++++--------- .../public/js/user-menu.js | 7 ++-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs index 3234197ca9..c3e5541c18 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/pages/cdmf.page.roles/public/templates/role-listing.hbs @@ -5,13 +5,14 @@ - {{roleName}} + {{roleName}} {{#unequal adminRole roleName }} - {{#if canEdit}} - + {{#if canEdit}} + @@ -21,10 +22,12 @@ - - - + + + @@ -34,18 +37,19 @@ - - - {{/if}} - {{#if canRemove}} - + + + {{/if}} + {{#if canRemove}} + - - - {{/if}} + + + {{/if}} {{/unequal}} 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 f5e03d86c8..93c8a17d24 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 @@ -31,8 +31,8 @@ function inputIsValid(regExp, inputString) { /* * Fix for the modal popup overlay disappear bug */ -$('.modal').on('hidden.bs.modal',function(){ - if($('.modal-backdrop').length == 2){ +$('.modal').on('hidden.bs.modal', function () { + if ($('.modal-backdrop').length == 2) { $('.modal-backdrop')[0].remove() } }); @@ -92,7 +92,8 @@ $(document).ready(function () { $(errorMsg).text("Your current password does not match with the provided value."); $(errorMsgWrapper).removeClass("hidden"); } else { - $(errorMsg).text("An unexpected error occurred. Please try again later."); + var response = JSON.parse(jqXHR.responseText).message; + $(errorMsg).text(response); $(errorMsgWrapper).removeClass("hidden"); } }