Skip to content
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

Unwanted <p> element in rendering button #1

Open
swasher opened this issue May 8, 2023 · 5 comments
Open

Unwanted <p> element in rendering button #1

swasher opened this issue May 8, 2023 · 5 comments

Comments

@swasher
Copy link

swasher commented May 8, 2023

I have strange <p> wrapper around action buttons, that slides the button out of the row. I will be grateful for any ideas how to fix it!

Thank you in advance!

p.s If you want look at source code, it lay in repo: admin.py, class DetalInLine

image

@HiroshiFuu
Copy link
Owner

HiroshiFuu commented May 8, 2023

I have published version 1.5 to remove the unwanted <p> element. However, the original author commented "we have to add <p> tags as a workaround for invalid html". And I have no idea what does it mean as well, contact me again if u encounter any more issue.

@swasher
Copy link
Author

swasher commented May 9, 2023

First, thank you for your fast answer and support!

I was dig into problem, and discovered that:

  1. With or without render_inline_actions function, <p></p> tags at start and end of button present in html. May be, this function was actual with Django 3 or more early admin templates.

  2. Your distributive don't have static\inline_actions\css\inline_actions.css file, which have influence on <p> tag:

    .field-render_inline_actions > p,
    .field-render_inline_actions label + p {
      display: none;
    }

So, I trying return render_inline_actions back, and with inline_actions.css I got following result:

image

which is pretty enough.

One thing I want suggest, change padding: 0px 5px; to padding: 2px 5px;, which is a little cleaner.

@HiroshiFuu
Copy link
Owner

Thanks for the info, I have made the changes and published v1.6.

@swasher
Copy link
Author

swasher commented May 17, 2023

There is some trouble with package:

# pipenv install  django4-inline-actions==1.6
Loading .env environment variables...
Installing django4-inline-actions==1.6...
Resolving django4-inline-actions==1.6...
Installing...
[   =] Installing django4-inline-actions...[31m[1mError: [0m An error occurred while installing [32mdjango4-inline-actions==1.6[0m!
Error text: Collecting django4-inline-actions==1.6 (from -r c:\users\oleksii\appdata\local\temp\pipenv-eb690t6z-requirements\pipenv-vux0fmrh-requirement.txt (line 1))
  Using cached django4-inline-actions-1.6.tar.gz (20 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Discarding https://files.pythonhosted.org/packages/6d/4e/4c1974b5a93ad04e305b69dd05713010150f5dbb482c14b136b8e29c534c/django4-inline-actions-1.6.tar.gz (from https://pypi.org/simple/django4-inline-actions/): Requested django4-inline-actions==1.6 
from https://files.pythonhosted.org/packages/6d/4e/4c1974b5a93ad04e305b69dd05713010150f5dbb482c14b136b8e29c534c/django4-inline-actions-1.6.tar.gz (from -r
c:\users\oleksii\appdata\local\temp\pipenv-eb690t6z-requirements\pipenv-vux0fmrh-requirement.txt (line 1)) has inconsistent version: expected '1.6', but metadata has '1.5'

[36m  WARNING: Requested django4-inline-actions==1.6 from https://files.pythonhosted.org/packages/6d/4e/4c1974b5a93ad04e305b69dd05713010150f5dbb482c14b136b8e29c534c/django4-inline-actions-1.6.tar.gz (from -r
c:\users\oleksii\appdata\local\temp\pipenv-eb690t6z-requirements\pipenv-vux0fmrh-requirement.txt (line 1)), but installing version 1.5
ERROR: Could not find a version that satisfies the requirement django4-inline-actions==1.6 (from versions: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6)
ERROR: No matching distribution found for django4-inline-actions==1.6
[0m
Installation Failed

Version 1.5 installed sucessfully.

@swasher
Copy link
Author

swasher commented Jun 1, 2023

bump!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants