]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1539908 - Replace no_break filter with CSS nowrap
authorKohei Yoshino <kohei.yoshino@gmail.com>
Mon, 8 Apr 2019 20:54:08 +0000 (16:54 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2019 20:54:08 +0000 (16:54 -0400)
20 files changed:
Bugzilla/Template.pm
extensions/BMO/template/en/default/global/choose-product.html.tmpl
extensions/BMO/template/en/default/pages/triage_reports.html.tmpl
extensions/BMO/template/en/default/pages/user_activity.html.tmpl
extensions/BMO/web/styles/reports.css
extensions/BMO/web/styles/triage_reports.css
extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
extensions/BugModal/web/bug_modal.css
extensions/BugmailFilter/template/en/default/account/prefs/bugmail_filter.html.tmpl
extensions/BugmailFilter/web/style/bugmail-filter.css
extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
extensions/MyDashboard/web/styles/mydashboard.css
skins/standard/global.css
template/en/default/admin/flag-type/list.html.tmpl
template/en/default/attachment/list.html.tmpl
template/en/default/bug/show-multiple.html.tmpl
template/en/default/flag/list.html.tmpl
template/en/default/global/choose-product.html.tmpl
template/en/default/global/header-search-dropdown.html.tmpl

index 0ce6acf95047c125a215b2ae76c8daa60145d775..131d7fb5148c42375b891e9a7e91697502d131ae 100644 (file)
@@ -702,14 +702,6 @@ sub create {
         return $var;
       },
 
-      # Prevents line break on hyphens and whitespaces.
-      no_break => sub {
-        my ($var) = @_;
-        $var =~ s/ /\&nbsp;/g;
-        $var =~ s/-/\&#8209;/g;
-        return $var;
-      },
-
       # Insert `<wbr>` 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
index 82a4febf4e55d9048ac0a6ac119d95c54d972a59..405812869c717c7a26500c273652e657dbc61f68 100644 (file)
           [% IF p.name == "Mozilla PR" AND target == "enter_bug.cgi" AND NOT format AND NOT cgi.param("debug") %]
             <a href="[% basepath FILTER none %][% target FILTER uri %]?product=[% p.name FILTER uri -%]
                   [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END %]&amp;format=mozpr">
-            [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
+            [% p.name FILTER html %]</a>:&nbsp;
           [% ELSE %]
             <a href="[% basepath FILTER none %][% target FILTER uri %]?product=[% p.name FILTER uri -%]
                   [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%]
                   [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
-            [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
+            [% p.name FILTER html %]</a>:&nbsp;
           [% END %]
           </th>
           <td valign="top">[% p.description FILTER html_light %]</td>
index 3575c960d5c0b8e73cd2e60e8f66a29b1fe0a3e4..cdd96c3810f4c1b5c7af5cbd329b81f211183496 100644 (file)
@@ -161,7 +161,7 @@ Show UNCONFIRMED [% terms.bugs %] with:
       <tr class="bz_bugitem [% count % 2 == 1 ? "bz_row_odd" : "bz_row_even" %]">
         <td>
           [% bug.id FILTER bug_link(bug.id) FILTER none %]<br>
-          [% bug.creation_ts.replace(' .*' '') FILTER html FILTER no_break %]
+          <time>[% bug.creation_ts.replace(' .*' '') FILTER html %]</time>
         </td>
         <td>
           [% bug.summary FILTER html %]
@@ -173,7 +173,7 @@ Show UNCONFIRMED [% terms.bugs %] with:
           [% END %]
         </td>
         <td>
-          [% bug.comment_ts FILTER html FILTER no_break %]
+          <time>[% bug.comment_ts FILTER html %]</time>
         </td>
         <td>
           [% bug.comment FILTER html %]
index 993f59314f81764ca6c7424bf9c5d698ac975b11..c970214c4a94b4ae15bb3fbfbf857ff9d9bd0d6d 100644 (file)
               <td>[% operation.who FILTER email FILTER html %]</td>
             [% END %]
             [% IF group == 'when' %]
-              <td>[% change.when FILTER time FILTER no_break %]</td>
+              <td><time datetime="[% change.when FILTER time('%Y-%m-%d %H:%M:%S') %]">[% change.when FILTER time %]</time></td>
               <td>[% operation.bug FILTER bug_link(operation.bug) FILTER none %]</td>
             [% ELSE %]
               <td>[% operation.bug FILTER bug_link(operation.bug) FILTER none %]</td>
-              <td>[% change.when FILTER time FILTER no_break %]</td>
+              <td><time datetime="[% change.when FILTER time('%Y-%m-%d %H:%M:%S') %]">[% change.when FILTER time %]</time></td>
             [% END %]
           [% ELSE %]
             [% IF who_count > 1 %]
             [% IF group == 'when' %]
               <td>&nbsp;</td>
             [% ELSE %]
-              <td>[% change.when FILTER time FILTER no_break %]</td>
+              <td><time datetime="[% change.when FILTER time('%Y-%m-%d %H:%M:%S') %]">[% change.when FILTER time %]</time></td>
             [% END %]
           [% END %]
           <td>
index 06ae52d68305686c909e4044873456a9f55c4556..bc84ff33f0992a3e7bc4507dc2aad96d0dcf7d11 100644 (file)
     border: 0px;
 }
 
+#report td time {
+    white-space: nowrap;
+}
+
 .disabled {
     color: #888888;
 }
index 099dd9429ac95b94be5047e50c449d4a754979ba..cd3e51ee46365c4dd53babd2148368f83cc926e6 100644 (file)
@@ -60,3 +60,7 @@
   display: block;
   width: 100%;
 }
+
+#report td time {
+  white-space: nowrap;
+}
index 6c49ef7846430fb4f6d2a960d6340c376045301c..3bf5916ae42c006cf5715ff93a46ea5359f33041 100644 (file)
 
     <td class="flag-name">
       <label title="[% t.description FILTER html %]" for="[% flag_id FILTER html %]">
-        [%~ t.name FILTER html FILTER no_break ~%]
+        [%~ t.name FILTER html ~%]
       </label>
     </td>
 
index cf9315f49fbe81cd0e2df02d4d5b7041b93ea368..82b0d67d473b28f238834d481b073a9b268f63d7 100644 (file)
@@ -467,6 +467,7 @@ input[type="number"] {
 
 .flag-name {
     text-align: right;
+    white-space: nowrap;
 }
 
 td.flag-name, td.flag-requestee {
index 0780ffe4ad8114a090a9bf3cfd2dcdc76e4b3730..fef89c8b941eceaf3797dbe1d0f8989ab459a5aa 100644 (file)
@@ -226,7 +226,7 @@ var cpts = new Array();
         </span>
         <span id="all_flags" class="bz_default_hidden">
       [% END %]
-      [% flag.description FILTER html FILTER no_break %]
+      <span class="flag-description">[% flag.description FILTER html %]</span>
       [% ", " UNLESS loop.last %]
       [% IF loop.last && flag_count > 10 %]
         </span>
index 193cf446999eaa8d60a4b100748f11ae1b2640d4..1e30909d4618612a134a31428a0438bb687c3872 100644 (file)
@@ -42,3 +42,7 @@
     background-color: #eeeeee;
     color: #000000;
 }
+
+.flag-description {
+    white-space: nowrap;
+}
index 34e0da809cc661afaa3e785afce133a3aac68227..260b99f767b5a34a3eddd52f8fb29926b88efa71 100644 (file)
@@ -212,7 +212,7 @@ Other Mozilla products which aren't listed here
     <tr>
       <th align="right" valign="top">
         <a href="javascript:void(0)" onclick="product.select('[% p.name FILTER js %]')">
-        [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
+        [% p.name FILTER html %]</a>:&nbsp;
       </th>
 
       <td valign="top">[% p.description FILTER html_light %]</td>
index 3a8c5fbc39d35ca777173741fc9af9d4559a2ea3..77fe47dda4cc3f6437c8c748036bd189e097cf96 100644 (file)
           [% FOREACH q = user.queries_subscribed %]
             <li><a href="[% basepath FILTER none %]buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
                 [% q.name FILTER uri %]&amp;sharer_id=[% q.user.id FILTER uri %]"
-                title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html FILTER no_break %]</a></li>
+                title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html %]</a></li>
           [% END %]
         </ul>
       </section>
index ef34bb100fffc786a1353e038d28721b7d7e0742..f5ccfec19c4271de11a3016a5619a3bc1d28f50e 100644 (file)
@@ -87,4 +87,5 @@
 #saved_searches_container li {
     margin: 5px;
     display: inline;
+    white-space: nowrap;
 }
index faf543ba8346cd0465cfeda439a3f26f4eea8732..76b24942f538e3c101eb1171759e19c88a54544b 100644 (file)
@@ -1764,6 +1764,7 @@ button::-moz-focus-inner {
 
 #flags label {
     font-weight: normal;
+    white-space: nowrap;
 }
 
 /* tabs */
index 050a1066edea1d9dcfad5387bf6410eeabbfb549..4f73ecf03c0709c7ecbe44a29ebca0d509f2864f 100644 (file)
     [% FOREACH type = types %]
 
       <tr class="[% IF type.is_active %]active[% ELSE %]inactive[% END %]">
-        <td><a href="[% basepath FILTER none %]editflagtypes.cgi?action=edit&amp;id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td>
+        <th><a href="[% basepath FILTER none %]editflagtypes.cgi?action=edit&amp;id=[% type.id %]">[% type.name FILTER html %]</a></th>
         <td>[% type.description FILTER html %]</td>
         <td align="right">[% type.sortkey FILTER html %]</td>
         <td>
index 49ac973606d5142d1fd5723eb0873952cb510d1c..6ded06319d9efa97a00632abe749fed212bf5790 100644 (file)
@@ -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 %]
                     (<span title="[% flag.requestee.identity FILTER html %]">[% flag.requestee.nick FILTER html %]</span>)
index e17138237e452e13356516cc5089b1969569fccb..9622de8c8a84eb103389de6e77e5d814a36d6820 100644 (file)
                     [% 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() %]
           [% 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 %]<br>
index 653c1aac61f3f5af4085fdaccaa3ca4d91e53668..8189e187def5f78251bba796f8426d3966c6d630 100644 (file)
@@ -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 %]
           (<span title="[% flag.requestee.name FILTER html %]">[% flag.requestee.nick FILTER html %]</span>)
       </td>
       <td>
         <label title="[% type.description FILTER html %]" for="[% fid FILTER html %]">
-          [%- type.name FILTER html FILTER no_break -%]</label>
+          [%- type.name FILTER html -%]</label>
       </td>
       <td>
         <input type="hidden" id="[% fid FILTER html %]_dirty">
index 8cd23a91029d9e252d810e11cae0d25533dff60c..75fd645e36e5d82335048a52887407589cb71885 100644 (file)
@@ -58,7 +58,7 @@
         <a href="[% target %]?product=[% p.name FILTER uri -%]
               [%- IF cloned_bug_id %]&amp;cloned_bug_id=[% cloned_bug_id FILTER uri %][% END -%]
               [%- IF format %]&amp;format=[% format FILTER uri %][% END %]">
-        [% p.name FILTER html FILTER no_break %]</a>:&nbsp;
+        [% p.name FILTER html %]</a>:&nbsp;
       </th>
 
       <td valign="top">[% p.description FILTER html_light %]</td>
index cd52ac7b027a5c40dfb39901831f22a5056809b6..0f5cc270b751e5d7b0e2fa7bc1a03dc56ffb3598 100644 (file)
@@ -42,7 +42,7 @@
           [% FOREACH q = user.queries_subscribed %]
             <li role="none"><a role="option" href="[% basepath FILTER none %]buglist.cgi?cmdtype=dorem&amp;remaction=run&amp;namedcmd=
                 [% q.name FILTER uri %]&amp;sharer_id=[% q.user.id FILTER uri %]"
-                title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html FILTER no_break %]</a></li>
+                title="Shared by [% q.user.identity FILTER html %]">[% q.name FILTER html %]</a></li>
           [% END %]
         </ul>
       </section>