+<pre class=debug><%= dumper $cols_changed %></pre>
<table border=1>
<tr>
% my $commit = param('commit');
% foreach my $n ( @$columns ) {
-% if ( $cols_changed->{$n} == 2 && ! $commit ) {
-<th class=changed>
+% if ( defined $cols_changed->{$n} && ! $commit ) {
+<th class=<%= $cols_changed->{$n} ? 'changed' : 'used' %>>
<%= $n %>
% } else {
<th>
+% if ( $unique->{$n} ) {
+<span title="unique">✍</span>
+% }
% if ( session('order') ne $n ) {
<a href="<%= url_for( action => 'order' )->query( order => $n, sort => 'a' ) %>"><%= $n %></a>
% } else {
% foreach my $row ( @$sorted ) {
<tr title="<%= $row->{_row_id} %>">
% foreach my $col ( @$columns ) {
-% my $class = '';
-% $class .= ' numeric' if $numeric->{$col};
-% $class .= ' changed' if $cols_changed->{$col};
-% $class =~ s/^ / class="/ && $class =~ s/$/"/;
-<td<%== $class %>>
+% my @class ;
+% push @class, 'numeric' if $numeric->{$col};
+% if ( defined $cols_changed->{$col} ) {
+% push @class, $cols_changed->{$col} ? 'changed' : 'used';
+% }
+<td class="<%= join(' ',@class) %>">
% if ( ref $row->{$col} eq 'ARRAY' ) {
% my $last = $#{ $row->{$col} };
% foreach ( 0 .. $last ) {
</table>
<form id=eval method=post style="<%= $code ? '' : 'display:none' %>">
+
% my $error = stash('eval_error');
% if ( $error ) {
<div class=error><%= $error %></div>
% }
+
+% if ( $out ) {
+<pre id=out><%= dumper $out %></pre>
+% }
+
% my $rows = scalar split(/\n/,$code);
<textarea name=code rows=<%= $rows %>><%= $code %></textarea>
<input name=test type=submit value="Test code">
$(this).parent().hide();
});
+ var $out = $('pre#out');
+ if ( $out.height() > $(window).height() ) {
+ $out.height( $(window).height() / 3 * 2 ).css({ overflow: 'auto' });
+ }
+
$('a#console').click( function() {
console.debug('open console');
var $f = $('form#eval');