Refactoring user-listing front-end logic

merge-requests/7/head
dilanua 8 years ago
parent 8f81f2bb01
commit bbce1a3d8a

@ -330,26 +330,45 @@ 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/users/edit-user?username=' + data.username + '" data-username="' + data.username + return '<a href="/emm/users/edit-user?username=' + data.username + '" ' +
'" data-click-event="edit-form" class="btn padding-reduce-on-grid-view edit-user-link"> ' + 'data-username="' + data.username + '" ' +
'<span class="fw-stack"><i class="fw fw-ring fw-stack-2x"></i>' + 'data-click-event="edit-form" ' +
'<i class="fw fw-edit fw-stack-1x"></i>' + 'class="btn padding-reduce-on-grid-view edit-user-link">' +
' </span> <span class="hidden-xs hidden-on-grid-view">Edit</span> </a>' + '<span class="fw-stack">' +
'<i class="fw fw-ring fw-stack-2x"></i>' +
'<a href="#" data-username="' + data.username + '" data-user-id=' + data.username + '<i class="fw fw-edit fw-stack-1x"></i>' +
' data-click-event="remove-form" onclick="javascript:removeUser(\'' + data.username + '\', \'' + '</span>' +
data.username + '\')" class="btn padding-reduce-on-grid-view remove-user-link">' + '<span class="hidden-xs hidden-on-grid-view">&nbsp;&nbsp;Edit</span>' +
'<span class="fw-stack"> <i class="fw fw-ring fw-stack-2x"></i><i class="fw fw-delete fw-stack-1x">' + '</a>' +
'</i> </span> <span class="hidden-xs hidden-on-grid-view">Remove</span> </a>' + '<a href="#" ' +
'data-username="' + data.username + '" ' +
'<a href="#" data-username="' + data.username + '" data-user-id="' + data.username + 'data-user-id="' + data.username + '" ' +
'" data-click-event="edit-form" onclick="javascript:resetPassword(\'' + data.username + 'data-click-event="edit-form" ' +
'\')" class="btn padding-reduce-on-grid-view remove-user-link"> <span class="fw-stack">' + 'onclick="javascript:resetPassword(\'' + data.username + '\')" ' +
'<i class="fw fw-ring fw-stack-2x">' + 'class="btn padding-reduce-on-grid-view remove-user-link">' +
'</i> <i class="fw fw-key fw-stack-1x"></i> <span class="fw-stack fw-move-right fw-move-bottom"> ' + '<span class="fw-stack">' +
'<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"><' + '<i class="fw fw-ring fw-stack-2x"></i>' +
'/i> <i class="fw fw-circle fw-stack-2x"></i> <i class="fw fw-refresh fw-stack-1x fw-inverse">' + '<i class="fw fw-key fw-stack-1x"></i>' +
'</i> </span> </span> <span class="hidden-xs hidden-on-grid-view">Reset</span> </a>' '<span class="fw-stack fw-move-right fw-move-bottom">' +
'<i class="fw fw-circle fw-stack-2x fw-stroke fw-inverse"></i> ' +
'<i class="fw fw-circle fw-stack-2x"></i>' +
'<i class="fw fw-refresh fw-stack-1x fw-inverse"></i> ' +
'</span>' +
'</span>' +
'<span class="hidden-xs hidden-on-grid-view">&nbsp;&nbsp;Reset Password</span>' +
'</a>' +
'<a href="#" ' +
'data-username="' + data.username + '" ' +
'data-user-id=' + data.username + ' ' +
'data-click-event="remove-form" ' +
'onclick="javascript:removeUser(\'' + data.username + '\', \'' + data.username + '\')" ' +
'class="btn padding-reduce-on-grid-view remove-user-link">' +
'<span class="fw-stack">' +
'<i class="fw fw-ring fw-stack-2x"></i>' +
'<i class="fw fw-delete fw-stack-1x"></i>' +
'</span>' +
'<span class="hidden-xs hidden-on-grid-view">&nbsp;&nbsp;Remove</span> ' +
'</a>'
} }
} }

Loading…
Cancel
Save