diff --git a/docs/example-widget-column-selector.html b/docs/example-widget-column-selector.html index 287f5886..7a481c39 100644 --- a/docs/example-widget-column-selector.html +++ b/docs/example-widget-column-selector.html @@ -10,6 +10,8 @@ + + @@ -21,10 +23,18 @@ + - +} + +/*** Bootstrap popover ***/ +#popover-target label { + margin: 0 5px; +} +#popover-target input { + margin-right: 5px; +} + @@ -128,7 +171,8 @@
widgetOptions
)columnSelector_container
(null
) - Target an element within the current page where the column selector will be inserted.
- '#columnSelector'
)$('#columnSelector')
).columnSelector_columns
({}
; empty object) - Assigns a column status for each selector:
- "disable"
- this is one of many ways to remove a column from the column selector popuptrue
to initially display a column. This is the default for undefined columns.false
to initially hide a column.widgetOptions : { +Column selector widget default options (added inside of tablesorter
+widgetOptions
)
Option | Description |
---|---|
columnSelector_container |
+
+ Target an element within the current page where the column selector will be inserted.
+
null
+ |
+
columnSelector_columns |
+
+ Assigns a column status for each selector:
+
{} ; empty object
+ |
+
columnSelector_saveColumns |
+ Save the current manually set column status (not the column's responsive state). This option requires the storage utility contained within the tablesorter widgets file (jquery.tablesorter.widgets.js ).+ + Default value: true
+ |
+
columnSelector_layout |
+
+ This option defines the markup used for each column selector within the popup. The only available parameter is the {name} string which will be replaced with the appropriate column name/title.+ + An <input type="checkbox"> is required within this setting!+ + Default value: '<label><input type="checkbox">{name}</label>'
+ |
+
columnSelector_name |
+
+ The data-attribute within the table header cell which contains an alternate column selector name.
+
"data-selector-name"
+ |
+
columnSelector_mediaquery |
+ Set this option to add (true ) or not add (false ) the media query functionality of this widget.+ + Default value: true
+ |
+
columnSelector_mediaqueryName |
+ When the media query checkbox is added (it also uses the columnSelector_layout markup), this is the name that is added. Set as "Auto" to signify to the user that columns disappearing and/or reappearing is automatically done.+ + Default value: "Auto: "
+ |
+
columnSelector_mediaqueryState |
+ Set this option to false to start with the media query disabled (manual column selection mode).+ + Default value: true
+ |
+
columnSelector_breakpoints |
+
+
[ "20em", "30em", "40em", "50em", "60em", "70em" ]
+ |
+
columnSelector_priority |
+
+ This is the assigned data-attribute which contains the defined data priority for a table column.
+
"data-priority"
+ |
+
columnSelector_mediaquery
(true
) - Set this option to add (true
) or not add (false
) the media query functionality of this widget.columnSelector_mediaqueryName
("Auto: "
) - When the media query checkbox is added (it also uses the columnSelector_layout
markup), this is the name that is added. Set as "Auto" to signify to the user that columns disappearing and/or reappearing is automatically done.columnSelector_mediaqueryState
(true
) - Set this option to false
to start with the media query disabled (manual column selection mode).columnSelector_breakpoints
([ "20em", "30em", "40em", "50em", "60em", "70em" ]
)
- columnSelector_priority
("data-priority"
) - This is the assigned data-attribute which contains the defined data priority for a table column.
- Name | - +Major | Sex | English | @@ -242,6 +365,9 @@|||
---|---|---|---|---|---|---|
Name | Major | Sex | English | Japanese | Calculus | Geometry |
Student03 | Languages | female | 85 | 95 | 80 | 85 |
Student04 | Languages | male | 60 | 55 | 100 | 100 |
Student05 | Languages | female | 68 | 80 | 95 | 80 |
Student12 | Mathematics | female | 100 | 75 | 70 | 85 |
Student13 | Languages | female | 100 | 80 | 100 | 90 |
Student14 | Languages | female | 50 | 45 | 55 | 90 |
Student18 | Mathematics | male | 30 | 49 | 55 | 75 |
Student19 | Languages | male | 68 | 90 | 88 | 70 |
Student20 | Mathematics | male | 40 | 45 | 40 | 80 |
Student21 | Languages | male | 50 | 45 | 100 | 100 |
Student22 | Mathematics | male | 100 | 99 | 100 | 90 |
Student23 | Languages | female | 85 | 80 | 80 | 80 |
Student01 | Languages | male | 80 | 70 | 75 | 80 |
Student02 | Mathematics | male | 90 | 88 | 100 | 90 |
Student03 | Languages | female | 85 | 95 | 80 | 85 |
Student04 | Languages | male | 60 | 55 | 100 | 100 |
Student05 | Languages | female | 68 | 80 | 95 | 80 |
Student06 | Mathematics | male | 100 | 99 | 100 | 90 |
Student07 | Mathematics | male | 85 | 68 | 90 | 90 |
Student08 | Languages | male | 100 | 90 | 90 | 85 |
Student09 | Mathematics | male | 80 | 50 | 65 | 75 |
Student10 | Languages | male | 85 | 100 | 100 | 90 |
Student11 | Languages | male | 86 | 85 | 100 | 100 |
Student24 | Languages | female | 100 | 91 | 13 | 82 |
Rank | +First Name | +Last Name | +Age | +Total | +Discount | +Date | +
---|---|---|---|---|---|---|
1 | Philip Aaron Wong | Johnson Sr Esq | 25 | $5.95 | 22% | Jun 26, 2004 7:22 AM |
11 | Aaron | Hibert | 12 | $2.99 | 5% | Aug 21, 2009 12:21 PM |
12 | Brandon Clark | Henry Jr | 51 | $42.29 | 18% | Oct 13, 2000 1:15 PM |
111 | Peter | Parker | 28 | $9.99 | 20% | Jul 6, 2006 8:14 AM |
21 | John | Hood | 33 | $19.99 | 25% | Dec 10, 2002 5:14 AM |
013 | Clark | Kent Sr. | 18 | $15.89 | 44% | Jan 12, 2003 11:14 AM |
005 | Bruce | Almighty Esq | 45 | $153.19 | 44% | Jan 18, 2021 9:12 AM |
10 | Alex | Dumass | 13 | $5.29 | 4% | Jan 8, 2012 5:11 PM |
16 | Jim | Franco | 24 | $14.19 | 14% | Jan 14, 2004 11:23 AM |
166 | Bruce Lee | Evans | 22 | $13.19 | 11% | Jan 18, 2007 9:12 AM |
100 | Brenda Dexter | McMasters | 18 | $55.20 | 15% | Feb 12, 2010 7:23 PM |
55 | Dennis | Bronson | 65 | $123.00 | 32% | Jan 20, 2001 1:12 PM |
9 | Martha | delFuego | 25 | $22.09 | 17% | Jun 11, 2011 10:55 AM |
<!-- This selector markup is completely customizable --> +<h3>CSS only popup</h3> +<!-- This selector markup is completely customizable --> <div class="columnSelectorWrapper"> <input id="colSelect1" type="checkbox" class="hidden"> <label class="columnSelectorButton" for="colSelect1">Column</label> @@ -285,7 +440,7 @@ </div> </div> -<table class="tablesorter"> +<table class="tablesorter custom-popup"> <thead> <tr> <th data-priority="critical">Name</th> @@ -305,6 +460,29 @@ <tbody> <!-- ... --> </tbody> +</table> + +<h3>Bootstrap Popover</h3> +<!-- Bootstrap popover button --> +<button id="popover" type="button" class="btn btn-default"> + Select Column +</button> + +<table class="tablesorter bootstrap-popup"> + <thead> + <tr> + <th data-priority="critical">Rank</th> + <th data-priority="3">First Name</th> + <th data-priority="critical">Last Name</th> + <th data-priority="4">Age</th> + <th data-priority="4">Total</th> + <th data-priority="5">Discount</th> + <th data-priority="6">Date</th> + </tr> + </thead> + <tbody> + <!-- ... --> + </tbody> </table>