From: Kohei Yoshino Date: Mon, 8 Apr 2019 20:54:08 +0000 (-0400) Subject: Bug 1539908 - Replace no_break filter with CSS nowrap X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12906499d197bcfa9c4056daa86b3bb5a579f800;p=thirdparty%2Fbugzilla.git Bug 1539908 - Replace no_break filter with CSS nowrap --- diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 0ce6acf95..131d7fb51 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -702,14 +702,6 @@ sub create { return $var; }, - # Prevents line break on hyphens and whitespaces. - no_break => sub { - my ($var) = @_; - $var =~ s/ /\ /g; - $var =~ s/-/\‑/g; - return $var; - }, - # Insert `` HTML tags to camel and snake case words as well as # words containing dots in the given string so a long bug summary, # for example, will be wrapped in a preferred manner rather than diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl index 82a4febf4..405812869 100644 --- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl +++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl @@ -180,12 +180,12 @@ [% IF p.name == "Mozilla PR" AND target == "enter_bug.cgi" AND NOT format AND NOT cgi.param("debug") %] - [% p.name FILTER html FILTER no_break %]:  + [% p.name FILTER html %]:  [% ELSE %] - [% p.name FILTER html FILTER no_break %]:  + [% p.name FILTER html %]:  [% END %] [% p.description FILTER html_light %] diff --git a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl index 3575c960d..cdd96c381 100644 --- a/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl +++ b/extensions/BMO/template/en/default/pages/triage_reports.html.tmpl @@ -161,7 +161,7 @@ Show UNCONFIRMED [% terms.bugs %] with: [% bug.id FILTER bug_link(bug.id) FILTER none %]
- [% bug.creation_ts.replace(' .*' '') FILTER html FILTER no_break %] + [% bug.summary FILTER html %] @@ -173,7 +173,7 @@ Show UNCONFIRMED [% terms.bugs %] with: [% END %] - [% bug.comment_ts FILTER html FILTER no_break %] + [% bug.comment FILTER html %] diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl index 993f59314..c970214c4 100644 --- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl +++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl @@ -132,11 +132,11 @@ [% operation.who FILTER email FILTER html %] [% END %] [% IF group == 'when' %] - [% change.when FILTER time FILTER no_break %] + [% operation.bug FILTER bug_link(operation.bug) FILTER none %] [% ELSE %] [% operation.bug FILTER bug_link(operation.bug) FILTER none %] - [% change.when FILTER time FILTER no_break %] + [% END %] [% ELSE %] [% IF who_count > 1 %] @@ -146,7 +146,7 @@ [% IF group == 'when' %]   [% ELSE %] - [% change.when FILTER time FILTER no_break %] + [% END %] [% END %] diff --git a/extensions/BMO/web/styles/reports.css b/extensions/BMO/web/styles/reports.css index 06ae52d68..bc84ff33f 100644 --- a/extensions/BMO/web/styles/reports.css +++ b/extensions/BMO/web/styles/reports.css @@ -61,6 +61,10 @@ border: 0px; } +#report td time { + white-space: nowrap; +} + .disabled { color: #888888; } diff --git a/extensions/BMO/web/styles/triage_reports.css b/extensions/BMO/web/styles/triage_reports.css index 099dd9429..cd3e51ee4 100644 --- a/extensions/BMO/web/styles/triage_reports.css +++ b/extensions/BMO/web/styles/triage_reports.css @@ -60,3 +60,7 @@ display: block; width: 100%; } + +#report td time { + white-space: nowrap; +} diff --git a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl index 6c49ef784..3bf5916ae 100644 --- a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl @@ -124,7 +124,7 @@ diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css index cf9315f49..82b0d67d4 100644 --- a/extensions/BugModal/web/bug_modal.css +++ b/extensions/BugModal/web/bug_modal.css @@ -467,6 +467,7 @@ input[type="number"] { .flag-name { text-align: right; + white-space: nowrap; } td.flag-name, td.flag-requestee { diff --git a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl index 0780ffe4a..fef89c8b9 100644 --- a/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl +++ b/extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl @@ -226,7 +226,7 @@ var cpts = new Array(); [% END %] - [% flag.description FILTER html FILTER no_break %] + [% flag.description FILTER html %] [% ", " UNLESS loop.last %] [% IF loop.last && flag_count > 10 %] diff --git a/extensions/BugmailFilter/web/style/bugmail-filter.css b/extensions/BugmailFilter/web/style/bugmail-filter.css index 193cf4469..1e30909d4 100644 --- a/extensions/BugmailFilter/web/style/bugmail-filter.css +++ b/extensions/BugmailFilter/web/style/bugmail-filter.css @@ -42,3 +42,7 @@ background-color: #eeeeee; color: #000000; } + +.flag-description { + white-space: nowrap; +} diff --git a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl index 34e0da809..260b99f76 100644 --- a/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl +++ b/extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl @@ -212,7 +212,7 @@ Other Mozilla products which aren't listed here - [% p.name FILTER html FILTER no_break %]:  + [% p.name FILTER html %]:  [% p.description FILTER html_light %] diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl index 3a8c5fbc3..77fe47dda 100644 --- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl +++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl @@ -170,7 +170,7 @@ [% FOREACH q = user.queries_subscribed %]
  • [% q.name FILTER html FILTER no_break %]
  • + title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html %] [% END %] diff --git a/extensions/MyDashboard/web/styles/mydashboard.css b/extensions/MyDashboard/web/styles/mydashboard.css index ef34bb100..f5ccfec19 100644 --- a/extensions/MyDashboard/web/styles/mydashboard.css +++ b/extensions/MyDashboard/web/styles/mydashboard.css @@ -87,4 +87,5 @@ #saved_searches_container li { margin: 5px; display: inline; + white-space: nowrap; } diff --git a/skins/standard/global.css b/skins/standard/global.css index faf543ba8..76b24942f 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -1764,6 +1764,7 @@ button::-moz-focus-inner { #flags label { font-weight: normal; + white-space: nowrap; } /* tabs */ diff --git a/template/en/default/admin/flag-type/list.html.tmpl b/template/en/default/admin/flag-type/list.html.tmpl index 050a1066e..4f73ecf03 100644 --- a/template/en/default/admin/flag-type/list.html.tmpl +++ b/template/en/default/admin/flag-type/list.html.tmpl @@ -131,7 +131,7 @@ [% FOREACH type = types %] - [% type.name FILTER html FILTER no_break %] + [% type.name FILTER html %] [% type.description FILTER html %] [% type.sortkey FILTER html %] diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index 49ac97360..6ded06319 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -125,7 +125,7 @@ function toggle_display(link) { [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [%+ IF flag.status == "?" && flag.requestee %] [% IF user.id %] ([% flag.requestee.nick FILTER html %]) diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index e17138237..9622de8c8 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -285,7 +285,7 @@ [% ELSE %] [% FOREACH flag = attachment.flags %] [% flag.setter.nick FILTER html %]: - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [% IF flag.status == "?" && flag.requestee %] ([% flag.requestee.nick FILTER html %]) [% END %][% ", " IF not loop.last() %] @@ -374,7 +374,7 @@ [% FOREACH type = bug.flag_types %] [% FOREACH flag = type.flags %] [% flag.setter.nick FILTER html %]: - [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %] + [%+ flag.type.name FILTER html %][% flag.status %] [%+ IF flag.status == "?" && flag.requestee %] ([% flag.requestee.nick FILTER html %]) [% END %]
    diff --git a/template/en/default/flag/list.html.tmpl b/template/en/default/flag/list.html.tmpl index 653c1aac6..8189e187d 100644 --- a/template/en/default/flag/list.html.tmpl +++ b/template/en/default/flag/list.html.tmpl @@ -92,7 +92,7 @@ [% ELSE %] [% flag.setter.nick FILTER html %]: [% END %] - [%+ type.name FILTER html FILTER no_break %][% flag.status %] + [%+ type.name FILTER html %][% flag.status %] [% IF flag.requestee %] [% IF flag.requestee.name %] ([% flag.requestee.nick FILTER html %]) @@ -120,7 +120,7 @@ + [%- type.name FILTER html -%] diff --git a/template/en/default/global/choose-product.html.tmpl b/template/en/default/global/choose-product.html.tmpl index 8cd23a910..75fd645e3 100644 --- a/template/en/default/global/choose-product.html.tmpl +++ b/template/en/default/global/choose-product.html.tmpl @@ -58,7 +58,7 @@ - [% p.name FILTER html FILTER no_break %]:  + [% p.name FILTER html %]:  [% p.description FILTER html_light %] diff --git a/template/en/default/global/header-search-dropdown.html.tmpl b/template/en/default/global/header-search-dropdown.html.tmpl index cd52ac7b0..0f5cc270b 100644 --- a/template/en/default/global/header-search-dropdown.html.tmpl +++ b/template/en/default/global/header-search-dropdown.html.tmpl @@ -42,7 +42,7 @@ [% FOREACH q = user.queries_subscribed %]
  • [% q.name FILTER html FILTER no_break %]
  • + title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html %] [% END %]