I'd like to be able to use this on a 2 column stacked panels layout, to keep items in the left and right columns equal height. I can do this by setting panel-pane as the css class - however, this affects all of the panel panes on the page, including those in the top and bottom regions.

This would work if I could specify a more specific selector, like .panel-col-first .panel-pane and .panel-col-last .panel-pane.

Could this be adapted so that would work? or is it just a limitation of the equal height jQuery library?

Comments

mrfelton’s picture

Status: Active » Needs work
StatusFileSize
new977 bytes

Proof of concept patch - this works fine just using standard css selectors.

I think we need to rethink the special syntax for specifying the (min) height a little. Rather than using a space separated list of basic css class names, it would be more flexible if you could just use standard css selectors, and there and some other method to specify the height. I don't think one textfield will cut it for this - the admin interface needs some more thought.

drurian’s picture

The original plugin uses classes so I had to continue using them. Space separated class names was just a quick way to enable using the script in several places.

drurian’s picture

Speaking of Panels - you can assign a different class or id to every pane.

mrfelton’s picture

You can assign different classes and ids to each pane, but I don't want to make my content editors have to do that - they shouldn't have to.

drurian’s picture

Well, if someone writes a patch that has a better admin interface with a textfield for each selector and ability to add a new one on the fly, I'll be happy to apply it. Otherwise, I'd wait until D7 where Ajax is much better implemented.

charos’s picture

So this patch works only for a single css class?

charos’s picture

Patch doesn't work by the way.

hexblot’s picture

StatusFileSize
new699 bytes

Problem here is that space is used as a separator in the text field, but is also a (very!) useful CSS selector. It's trivial to patch the module and use a different character as a separator, to allow for spaces in selectors.

See attached patch for switching the default space separator to ampersand. After applying this patch ( works for both dev and stable ) here's an example for selecting $('#id1 .myclass') as well as $('#id2 .myclass')

#id1 .myclass&#id2 .myclass

Basically, just use ampersand (&) between rules and you're golden. It's a bit less readable, but works just fine (using that in 5 production sites).

If you want a cleaner approach you should use a textarea in your admin interface, with one rule per line.

drurian’s picture

Will post after the switch to git.

drurian’s picture

Status: Needs work » Closed (fixed)

Fixed in dev