';
document.querySelector('#copytext').value = textContent;
modal.showModal();
});
// Modal close functionality
const modal = document.querySelector('.republish-modal');
const closeBtn = document.querySelector('.republish-modal-close');
// Close button click
closeBtn.addEventListener('click', function() {
modal.close();
});
// Close on backdrop click
modal.addEventListener('click', function(e) {
if (e.target === modal) {
modal.close();
}
});
// Close on ESC key (this is usually built-in, but adding for safety)
modal.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
modal.close();
}
});
// Copy text button functionality
document.querySelector('.copy-text-button').addEventListener('click', async function() {
const textarea = document.querySelector('#copytext');
const text = textarea.value;
try {
// Try modern Clipboard API first
if (navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text);
this.textContent = 'Copied!';
} else {
// Fallback for older browsers
textarea.select();
document.execCommand('copy');
this.textContent = 'Copied!';
}
// Reset button text after 2 seconds
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
} catch (err) {
console.error('Failed to copy text: ', err);
// Fallback to selection if copying fails
textarea.select();
this.textContent = 'Text selected';
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
}
});
});
Two lawsuits have been filed by inmates and family members against the healthcare provider for Maricopa County jails. The lawsuits cite, among other things, the healthcare agency's lack of accreditation. Correctional Health Services was stripped of its accreditation more than seven months ago, writes J.J. Hensley of the Arizona Republic.
Though the healthcare agency is not required to be accredited, the lack of that status has left it open to criticism and legal action, Hensley writes. There have been hundreds of lawsuits related to inmate health care over the past 10 years, and the County Board of Supervisors has paid more Than $250,000 to consultants to try to find solutions. Since 1998, the county has paid $13 million in legal fees, settlement and jury verdicts to inmates and their families, Hensley writes. The most recent lawsuits center on an inmate who died after jail health providers allegedly failed to recognize his diabetic symptoms, according to the claim. A second suit involves an inmate who alleges staff members denied him medication for seizures.