项目作者: cmb69

项目描述 :
Tables sortable by visitors
高级语言: HTML
项目地址: git://github.com/cmb69/tablesorter_xh.git
创建时间: 2015-06-01T20:50:26Z
项目社区:https://github.com/cmb69/tablesorter_xh

开源协议:GNU General Public License v3.0

下载


Tablesorter_XH

Tablesorter_XH facilitates semi-automatic enhancement of tables in
browsers which support somewhat contemporary JavaScript. Sorting by
single columns in ascending and descending order, hiding of predefined
columns which can be expanded, and pagination are supported.

Table of Contents

Requirements

Tablesorter_XH is a plugin for CMSimple_XH ≥ 1.7.0. It requires PHP ≥
5.5.0 with the JSON extension.

Download

The lastest release
is available for download on Github.

Installation

The installation is done as with many other CMSimple_XH plugins. See
the CMSimple_XH
wiki
for further
details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory tablesorter/ to your server into
    CMSimple_XH’s plugins directory.
  4. Set write permissions for the subdirectories config/, css/ and
    languages/.
  5. Switch to PluginsTablesorter in the back-end to check if all
    requirements are fulfilled.

Settings

The plugin’s configuration is done as with many other CMSimple_XH
plugins in the website’s back-end. Select Plugins→Tablesorter.

You can change the default settings of Tablesorter_XH under Config.
Hints for the options will be displayed when hovering over the help icon
with your mouse.

Localization is done under Language. You can translate the character
strings to your own language if there is no appropriate language file
available, or customize them according to your needs.

The look of Tablesorter_XH can be customized under Stylesheet.

Usage

To turn a table into an enhanced table, you have to give it the CSS
class tablesorter. Furthermore it is mandatory that the table has a
<thead> with <th> cells and a <tbody> section.

To make wide tables better viewable, you can select less important
columns which will not be shown, but the visitor will be able to expand
each row to view the hidden column contents. To mark a column as hidden,
just add the CSS class tablesorter_hide to the respective <th>.
Alternatively, you can add the CSS class tablesorter_x_small,
tablesorter_small, tablesorter_medium and tablesorter_large,
respectively, to hide the column in inappropriate viewports. For
instance, tablesorter_medium will show the column in medium and large
viewports, but will hide it in small viewports.

The sorting of the rows works by case-insensitive string comparison
according to the browser’s locale. This does not work well for numeric
columns, so it is possible to mark a numeric column as such by adding
the CSS class tablesorter_numeric to the column’s <th>. Note that
thousands separators are not supported, and that only dots (.) are
supported as decimal separator. Sorting arbitrary dates and/or times is
also unsupported; if you need this, just use ISO 8601 date/time formats,
such as 2017-03-15 and 08:12 in which case string comparison works
fine.

To actually enable the table enhancements, you have to add the following
plugin call somewhere on the page:

  1. {{{tablesorter();}}}

Alternatively, you can enable the auto option in the plugin
configuration.

Troubleshooting

Report bugs and ask for support either on Github
or in the CMSimple_XH Forum.

License

Tablesorter_XH is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Tablesorter_XH is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty of
merchantibility or fitness for a particular purpose. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Tablesorter_XH. If not, see http://www.gnu.org/licenses.

Copyright © 2012-2019 Christoph M. Becker

Credits

The plugin logo is designed by New
Mooon
. Many thanks for publishing
this icon under GPL.

This plugin uses free applications icons from
Aha-Soft. Many thanks for making these icons
freely available.

Many thanks to the community at the CMSimple_XH
forum
for tips, suggestions and testing.
Particularly, I want to thank lck for helpful hints regarding the
design.

And last but not least many thanks to Peter Harteg,
the father of CMSimple, and all developers of
CMSimple_XH without whom this amazing CMS
wouldn’t exist.