Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
115cc7b7
Commit
115cc7b7
authored
Aug 22, 2003
by
burnus%gmx.de
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 139011 - Improve buglist colors further
r,a=justdave
parent
d08d7d95
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
9 deletions
+30
-9
Template.pm
Bugzilla/Template.pm
+4
-0
Util.pm
Bugzilla/Util.pm
+13
-0
buglist.cgi
buglist.cgi
+4
-2
004template.t
t/004template.t
+1
-0
008filter.t
t/008filter.t
+2
-2
filterexceptions.pl
template/en/default/filterexceptions.pl
+0
-3
table.html.tmpl
template/en/default/list/table.html.tmpl
+6
-2
No files found.
Bugzilla/Template.pm
View file @
115cc7b7
...
...
@@ -218,6 +218,10 @@ sub create {
# a full URL that may have characters that need encoding.
url_quote
=>
\&
Bugzilla::Util::
url_quote
,
# This filter is similar to url_quote but used a \ instead of a %
# as prefix. In addition it replaces a ' ' by a '_'.
css_class_quote
=>
\&
Bugzilla::Util::
css_class_quote
,
quoteUrls
=>
\&::
quoteUrls
,
bug_link
=>
[
sub
{
...
...
Bugzilla/Util.pm
View file @
115cc7b7
...
...
@@ -30,6 +30,7 @@ use strict;
use
base
qw(Exporter)
;
@
Bugzilla::Util::
EXPORT
=
qw(is_tainted trick_taint detaint_natural
html_quote url_quote value_quote xml_quote
css_class_quote
lsearch max min
trim format_time)
;
...
...
@@ -73,6 +74,13 @@ sub url_quote {
return
$toencode
;
}
sub
css_class_quote
{
my
(
$toencode
)
=
(
@_
);
$toencode
=~
s/ /_/g
;
$toencode
=~
s/([^a-zA-Z0-9_\-.])/uc sprintf("&#x%x;",ord($1))/eg
;
return
$toencode
;
}
sub
value_quote
{
my
(
$var
)
=
(
@_
);
$var
=~
s/\&/\&/g
;
...
...
@@ -260,6 +268,11 @@ replaced with their appropriate HTML entities.
Quotes characters so that they may be included as part of a url.
=item C<css_class_quote($val)>
Quotes characters so that they may be used as CSS class names. Spaces
are replaced by underscores.
=item C<value_quote($val)>
As well as escaping html like C<html_quote>, this routine converts newlines
...
...
buglist.cgi
View file @
115cc7b7
...
...
@@ -486,8 +486,10 @@ if (!UserInGroup(Param("timetrackinggroup"))) {
# Generate the list of columns that will be selected in the SQL query.
# The bug ID is always selected because bug IDs are always displayed.
# Severity and Priority are required for buglist CSS classes.
my
@selectcolumns
=
(
"bug_id"
,
"bug_severity"
,
"priority"
);
# Severity, priority, resolution and status are required for buglist
# CSS classes.
my
@selectcolumns
=
(
"bug_id"
,
"bug_severity"
,
"priority"
,
"bug_status"
,
"resolution"
);
# remaining and actual_time are required for precentage_complete calculation:
if
(
lsearch
(
\
@displaycolumns
,
"percentage_complete"
)
>=
0
)
{
...
...
t/004template.t
View file @
115cc7b7
...
...
@@ -92,6 +92,7 @@ foreach my $include_path (@include_paths) {
js
=>
sub
{
return
$_
}
,
strike
=>
sub
{
return
$_
}
,
url_quote
=>
sub
{
return
$_
}
,
css_class_quote
=>
sub
{
return
$_
}
,
xml
=>
sub
{
return
$_
}
,
quoteUrls
=>
sub
{
return
$_
}
,
bug_link
=>
[
sub
{
return
sub
{
return
$_
;
}
},
1
]
,
...
...
t/008filter.t
View file @
115cc7b7
...
...
@@ -198,8 +198,8 @@ sub directive_ok {
# Things which are already filtered
# Note: If a single directive prints two things, and only one is
# filtered, we may not catch that case.
return
1
if
$directive
=~
/
FILTER
\
(
html
|
csv
|
js
|
url_quote
|
quoteUrls
|
time
|
uri
|
xml
|
lower
)
/
x
;
return
1
if
$directive
=~
/
FILTER
\
(
html
|
csv
|
js
|
url_quote
|
css_class_quote
|
quoteUrls
|
time
|
uri
|
xml
|
lower
)
/
x
;
return
0
;
}
...
...
template/en/default/filterexceptions.pl
View file @
115cc7b7
...
...
@@ -251,11 +251,8 @@
],
'list/table.html.tmpl'
=>
[
'id'
,
'abbrev.$id.title || field_descs.$id || column.title'
,
#
'tableheader'
,
'bug.bug_severity'
,
#
'bug.priority'
,
#
'bug.bug_id'
,
],
...
...
template/en/default/list/table.html.tmpl
View file @
115cc7b7
...
...
@@ -76,7 +76,7 @@
<colgroup>
<col class="bz_id_column">
[% FOREACH id = displaycolumns %]
<col class="bz_[% id %]_column">
<col class="bz_[% id
FILTER css_class_quote
%]_column">
[% END %]
</colgroup>
...
...
@@ -136,7 +136,11 @@
[% tableheader %]
[% END %]
<tr class="bz_[% bug.bug_severity %] bz_[% bug.priority %] [%+ "bz_secure" IF bug.isingroups %]">
<tr class="bz_[% bug.bug_severity FILTER css_class_quote %]
bz_[% bug.priority FILTER css_class_quote %]
bz_[% bug.bug_status FILTER css_class_quote %]
bz_[% bug.resolution FILTER css_class_quote %]
[%+ "bz_secure" IF bug.isingroups %]">
<td>
[% IF dotweak %]<input type="checkbox" name="id_[% bug.bug_id %]">[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment