Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Filter field

  • Loading branch information...
commit 9b7c77693cb30b596cace3734dd42cd6468749ca 1 parent e9e662d
@janmarek janmarek authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 app/templates/Homepage/default.latte
View
26 app/templates/Homepage/default.latte
@@ -12,7 +12,31 @@
<h1>Generated documentations <small>Projects already having API docs generated by ApiGen</small></h1>
</div>
- <table n:if="$repos" class="table table-striped table-bordered">
+ {if $repos}
+ <script>
+ function filterRepos(text) {
+ $("#repos tbody tr").each(function () {
+ var tr = $(this);
+
+ if (text === '') {
+ tr.show();
+ return;
+ }
+
+ if (tr.find('td:eq(0), td:eq(1)').text().toLowerCase().indexOf(text.toLowerCase()) !== -1) {
+ tr.show();
+ } else {
+ tr.hide();
+ }
+ });
+ }
+ </script>
+ <form>
+ <p>Filter: <input type="text" id="filter" onkeyup="filterRepos(this.value)"></p>
+ </form>
+ {/if}
+
+ <table n:if="$repos" class="table table-striped table-bordered" id="repos">
<thead><tr>
{* <th>#</th> *}
<th>Project name</th>
Please sign in to comment.
Something went wrong with that request. Please try again.