forked from masak/proto
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #64 from zakame/smarter-search-field
Make module search box a bit smarter
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * This filtering plugin will allow matching of module names in either | ||
| * form of 'Foo::Bar', or 'Foo-Bar'. | ||
| * | ||
| * Based on dataTables.filter.phoneNumber.js | ||
| * | ||
| * @summary Make Perl module names searchable | ||
| * @name Perl module | ||
| * @author Zak B. Elep | ||
| * | ||
| * @example | ||
| * $(document).ready(function() { | ||
| * $('#example').dataTable({ | ||
| * columDefs: [ | ||
| * { type: 'perlModule', target: 1 } | ||
| * ] | ||
| * }); | ||
| * }); | ||
| */ | ||
|
|
||
| jQuery.fn.DataTable.ext.type.search.perlModule = function(data) { | ||
| return !data ? | ||
| '' : | ||
| typeof data === 'string' ? | ||
| data + data.replace(/::/g, '-') : | ||
| data; | ||
| }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters