Merge lp:~intellectronica/launchpad/webkit-ajax-disables into lp:launchpad

Proposed by Eleanor Berger
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~intellectronica/launchpad/webkit-ajax-disables
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~intellectronica/launchpad/webkit-ajax-disables
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Graham Binns (community) code Approve
Review via email: mp+12215@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

This branch has several simple fixes for the bug page:

1. The duplicate edit button now appears in webkit-based browsers.
2. The duplicate edit button is now positioned to the left of the action text, to fit with all other actions in the portlet.
3. The number of duplicates no longer displays in the actions portlet.
4. The product and assignee controls in the bugtask table are disabled in webkit-based browsers. Instead, a normal edit icon is dynamically added to the cells (a solution that's far from ideal but will have to do as a release-critical fix to allow users of those browsers edit the value).

Revision history for this message
Graham Binns (gmb) :
review: Approve (code)
Revision history for this message
Brad Crittenden (bac) wrote :

Hi Tom,

As we discussed on IRC the problem seen with the project picker does not affect the assignee picker. Thanks for confirming and agreeing to revert the changes for the assignee.

--Brad

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/javascript/bugs/bugtask-index.js'
2--- lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-02 22:13:06 +0000
3+++ lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-22 11:03:00 +0000
4@@ -1227,15 +1227,23 @@
5 if ((LP.client.links.me !== undefined) && (LP.client.links.me !== null)) {
6 if (Y.Lang.isValue(bugtarget_content)) {
7 if (conf.target_is_product) {
8- var bugtarget_picker = Y.lp.picker.addPickerPatcher(
9- 'Product',
10- conf.bugtask_path,
11- "target_link",
12- bugtarget_content.get('id'),
13- false,
14- false,
15- {"step_title": "Search products",
16- "header": "Change product"});
17+ if (Y.UA.webkit) {
18+ bugtarget_content.replaceChild(
19+ Y.DOM.create(
20+ '<a href="+editstatus" ' +
21+ ' class="sprite edit yui-activator-act" />'),
22+ bugtarget_content.query('.yui-activator-act'));
23+ } else {
24+ var bugtarget_picker = Y.lp.picker.addPickerPatcher(
25+ 'Product',
26+ conf.bugtask_path,
27+ "target_link",
28+ bugtarget_content.get('id'),
29+ false,
30+ false,
31+ {"step_title": "Search products",
32+ "header": "Change product"});
33+ }
34 }
35 }
36
37@@ -1359,18 +1367,26 @@
38 milestone_choice_edit.render();
39 }
40 if (Y.Lang.isValue(assignee_content)) {
41- var assignee_picker = Y.lp.picker.addPickerPatcher(
42- 'ValidAssignee',
43- conf.bugtask_path,
44- "assignee_link",
45- assignee_content.get('id'),
46- true,
47- true,
48- {"step_title": "Search for people or teams",
49- "header": "Change assignee",
50- "remove_button_text": "Remove asignee",
51- "null_display_value": "Unassigned"});
52- assignee_picker.render()
53+ if (Y.UA.webkit) {
54+ assignee_content.replaceChild(
55+ Y.DOM.create(
56+ '<a href="+editstatus" ' +
57+ ' class="sprite edit yui-activator-act" />'),
58+ assignee_content.query('.yui-activator-act'));
59+ } else {
60+ var assignee_picker = Y.lp.picker.addPickerPatcher(
61+ 'ValidAssignee',
62+ conf.bugtask_path,
63+ "assignee_link",
64+ assignee_content.get('id'),
65+ true,
66+ true,
67+ {"step_title": "Search for people or teams",
68+ "header": "Change assignee",
69+ "remove_button_text": "Remove asignee",
70+ "null_display_value": "Unassigned"});
71+ assignee_picker.render()
72+ }
73 }
74 };
75
76
77=== removed file 'lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt'
78--- lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt 2009-06-12 16:36:02 +0000
79+++ lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt 1970-01-01 00:00:00 +0000
80@@ -1,7 +0,0 @@
81-A bug with duplicates shows a message of how many times it's been reported.
82-
83- >>> user_browser.open("http://launchpad.dev/bugs/5")
84-
85- >>> tag = find_tag_by_id(user_browser.contents, "number_of_dupes")
86- >>> print tag.renderContents()
87- (This bug has 1 duplicate)
88
89=== modified file 'lib/lp/bugs/templates/bug-portlet-actions.pt'
90--- lib/lp/bugs/templates/bug-portlet-actions.pt 2009-09-18 16:22:35 +0000
91+++ lib/lp/bugs/templates/bug-portlet-actions.pt 2009-09-22 10:52:10 +0000
92@@ -19,17 +19,19 @@
93 <tal:block
94 tal:condition="context/duplicates"
95 tal:define="number_of_dupes context/duplicates/count"
96- ><span id="number_of_dupes">(This bug has
97- <tal:num-dupes condition="python:number_of_dupes == 1">1
98- duplicate)</tal:num-dupes>
99- <tal:num-dupes condition="python:number_of_dupes > 1"
100- content="string:${number_of_dupes} duplicates)"
101- >2 duplicates</tal:num-dupes></span>
102+ >
103 </tal:block>
104 <tal:block
105 tal:define="duplicateof context/duplicateof"
106 tal:condition="duplicateof"
107 >
108+ <a
109+ tal:define="link context_menu/markduplicate"
110+ tal:condition="python: link.enabled"
111+ id="change_duplicate_bug"
112+ title="Edit or remove linked duplicate bug"
113+ class="sprite edit"
114+ tal:attributes="href link/url"></a>
115 <span id="mark-duplicate-text">Duplicate of
116 <a
117 tal:condition="duplicateof/required:launchpad.View"
118@@ -41,14 +43,6 @@
119 <span
120 tal:condition="not:duplicateof/required:launchpad.View"
121 tal:replace="string:bug #${duplicateof/id}" />
122- <a
123- tal:define="link context_menu/markduplicate"
124- tal:condition="python: link.enabled"
125- id="change_duplicate_bug"
126- title="Edit or remove linked duplicate bug"
127- class="sprite edit"
128- tal:attributes="href link/url">
129- </a>
130 </span>
131 </tal:block>
132 </div>