• Stars
    star
    2,131
  • Rank 21,581 (Top 0.5 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jQuery plugin to make HTML tables responsive

FooTable V3

This is a complete re-write of the plugin. There is no upgrade path from V2 to V3 at present as the options and the way the code is written are inherently different. Please check out the full documentation for V3 found in the docs folder or by viewing it online here.

Contributors

Pull requests need to be made against the develop branch as a new feature. I've switched to using a GitFlow process with this repository to try keep things organized a bit more. It makes it easier for me to test and make changes to submitted pull requests before merging the feature into the develop branch. The master branch now only contains release versions of the code.

Changelog

3.1.6

  • Fixed a critical issue with the new export feature throwing an error if Moment.js and the DateColumn were not included in the page.

3.1.5

  • Added two new events expanded.ft.row and collapsed.ft.row that occur after there complementary expand.ft.row and collapse.ft.row events.
  • Added a new FooTable.Export component which exposes two primary methods on the FooTable.Table object, .toJSON() and .toCSV().
  • Added a new array column type to make rendering JavaScript arrays as cell contents easier.
  • Added a new object column type to make rendering JavaScript objects containing multiple properties as cell contents easier.
  • Added a new container option to the filtering component. This option allows you to provide a selector to specify where the filtering form is rendered. The selector should match only a single element and if multiple are found only the first is used.
  • Added a new container option to the paging component. This option allows you to provide a selector to specify where the paging UI is rendered. The selector should match only a single element and if multiple are found only the first is used.
  • Added redrawSelf as an extra parameter to the FooTable.Cell#val(value, redraw, redrawSelf) and FooTable.Row#val(value, redraw, redrawSelf) methods. This parameter dictates whether the row or cell updates its' own DOM when a value is set.
  • Updated the FooTable.Paging#pageSize method to also accept string values. If the parameter is not supplied or is not a valid number the current page size is returned.
  • Updated the FooTable.Filtering#filter method to accept a single boolean param simply called focus, if supplied and true the default search input receives focus after the component performs a filter operation. This new param is used internally when auto applying a query after a user types in the search input, or clicks the search/clear buttons. This behavior can be disabled by setting the new filtering.focus option to false.
  • Updated the .formatter() function of all column types to now accept three parameters; value, options and rowData. value and options have always been available, the new addition is the rowData parameter which is an object containing the current rows' parsed values, the properties of this object match the names of the columns for the current table, if no names are specified the properties will be col1, col2, etc.
  • Updated the FooTable.HTMLColumn#sortValue method to offload additional parsing to its .parser() method.
  • Fixed an issue in the sorting component where values in a number column supplied as strings were being sorted as such and not as numbers as they should.
  • Fixed an issue with the FooTable.NumberColumn where it was converting negative numbers to positive when parsing values directly from the DOM.
  • Fixed the FooTable.Table#_construct method which was not returning a promise as it should have been doing.
  • Fixes memory leak when destroying the table, properties that were holding onto references should now be cleared.

3.1.4

  • Updated the FooTable.Table#draw method to prevent unnecessary browser reflows and hide an unstyled flash of content during the initial loading of the table. (@jleider & @mrdziuban)
  • Updated the FooTable.DateColumn#formatter method to perform a check for invalid dates and return an empty string instead of "Invalid Date". (@jnimety)
  • Updated the FooTable.Cell#collapse method to copy all attributes from the original element to the one displayed in the details row. If the element has an ID, the copied version is suffixed with "-detail" to avoid duplicates. (@mrdziuban)
  • Updated the FooTable.Column#parser method to use jQuery's .html() method instead of .text() as the latter was decoding HTML entities which were then reinserted into the DOM which opened up the possibility of XSS.
  • Removed the FooTable.Paging#_countFormat private method and replaced it with a new FooTable.Paging#format( string ) method to make custom paging UI's simpler to implement.
  • Fixed an issue with column classes and styles supplied through the options not being applied to the actual column header TH element.

3.1.3

  • Added a new dropdownTitle option to the filtering component. This options specifies a title to display at the top of the column select dropdown.
  • Added a new exactMatch option to the filtering component.
  • Added a new utility method FooTable.str.containsExact(string, match, ignoreCase).
  • Added a class footable-filtering-search to the form-group of the built in search input for the filtering component.
  • Added footable-first-visible and footable-last-visible classes to all cells (including headers) in either the first or last visible columns respectively.
  • Updated the min option default value from 3 to 1 for the filtering component.
  • Updated the load priority for rows and columns supplied via options or ajax load, they now take precedence over those supplied through the DOM to work around issues with the plugin being reinitialized multiple times on the same element.
  • Fixed an issue in the FooTable.Query object where phrases were not being matched correctly.
  • Fixed filtering component not properly clearing filters when the search input is cleared using backspace or delete.
  • Fixed the resize event not being removed when the plugin is destroyed.
  • Fixed an issue with unexpected sorting and filtering results if the sortValue and filterValue attributes contained a falsy value. The values are now subject to a strict undefined check before being passed off.
  • Fixed an issue with the date column type not sorting it's values as expected.

3.1.2

  • Added sortValue column option. This option allows you to supply your own function to retrieve the sort value for a cell.
  • Updated filtering component internals to clean things up a bit.
  • Updated filtering component search input to trigger a filtering operation on paste.
  • Updated FooTable.Filtering#addFilter method to accept an object or FooTable.Filter as the first argument to make custom filters easier to implement.
  • Updated filtering preinit and init to return a promise to make custom filters easier to implement.
  • Updated FooTable.Filter to accept a FooTable.Query as the query parameter along with the original plain string.
  • Updated paging component to expose some previously private properties to make setting a custom count label element easier.
  • Fixed issue where the filtering components min option was not being applied.
  • Fixed the paging components' countFormat option placeholder {TR} to correctly reflect filtered rows.
  • Fixed preinit unhandled exception if the table the plugin is initialized on has no class attribute.
  • Fixed issue with the individual components .ZIP missing the footable.core.bootstrap.min.css and footable.core.standalone.min.css minified files.

3.1.1

  • Added the breakpoint class to the table when columns are hidden.
  • Added an internal key used as part of the storage keys generated by the state component. Can be changed if an update breaks backwards compatibility.
  • Added the hidden option that can be used for filters. When set to true the filter is always applied to the table, can not be cleared unless removed using the FooTable.Filtering#removeFilter() method and they will not effect the default UI search/clear buttons.
  • Updated some utility functions with additional parameter checking to avoid unhandled errors under certain scenarios.
  • Updated the FooTable.Filtering#addFilter() method to expose the last three parameters of the FooTable.Filter constructor; ignoreCase, connectors and space.
  • Fixed an issue when reinitializing the plugin for a second time on a table after it's DOM had been modified by a 3rd party.
  • Fixed an issue where the FooTable.Filtering#draw() method was not setting the button to the clear icon if the filter supplied was not the default.
  • Fixed state component clearing filters supplied through options if the state value was an empty array.
  • Fixed an issue with the incorrect sort icon appearing if a column was set to just sorted=true without supplying a direction.

3.1.0

  • Added a new state component that handles the page number, sorted column and any filters applied across sessions.
  • Added in the ability to toggle the visibility of the various editing component buttons.
  • Added in a new "view" button to the editing component.
  • Added in FooTable.Rows#expand() and FooTable.Rows#collapse() methods to toggle all visible rows.
  • Added in a new FooTable.getRow() utility method to retrieve the current FooTable.Row object given a TR element or any of its' children.
  • Fixed an issue when reinitializing the plugin by doing some additional cleanup in the destroy methods for columns, rows and sorting.
  • Fixed an issue with filtering not applying correctly when filters were supplied through the options.
  • Fixed base FooTable.Component method signatures.
  • Updated the FooTable.Row#val() method to merge supplied data instead of replacing it entirely.
  • Updated the FooTable.getFnPointer() method to handle dot notation names.
  • Updated the requirement checks for columns so having at least one data-breakpoints attribute is no longer required.
  • Updated the FooTable.Filtering#filter() method to only apply all filters in the FooTable.Filtering#filters.
  • Removed the FooTable.Table#applyFilter() and FooTable.Table#removeFilter() methods.
  • Removed the FooTable.components.core and FooTable.components.internal objects.

NOTE

As of version 3.1.0 there are some backwards compatibility issues if you have done customizations like those seen in the custom dropdown filter example using the 3.0.x versions. The examples have been updated with the changes however the issues are listed below.

  1. The FooTable.Filtering#filter() method no longer accepts any arguments and is used purely to apply all filters found in the FooTable.Filtering#filters array.
  2. Due to #1 above to apply a new search filter it must now be done using the FooTable.Filtering#addFilter(name, query, columns) method using a name of "search".
  3. The internal, core and custom component arrays that existed within the FooTable.Table#components object have been removed. All components are now loaded into a single array.
  4. When registering a component you now only need to use FooTable.components.register() method instead of having to decide between FooTable.components.register(), FooTable.components.core.register() and FooTable.components.internal.register() due to #3 above.

3.0.11

  • Added in a basic expandAll option for rows.
  • Added in a FooTable.Rows#load() method to make supplying the table with new data much easier.
  • Added in a redraw parameter to the FooTable.Rows#add(),FooTable.Rows#update() and FooTable.Rows#delete() methods to allow for better bulk operations.
  • Added in new ignoreCase option for the filtering component.
  • Fixed issue with breakpoints being calculated incorrectly on mobile devices.
  • Fixed issue with the sorting component preventing the default action of click events from taking place. (think checkboxes not checking when in header)
  • Fixed issue where the events expand.ft.row and collapse.ft.row were not supplying the row as a parameter.

3.0.10

  • Added the ability to filter for empty values.
  • Fixed an issue where there were duplicate components being loaded when using the FooTable.init() constructor.
  • Fixed an issue where the FooTable.NumberColumn#thousandSeparator was being initialized with an incorrect default value.
  • Fixed an issue where the old instance id class was being left on the table when reinitializing FooTable on the same table over and over again.

3.0.9

  • Added in ready.ft.table and postinit.ft.table events.
  • Added new FooTable.Table#_construct() method to allow for easier overriding.
  • Added in three new methods for the sorting component; FooTable.Sorting#toggleAllowed(state), FooTable.Sorting#hasChanged() and FooTable.Sorting#reset().
  • Fixed an issue where the sort direction for a column marked as sorted was defaulting to DESC instead of ASC.
  • Fixed an issue where the indexOrRow parameter for the FooTable.Row#delete() and FooTable.Row#update() methods was being ignored.

3.0.8

  • Added a new editing component that provides the framework to create an editable table.
  • Added in a new option toggleSelector to allow filtering of row click events.
  • Added in a priority to component loading.
  • Added in new events expand.ft.row and collapse.ft.row.
  • Fixed an issue with the paging component where if the total number of rows was less than the page size breakpoints would not fire.
  • Fixed an issue with the paging component during resizing/drawing when there was only a single page.
  • Fixed an issue with bubbled errors and deferreds in FooTable.Table.
  • Fixed the sorting components icon padding on TH elements being overridden by Bootstrap.
  • Fixed breakpoint values being off by 1 pixel.

More Repositories

1

foogallery

The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
PHP
110
star
2

grunt-wp-boilerplate

Grunt Init Template For WordPress Plugin Boilerplate
PHP
84
star
3

foonav

A Simple Navigation Plugin for jQuery
JavaScript
39
star
4

foojitsu

A light weight JavaScript plugin framework
JavaScript
14
star
5

brickfolio

jQuery plugin for better grid layouts - especially for portfolio pages
HTML
11
star
6

remove-xmlrpc-pingback-ping

Prevent WordPress From Participating In Pingback Denial of Service Attacks
PHP
11
star
7

Foo_Plugin_Base

A base class for WordPress plugins. Get up and running quickly with this opinionated, convention based, plugin framework
PHP
9
star
8

device-body-class

WordPress plugin that adds device-specific class names to the body tag
PHP
8
star
9

rvslider

Responsive Video Slider
CSS
6
star
10

FooAuth

Better Authentication For WordPress. Including LDAP single sign on.
PHP
6
star
11

affiliates-edd-download-rates

PHP
5
star
12

FooTweetFetcher

A class for WordPress to pull tweets from Twitter API v1.1
PHP
4
star
13

footable-wordpress

FooTable WordPress Plugin
PHP
4
star
14

foogallery-media-menu

FooGallery Media Menu Extension
PHP
3
star
15

foogallery-client-side

The client side CSS and JavaScript used by the FooGallery plugin.
HTML
3
star
16

foobox-google-analytics

FooBox Google Analytics Extension
PHP
2
star
17

Better-Media-Library-Fields

Displays extra fields (ALT, Caption, Description, Href and Src fields) in the media library view
PHP
2
star
18

freemius

Custom CSS for Freemius
CSS
2
star
19

wordpress-file-structure

A visual representation of the WordPress file structure
2
star
20

debug-bar-screen-info

A WordPress Debug Bar add-on, that shows screen info of the current admin page you are on
PHP
2
star
21

hidden-widget

Include a hidden div on your WordPress site using a widget
PHP
2
star
22

foomasonry

A masonry layout clone
JavaScript
2
star
23

gallery-wrapper

Customize the CSS class names within the WordPress gallery
PHP
2
star
24

foogallery-polaroid-template

A gallery template to FooGallery, which uses a popular polaroid layout and effect
PHP
1
star
25

foobox

The best responsive lightbox for WordPress
JavaScript
1
star
26

affiliates-pro-zero-notifications

PHP
1
star
27

foobox-share-more

FooBox Share More Extension
PHP
1
star
28

foojitsu.vid

FooJitsu plugin to retrieve video info from providers.
JavaScript
1
star
29

foodocs

A WordPress plugin to help organize documentation for your digital products
PHP
1
star
30

foobox-disable-rocketship

Disable Cloudfare's Rocketship for FooBox
PHP
1
star
31

fooplugins-generator

A WordPress Plugin to Generate WordPress Plugins
PHP
1
star
32

foogallery-custom-attachment-fields

FooGallery Custom Attachment Fields
PHP
1
star
33

FooBox-WP-e-Commerce-Excluder

Exclude FooBox scripts and CSS from WP e-Commerce product pages
PHP
1
star