зеркало из https://github.com/mozilla/pjs.git
Bug 245282 : Flags should use nonbreaking hyphens or nowrap or somehow prevent hyphens from breaking flag names
Patch by LpSolit@gmail.com r=wurblzap a=myk
This commit is contained in:
Родитель
2abc352241
Коммит
79deb67800
|
@ -249,6 +249,14 @@ sub create {
|
|||
return $var;
|
||||
},
|
||||
|
||||
# Prevents line break on hyphens and whitespaces.
|
||||
no_break => sub {
|
||||
my ($var) = @_;
|
||||
$var =~ s/ /\ /g;
|
||||
$var =~ s/-/\‑/g;
|
||||
return $var;
|
||||
},
|
||||
|
||||
xml => \&Bugzilla::Util::xml_quote ,
|
||||
|
||||
# This filter escapes characters in a variable or value string for
|
||||
|
|
|
@ -1249,6 +1249,7 @@ END
|
|||
obsolete => sub { return $_; },
|
||||
js => sub { return $_; },
|
||||
html_linebreak => sub { return $_; },
|
||||
no_break => sub { return $_; },
|
||||
url_quote => sub { return $_; },
|
||||
xml => sub { return $_; },
|
||||
quoteUrls => sub { return $_; },
|
||||
|
|
|
@ -93,6 +93,7 @@ foreach my $include_path (@include_paths) {
|
|||
FILTERS =>
|
||||
{
|
||||
html_linebreak => sub { return $_; },
|
||||
no_break => sub { return $_; } ,
|
||||
js => sub { return $_ } ,
|
||||
inactive => [ sub { return sub { return $_; } }, 1] ,
|
||||
closed => [ sub { return sub { return $_; } }, 1] ,
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
[% FOREACH type = types %]
|
||||
|
||||
<tr class="[% IF type.is_active %]active[% ELSE %]inactive[% END %]">
|
||||
<td><a href="editflagtypes.cgi?action=edit&id=[% type.id %]">[% type.name FILTER html %]</a></td>
|
||||
<td><a href="editflagtypes.cgi?action=edit&id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td>
|
||||
<td>[% type.description FILTER html %]</td>
|
||||
<td>
|
||||
<a href="editflagtypes.cgi?action=copy&id=[% type.id %]">Copy</a>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
[% IF flag.setter %]
|
||||
[% flag.setter.nick FILTER html %]:
|
||||
[% END %]
|
||||
[%+ flag.type.name FILTER html %][% flag.status %]
|
||||
[%+ flag.type.name FILTER html FILTER no_break %][% flag.status %]
|
||||
[%+ IF flag.status == "?" && flag.requestee %]
|
||||
([% flag.requestee.nick FILTER html %])
|
||||
[% END %]<br>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
[% flag.setter.nick FILTER html %]:
|
||||
</td>
|
||||
<td>
|
||||
[% type.name FILTER html %]
|
||||
[% type.name FILTER html FILTER no_break %]
|
||||
</td>
|
||||
<td>
|
||||
<select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
|
||||
|
@ -137,7 +137,7 @@
|
|||
[% IF (!type.flags || type.flags.size == 0) && type.is_active %]
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>[% type.name FILTER html %]</td>
|
||||
<td>[% type.name FILTER html FILTER no_break %]</td>
|
||||
<td>
|
||||
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
|
||||
onchange="toggleRequesteeField(this);">
|
||||
|
@ -172,7 +172,7 @@
|
|||
[% separator_displayed = 1 %]
|
||||
[% END %]
|
||||
<tr>
|
||||
<td colspan="2">addl. [% type.name FILTER html %]</td>
|
||||
<td colspan="2">addl. [% type.name FILTER html FILTER no_break %]</td>
|
||||
<td>
|
||||
<select id="flag_type-[% type.id %]" name="flag_type-[% type.id %]"
|
||||
onchange="toggleRequesteeField(this);">
|
||||
|
|
Загрузка…
Ссылка в новой задаче