all values must be arrays
[MojoFacets.git] / templates / data / columns.html.ep
index ad6a79b..5ea9dff 100644 (file)
@@ -8,14 +8,12 @@
 */
 </style>
 <script type="text/javascript">
-$(function() {
+
+$(document).ready(function() {
        $("#sortable").sortable();
        $("#sortable").disableSelection();
 });
 
-function all_checkboxes(checked) {
-    $("input[type='checkbox']:not([disabled='disabled'])").attr('checked', checked);
-}
 </script>
 
 
@@ -23,10 +21,11 @@ function all_checkboxes(checked) {
 
 <h2>Select and reorder columns</h2>
 
-<form method=post action=/data/table >
+<form method=post>
+
+<input type=submit value="Select">
 
-<a href="#" onClick="all_checkboxes(true); return false;">all</a>
-<a href="#" onClick="all_checkboxes(false); return false;">none</a>
+<%= include 'all_checkboxes' %>
 
 <ul id="sortable">
 % foreach my $n ( @$columns ) {
@@ -35,11 +34,18 @@ function all_checkboxes(checked) {
 <input type=checkbox name=columns value="<%= $n %>" <%= $checked->{$n} ? 'checked' : '' %>>
 <%= $n %>
 <span class="count"><%= $stats->{$n}->{count} %></span>
+% if ( defined $stats->{$n}->{unique} ) {
+<span title="unique">&#9997;</a>
+% }
 </label>
 % }
 </ul>
 
-<input type=submit>
+<input type=submit value="Select">
+
+from <input type=text name=path value="<%= session('path') %>" readonly>
+
+<a href="<%= url_for( action => 'stats' ) %>">rebuild stats</a>
 
 </form>