- +
From 50721dab4eb863ebaf52fb99c0eeb4514fe5cacd Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 13 May 2014 00:59:34 +0300 Subject: [PATCH 05/12] Table: Add option "enhanced" --- entries/table.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/entries/table.xml b/entries/table.xml index e3ed6140..24e13f88 100644 --- a/entries/table.xml +++ b/entries/table.xml @@ -373,6 +373,7 @@ +
Rank
]]> -

Working with grouped column headers

+

Working with grouped column headers

It's fairly common to need to logically group multiple columns together under a heading group for financial or scientific data. The framework can support the most simple version of this by allowing for two rows of table headers (TH), with the first row containing simple colspan attributes to group the columns below. In this configuration, the framework will add a class to the label of the first cell in each group to allow you to style these differently and provide aditional visual hierarchy.

@@ -282,10 +282,6 @@

The theme for the column chooser popup can be set by adding the data-column-popup-theme attribute to the table and specifying any swatch letter in your theme. For custom styles or scripting, all the column chooser popups can be targeted by using the ui-table-columntoggle-popup structural class added to these popups. To customize a single popup, use the generated ID based on the table ID that added to each specific popup (such as #movie-table-popup) to target a specific popup.

-

Working with grouped column headers

- -

It's fairly common to need to logically group multiple columns together under a heading group for financial or scientific data. The framework can support the most simple version of this by allowing for two rows of table headers (TH), with the first row containing simple colspan attributes to group the columns below. In this configuration, the framework will parse the first row only for the priority and expose these heading groups as the options in the column chooser popup. In this configuration, the second heading will not be exposed as columns that can be hidden or shown independently of the groupings in the chooser.

-

The columntoggle table places an anchor before the table that invokes a popup listing the columns available for showing/hiding. The ID of the popup and thus the href of the anchor should be the ID of the table suffixed by the string -popup. The anchor must also have an id attribute which is identical to that of the table, but postfixed with -button. This will allow the table to correctly enable/disable when you modify its disabled option. You may separately pre-enhance the popup widget, or you may allow autoinitialization to enhance it.

The popup widget must contain a single controlgroup widget which in turn contains all the checkboxes representing the columns of the table.

@@ -342,6 +338,8 @@
Default value: "ui-table-reflow". This class is appended to the <table> element upon widget instantiation when it is to be turned into a reflow table. This key is provided by the widget's reflow extension.
cellLabels
Default value: "ui-table-cell-label. This class is added to the <b> elements which play the role of headings when the is rendered as a single column on narrow screens. This key is provided by the widget's reflow extension.
+
cellLabelsTop
+
Default value: "ui-table-cell-label-top. This class is added to the <b> elements which play the role of top level headings when the is rendered as a single column on narrow screens and it has grouped headers. This key is provided by the widget's reflow extension.
popup
Default value: "ui-table-columntoggle-popup". This class is added to the popup containing the column checklist. This key is provided by the widget's columntoggle extension.
columnBtn
From 2cce7829b120cac4e12c4deb5a6be1870ab3946b Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 27 May 2014 15:58:10 +0300 Subject: [PATCH 09/12] Table: Document new option columnButton --- entries/table.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entries/table.xml b/entries/table.xml index 428477fd..4afcc6e4 100644 --- a/entries/table.xml +++ b/entries/table.xml @@ -355,13 +355,19 @@ Sets the text prompt for the column chooser button.

This option is also exposed as a data attribute:data-column-btn-text="Show columns".

- + + @@ -385,7 +389,7 @@
"reflow"
Indicates that the table should handle narrow screens using functionality provided by the reflow extension.
"columntoggle"
-
Indicate sthat the table should handle narrow screens using functionality provided by the columntoggle extension.
+
Indicates that the table should handle narrow screens using functionality provided by the columntoggle extension.

This option is also exposed as a data attribute: data-mode="columntoggle".

From 3d862eaf9c036b05b70436036e6054ffd13cbadb Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Wed, 28 May 2014 21:09:17 +0300 Subject: [PATCH 11/12] Table: Add classes "cellHidden" and "cellVisible" and method setColumnVisibility() --- entries/table.xml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/entries/table.xml b/entries/table.xml index 78689f94..2ace0cc9 100644 --- a/entries/table.xml +++ b/entries/table.xml @@ -340,14 +340,18 @@
Default value: "ui-table-cell-label. This class is added to the <b> elements which play the role of headings when the is rendered as a single column on narrow screens. This key is provided by the widget's reflow extension.
cellLabelsTop
Default value: "ui-table-cell-label-top. This class is added to the <b> elements which play the role of top level headings when the is rendered as a single column on narrow screens and it has grouped headers. This key is provided by the widget's reflow extension.
-
popup
-
Default value: "ui-table-columntoggle-popup". This class is added to the popup containing the column checklist. This key is provided by the widget's columntoggle popup extension.
-
columnBtn
-
Default value: "ui-table-columntoggle-btn". This class is added to the button that brings up the column checklist. This key is provided by the widget's columntoggle popup extension.
+
cellHidden
+
Default value: "ui-table-cell-hidden". This class is added to all cells in a column that the user has forced into the hidden state by calling the toggleColumn() method or by unchecking a checkbox in the popup menu. This key is provided by the widget's columntoggle extension.
+
cellVisible
+
Default value: "ui-table-cell-visible". This class is added to all cells in a column that the user has forced into the visible state by calling the toggleColumn() method or by checking a checkbox in the popup menu. This key is provided by the widget's columntoggle extension.
priorityPrefix
Default value: "ui-table-priority-". The table constructs a class name from this prefix by appending the value of the data-priority attribute it finds on the column header, if any. It then applies the resulting class to all cells under the column header. This key is provided by the widget's columntoggle extension.
columnToggleTable
Default value: "ui-table-columntoggle". This class is appended to the <table> upon widget instantiation when it is to be turned into a columntoggle table. This key is provided by the widget's columntoggle extension.
+
popup
+
Default value: "ui-table-columntoggle-popup". This class is added to the popup containing the column checklist. This key is provided by the widget's columntoggle popup extension.
+
columnBtn
+
Default value: "ui-table-columntoggle-btn". This class is added to the button that brings up the column checklist. This key is provided by the widget's columntoggle popup extension.
@@ -417,6 +421,21 @@ 1.5.0 Re-process the entire table to ensure it is displayed correctly. + + Sets the visibility of a column. + + +

This argument may be set to either a number or a jQuery collection object.

+

When set to a number, the value of this argument is the zero-based DOM order index of the cell located in the table header's first row whose column's visibility is to be set.

+

When set to a jQuery collection object, the value of this argument is a jQuery collection object containing a cell from the column whose visibility is to be set. Only the first item in the collection object is used.

+
+ + +
+ + When true, it causes the column to be always shown. When false, it causes the column to be always hidden. + +
350 From a26d39c85d50108884088cf4ab1cf7da66bff2ac Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 5 Jun 2014 22:23:52 +0300 Subject: [PATCH 12/12] Table: Copy editing based on review --- entries/table.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entries/table.xml b/entries/table.xml index 2ace0cc9..83c31a3b 100644 --- a/entries/table.xml +++ b/entries/table.xml @@ -90,7 +90,7 @@
]]> -

an element is added before the text of each cell with a class of ui-table-cell-label:

+

An element is added before the text of each cell with a class of ui-table-cell-label:

@@ -136,7 +136,7 @@

We recommend writing media query widths in ems so they respond to font size changes. To convert a pixel width into ems, divide the target width by 16 (pixels). Use this value for the min-width value in the media query above.

Applying a preset breakpoint

-

Even though we strongly encourage you to write custom breakpoints yourself, the framework includes a single pre-configured breakpoint that targets the stacked style to smaller phones and swaps to a tabular prsentation on larger phones, tablet and desktop devices. To use this preset breakpoint, add the ui-responsive class to the table to convert from the stacked presentation to a tabular presentation at 560px (35em). If this breakpoint doesn't work for your content, we encourage you to write a custom breakpoint as descibed above.

+

Even though we strongly encourage you to write custom breakpoints yourself, the framework includes a single pre-configured breakpoint that targets the stacked style to smaller phones and swaps to a tabular prsentation on larger phones, tablet and desktop devices. To use this preset breakpoint, add the ui-responsive class to the table to convert from the stacked presentation to a tabular presentation at 560px (35em). If this breakpoint doesn't work for your content, we encourage you to write a custom breakpoint as described above.

1941