|
|
@ -266,7 +266,7 @@ function loadUsers() {
|
|
|
|
"recordsFiltered": data.count,
|
|
|
|
"recordsFiltered": data.count,
|
|
|
|
"data": objects
|
|
|
|
"data": objects
|
|
|
|
};
|
|
|
|
};
|
|
|
|
console.log(json);
|
|
|
|
|
|
|
|
return JSON.stringify(json);
|
|
|
|
return JSON.stringify(json);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -281,9 +281,11 @@ function loadUsers() {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
class: "remove-padding icon-only content-fill",
|
|
|
|
class: "remove-padding icon-only content-fill",
|
|
|
|
data: null,
|
|
|
|
data: null,
|
|
|
|
defaultContent: '<div class="thumbnail icon">' +
|
|
|
|
render: function (data, type, row, meta) {
|
|
|
|
|
|
|
|
return '<div class="thumbnail icon viewEnabledIcon" data-url="' + context +'/user/view?username=' + data.filter + '">' +
|
|
|
|
'<i class="square-element text fw fw-user" style="font-size: 74px;"></i>' +
|
|
|
|
'<i class="square-element text fw fw-user" style="font-size: 74px;"></i>' +
|
|
|
|
'</div>'
|
|
|
|
'</div>';
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
class: "fade-edge",
|
|
|
|
class: "fade-edge",
|
|
|
@ -318,7 +320,7 @@ function loadUsers() {
|
|
|
|
class: "text-right content-fill text-left-on-grid-view no-wrap",
|
|
|
|
class: "text-right content-fill text-left-on-grid-view no-wrap",
|
|
|
|
data: null,
|
|
|
|
data: null,
|
|
|
|
render: function (data, type, row, meta) {
|
|
|
|
render: function (data, type, row, meta) {
|
|
|
|
return ' <a href="/emm/user/edit?username=' + data.filter + '" data-username="' + data.filter + '" ' +
|
|
|
|
var editbtn= ' <a href="' + context + '/user/edit?username=' + data.filter + '" data-username="' + data.filter + '" ' +
|
|
|
|
'data-click-event="edit-form" ' +
|
|
|
|
'data-click-event="edit-form" ' +
|
|
|
|
'class="btn padding-reduce-on-grid-view edit-user-link"> ' +
|
|
|
|
'class="btn padding-reduce-on-grid-view edit-user-link"> ' +
|
|
|
|
'<span class="fw-stack"> ' +
|
|
|
|
'<span class="fw-stack"> ' +
|
|
|
@ -328,8 +330,9 @@ function loadUsers() {
|
|
|
|
'<span class="hidden-xs hidden-on-grid-view">' +
|
|
|
|
'<span class="hidden-xs hidden-on-grid-view">' +
|
|
|
|
' Edit' +
|
|
|
|
' Edit' +
|
|
|
|
'</span>' +
|
|
|
|
'</span>' +
|
|
|
|
'</a>' +
|
|
|
|
'</a>';
|
|
|
|
'<a href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
|
|
|
|
|
|
|
|
|
|
|
|
var resetPasswordbtn = '<a href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
|
|
|
|
'data-click-event="edit-form" ' +
|
|
|
|
'data-click-event="edit-form" ' +
|
|
|
|
'onclick="javascript:resetPassword(\'' + data.filter + '\')" ' +
|
|
|
|
'onclick="javascript:resetPassword(\'' + data.filter + '\')" ' +
|
|
|
|
'class="btn padding-reduce-on-grid-view remove-user-link">' +
|
|
|
|
'class="btn padding-reduce-on-grid-view remove-user-link">' +
|
|
|
@ -340,8 +343,9 @@ function loadUsers() {
|
|
|
|
'<span class="hidden-xs hidden-on-grid-view">' +
|
|
|
|
'<span class="hidden-xs hidden-on-grid-view">' +
|
|
|
|
' Reset Password' +
|
|
|
|
' Reset Password' +
|
|
|
|
'</span>' +
|
|
|
|
'</span>' +
|
|
|
|
'</a>' +
|
|
|
|
'</a>';
|
|
|
|
'<a href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
|
|
|
|
|
|
|
|
|
|
|
|
var removebtn = '<a href="#" data-username="' + data.filter + '" data-userid="' + data.filter + '" ' +
|
|
|
|
'data-click-event="remove-form" ' +
|
|
|
|
'data-click-event="remove-form" ' +
|
|
|
|
'onclick="javascript:removeUser(\'' + data.filter + '\')" ' +
|
|
|
|
'onclick="javascript:removeUser(\'' + data.filter + '\')" ' +
|
|
|
|
'class="btn padding-reduce-on-grid-view remove-user-link">' +
|
|
|
|
'class="btn padding-reduce-on-grid-view remove-user-link">' +
|
|
|
@ -353,6 +357,19 @@ function loadUsers() {
|
|
|
|
' Remove' +
|
|
|
|
' Remove' +
|
|
|
|
'</span>' +
|
|
|
|
'</span>' +
|
|
|
|
'</a>';
|
|
|
|
'</a>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
$('#user-grid').datatables_extended_serverside_paging(null, '/api/device-mgt/v1.0/users', dataFilter, columns, fnCreatedRow, null, options);
|
|
|
|
$(loadingContentView).hide();
|
|
|
|
$(loadingContentView).hide();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
loadUsers();
|
|
|
|
loadUsers();
|
|
|
|
$(".viewEnabledIcon").click(function () {
|
|
|
|
|
|
|
|
InitiateViewOption();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!$("#can-invite").val()) {
|
|
|
|
if (!$("#can-invite").val()) {
|
|
|
|
$("#invite-user-button").remove();
|
|
|
|
$("#invite-user-button").remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(".viewEnabledIcon").click(function () {
|
|
|
|
|
|
|
|
InitiateViewOption();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|