mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
UI fixes in 2.2.0-beta
This commit is contained in:
parent
7898a7475c
commit
f32caf1833
@ -83,7 +83,7 @@ function hidePopup() {
|
|||||||
* initial mode and with out select mode.
|
* initial mode and with out select mode.
|
||||||
*/
|
*/
|
||||||
function InitiateViewOption() {
|
function InitiateViewOption() {
|
||||||
$(location).attr('href', $(this).data("url"));
|
// $(location).attr('href', $(this).data("url"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadRoles() {
|
function loadRoles() {
|
||||||
@ -124,8 +124,8 @@ function loadRoles() {
|
|||||||
class: "remove-padding icon-only content-fill",
|
class: "remove-padding icon-only content-fill",
|
||||||
data: null,
|
data: null,
|
||||||
defaultContent: "<div class='thumbnail icon'>" +
|
defaultContent: "<div class='thumbnail icon'>" +
|
||||||
"<i class='square-element text fw fw-bookmark' style='font-size: 74px;'></i>" +
|
"<i class='square-element text fw fw-bookmark' style='font-size: 74px;'></i>" +
|
||||||
"</div>"
|
"</div>"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
class: "fade-edge",
|
class: "fade-edge",
|
||||||
|
|||||||
@ -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) {
|
||||||
'<i class="square-element text fw fw-user" style="font-size: 74px;"></i>' +
|
return '<div class="thumbnail icon viewEnabledIcon" data-url="' + context +'/user/view?username=' + data.filter + '">' +
|
||||||
'</div>'
|
'<i class="square-element text fw fw-user" style="font-size: 74px;"></i>' +
|
||||||
|
'</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();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -25,6 +25,7 @@ $.fn.datatables_extended = function(settings){
|
|||||||
|
|
||||||
// EMM related function
|
// EMM related function
|
||||||
if (InitiateViewOption) {
|
if (InitiateViewOption) {
|
||||||
|
$(".viewEnabledIcon").unbind("click");
|
||||||
$(".viewEnabledIcon").bind("click", InitiateViewOption);
|
$(".viewEnabledIcon").bind("click", InitiateViewOption);
|
||||||
}
|
}
|
||||||
//--- End of EMM related codes
|
//--- End of EMM related codes
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user