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 602dbc0544..b27dfbe698 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
@@ -83,7 +83,7 @@ function hidePopup() {
* initial mode and with out select mode.
*/
function InitiateViewOption() {
- $(location).attr('href', $(this).data("url"));
+ // $(location).attr('href', $(this).data("url"));
}
function loadRoles() {
@@ -124,8 +124,8 @@ function loadRoles() {
class: "remove-padding icon-only content-fill",
data: null,
defaultContent: "
" +
- "" +
- "
"
+ "" +
+ ""
},
{
class: "fade-edge",
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 8baf1b32e5..c21b515cd0 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
@@ -266,7 +266,7 @@ function loadUsers() {
"recordsFiltered": data.count,
"data": objects
};
- console.log(json);
+
return JSON.stringify(json);
};
@@ -281,9 +281,11 @@ function loadUsers() {
{
class: "remove-padding icon-only content-fill",
data: null,
- defaultContent: '' +
- '' +
- '
'
+ render: function (data, type, row, meta) {
+ return '' +
+ '' +
+ '
';
+ }
},
{
class: "fade-edge",
@@ -318,7 +320,7 @@ function loadUsers() {
class: "text-right content-fill text-left-on-grid-view no-wrap",
data: null,
render: function (data, type, row, meta) {
- return ' ' +
' ' +
@@ -328,8 +330,9 @@ function loadUsers() {
'' +
' Edit' +
'' +
- '' +
- '';
+
+ var resetPasswordbtn = '' +
@@ -340,8 +343,9 @@ function loadUsers() {
'' +
' Reset Password' +
'' +
- '' +
- '';
+
+ var removebtn = '' +
@@ -353,6 +357,19 @@ function loadUsers() {
' Remove' +
'' +
'';
+
+ var returnbtnSet = '';
+ if($("#can-edit").length > 0) {
+ returnbtnSet = returnbtnSet + editbtn;
+ }
+ if($("#can-reset-password").length > 0) {
+ returnbtnSet = returnbtnSet + resetPasswordbtn;
+ }
+ if($("#can-remove").length > 0) {
+ returnbtnSet = returnbtnSet + removebtn;
+ }
+
+ return returnbtnSet;
}
}
@@ -365,14 +382,15 @@ function loadUsers() {
$('#user-grid').datatables_extended_serverside_paging(null, '/api/device-mgt/v1.0/users', dataFilter, columns, fnCreatedRow, null, options);
$(loadingContentView).hide();
+
}
$(document).ready(function () {
loadUsers();
- $(".viewEnabledIcon").click(function () {
- InitiateViewOption();
- });
if (!$("#can-invite").val()) {
$("#invite-user-button").remove();
}
+ $(".viewEnabledIcon").click(function () {
+ InitiateViewOption();
+ });
});
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.js
index bc14c19c2a..812acca6f7 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.js
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.data-tables-extended/public/js/dataTables.extended.js
@@ -25,6 +25,7 @@ $.fn.datatables_extended = function(settings){
// EMM related function
if (InitiateViewOption) {
+ $(".viewEnabledIcon").unbind("click");
$(".viewEnabledIcon").bind("click", InitiateViewOption);
}
//--- End of EMM related codes