DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:tablefilterjs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:tablefilterjs [2013-06-21 21:30] – [tablefilterjs Plugin] mprinsplugin:tablefilterjs [2021-02-15 22:31] (current) Aleksandr
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: Filter dokuwiki table using JavaScript regexps.+description: Filter DokuWiki table using JavaScript regexps
 author     : Szymon Olewniczak author     : Szymon Olewniczak
-email      : szymon.olewniczak@rid.pl+email      : solewniczak@rid.pl
 type       : syntax type       : syntax
-lastupdate : 2013-06-17 +lastupdate : 2017-09-29 
-compatible : "Weatherwax" "Angua" "Adora Belle"+compatible : 2018-04-22 "Greebo", !2014-09-29 “Hrun”, 2013-05-10 “Weatherwax”, 2012-10-13 “Adora Belle”, 2012-01-25 “Angua”
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : tables javascript filter +tags       : tablesjavascriptfilter
- +
-downloadurl: https://github.com/hafron/dokuwiki-plugin-tablefilterjs/zipball/master +
-bugtracker : https://github.com/hafron/dokuwiki-plugin-tablefilterjs/issues +
-sourcerepo : https://github.com/hafron/dokuwiki-plugin-tablefilterjs/ +
-donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=F2VQWA9PCK6LQ&lc=PL&item_name=tablefilterjs%20%2d%20dokuwiki%20plugin&item_number=tablefilterjs&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted+
  
 +downloadurl: https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/zipball/master
 +bugtracker : https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/issues
 +sourcerepo : https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/
 ---- ----
  
-===== Donate ===== +===== Description =====
-I'm a young student working on this plugin in my free time. So if you like this plugin you can [[https://github.com/hafron/dokuwiki-filterrss-plugin/|Flattr it on its github page]] or send me money via [[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=F2VQWA9PCK6LQ&lc=PL&item_name=tablefilterjs%20%2d%20dokuwiki%20plugin&item_number=tablefilterjs&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted|PayPal]]. There is a lot to do in this plugin and a small donation would convince me that you need my work and motivate me to keep developing this plugin. Thank you in advance. ;-)+
  
-===== Description ===== +This plugin allows you to filter rows in your DokuWiki table by using javascript regex. The plugin is much more useful with [[Include]] Plugin which allows you to have one page where you store your data and several others where you store filtered informations.
-This plugin allows you to filter rows in your dokuwiki table by using javascript regex. The plugin is much more useful with [[include]] plugin which allows you to have one page where you store your data and several others where you store filtered informations.+
  
 ===== Installation ===== ===== Installation =====
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
 Let's say that we have table that contains names and birth's date and we want to know who was born in 08-11-1994: Let's say that we have table that contains names and birth's date and we want to know who was born in 08-11-1994:
 +
   <filter Birthday=/08-11-1994/>   <filter Birthday=/08-11-1994/>
   ^Name^Birthday^   ^Name^Birthday^
Line 39: Line 36:
   |User 3|18-12-1994|   |User 3|18-12-1994|
   </filter>   </filter>
-or more briefly(using cols index instead of names).+ 
 +or more briefly (using cols index instead of names). 
   <filter 2=/08-11-1994/>   <filter 2=/08-11-1994/>
   ^Name^Birthday^   ^Name^Birthday^
Line 46: Line 45:
   |User 3|18-12-1994|   |User 3|18-12-1994|
   </filter>   </filter>
 +
 This will return only the second row. This will return only the second row.
  
 Now let's try something more complexed. For example select all persons born in 1994: Now let's try something more complexed. For example select all persons born in 1994:
 +
   <filter 2=/\d{1,2}-\d{1,2}-1994/>   <filter 2=/\d{1,2}-\d{1,2}-1994/>
   ^Name^Birthday^   ^Name^Birthday^
Line 55: Line 56:
   |User 3|18-12-1994|   |User 3|18-12-1994|
   </filter>   </filter>
 +
 Here we've used javascript regexp syntax. You can read more about it [[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions|here]]. Here we've used javascript regexp syntax. You can read more about it [[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions|here]].
  
-==== Using tablefilterjs with include ==== +==== Using tablefilterjs with Include Plugin ==== 
-As I've mentioned before this plugin is mostly useful when used together with [[include]] plugin. You can read more about this plugin on it's page but there are several things to remember when you want to use it together with tablefilterjs.  + 
-To use dokuwiki table nested by include on one of your page. Use following syntax:+As I've mentioned before this plugin is mostly useful when used together with [[Include]] Plugin. You can read more about this plugin on it's page but there are several things to remember when you want to use it together with tablefilterjs.  
 + 
 +To use DokuWiki table nested by include on one of your page. Use following syntax: 
   <filter "Data"=/201[0-9]{1}/>   <filter "Data"=/201[0-9]{1}/>
   {{page>test&inline}}   {{page>test&inline}}
   </filter>   </filter>
-**Remeber about adding inline flag. Without it tablefilterjs will simply not work.**+ 
 +**Remember about adding inline flag. Without it tablefilterjs will simply not work.** 
 There are also several other include flags that you may consider usefull: There are also several other include flags that you may consider usefull:
 +
   <filter "Data"=/201[0-9]{1}/>   <filter "Data"=/201[0-9]{1}/>
   {{page>test&inline&nofooter&noeditbutton&noheader}}   {{page>test&inline&nofooter&noeditbutton&noheader}}
   </filter>   </filter>
-This flags cause that only the source table will be shown, without unnecessary(headers, footers, edit buttons).+ 
 +This flags cause that only the source table will be shown, without unnecessary (headers, footers, edit buttons).
  
 ===== Syntax ===== ===== Syntax =====
 +
 There are two variants of syntax. First allows you to use table headers as row names that will be used to filter table. Ex.: There are two variants of syntax. First allows you to use table headers as row names that will be used to filter table. Ex.:
 +
   <filter "Test row"=/test/>   <filter "Test row"=/test/>
   </filter>   </filter>
 +
 If your header contains " you can use ' instead. Ex. If your header contains " you can use ' instead. Ex.
 +
   <filter 'Test "something" row'=/test/>   <filter 'Test "something" row'=/test/>
   </filter>   </filter>
-Alternativelly you can use \ char in order to quote ' or ":+ 
 +Alternatively you can use ''\'' char in order to quote ''%%'%%'' or ''%%"%%'': 
   <filter 'Test \'something\' row'=/test/>   <filter 'Test \'something\' row'=/test/>
   </filter>   </filter>
Line 84: Line 99:
   <filter 1=/another test/ 2=/something more/>   <filter 1=/another test/ 2=/something more/>
   </filter>   </filter>
 +
 You can of course mix this two syntax variants: You can of course mix this two syntax variants:
 +
   <filter 1=/another test/ "Test row"=/test/>   <filter 1=/another test/ "Test row"=/test/>
   </filter>   </filter>
  
-After = you need to put JavaScript compatibile regexp between / / characters. After second / you can set regexp flags. For example:+After ''='' you need to put JavaScript compatible regexp between ''/'' ''/'' characters. After second ''/'' you can set regexp flags. For example: 
   <filter 1=/another test/i>   <filter 1=/another test/i>
   </filter>   </filter>
Line 100: Line 118:
 === Change Log === === Change Log ===
  
-{{rss>https://github.com/hafron/dokuwiki-plugin-tablefilterjs/commits/master.atom}}+{{rss>https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/commits/develop.atom date}}
  
-=== Known Bugs and Issues ===+**Releases:** 
 +{{rss>https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/releases.atom description author}}
  
-Please report bug and issus on the project's [[https://github.com/hafron/dokuwiki-plugin-tablefilterjs/issues|github page]].+===== Discussion =====
  
- +[[https://github.com/gkrid/dokuwiki-plugin-tablefilterjs/issues]]
-=== ToDo/Wish List === +
- +
-If you have any wishes write it down here. +
- +
-===== FAQ ===== +
- +
-===== Discussion =====+
plugin/tablefilterjs.1371843022.txt.gz · Last modified: 2013-06-21 21:30 by mprins

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki