Skip to content

Commit

Permalink
Merge pull request #43 from eea/develop
Browse files Browse the repository at this point in the history
tables in nfp_nrc set to datatable
  • Loading branch information
valipod authored Dec 9, 2021
2 parents 923f11b + ff5fabc commit e1a3334
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 86 deletions.
5 changes: 5 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

3.6 - (2021-12-09)
---------------------------
* tables in nfp_nrc set to datatable
[valipod refs #142972]

3.5 - (2021-11-22)
---------------------------
* fix typo in role id
Expand Down
2 changes: 1 addition & 1 deletion eea/ldapadmin/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5
3.6
66 changes: 38 additions & 28 deletions eea/ldapadmin/zpt/nfp_nrc/awps.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
success: function(result) {
count += 1;
$('#remaining').text(top_role_dns.length - count)
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
}
$.each(result['roles'], function(i2, role){

var users = $('<tbody>');
Expand Down Expand Up @@ -125,7 +122,7 @@
});

$('#' + div_id)
.addClass('nrc_role')
.addClass('nrc_role')
.append(
$('<h3>')
.attr('id', role['role_id'])
Expand All @@ -141,32 +138,45 @@
)
)
);
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('Name'))
.append(thead_a)
)
)
.append(users)
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable dataTable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('Name'))
.append(thead_a)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
)
).append($('<div>').addClass('clear').html('&nbsp;'))
.append(users)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
)
).append($('<div>').addClass('clear').html('&nbsp;'))
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
requirejs(["datatables.net"], function() {
window.data_table = $('.dataTable').dataTable({
"aaSorting": [[0, "asc"]],
"sPaginationType": "full_numbers",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"oLanguage": {
"sSearch": "Apply filter _INPUT_ to table"
}
});
});
}
});
}
});
Expand Down
65 changes: 37 additions & 28 deletions eea/ldapadmin/zpt/nfp_nrc/extranet_reporters.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
success: function(result) {
count += 1;
$('#remaining').text(top_role_dns.length - count)
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
}
$.each(result['roles'], function(i2, role){

var users = $('<tbody>');
Expand Down Expand Up @@ -123,38 +120,50 @@
});

$('#' + div_id)
.addClass('nrc_role')
.addClass('nrc_role')
.append(
$('<h3>')
.attr('id', role['role_id'])
.text(role['description'] + ' (' + role['role_id'] + ')')
);
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('Name'))
.append(thead_a)
)
)
.append(users)
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable dataTable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('Name'))
.append(thead_a)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
)
).append($('<div>').addClass('clear').html('&nbsp;'))
.append(users)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')))
.append($('<div>').addClass('clear').html('&nbsp;'))
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
requirejs(["datatables.net"], function() {
window.data_table = $('.dataTable').dataTable({
"aaSorting": [[0, "asc"]],
"sPaginationType": "full_numbers",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"oLanguage": {
"sSearch": "Apply filter _INPUT_ to table"
}
});
});
}
});
}
});
Expand Down
67 changes: 38 additions & 29 deletions eea/ldapadmin/zpt/nfp_nrc/nrcs.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
success: function(result) {
count += 1;
$('#remaining').text(top_role_dns.length - count)
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
}
$.each(result['roles'], function(i2, role){

var users = $('<tbody>');
Expand Down Expand Up @@ -144,7 +141,7 @@
});

$('#' + div_id)
.addClass('nrc_role')
.addClass('nrc_role')
.append(
$('<h3>')
.attr('id', role['role_id'])
Expand All @@ -160,33 +157,45 @@
)
)
);
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('PCP'))
.append($('<td>').text('Name'))
.append(thead_a)
)
)
.append(users)
if (role['users'].length > 0){
$('#' + div_id).append(
$('<table>').addClass('account-datatable dataTable')
.append($('<thead>')
.append($('<tr>')
.append($('<td>').text('PCP'))
.append($('<td>').text('Name'))
.append(thead_a)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#main-container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
)
).append($('<div>').addClass('clear').html('&nbsp;'))
.append(users)
)
.append($('<div>').addClass('clear').html('&nbsp;'))
} else {
$('#' + div_id).append($('<p>').text('No member'))
};
$('#' + div_id).append(
$('<div>').addClass('left-position').append(
$('<a>')
.addClass('account-link button')
.attr({
href: '#main-container',
title: 'Click to go back to top'
})
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')))
.append($('<div>').addClass('clear').html('&nbsp;'))
if (i1 + 1 == role_dns_count) {
$('#loading').slideUp();
requirejs(["datatables.net"], function() {
window.data_table = $('.dataTable').dataTable({
"aaSorting": [[1, "asc"]],
"sPaginationType": "full_numbers",
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"oLanguage": {
"sSearch": "Apply filter _INPUT_ to table"
}
});
});
}
});
}
});
Expand Down

0 comments on commit e1a3334

Please sign in to comment.