зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-03 18:25:51 +03:00
fix: Update tests and CI for ActiveAdmin 4 compatibility
- Fix active_admin_comments to use active_admin_comments_for in AA4 - Add author to CSS test to fix validation error - Update has_many support for AA4 using .has-many-add button click - Simplify GitHub Actions workflow for AA4 testing - All tests now passing with ActiveAdmin 4.0.0.beta16 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Этот коммит содержится в:
14
vendor/assets/javascripts/activeadmin_quill_editor.js
поставляемый
14
vendor/assets/javascripts/activeadmin_quill_editor.js
поставляемый
@@ -190,10 +190,16 @@
|
||||
document.addEventListener('turbolinks:load', initQuillEditors);
|
||||
|
||||
// Support for ActiveAdmin has_many fields
|
||||
document.addEventListener('has_many_add:after', function(event) {
|
||||
const newFields = event.target.querySelectorAll('[data-aa-quill-editor]');
|
||||
newFields.forEach(initQuillEditor);
|
||||
setupFormSubmission();
|
||||
// ActiveAdmin 4 uses .has-many-add button click
|
||||
document.addEventListener('click', function(event) {
|
||||
if (event.target.closest('.has-many-add')) {
|
||||
// Wait for DOM to be updated with new fields
|
||||
setTimeout(function() {
|
||||
const newEditors = document.querySelectorAll('[data-aa-quill-editor]:not(.quill-editor--active)');
|
||||
newEditors.forEach(initQuillEditor);
|
||||
setupFormSubmission();
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user