OpenDevelopmentMekong / wp-odm_tabular_pages

Internal ODM Wordpress plugin for exposing a page template for tabular pages
https://opendevelopmentmekong.net
GNU General Public License v3.0
0 stars 2 forks source link

Fixes #89 #90

Closed acorbi closed 7 years ago

acorbi commented 7 years ago

@Huyeng @prustar The problem with Issue #89 is that the width of the columns (in %) was hard-coded considering the table to contain ALWAYS 4 columns. If editors remove one of the columns by changing the config, then a javascript error was thrown because the table expects to have 4 columns.

screenshot from 2017-01-02 10-29-35

This PR removes that line of code that determines the width of the columns (in %) and solves the problem with the consequence that column width is then adjusted to fit its contents dynamically. Looks like below:

screenshot from 2017-01-02 10-32-00

@Huyeng @prustar would you agree on leaving the column width as pictured above?

Huyeng commented 7 years ago

Alex, if the % of the column is removed, the table will looks like as below: screenshot_3

screenshot_4

Anyways, I think you css can help to fix the styling issues above.

acorbi commented 7 years ago

hi @huyeng. which brower are you using to reproduce that layout? i would then add a min-width attribute on the CSS to ensure the columns are not too thin.

acorbi commented 7 years ago

Will push the code-change later and let you review again

Huyeng commented 7 years ago

which brower are you using to reproduce that layout?

Well, both Firefox ( v. 50.1.0) and Chrome ( v. 55.0.2883.87 m)