diff options
Diffstat (limited to 'rt/html/Elements')
-rw-r--r-- | rt/html/Elements/Callback | 4 | ||||
-rw-r--r-- | rt/html/Elements/CollectionAsTable/Row | 1 | ||||
-rw-r--r-- | rt/html/Elements/EditCustomField | 4 | ||||
-rw-r--r-- | rt/html/Elements/EditCustomFieldSelect | 3 | ||||
-rw-r--r-- | rt/html/Elements/Header | 8 | ||||
-rw-r--r-- | rt/html/Elements/QueryString | 6 | ||||
-rw-r--r-- | rt/html/Elements/RT__Ticket/ColumnMap | 3 | ||||
-rw-r--r-- | rt/html/Elements/ScrubHTML | 2 | ||||
-rw-r--r-- | rt/html/Elements/ShowCustomFields | 3 |
9 files changed, 25 insertions, 9 deletions
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index 937e923a1..c7aeb9f5d 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -68,14 +68,14 @@ if (!$callbacks) { push @$callbacks, # Skip backup files, files without a leading package name, # and files we've already seen - grep { !/^\.|~$/ + grep { !/\/\.|~$/ and $_ ne "/Callbacks/$Page/$_CallbackName" and not $seen{$_}++ } $m->interp->resolver->glob_path($path, $root); } $m->notes($CacheKey => $callbacks); - $cache{$Page,$_CallbackName} = $callbacks if !$RT::DevelMode; + $cache{$CacheKey} = $callbacks if !$RT::DevelMode; } my @rv; diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 3316bc027..0de362ea8 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -71,6 +71,7 @@ foreach my $column (@Format) { $item++; $m->out('<td class="collection-as-table" '); $m->out( 'align="' . $column->{align} . '"' ) if ( $column->{align} ); + $m->out( 'style="' . $column->{style} . '"' ) if ( $column->{style} ); $m->out('>'); foreach my $subcol ( @{ $column->{output} } ) { if ( $subcol =~ /^__(.*?)__$/o ) { diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField index d2398c9da..e443c764e 100644 --- a/rt/html/Elements/EditCustomField +++ b/rt/html/Elements/EditCustomField @@ -49,6 +49,10 @@ if ($Object) { $Values = $Object->CustomFieldValues($CustomField->id); $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) ); $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', ''); +} elsif (not $Default) { + my %TOP = $m->request_args; + $Default = $TOP{ $NamePrefix .$CustomField->Id . '-Values' } + || $TOP{ $NamePrefix .$CustomField->Id . '-Value' }; } my $Type = $CustomField->Type; diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect index db33a6839..2a2a64a1d 100644 --- a/rt/html/Elements/EditCustomFieldSelect +++ b/rt/html/Elements/EditCustomFieldSelect @@ -53,7 +53,8 @@ % if ($Values) { <% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %> % } elsif ($Default) { - <% ($Default eq $value->Name) && ($selected = 1) && 'SELECTED' %> + <% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name)) + && ($selected = 1) && 'SELECTED' %> % } ><% $value->Name%></option> % } diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 8c3775bba..f5a616ece 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -47,12 +47,14 @@ <HTML> <HEAD> <TITLE><%$Title%></TITLE> -% if ($Refresh > 0) { +% if ($Refresh && $Refresh > 0) { <META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>"> % } -<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png"> -<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css"> +<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" /> +<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" /> +<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" /> + <script> function hideshow(num) { idstring = "element-" + num; diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index 7d41f15e0..1ddab85de 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -45,8 +45,12 @@ %# END BPS TAGGED BLOCK }}} <%init> my @params; -while ( (my $key, my $value) = each %ARGS ){ +while ( my ($key, $value) = each %ARGS ){ + if( UNIVERSAL::isa( $value, 'ARRAY' ) ) { + push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value; + } else { push @params, $key."=".$m->interp->apply_escapes($value,'u'); + } } return(join('&',@params)); </%init> diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap index dade91494..80e3c693c 100644 --- a/rt/html/Elements/RT__Ticket/ColumnMap +++ b/rt/html/Elements/RT__Ticket/ColumnMap @@ -95,6 +95,7 @@ sub LinkCallback { my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode}; my $type = $RT::Ticket::LINKTYPEMAP{$method}{Type}; + my $other_mode = ($mode eq "Target" ? "Base" : "Target"); my $mode_uri = $mode.'URI'; my $local_type = 'Local'.$mode; @@ -105,7 +106,7 @@ sub LinkCallback { \'">', ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ), \'</A><BR>', - } @{ $_[0]->Links($mode,$type)->ItemsArrayRef } + } @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef } } } diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML index 94a729907..443ded9c4 100644 --- a/rt/html/Elements/ScrubHTML +++ b/rt/html/Elements/ScrubHTML @@ -62,7 +62,7 @@ $scrubber->default( $scrubber->deny(qw[*]); $scrubber->allow( - qw[A B U P BR I HR BR SMALL EM FONT SPAN DIV UL OL LI DL DT DD]); + qw[A B U P BR I HR BR SMALL EM FONT SPAN DIV UL OL LI DL DT DD PRE]); $scrubber->comment(0); return ( $scrubber->scrub($Content) ); </%init> diff --git a/rt/html/Elements/ShowCustomFields b/rt/html/Elements/ShowCustomFields index 7591fa3aa..986184120 100644 --- a/rt/html/Elements/ShowCustomFields +++ b/rt/html/Elements/ShowCustomFields @@ -71,6 +71,9 @@ </table> <%INIT> my $CustomFields = $Object->CustomFields; + $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields', + CustomFields => $CustomFields); + </%INIT> <%ARGS> $Object => undef |