Loading...
 
Skip to main content

History: Tablesorter

Source of version: 42

Copy to clipboard
            !Tablesorter
Tiki uses the  [http://mottie.github.io/tablesorter/docs/|Rob Garrison fork of the tablesorter jQuery plugin] to add the ability for users to filter, sort, paginate and otherwise manipulate tables used in Tiki. 

__Please consider, that the implementation of tablesorter is still marked as experimental by Feb. 2015.__
!! Features
Tablesorter allows the following to be done without refreshing the page through use of jQuery and Ajax:
* Sorting by clicking on active column headers. 
** ''sorts all items even if only a portion are retrieved from the server and displayed''
* Filtering by typing in text or using a dropdown
** ''all items are filtered even if only some are shown''
* Pagination with pager controls
** ''number of rows shown can be expanded as well''
* Sticky headers
** ''the header row stays visible as you scroll down even when the top of the table is not visible''
* Resizable columns
** ''place your cursor on the right edge of a header cell until the cursor turns into a resize icon - then click and move to the right or left''
* Column selector to hide columns
** ''the button on the top left of the table allows you to hide a column for the duration of the session''
* Auto hide columns for small viewing windows
!!Tables where Tablesorter is available in Tiki
Below are the tables for which Tablesorter may be applied. For plugins, Tablesorter is optional even if the Tablesorter feature is activated. For other standard tables in Tiki, Tablesorter is automatically applied if the Tablesorter feature is turned on.

{FANCYTABLE(head="Feature|Table|Tiki version" sortable="reset" sortList="[0,0],[1,y],[2,0]" tsortcolumns="type:text;group:word|type:text|type:digit;group:number" tsfilters="type:dropdown|type:text|type:range;from:12;to:15" tspaginate="n")}
Plugin |  ((PluginFancytable)) | 12
Plugin | ((PluginTrackerlist)) | 12
Plugin | ((PluginList)) | 15
Users | Admin users list ''(tiki-adminusers.php)'' | 12
Wiki| List of wiki pages ''(tiki-listpages.php)'' | 14
Forum|List of forums ''(tiki-forums.php)'' | 14
Forum|Topic list for a forum ''(tiki-view_forum.php)''|14
Forum|Admin forums ''(tiki-admin_forums.php)''|14
{FANCYTABLE}
!!Configuration
Below are the parameters that are used for plugins where this feature is available. See the related plugin documentation pages for more information and examples. This table of parameters may be added to a documentation page by using ((PluginInclude)) and referring to the ''startinclude'' and ''stopinclude'' text for the starting and stopping points of the include.

startinclude
In order to use tablesorter,
# Javascript must be enabled
** Enabled by default at __Admin > Features > Programmer (tab)__
# jQuery Sortable Tables must be activated 
** Enable at __Admin > Features > Interface (tab)__
# For the ''server'' parameter to work for a plugin, and to apply tablesorter to any tiki table that is not a plugin, ajax must be enabled. 
** Enable at __Admin > Features > Interface (tab)__
{FANCYTABLE(head="__Parameter__|__Purpose__|__Usage__|__Optional__|__Since__" sortable="type:reset" sortList="[0,0],[1,n],[2,n],[3,n],[4,n]" tsfilters="type:dropdown|type:nofilter|type:text|type:nofilter|type:nofilter")}
''sortable'' | Turn sorting / filtering / paginating on and set sort button and save settings. This setting is needed for all other features to work.|Enter __y__ to allow sorting and __n__ to disallow (__n__ is the default).%%%Enter __type:save__ to allow sorts to be saved between page refreshes.%%%Enter __type:reset;text:buttontext__ to allow sorting and show an unsort button with custom text.%%%Enter __type:savereset;text:buttontext__ to allow the same for saved sorts. | optional, but needs to be set to something other than __n__ for the features to be turned on | 4.0, enhanced in 12.0
''server''| Choose to use browser or server to filter, sort and paginate|Enter __y__ to have the server do the sorting and filtering through Ajax and __n__ to have the browser do it (__n__ is the default). Set to __y__ (and also set the ''Paginate'' parameter) if you do not want all rows fetched at once, but rather fetch rows as you paginate, filter or sort.%%%together with trackers (trackerlist) tablesorter might not fetch all items -> in this case use server="y" and it should work. | optional | 12.0
''sortList'' | To pre-sort columns or disallow sorting by colum | Enter bracketed numbers for column number (first column = 0) and sort direction (0 = ascending, 1 = descending, n = no sort, y = allow sorting but no pre-sort). For example: ~np~[0,y],[1,0],[2,n]~/np~. If the first pre-sorted or no filter column is not the first column, then you should use the y parameter (as in ~np~[0,y]~/np~) to assign all previous columns. | optional | 4.0, enhanced in 12.0
''tsortcolumns'' | Set data type of column for more accurate sorting and set group headers|Set __type__ and __group__ settings for each column, using __|__ to separate columns. To show group headings upon page load, the ''sortList'' parameter will need to be set for a column with a group setting. Group will not work in plugins where the ''server'' parameter is set to __y__.%%%__type__ tells the sorter what type of date is being sorted and choices include: __text__, __digit__, __currency__, __percent__, __usLongDate__, __shortDate__, __isoDate__, __dateFormat-ddmmyyyy__, __ipAddress__, __url__, __time__.%%%Also handle strings in numeric columns with __string-min__ and __string-max__. Handle empty cells with __empty-top__, __empty-bottom__ or __empty-zero__.%%%__group__ creates automatic row headings upon sort with the heading text determined by the setting as follows: __letter__ (first letter), __word__ (first word), __number__, __date__, __date-year__, __date-month__, __date-day__, __date-week__, __date-time__. %%%__letter__ and __word__ can be extended, e.g., __word-2__ shows first 2 words. __number-10__ will group rows in blocks of ten. | optional | 12.0
''tsfilters''|Set filter settings | Enter __y__ for a blank text filter on all columns, or __n__ for no filters. Or set custom column filters separated by __|__ for each column for the following filter choices and parameters:%%%__Text__ - type:text;placeholder:xxxx%%%(For PluginTrackerlist this will be an exact search, for other plugins partial values will work.)%%%__Dropdown__ - type:dropdown;placeholder:****;option:****;option:****;option:****%%%Options generated automatically if not set and the server parameter is not __y__ . Use ''value=Display label'' to have the option value be different than the displayed label in the dropdown.%%%__Date range__ - type:date;format:yyyy-mm-dd;from:2013-06-30;to:2013-12-31%%%(from and to values set defaults for these fields when user clicks on the input field)%%%__Numeric range__ - type:range;from:0;to:50%%%__No filter__ - type:nofilter%%%For example: __tsfilters="type:dropdown;placeholder:Type to filter..."__ would result in a dropdown filter on the first column with all unique values in that column in the dropdown list.|optional|12.0
''tsfilteroptions''|To set additional filter-related options|The following options are available: __type:reset__ (adds button to take off filters), and __style:hide__(Filters are revealed upon mouseover. Hide doesn't work when date and range filters are used.). To use both, set __tsfilteroptions="type:reset;text:button text;style:hide"__|optional|12.0
''tspaginate''|To add pagination controls and text|Enter __y__ to set default values based on the site setting for maximum records in listings (on the pagination table of the Look & Feel admin panel). Set custom values as in the following example: __max:40;expand:60;expand:100;expand:140__|optional, except needs to be set when the ''server'' parameter is set to __y__|12.0
''tscolselect''|To hide and prioritize columns| Add a button for hiding and re-showing columns. Also sets priority for dropping columns when browser is too narrow. Set each column to a number between 1 and 6 (1 is highest priority and last to be dropped) or to __critical__ to never hide or drop. An example with 4 columns:   ~np~ tscolselect="critical|4|5|6" ~/np~ | optional|14.0
{FANCYTABLE}
stopinclude

        

History

Information Version
Jean-Marc Libs 53
Jean-Marc Libs 52
Yves Kipondo 51
Bernard Sfez / Tiki Specialist Adding links to samples 50
lindon Edit restored by rescue script 2017-04-24T18:09:12+00:00 49
Bernard Sfez / Tiki Specialist Edit restored by rescue script 2017-04-24T18:09:12+00:00 48
Bernard Sfez / Tiki Specialist Edit restored by rescue script 2017-04-24T18:09:12+00:00 47
Bernard Sfez / Tiki Specialist Edit restored by rescue script 2017-04-24T18:09:12+00:00 46
lindon Fancy Table Plugin modified by editor. 45
lindon Fancy Table Plugin modified by editor. 44
lindon 43
lindon 42
lindon 41
lindon 40
lindon Fancy Table Plugin modified by editor. 39
lindon 38
lindon 37
lindon 36
lindon 35
lindon 34
lindon 33
lindon 32
lindon 31
lindon Fancy Table Plugin modified by editor. 30
lindon Fancy Table Plugin modified by editor. 29
lindon 28
Torsten Fabricius 27
lindon 26
lindon Fancy Table Plugin modified by editor. 25
lindon Fancy Table Plugin modified by editor. 24
lindon Fancy Table Plugin modified by editor. 23
lindon Fancy Table Plugin modified by editor. 22
lindon Fancy Table Plugin modified by editor. 21
lindon 20
lindon 19
lindon 18
lindon 17
lindon 16
lindon 15
lindon Fancy Table Plugin modified by editor. 14
lindon 13
lindon Remarks Box Plugin modified by editor. 12
lindon 11
lindon 10
lindon Fancy Table Plugin modified by editor. 9
lindon 8
lindon 7
lindon Fancy Table Plugin modified by editor. 6
lindon Fancy Table Plugin modified by editor. 5
lindon Fancy Table Plugin modified by editor. 4
  • «
  • 1 (current)
  • 2
Collapse/expand modules below