-
Notifications
You must be signed in to change notification settings - Fork 1
/
global.js
29 lines (23 loc) · 839 Bytes
/
global.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
jQuery(document).ready(function($) {
var dpdButton = $('#dpd-export-button');
if(dpdButton.length) {
var ordersTable = $('table.wp-list-table.posts');
ordersTable.find('.check-column input').change(function() {
var selected = new Array();
setTimeout(function(){
ordersTable.find('.check-column input:checked').each(function(){
if($(this).val() != 'on') {
selected.push($(this).val());
}
});
if(selected.length) {
dpdButton.find('small').html(' - #'+selected.join(', #'));
dpdButton.attr('href',dpdButton.data('baseurl')+selected.join('|'));
} else {
dpdButton.find('small').html('');
dpdButton.attr('href',dpdButton.data('baseurl'));
}
}, 100);
});
}
});