Is there a way to show all content in a jquery accordion (without scrollbars) - jquery-ui-accordion

Autoheight : false seems to have no effect. Even if it did work it doesnt sound like its what I need since one section could be really long and the fololowing really short and I wouldnt want the two sections with the same height.
The div in which the content is displayed can be of variable height so I cannot use a fixed height. I have tried most of the options and none of them seem to have the effect I want but I think I am missig something as this sounds like it should be a common requirement since scollbars in the accordion look rather horrible.

Have you tried to explicitly set the Height and Width of the Acccordion to the content? For example load the content into a hidden div and then get its dimensions. Then resize the Accordion and load the contents to fit.

Use this line instead:
heightStyle: "content"

autoheight : false
It is auto with a small a

Related

Isotape responsive layout with toggles and unknown heights

I am trying to create a masonary style layout using isotope. The layout must be a responsive grid with flexible columns. However each grid item has an hidden text element which opens when the image is clicked. This text will come from wordpress and therefore as an unknown length. I am trying to use the
.isotope("reLayout");
function to reset the layout when the item is toggled however it does not work. If you alter the size of the browser when the text is visible you can see that that the isotope layout kicks back in and gives the desired effect.
I have created a codepen to illustrate my issue. Any help would be appreciated
http://codepen.io/GlynnJohnson/pen/bLBCJ
Thanks
You need top use:
$container.isotope("layout");
Not
$container.isotope("reLayout");
Codepen

Cannot change header row height of ng grid

I need to dynamically change the header row height of an ng grid, depending on which column headers need to be displayed. Some columns have a very long header and I want the column name to wrap so they don't need to be excessively wide. I also don't want a lot of blank space if I initially set a tall header height, but then don't need the space if those long column names aren't displayed.
The issue is I cannot get the headerRowHeight to dynamically change. It took some time to realize that I cannot even initialize headerRowHeight using a scope variable the same way as the other gridOptions (see line 23).
See plnkr
The reason this doesn't work is that ng-grid uses absolute positioning under the hood. Grid Options are only fired once, and then the heights are set in the html after that using style= on the html dom node. (THIS IS AWFUL!) They even set the style manually on all of the underlying header dom nodes.
The other avenue I thought of was trying to redraw the grid using ngGridLayoutPlugin. I played around with this for 30 minutes with no luck. You could try manually redrawing the page itself. It looks like ng-grid is not very good at redrawing the grid, and they've made optimizations specifically for updating data, but not the styles.
The 3.0 beta unstable release looks like they've made a lot of changes, and you'll be able to do what you're trying to do easier... however, it is not ready for production. See the header cell class conditionals in this example: http://ui-grid.info/docs/#/tutorial/115_headerCellClass
I had a hell of a time trying to get ng-grid styling to do my bidding at my last job. At a certain point, we were ready to toss it because it was too restrictive. Good luck.
Use this in your CSS.
.ui-grid-header-cell-primary-focus {
line-height: 2.428571;
}

qx.ui.embed.Html scale to content

Is there a way to have the container containing an html widget (qx.ui.embed.Html) scale to the proper size so it doesn't cut off some of the Html?
Here's a playground example:
http://tinyurl.com/a4twfdc
Notice how the Three and Four get cut off.
The only way I could fix this was to define a minHeight and minWidth for the container, but my html can vary in size, so I end up with a large blank area or not enough room.
The only way I could think of a fix is to render the HTML prior into a helper div and take the offsetWidth / offsetHeight and apply it to the embed as well. That helper DIV could be out of the view port at e.g. -1000 / -1000 and you can set the HTML as innerHTML. Maybe that could solve your problem for the initial size. But as soon as the content of the embed changes dynamically, you have to redo the calculation if you can.

Hiding a component within a Border-Layout region programatically

I have a border Layout with let's say two regions; center and west. The westregion is added with the splitter param and is collapsible. Now I have a toolbar from which I want to hide/show the west region. I've solved this by calling the toggleTargetCmp() method of the splitter. Well I know, this is a private method and should not be used, but I found no other way to archive this. So far so good. All this works.
But now I want to hide the splitter & placeholder (I fetch the placeholder ownet by using the getCollapseTarget() method of the splitter) if the button in the toolbar gets clicked. I tried it with setVisible(false) which works for the splitter but it didn't work well for the placeholder... after a deeper look onto the placeholder instance I can tell that it is set to hidden: true but it uses the hideMode: 'offsets' by default plus hiddenAnchestor: false which is not documented in the API.
Based on the API docu for hideMode I tried to set it to 'display'
before calling setVisible(false) without any luck, the placeholder still stays visible.
So how can I hide the placholder, too. Or is there even a better way to archive this?
Have you tried hide method? It works exactly as you describe - hides region and splitter.
In my project I do it like this:
panel.hide();
where panel is one of borderPanel items.

How to display horizontal scroll bar in ExtJS ComboBox?

A combo's drop-down list gets the size of the Combo, and display of items with longer text just gets cropped.
I tried fiddling with Ext's CSS for combos with no luck.
Does anyone know how it can be done ?
Using ExtJS 3.2.0.
EDIT:
Alternative solutions to improve usability will also be appreciated, e.g. getting the list to expand with the content.
I don't know how you can add a scroll bar, but I know that you can change the list width with the well-named property :
listWidth : Number
The width (used as
a parameter to Ext.Element.setWidth)
of the dropdown list (defaults to the
width of the ComboBox field). See also
minListWidth
For an horizontal scroll, it would need lots of changes, because the list container width is forced, so "overflow" attributes in css are useless.
Edit : Another method
You can add this custom css, for me it seems to work well, as wrapping long lines.
.x-combo-list-item {
white-space:normal;
}
Of course, if you add this it will apply to all combos' lists.
You can set listClass : 'x-combo-list-wrap' on your Ext.form.ComboBox, and then apply the css only to these items :
x-combo-list-wrap .x-combo-list-item {
white-space:normal !important;
}
(I'm not sure the !important is useful here, not tested)

Resources