Table cell stretching - cell

I have two columns in my table with equal width (50%, 50%).
I am showing search results URL in them. For big urls the columns are stretching and destroying the layout.
Any suggestion to the problem?

SEE How to wrap long lines without spaces in HTML?
These may help too:
Best word wrap algorithm?
Word-wrap in an HTML table

You can set text-overflow:ellipsis; described here and/or use jQuery ellipsis plugin.

Related

Django-tables2 RowSpan

I tried to make a table with rowspan when the cells in the same column have the same value.
Like in this image
And i want to make it with django-tables2
I tried this code line but it shift the X1 to the field2 column at the second record.
Thanks in advance.
There is no support for rowspan in django-tables2. While adding such a feature is a theoretical possibility, I suspect it is non-trivial and will bring quite some complexity.
You are welcome to propose a patch by opening a pull request though, but I will only consider merging it after I can inspect the actual implementation (and documentation, tests).

Keep a row together but break if necessary

I´m working on a project using XSL-FO to generate some PDF Files.
There are several tables with rating comparisons.
Some columns have short text and some have very long text.
Without the attribute keep-together.within-page or with keep-together.within-page='auto' the tables look very ugly because the columns break the text at the end of a page - no matter what.
So i decided to use keep-together.within-page='always' to achive a better look. If a row doesnt fit on a page, fop moves the row to a new page. beautiful.
Now the problem.
In some cases some texts are very long and the content is larger than one page. In this case i want the row to break onto 2 pages.
I was looking for something like keep-together.within-page='always if possible'
is it possible to achive this some how?
You are searching for:
keep-together.within-page='<number(1-9)>'
If you type in 'always' fop tries to fit it with any necessary method into one page. If you specify a number it is more like "I will try what I can, but if the text is to long, it will break anyways". The number you fill in, is more like a priority, in case you have many nested keep-togethers. That means that the value 1 will also do its job.

How to create a form with repeated rows in a grid with Orbeon?

Is it possible to have repeating data in a grid with lots of fields in a table-like format, i.e. with several columns on each row, and a totals row that calculates the sum? If not, are there any other solution?
Yes, this is possible. And I think you'll find the information you need on how to do this in this blog post: Spreadsheet-like forms. I could copy part of the post here, but think you're better of reading the whole thing.

How to determine if a given word or phrase from a list is within an anchor tag?

We have a ColdFusion based site that involves a large number of 'document authors' that have little or no knowledge of HTML. The 'documents' they create are comprised of HTML stored in a table in the database. They use a CKEDITOR interface. The content that they create is output into specific area of the page. The document frequently has tons of technical terms that readers may not be familiar with that we would like to have tooltips automatically show up for.
I and the other programmer want to have some code insert 'tooltip' code into the page based on a list of words in a table on our SQL server. The 'dictionary' table in our database has a unique ID, the word/phrase we will look for and a corresponding definition that would be displayed in the tooltip.
For instance, one of the word/phrases we will be looking for is 'Scrum Master'. If it occurs in the document area, we need to insert code around the words to create a tooltip. To do that, we need to see if certain conditions exist. Are the words within an anchor tag? If yes, is there already a title value for the tag (title is used to contain the info to be displayed in a tooltip)? If a title tag exists, don't do anything. If the words are not in an anchor tag, then we would put anchor tags around the words along with the title that will contain the definition.
The tooltip code we use is via jQuery (http://jqueryui.com/tooltip/). It is quick and simple to use. We just need to figure out how to use it dynamically based on our dictionary table.
Do you have any suggestions of how to go about this?
I was hoping that jSoup might have a function that I could use, but that doesn't seem to be the right technology for what I want to do, but I could be wrong and I am happy to be corrected!
We have a large number of these documents and so manually inserting and maintaining the tooltip code is just not an option.
Update you content with something like:
strOut = ReplaceList(strIn, ValueList(qryTT.find), ValueList(qryTT.replace));
Since words are delimited by spaces, the qryTT.find needs to have spaces. The replace column is going to need to include some of the original content. You are going to have to be careful with words followed by a comma or a period too.
I would cache the results because I would expect it to be memory intensive.

How to prevent page break in QTextDocument block or frame?

Is it possible to prevent page break anywhere inside table in QTextDocument?
In my QTextDocument I have a plenty of larger images created from small image blocks. Adding large images seeems to be a waste of resources, so an obvious solution seems to be creating a table, putting small image in each cell.
The problem is that now these tables can have page breaks after each row. The only way to prevent it I know is to call setPageBreakPolicy() for each table/frame format, but this requires obligatory page break before each larger image. I would like to have these page breaks only if necessary (larger image does not fit).
Is it possible to do what I want?
For a QTextTable, you can prevent splitting it over multiple pages by setting the headerRowCount property of the QTextTableFormat equal to the number of rows in the table. This property sets the number of rows that are repeated when a page boundary is crossed, repeating the table header. If you set you entire table to be the header, the whole table is always placed on a single page.
One warning: do not do this with tables that potentially do not fit on a single page. Qt will mess things up in this case.
I hope Qt will add some extra flags to the pageBreakPolicy property in the future, so that we can create unbreakable tables/frames in a clean way.