Skip to content
Snippets Groups Projects
Commit 63eae631 authored by CupCakeArmy's avatar CupCakeArmy
Browse files

Fixes

parent 91fa256e
No related branches found
No related tags found
No related merge requests found
<div class="users-table-wrapper">
<div class="tools-full-height">
<table class="table table-hover users-table">
<thead>
<tr>
</tr>
</thead>
<tbody>
</tbody>
<thead>
<tr>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
......@@ -15,6 +15,7 @@
.users-table-wrapper {
position: relative;
}
.users-table-wrapper>div {
overflow: auto;
}
......@@ -24,25 +25,37 @@
}
</style>
<script type="text/javascript">
tools.ui.menu({
'Add User': {
callback: function(){
console.log('noice');
}
}
});
var showInTable = ['firstname', 'lastname', 'email', 'membership'];
amivcore.users.GET({data:{'max_results':'50'}}, function(ret){
amivcore.users.GET({
data: {
'max_results': '50'
}
}, function(ret) {
if(!ret || ret['_items'].length == 0){
if (!ret || ret['_items'].length == 0) {
tools.log('No Data', 'w');
return;
}
showInTable.forEach(function(i){
$('.users-table thead tr').append('<th>'+ i +'</th>');
showInTable.forEach(function(i) {
$('.users-table thead tr').append('<th>' + i + '</th>');
});
for(var n in ret['_items']){
for (var n in ret['_items']) {
var tmp = '';
showInTable.forEach(function(i){
tmp += '<td>'+ ret['_items'][n][i] +'</td>';
showInTable.forEach(function(i) {
tmp += '<td>' + ret['_items'][n][i] + '</td>';
});
$('.users-table tbody').append('<tr>'+tmp+'</tr>');
//$('.users-table tbody').append('<tr><td>'+ret['_items'][n].firstname+'</td></tr>');
}
});
$('.users-table tbody').append('<tr>' + tmp + '</tr>');
//$('.users-table tbody').append('<tr><td>'+ret['_items'][n].firstname+'</td></tr>');
}
});
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment