Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit e1a3334

Browse files
authored
Merge pull request #43 from eea/develop
tables in nfp_nrc set to datatable
2 parents 923f11b + ff5fabc commit e1a3334

5 files changed

Lines changed: 119 additions & 86 deletions

File tree

docs/HISTORY.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
3.6 - (2021-12-09)
5+
---------------------------
6+
* tables in nfp_nrc set to datatable
7+
[valipod refs #142972]
8+
49
3.5 - (2021-11-22)
510
---------------------------
611
* fix typo in role id

eea/ldapadmin/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.5
1+
3.6

eea/ldapadmin/zpt/nfp_nrc/awps.zpt

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
success: function(result) {
3838
count += 1;
3939
$('#remaining').text(top_role_dns.length - count)
40-
if (i1 + 1 == role_dns_count) {
41-
$('#loading').slideUp();
42-
}
4340
$.each(result['roles'], function(i2, role){
4441

4542
var users = $('<tbody>');
@@ -125,7 +122,7 @@
125122
});
126123

127124
$('#' + div_id)
128-
.addClass('nrc_role')
125+
.addClass('nrc_role')
129126
.append(
130127
$('<h3>')
131128
.attr('id', role['role_id'])
@@ -141,32 +138,45 @@
141138
)
142139
)
143140
);
144-
if (role['users'].length > 0){
145-
$('#' + div_id).append(
146-
$('<table>').addClass('account-datatable')
147-
.append($('<thead>')
148-
.append($('<tr>')
149-
.append($('<td>').text('Name'))
150-
.append(thead_a)
151-
)
152-
)
153-
.append(users)
141+
if (role['users'].length > 0){
142+
$('#' + div_id).append(
143+
$('<table>').addClass('account-datatable dataTable')
144+
.append($('<thead>')
145+
.append($('<tr>')
146+
.append($('<td>').text('Name'))
147+
.append(thead_a)
154148
)
155-
.append($('<div>').addClass('clear').html('&nbsp;'))
156-
} else {
157-
$('#' + div_id).append($('<p>').text('No member'))
158-
};
159-
$('#' + div_id).append(
160-
$('<div>').addClass('left-position').append(
161-
$('<a>')
162-
.addClass('account-link button')
163-
.attr({
164-
href: '#container',
165-
title: 'Click to go back to top'
166-
})
167-
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
168149
)
169-
).append($('<div>').addClass('clear').html('&nbsp;'))
150+
.append(users)
151+
)
152+
.append($('<div>').addClass('clear').html('&nbsp;'))
153+
} else {
154+
$('#' + div_id).append($('<p>').text('No member'))
155+
};
156+
$('#' + div_id).append(
157+
$('<div>').addClass('left-position').append(
158+
$('<a>')
159+
.addClass('account-link button')
160+
.attr({
161+
href: '#container',
162+
title: 'Click to go back to top'
163+
})
164+
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
165+
)
166+
).append($('<div>').addClass('clear').html('&nbsp;'))
167+
if (i1 + 1 == role_dns_count) {
168+
$('#loading').slideUp();
169+
requirejs(["datatables.net"], function() {
170+
window.data_table = $('.dataTable').dataTable({
171+
"aaSorting": [[0, "asc"]],
172+
"sPaginationType": "full_numbers",
173+
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
174+
"oLanguage": {
175+
"sSearch": "Apply filter _INPUT_ to table"
176+
}
177+
});
178+
});
179+
}
170180
});
171181
}
172182
});

eea/ldapadmin/zpt/nfp_nrc/extranet_reporters.zpt

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
success: function(result) {
3838
count += 1;
3939
$('#remaining').text(top_role_dns.length - count)
40-
if (i1 + 1 == role_dns_count) {
41-
$('#loading').slideUp();
42-
}
4340
$.each(result['roles'], function(i2, role){
4441

4542
var users = $('<tbody>');
@@ -123,38 +120,50 @@
123120
});
124121

125122
$('#' + div_id)
126-
.addClass('nrc_role')
123+
.addClass('nrc_role')
127124
.append(
128125
$('<h3>')
129126
.attr('id', role['role_id'])
130127
.text(role['description'] + ' (' + role['role_id'] + ')')
131128
);
132-
if (role['users'].length > 0){
133-
$('#' + div_id).append(
134-
$('<table>').addClass('account-datatable')
135-
.append($('<thead>')
136-
.append($('<tr>')
137-
.append($('<td>').text('Name'))
138-
.append(thead_a)
139-
)
140-
)
141-
.append(users)
129+
if (role['users'].length > 0){
130+
$('#' + div_id).append(
131+
$('<table>').addClass('account-datatable dataTable')
132+
.append($('<thead>')
133+
.append($('<tr>')
134+
.append($('<td>').text('Name'))
135+
.append(thead_a)
142136
)
143-
.append($('<div>').addClass('clear').html('&nbsp;'))
144-
} else {
145-
$('#' + div_id).append($('<p>').text('No member'))
146-
};
147-
$('#' + div_id).append(
148-
$('<div>').addClass('left-position').append(
149-
$('<a>')
150-
.addClass('account-link button')
151-
.attr({
152-
href: '#container',
153-
title: 'Click to go back to top'
154-
})
155-
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
156137
)
157-
).append($('<div>').addClass('clear').html('&nbsp;'))
138+
.append(users)
139+
)
140+
.append($('<div>').addClass('clear').html('&nbsp;'))
141+
} else {
142+
$('#' + div_id).append($('<p>').text('No member'))
143+
};
144+
$('#' + div_id).append(
145+
$('<div>').addClass('left-position').append(
146+
$('<a>')
147+
.addClass('account-link button')
148+
.attr({
149+
href: '#container',
150+
title: 'Click to go back to top'
151+
})
152+
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')))
153+
.append($('<div>').addClass('clear').html('&nbsp;'))
154+
if (i1 + 1 == role_dns_count) {
155+
$('#loading').slideUp();
156+
requirejs(["datatables.net"], function() {
157+
window.data_table = $('.dataTable').dataTable({
158+
"aaSorting": [[0, "asc"]],
159+
"sPaginationType": "full_numbers",
160+
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
161+
"oLanguage": {
162+
"sSearch": "Apply filter _INPUT_ to table"
163+
}
164+
});
165+
});
166+
}
158167
});
159168
}
160169
});

eea/ldapadmin/zpt/nfp_nrc/nrcs.zpt

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
success: function(result) {
3838
count += 1;
3939
$('#remaining').text(top_role_dns.length - count)
40-
if (i1 + 1 == role_dns_count) {
41-
$('#loading').slideUp();
42-
}
4340
$.each(result['roles'], function(i2, role){
4441

4542
var users = $('<tbody>');
@@ -144,7 +141,7 @@
144141
});
145142

146143
$('#' + div_id)
147-
.addClass('nrc_role')
144+
.addClass('nrc_role')
148145
.append(
149146
$('<h3>')
150147
.attr('id', role['role_id'])
@@ -160,33 +157,45 @@
160157
)
161158
)
162159
);
163-
if (role['users'].length > 0){
164-
$('#' + div_id).append(
165-
$('<table>').addClass('account-datatable')
166-
.append($('<thead>')
167-
.append($('<tr>')
168-
.append($('<td>').text('PCP'))
169-
.append($('<td>').text('Name'))
170-
.append(thead_a)
171-
)
172-
)
173-
.append(users)
160+
if (role['users'].length > 0){
161+
$('#' + div_id).append(
162+
$('<table>').addClass('account-datatable dataTable')
163+
.append($('<thead>')
164+
.append($('<tr>')
165+
.append($('<td>').text('PCP'))
166+
.append($('<td>').text('Name'))
167+
.append(thead_a)
174168
)
175-
.append($('<div>').addClass('clear').html('&nbsp;'))
176-
} else {
177-
$('#' + div_id).append($('<p>').text('No member'))
178-
};
179-
$('#' + div_id).append(
180-
$('<div>').addClass('left-position').append(
181-
$('<a>')
182-
.addClass('account-link button')
183-
.attr({
184-
href: '#main-container',
185-
title: 'Click to go back to top'
186-
})
187-
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')
188169
)
189-
).append($('<div>').addClass('clear').html('&nbsp;'))
170+
.append(users)
171+
)
172+
.append($('<div>').addClass('clear').html('&nbsp;'))
173+
} else {
174+
$('#' + div_id).append($('<p>').text('No member'))
175+
};
176+
$('#' + div_id).append(
177+
$('<div>').addClass('left-position').append(
178+
$('<a>')
179+
.addClass('account-link button')
180+
.attr({
181+
href: '#main-container',
182+
title: 'Click to go back to top'
183+
})
184+
.html('<img src="/++resource++eea.ldapadmin-www/up.png" class="middle-image image12" alt="" title="Back to top" /> Back to top')))
185+
.append($('<div>').addClass('clear').html('&nbsp;'))
186+
if (i1 + 1 == role_dns_count) {
187+
$('#loading').slideUp();
188+
requirejs(["datatables.net"], function() {
189+
window.data_table = $('.dataTable').dataTable({
190+
"aaSorting": [[1, "asc"]],
191+
"sPaginationType": "full_numbers",
192+
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
193+
"oLanguage": {
194+
"sSearch": "Apply filter _INPUT_ to table"
195+
}
196+
});
197+
});
198+
}
190199
});
191200
}
192201
});

0 commit comments

Comments
 (0)