Sackgesicht VIP
Total posts: 1,636
27 May 2013 23:56

A list display with relation fields might cause quite some unnecessary code in the web page.

This is caused by using the standard/advanced table for both -- the default table and the table dof the relation field.

A good example is the inline <style> or the

JHtml::_('dropdown.init');

How to solve this?

1) Using a customized special "relation list template" for it, which does not replicate the code or

2) Optimize the existing (at least advanced table) template for this scenario.

I would prefer 2),

because with option 1) we will always depend on the main list template (like user controls, etc) and might have to spent more time in updating, maintaining the customized templates, while using only one (advanced table) template will make it much easier.

Proposed enhancements:

a) Relation title mode (will only display the title with options for short title) without using table structure - this would also solve the bootstrap table inheritance problem

b) Relation table mode -- this would just remove unnecessary stuff like the <style> etc since this is provided by the master table template

c) conditional inclusion of custom css field

d) conditional inclusion of JHtml::_('loader.clickover', 'clickoverrel', array());

e) more to follow ...

In my tests with a customized advanced table template with the described features, i was able to reduce the html size of a page from 560KB down to 410KB in removing useless generated code... and this is just the initial version -> more room for improvement

Last Modified: 02 Mar 2014


Sackgesicht VIP
Total posts: 1,636
28 May 2013 03:54

**e) **second field on the 1st column -- The field in the first column might be a picture or gallery field. So it would be good if there is a second field to explain it further ..

Example:

**f) **Several fields in 1 column. We can already place several fields under the title, why not combine some fields in 1 cell? Possible approach would be through a parameter containing 3 information: the initial field, the optional header titel, the following fields under. At the start of the template all additional fields can be unset, the optional titel be displayed and then later in the fields loop the fields will be displayed in the same table cell.

Example:

30|Bla Bla|74

25|Field 1,2|26,27

60||65,89


Sackgesicht VIP
Total posts: 1,636
29 May 2013 02:56

g) Individual field display order -- different from the field order under the TYPE - FIELD definition.

A parameter field with a listing of field id would enforce the display order.

Example 21|34|11|17|65

All other fields would be unset.

With the options f) and g) we would have a sort of LTCK (List Template Construction Kit). Think of the row cells as "field positions". We could define where the field content goes without creating individual customized templates. :D

Btw, i implemented a), b), c), d) in a customized template.

If you think it would be an useful enhancement and consider to add this functionality to the "advanced table template", i can sent it to you ...


Sackgesicht VIP
Total posts: 1,636
30 May 2013 02:02

**h) **option to display fields as icons beside the title,

Same approach as with f) and g) .. Maybe adding the option to display the content as tooltip, popover, or clickover

Example: 22,t|24,c|11,p


Sergey
Total posts: 13,748
30 May 2013 08:10

yes, room for enhancement is big :)


Sackgesicht VIP
Total posts: 1,636
16 Jun 2013 02:30

i) optional "responsive" feature -- wrapping the table in a div with overflow: auto as a start

It should be optional to address issues when using the list template as a "relate list template".

See here


Sackgesicht VIP
Total posts: 1,636
16 Jun 2013 19:44

Tried it with android v 4.04 and IOS 6.1.3 .. It does not have the scrollbar bar you can "scroll" by moving it left and right .. layout not destroyed

unlike my cobalt7 category listing which still breaks the layout --> have to wrap it also ...


Sackgesicht VIP
Total posts: 1,636
16 Jun 2013 21:39

Will try later and give feedback ... btw, you should sleep already ...


Sackgesicht VIP
Total posts: 1,636
17 Jun 2013 00:42

Did you try the ZURB responsive table ? I had no luck.

You have to modify the original JS a little. Replace all $ with jQuery and it will "work".

It will split the table into 2 tables, new table with first column "pinned" and the second table (without 1st column) scrollableif the browser resolution gets smaller than 767px.

But it would need quite some additional work with the css to make it work under the existing Cobalt table setup. Especially here in my setup, where i have several fields in a single cell etc ...


Sackgesicht VIP
Total posts: 1,636
14 Aug 2013 21:55

A relate field table should not have the 20px table bottom padding. It will apply for every list row in a list view.

Either we should use a special list template for relate records display within a list view or adjust the default/advanced template to support it as mentioned in the topic start.

Another issue would be the bootstrap problem to inherit the styling from the root table.


Sergey
Total posts: 13,748
15 Aug 2013 07:28

Another issue would be the bootstrap problem to inherit the styling from the root table.

Yep, you know about it more than anyone else on this planet :)


Sackgesicht VIP
Total posts: 1,636
15 Aug 2013 07:32

Yep, you know about it more than anyone else on this planet

and you know how to solve it ... ;-)

See here

Powered by Cobalt