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

fixed position of submit_line in change_form #212

Open
nordbit opened this issue Aug 10, 2015 · 11 comments
Open

fixed position of submit_line in change_form #212

nordbit opened this issue Aug 10, 2015 · 11 comments

Comments

@nordbit
Copy link

nordbit commented Aug 10, 2015

Sometimes forms are long, everytime when i must save, even after small correct at the top of form i need scroll to bottom of the page..
We can add class .fixed-bottom-right to form-actions with css:

postition:fixed;
bottom:10px;
right:10px;

Another solution is add extra block in navbar with icon-only form after logo for form-action (common used in Android application)

@xrmx
Copy link
Contributor

xrmx commented Aug 27, 2015

Thanks for the suggestion. I'll give it a try, hopefully next week.

@xrmx
Copy link
Contributor

xrmx commented Aug 28, 2015

I think having form-actions behave like the navbar where it's hamburger menu on small screens and normal menu on biggers could be interesting.

@olivierdalang
Copy link

Hi,
Not sure why, but here this seems implemented (even if I installed using pip). However, it doesn't display nicely on small screens and/or long forms, since the actions buttons float over the last fields (see screenshot).
I like it more with buttons at the bottom...
Thanks !

bug_css_django

@xrmx
Copy link
Contributor

xrmx commented Sep 18, 2015

@olivierdalang i never test it under 1024px wide screens, i think that's really too painful to use the django admin interface in such a small screen.

@olivierdalang
Copy link

Heh i thought that was the idea of responsive layouts!! By the way it displays very well besides of this particular problem...

@bformet
Copy link
Contributor

bformet commented Sep 30, 2015

I agree the overlap on small screens needs to be fixed, but I definitely do like the fixed position of the submit_line. Very handy on long change forms.
I'd love to see it come back (maybe as a setting?)

I can imagine two workarounds:

  1. increase the body's padding-bottom or give a margin-bottom to 'div#content-main'
  2. disable the fixed position on small screens with a media query

@securedirective
Copy link

Strangely, this was already implemented in v2.5.5

Though by looking at the repo code history, I can't figure out which commit removed it, if I install v2.5.5 manually I get the nice floating submit buttons.

pip install django-admin-bootstrapped==2.5.5

...overrides.css look like this:

/* overrides to default admin and bootstrap styles */

.fixed-save {
    position: fixed;
    bottom: 10px;
    right: 10px;
}

body {
...

...and change_form.html looks like this:

...
    <div class="form-actions fixed-save">
        {% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
    </div>
...

I like the floating submit buttons, since my form is very long. But ever since v2.5.6, the reference to fixed-save has been removed. Will it be coming back?

@xrmx
Copy link
Contributor

xrmx commented Oct 5, 2015

@securedirective override.css hasn't been touched since july which is before 2.5.5 was released. Can you dig a bit more to find out the commit that removed that?

@xrmx
Copy link
Contributor

xrmx commented Oct 5, 2015

@bformet pull requests are indeed very welcome :)

@securedirective
Copy link

@xrmx Okay, I've searched through your repo on github and cannot find any reference to the .fixed-save css block. I used both github's repository search and git log -S 'fixed-save'. I then compared your release versions to the appropriate commits:

  • Release 2.5.4, installed using pip, matches perfectly with your repo as of commit 1668ec8 "Bump version to 2.5.4".
  • Release 2.5.6, installed using pip, matches perfectly with your repo as of commit f536bfa "Bump version to 2.5.6".
  • But Release 2.5.5, installed using pip, does not match your repo as of commit e71c299 "Bump release to 2.5.5". The only differences are the ones I pointed out. The code installed by running pip install django-admin-bootstrapped==2.5.5 has these additional changes that are not from your repo...

/static/admin/css/overrides.css has an additional CSS block at the very beginning:

.fixed-save {
    position: fixed;
    bottom: 10px;
    right: 10px;
}

/templates/admin/change_form.html has an extra "fixed-saved" class added to the last DIV:

<div class="form-actions fixed-save">

Any way we could get these same 2 changes back for version 2.5.7 ? It was nice, having floating submit buttons.

@xrmx
Copy link
Contributor

xrmx commented Oct 5, 2015

Damn, that means i was so dumb to package some local modified files instead of the tagged stuff. Thanks @securedirective for investigating

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

No branches or pull requests

5 participants