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

contentchooser resize handle is erratic / contentchooser is not high enough for modern screen sizes #756

Open
fredvd opened this issue Sep 22, 2017 · 1 comment

Comments

@fredvd
Copy link
Member

fredvd commented Sep 22, 2017

I would like to increase the contentchooser height in a Plone site. The size is now hardcoded and only shows 9 items, where the whole contentchooser height is less then half of the web page hight. Ideally the contentchooser dialog would look at the available screen height before it pops up and set itself to 2/3, but overriding the height to a new fixed size would be an easier alternative.

Issue: in collective.cover the resizable feature of the contentchooser is only limited to horizontal, and when you try to change the horizontal width the dialog make a vertical jump and the internal dialog elements also get distorted a bit. So the internal markup of the contentchooser (no longer?) supports resizing.

I have found two places so far in the code where the dialog dimensions are controlled: contentchooser.js

$("#contentchooser-content-search").resizable({
maxHeight: 411,
minHeight: 411,
minWidth: 350,
maxWidth: 540
});

And the height of the item-list influences size of the dialog in

#contentchooser-content-search .item-list
{
overflow: auto;
width: 500px;
max-width: 100%;
height: 250px;
margin: 10px 0 0;
padding: 5px;
border: 1px solid #ccc;
}

The current values seem to be misaligned because of the resizing issues. I could override the values in both locations to make the dialog bigger and I'd probably remove the .resizable at all because the contentchooser markup doesn't seem to support it. But I'd have to overwrite two resources files, which are both in a resource directory and cannot be overridden using z3c.jbot.

Adding an automatic resize function on popup depending on the users screen height would require making the contentchooser height-flexible which it now isn't and requires front end skills I don't have :-(

This is also a bit related to issue #752 about refactoring covers' css/js, if that is considered can we at least register the most important resources as individual resource registrations which makes it much easier for an integrator to override a single resource in zcml?

@hvelarde
Copy link
Member

yes, the content chooser is a piece of crap that we need to refactor ASAP; we're finishing an important project and we can't help until 2 or 3 weeks on this.

do you mind to make a list list with all the enhancements that you would like to see here (besides compatibility with Plone 5)?

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

2 participants