summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/JWebmail/Plugin/Paginate.pm4
-rw-r--r--lib/JWebmail/View/RenderMail.pm6
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/JWebmail/Plugin/Paginate.pm b/lib/JWebmail/Plugin/Paginate.pm
index 9b39617..b4564b7 100644
--- a/lib/JWebmail/Plugin/Paginate.pm
+++ b/lib/JWebmail/Plugin/Paginate.pm
@@ -79,11 +79,11 @@ sub paginate {
}
sub make_link {
- my ($c, $txt, $to) = @_;
+ my ($c, $txt, $to, %args) = @_;
return $c->link_to(
$txt => $c->url_with->query({start => $c->stash('pgn')->{$to}[0]}),
- class => ($c->param('start')//0) == $c->stash('pgn')->{$to}[0] ? 'disabled' : '',
+ class => ($c->param('start')//0) == $c->stash('pgn')->{$to}[0] ? join(' ', $args{class}, $args{class_disabled}) : $args{class},
);
}
diff --git a/lib/JWebmail/View/RenderMail.pm b/lib/JWebmail/View/RenderMail.pm
index 90534dc..387e586 100644
--- a/lib/JWebmail/View/RenderMail.pm
+++ b/lib/JWebmail/View/RenderMail.pm
@@ -112,7 +112,7 @@ sub render_message {
warn "unkown mime-subtype $subtype" unless $subtype eq 'rfc822';
- my $R .= '<div clas="jwm-mail">';
+ my $R .= '<div class="jwm-mail">';
$R .= '<dl class="jwm-mail-header">';
$R .= '<dt>' . xml_escape(uc $self->c->l('subject')) . '</dt>';
@@ -127,8 +127,6 @@ sub render_message {
$R .= '<dd>' . to_mime_type($msg->{head}{mime}) . "</dd>\n";
$R .= "</dl>\n";
- #my $content = ref $msg->{body} && exists $msg->{body}{parts} ? $msg->{body}{parts} : $msg->{body};
-
$R .= $self->mime_render(to_mime_types($msg->{head}{mime}), $msg->{body}, [@$path, 0]);
return $R . "</div>\n";
@@ -149,7 +147,7 @@ sub mime_render {
my $renderer = $MIME_Render_Subs{"$maintype/$subtype"} || $MIME_Render_Subs{$maintype};
unless ($renderer) {
- return "<p>Unsupported MIME type of <code>$maintype/$subtype</code>.</p>\n";
+ return qq(<p class="jwm-body-unsupported">Unsupported MIME type of <code>$maintype/$subtype</code>.</p>\n);
}
return $renderer->($self, $subtype, $content, $path);