-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline heading problem #261
Comments
Nice, waiting for official bug fix. |
Until the bug fix gets released, you can fix it with JavaScript: // Function to fix the headings for tabular inline forms
function fixHeadings() {
// Find the h2 element
const h2Elements = document.querySelectorAll('.tabular h2.inline-heading');
for (const h2Element of h2Elements) {
// Get the next sibling node (which should be the text node)
const textNode = h2Element.nextSibling;
// Check if the next sibling is a text node and contains non-whitespace content
if (textNode && textNode.nodeType === Node.TEXT_NODE && textNode.textContent.trim()) {
// Move the text content into the h2 element
h2Element.textContent = textNode.textContent.trim();
// Remove the original text node
textNode.remove();
}
}
}
document.addEventListener("DOMContentLoaded", (event) => {
fixHeadings();
}); Which brings me to you, @fdintino: Do you have an estimation for when this fix could be released? Is there anything I could do to help? 😄 UPDATE: Nevermind, I saw |
drikusroor
added a commit
to Amsterdam-Music-Lab/MUSCLE
that referenced
this issue
Aug 30, 2024
drikusroor
added a commit
to Amsterdam-Music-Lab/MUSCLE
that referenced
this issue
Sep 4, 2024
…ck` (#1227) * feat: Add BlockTranslatedContent model and relate it to Block with a ManyToMany relationship * refactor: Migrate block content and associated models * refactor: Add `translated_content` as `ManyToMany` field of `Block` instead of on `BlockTranslatedContent` * feat: Warn user about missing translated contents * refactor: Remove hashtag, url, consent & language from block * refactor: Move warnings to remarks column * fix: Fix many tests after removing consent/url/hashtags from block model * doc: Update consent's doc string * fix: Fix minor test * fix: Fix remainder of tests * fix: Validating the model before saving the model and its relations results into errors as the validator looks for translated content using the FKs * refactor: Handle missing language in content * fix: Re-add Hooked ID * refactor(`BlockTranslatedContent`) Refactor `Block`-`BlockTranslatedContent` relationship to `ForeignKey` - Update Block model to use ForeignKey for translated_contents - Modify migrations to reflect new relationship - Adjust admin interface to handle inline editing of translated contents - Update related queries and methods to use new relationship structure * refactor: Use tabular inline for block translated content * fix: Fix border radius top left in markdown input * feat: Add all necessary fields for experiment translated content to its form * chore: Remove unnecessary print statement * fix: Add `BlockTranslatedContentInline` inline to `BlockAdmin` * fix: Create temporary fix for tabular inline headings appearing out of its h2 element See also: - theatlantic/django-nested-admin#261 - theatlantic/django-nested-admin#259 * chore: Incorporate latest version of `django-nested-admin` that includes fix for the tabular inline form's heading * refactor: Rename test to be more descriptive * refactor: Incorporate the migration of #1240
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Admin looks like:
And the code:
The text was updated successfully, but these errors were encountered: