From 03450656e24abb848f6ef8b4f599e876522120fb Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 16 Jul 2018 23:26:46 -0400 Subject: Bug 1472961 - Copy Summary button should copy link as well --- extensions/BugModal/template/en/default/bug_modal/header.html.tmpl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'extensions/BugModal/template/en') diff --git a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl index b9a42caf3..47d97fb32 100644 --- a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl @@ -8,6 +8,7 @@ [% PROCESS global/variables.none.tmpl; + USE Bugzilla; # IF bugs.defined; @@ -89,6 +90,8 @@ [%# expose useful data to js %] BUGZILLA.bug_id = [% bug.id FILTER none %]; BUGZILLA.bug_title = '[% unfiltered_title FILTER js %]'; + BUGZILLA.bug_summary = '[% bug.short_desc FILTER js %]'; + BUGZILLA.bug_url = '[% Bugzilla.cgi.self_url FILTER js %]'; BUGZILLA.user = { id: [% user.id FILTER none %], login: '[% user.login FILTER js %]', -- cgit v1.2.3-24-g4f1b From 2f91e373896ca57c6873a51d265c3f233709db99 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino <kohei.yoshino@gmail.com> Date: Tue, 17 Jul 2018 10:05:45 -0400 Subject: Bug 1474026 - Double HTML escaping in crash signature update --- .../BugModal/template/en/default/bug_modal/activity_stream.html.tmpl | 2 +- extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions/BugModal/template/en') diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index 51919ab27..883393fba 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -383,7 +383,7 @@ value FILTER bug_list_link; ELSE; - value FILTER truncate(256, '…') FILTER html; + value FILTER truncate(256, '…') FILTER html; END; END; diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index b61e742b4..d82e1a684 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -1023,7 +1023,7 @@ [% sub = []; IF bug.status_whiteboard != ""; - sub.push("Whiteboard: " _ bug.status_whiteboard.truncate(256, '…')); + sub.push("Whiteboard: " _ bug.status_whiteboard.truncate(256, '…')); END; IF bug.cf_crash_signature != ""; sub.push("crash signature"); -- cgit v1.2.3-24-g4f1b From 351b399991094e57e890a9291484c4ab69ca628b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison <dylan@hardison.net> Date: Wed, 18 Jul 2018 22:42:56 -0400 Subject: Bug 1476288 - Replace moz_nick with (new, revised) nick and also attempt to disallow duplicate nicks --- .../template/en/default/bug_modal/activity_stream.html.tmpl | 6 +++--- extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl | 4 ++-- extensions/BugModal/template/en/default/bug_modal/user.html.tmpl | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'extensions/BugModal/template/en') diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index 883393fba..af2077e00 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -146,7 +146,7 @@ [% END %] <button type="button" class="reply-btn minor" data-reply-id="[% comment.count FILTER none %]" - data-reply-name="[% comment.author.name || comment.author.moz_nick FILTER html %]" + data-reply-name="[% comment.author.name || comment.author.nick FILTER html %]" >Reply</button> [% END %] <button type="button" class="change-spinner minor" id="cs-[% comment.count FILTER none %]">-</button> @@ -184,9 +184,9 @@ <tr> <td class="comment-collapse-reason" [% IF user.setting("ui_use_absolute_time") == "on" %] - title="[% comment.author.moz_nick FILTER html %] [[% comment.creation_ts FILTER time("%Y-%m-%d %H:%M %Z") FILTER html %]]"> + title="[% comment.author.nick FILTER html %] [[% comment.creation_ts FILTER time("%Y-%m-%d %H:%M %Z") FILTER html %]]"> [% ELSE %] - title="[% comment.author.moz_nick FILTER html %] [[% comment.creation_ts FILTER time_duration FILTER html %]]"> + title="[% comment.author.nick FILTER html %] [[% comment.creation_ts FILTER time_duration FILTER html %]]"> [% END %] Comment hidden ([% comment.collapsed_reason FILTER html %]) </td> diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index d82e1a684..e2c8bba26 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -565,8 +565,8 @@ [% sub = []; - sub.push("Reporter: " _ bug.reporter.moz_nick); - sub.push(unassigned ? "Unassigned" : "Assigned: " _ bug.assigned_to.moz_nick); + sub.push("Reporter: " _ bug.reporter.nick); + sub.push(unassigned ? "Unassigned" : "Assigned: " _ bug.assigned_to.nick); IF bug.mentors.size; sub.push("Mentored"); END; diff --git a/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl index 9eda7b936..6a0ce4e24 100644 --- a/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl @@ -30,9 +30,9 @@ END; [% IF simple %] [% IF user.id %] - <span class="fn" title="[% u.identity FILTER html %]">[% u.moz_nick FILTER html %]</span> + <span class="fn" title="[% u.identity FILTER html %]">[% u.nick FILTER html %]</span> [% ELSE %] - <span class="fn">[% u.moz_nick FILTER html %]</span> + <span class="fn">[% u.nick FILTER html %]</span> [% END %] [% ELSE %] @@ -52,7 +52,7 @@ END; href="user_profile?user_id=[% u.id FILTER none %]" [% END %] > - <span class="[% user.id ? 'fn' : 'fna' %]">[% nick_only ? u.moz_nick : (u.name || u.nick) FILTER html %]</span> + <span class="[% user.id ? 'fn' : 'fna' %]">[% nick_only ? u.nick : (u.name || u.nick) FILTER html %]</span> [%~~%] </a> [% END %] -- cgit v1.2.3-24-g4f1b From 535a1fd09e4b150e31165e2e79af42c2e5f2bda5 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino <kohei.yoshino@gmail.com> Date: Wed, 18 Jul 2018 22:44:16 -0400 Subject: Bug 1472954 - Implement one-click component watching on bug modal and component description pages --- .../en/default/bug_modal/activity_stream.html.tmpl | 12 +-- .../template/en/default/bug_modal/edit.html.tmpl | 88 ++++++++++++++-------- .../template/en/default/bug_modal/header.html.tmpl | 1 + 3 files changed, 65 insertions(+), 36 deletions(-) (limited to 'extensions/BugModal/template/en') diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index af2077e00..36494773b 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -15,8 +15,8 @@ <div class="dropdown"> <button type="button" id="comment-tags-btn" arai-haspopup="true" aria-label="Tags Menu" aria-expanded="false" aria-controls="comment-tags-menu" class="dropdown-button minor">Tags ▾</button> - <ul id="comment-tags-menu" role="menu" tabindex="0" class="dropdown-content" style="display:none"> - <li class="dropdown-separator" role="presentation"> + <ul id="comment-tags-menu" role="menu" tabindex="0" class="dropdown-content left" style="display:none"> + <li role="presentation"> <a role="menuitem" tabindex="-1" data-comment-tag="">Reset</a> </li> </ul> @@ -24,19 +24,21 @@ <div class="dropdown"> <button type="button" id="view-menu-btn" arai-haspopup="true" aria-label="View Menu" aria-expanded="false" aria-controls="view-menu" class="dropdown-button minor">View ▾</button> - <ul id="view-menu" role="menu" tabindex="0" class="dropdown-content" style="display:none"> - <li class="dropdown-separator" role="presentation"> + <ul id="view-menu" role="menu" tabindex="0" class="dropdown-content left" style="display:none"> + <li role="presentation"> <a id="view-reset" role="menuitem" tabindex="-1">Reset</a> </li> + <li role="separator"></li> <li role="presentation"> <a id="view-collapse-all" role="menuitem" tabindex="-1">Collapse All</a> </li> <li role="presentation"> <a id="view-expand-all" role="menuitem" tabindex="-1">Expand All</a> </li> - <li class="dropdown-separator" role="presentation"> + <li role="presentation"> <a id="view-comments-only" role="menuitem" tabindex="-1">Comments Only</a> </li> + <li role="separator"></li> <li role="presentation"> <a id="view-toggle-cc" role="menuitem" tabindex="-1">Show CC Changes</a> </li> diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl index e2c8bba26..60ed6ca49 100644 --- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl @@ -320,24 +320,26 @@ <div class="dropdown"> <button type="button" id="action-menu-btn" aria-haspopup="true" aria-label="Actions Menu" aria-expanded="false" aria-controls="action-menu" class="dropdown-button minor">▾</button> - <ul class="dropdown-content" id="action-menu" role="menu" style="display:none;"> + <ul class="dropdown-content left" id="action-menu" role="menu" style="display:none;"> <li role="presentation"> <a id="action-reset" role="menuitem" tabindex="-1">Reset Sections</a> </li> <li role="presentation"> <a id="action-expand-all" role="menuitem" tabindex="-1">Expand All Sections</a> </li> - <li class="dropdown-separator" role="presentation"> + <li role="presentation"> <a id="action-collapse-all" role="menuitem" tabindex="-1">Collapse All Sections</a> </li> + <li role="separator"></li> [% IF user.id %] <li role="presentation"> <a id="action-add-comment" role="menuitem" tabindex="-1">Add Comment</a> </li> [% END %] - <li class="dropdown-separator" role="presentation"> + <li role="presentation"> <a id="action-last-comment" role="menuitem" tabindex="-1">Last Comment</a> </li> + <li role="separator"></li> <li role="presentation"> <a id="action-history" role="menuitem" tabindex="-1">History</a> </li> @@ -374,17 +376,29 @@ hide_on_edit = can_edit_product help = "describecomponents.cgi?product=$filtered_product" %] - <span aria-owns="product-name product-latch"> - <span role="button" aria-label="show product information" aria-expanded="false" tabindex="0" - class="spin-latch" id="product-latch" data-latch="product" data-for="product">▸</span> - <div title="show product information" tabindex="0" class="spin-toggle" - id="product-name" data-latch="product" data-for="product"> + <div class="name-info-outer dropdown"> + <span id="product-name" class="dropdown-button" tabindex="0" role="button" + aria-haspopup="menu" aria-controls="product-info"> [% bug.product FILTER html %] - </div> - <div id="product-info" style="display:none"> - [% bug.product_obj.description FILTER html_light %] - </div> - </span> + <span class="icon" aria-hidden="true">▾</span> + </span> + <aside id="product-info" class="name-info-popup dropdown-content right hover-display" hidden role="menu" + aria-label="Product description and actions"> + <header> + <div class="title">[%~ bug.product FILTER html ~%]</div> + <div class="description">[% bug.product_obj.description FILTER html_light %]</div> + </header> + <li role="separator"></li> + <div class="actions"> + <div><a href="buglist.cgi?product=[% bug.product FILTER uri %]&bug_status=__open__" + target="_blank" role="menuitem" tabindex="-1">See Other [% terms.Bugs %]</a></div> + <div><button disabled type="button" class="minor component-watching" role="menuitem" tabindex="-1" + data-product="[% bug.product FILTER html %]" + data-label-watch="Watch This Product" data-label-unwatch="Unwatch This Product" + data-source="BugModal">Watch This Product</button></div> + </div> + </aside> + </div> [% END %] [% WRAPPER bug_modal/field.html.tmpl field = bug_fields.product @@ -417,20 +431,30 @@ help = "describecomponents.cgi?product=$filtered_product&component=$filtered_component#$filtered_component" %] - <span aria-owns="component-name component-latch"> - <span role="button" aria-label="show component description" aria-expanded="false" tabindex="0" - class="spin-latch" id="component-latch" data-latch="component" data-for="component">▸</span> - <div title="show component information" tabindex="0" class="spin-toggle" id="component-name" - data-latch="#component-latch" data-for="component"> - [% bug.component FILTER html %] - </div> - <div id="component-info" style="display:none"> - <div>[% bug.component_obj.description FILTER html_light %]</div> - <a href="buglist.cgi?component=[% bug.component FILTER uri %]& - [%~ %]product=[% bug.product FILTER uri %]& - [%~ %]bug_status=__open__" target="_blank">Other [% terms.Bugs %]</a> - </div> - </span> + <div class="name-info-outer dropdown"> + <span id="component-name" class="dropdown-button" tabindex="0" role="button" + aria-haspopup="menu" aria-controls="component-info"> + [% bug.component FILTER html %] + <span class="icon" aria-hidden="true">▾</span> + </span> + <aside id="component-info" class="name-info-popup dropdown-content right hover-display" hidden role="menu" + aria-label="Component description and actions"> + <header> + <div class="title">[%~ bug.product _ " :: " _ bug.component FILTER html ~%]</div> + <div class="description">[% bug.component_obj.description FILTER html_light %]</div> + </header> + <li role="separator"></li> + <div class="actions"> + <div><a href="buglist.cgi?product=[% bug.product FILTER uri %]& + [%~ %]component=[% bug.component FILTER uri %]&bug_status=__open__" + target="_blank" role="menuitem" tabindex="-1">See Other [% terms.Bugs %]</a></div> + <div><button disabled type="button" class="minor component-watching" role="menuitem" tabindex="-1" + data-product="[% bug.product FILTER html %]" data-component="[% bug.component FILTER html %]" + data-label-watch="Watch This Component" data-label-unwatch="Unwatch This Component" + data-source="BugModal">Watch This Component</button></div> + </div> + </aside> + </div> [% END %] [%# importance %] @@ -1325,7 +1349,7 @@ <div class="dropdown"> <button type="button" id="format-btn" aria-haspopup="true" aria-label="Format [% terms.Bug %] Menu" aria-expanded="false" aria-controls="format-menu" class="dropdown-button minor">Format [% terms.Bug %] ▴</button> - <ul class="dropdown-content menu-up" id="format-menu" role="menu" style="display:none;"> + <ul class="dropdown-content left menu-up" id="format-menu" role="menu" style="display:none;"> <li role="presentation"> <a href="show_bug.cgi?format=multiple&id=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1">For Printing</a> </li> @@ -1346,7 +1370,7 @@ <div class="dropdown"> <button type="button" id="new-bug-btn" aria-haspopup="true" aria-label="New/Clone [% terms.Bug %] Menu" aria-expanded="false" aria-controls="new-bug-menu" class="dropdown-button minor">New/Clone [% terms.Bug %] ▴</button> - <ul class="dropdown-content menu-up" id="new-bug-menu" role="menu" style="display:none;"> + <ul class="dropdown-content left menu-up" id="new-bug-menu" role="menu" style="display:none;"> <li role="presentation"> <a href="enter_bug.cgi" role="menuitem" tabindex="-1" target="_blank"> Create a new [% terms.bug %]</a> @@ -1355,18 +1379,20 @@ <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]" role="menuitem" tabindex="-1" target="_blank">… in this product</a> </li> - <li class="dropdown-separator" role="presentation"> + <li role="presentation"> <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]&component=[% bug.component FILTER uri %]" role="menuitem" tabindex="-1" target="_blank">… in this component</a> </li> + <li role="separator"></li> <li role="presentation"> <a href="enter_bug.cgi?format=__default__&product=[% bug.product FILTER uri %]&blocked=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1" target="_blank">… that blocks this [% terms.bug %]</a> </li> - <li class="dropdown-separator" role="presentation"> + <li role="presentation"> <a href="enter_bug.cgi?format=__default__&product=[% bug.product FILTER uri %]&dependson=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1" target="_blank">… that depends on this [% terms.bug %]</a> </li> + <li role="separator"></li> <li role="presentation"> <a href="enter_bug.cgi?format=__default__&product=[% bug.product FILTER uri %]&cloned_bug_id=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1" target="_blank">… as a clone of this [% terms.bug %]</a> diff --git a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl index 47d97fb32..20561c760 100644 --- a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl @@ -54,6 +54,7 @@ "extensions/ProdCompSearch/web/js/prod_comp_search.js", "extensions/BugModal/web/bug_modal.js", "extensions/BugModal/web/comments.js", + "extensions/ComponentWatching/web/js/overlay.js", "js/bugzilla-readable-status-min.js", "js/field.js", "js/comments.js", -- cgit v1.2.3-24-g4f1b