Remove smap attributes
[plack-app-gruntmaster.git] / lib / Plack / App / Gruntmaster / HTML.pm
index f2b4ec9cead19e8e98af996ff35a3e0f4f8bc83f..a21b6cc933da5393d48e6e67a4ddf84a6397d0ca 100644 (file)
@@ -74,7 +74,7 @@ sub _render {
        $process->($tree, %args) if $process;
        $_->detach for $tree->look_down(static => $args{static} ? 'no' : 'yes');
        $_->attr('static', undef) for $tree->look_down(sub {$_[0]->attr('static')});
-       $_->attr('smap', undef) for $tree->look_down(sub {$_[0]->attr('defmap')});
+       $_->attr('smap', undef) for $tree->look_down(sub {$_[0]->attr('smap')});
        $tree->as_HTML;
 }
 
@@ -266,6 +266,10 @@ sub process_log {
                $elem->find('a')->edit_href(sub{s/$/&$str/}) if $str;
        }
        $tree->fclass('current')->replace_content("Page $args{current_page} of $args{last_page}");
+
+       my @detach;
+       push @detach, $args{args}{$_} ? $tree->fclass($_) : () for qw/problem contest owner/;
+       $_->detach for @detach;
 }
 
 sub process_st {
This page took 0.010143 seconds and 4 git commands to generate.