| @@ -394,8 +394,9 @@ | ||
| 394 | 394 | $(this).attr('disabled', 'disabled'); |
| 395 | 395 | |
| 396 | 396 | var data = { |
| 397 | 397 | action: 'propertyhive_add_key_date', |
| 398 | + security: propertyhive_admin_meta_boxes.add_key_date_nonce, | |
| 398 | 399 | post_id: propertyhive_admin_meta_boxes.post_id, |
| 399 | 400 | key_date_type: $('#_add_key_date_type').val(), |
| 400 | 401 | key_date_description: $('#_add_key_date_description').val(), |
| 401 | 402 | key_date_due: $('#_add_key_date_due').val(), |
| @@ -858,9 +859,15 @@ | ||
| 858 | 859 | var new_location = window.location.href; |
| 859 | 860 | new_location = new_location.split("#"); |
| 860 | 861 | new_location = new_location[0]; |
| 861 | 862 | |
| 862 | - window.location.href = new_location + '&sub_grid=' + $(this).attr('id').replace("export-", "") + '&record_ids=' + record_ids.join("|") | |
| 863 | + if ( record_ids.length == 0 ) | |
| 864 | + { | |
| 865 | + alert('No records to export'); | |
| 866 | + return; | |
| 867 | + } | |
| 868 | + | |
| 869 | + window.location.href = new_location + '&sub_grid=' + encodeURIComponent($(this).attr('id').replace("export-", "")) + '&record_ids=' + encodeURIComponent(record_ids.join("|")) + '&ph_export_nonce=' + encodeURIComponent(propertyhive_admin_meta_boxes.export_sub_grid_nonce); | |
| 863 | 870 | }); |
| 864 | 871 | |
| 865 | 872 | // Multiselect |
| 866 | 873 | $(".propertyhive_meta_box select.multiselect").chosen(); |