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
=== modified file 'lib/canonical/launchpad/javascript/bugs/bugtask-index.js'
--- lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-02 22:13:06 +0000
+++ lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-22 11:03:00 +0000
@@ -1227,15 +1227,23 @@
1227 if ((LP.client.links.me !== undefined) && (LP.client.links.me !== null)) {1227 if ((LP.client.links.me !== undefined) && (LP.client.links.me !== null)) {
1228 if (Y.Lang.isValue(bugtarget_content)) {1228 if (Y.Lang.isValue(bugtarget_content)) {
1229 if (conf.target_is_product) {1229 if (conf.target_is_product) {
1230 var bugtarget_picker = Y.lp.picker.addPickerPatcher(1230 if (Y.UA.webkit) {
1231 'Product',1231 bugtarget_content.replaceChild(
1232 conf.bugtask_path,1232 Y.DOM.create(
1233 "target_link",1233 '<a href="+editstatus" ' +
1234 bugtarget_content.get('id'),1234 ' class="sprite edit yui-activator-act" />'),
1235 false,1235 bugtarget_content.query('.yui-activator-act'));
1236 false,1236 } else {
1237 {"step_title": "Search products",1237 var bugtarget_picker = Y.lp.picker.addPickerPatcher(
1238 "header": "Change product"});1238 'Product',
1239 conf.bugtask_path,
1240 "target_link",
1241 bugtarget_content.get('id'),
1242 false,
1243 false,
1244 {"step_title": "Search products",
1245 "header": "Change product"});
1246 }
1239 }1247 }
1240 }1248 }
12411249
@@ -1359,18 +1367,26 @@
1359 milestone_choice_edit.render(); 1367 milestone_choice_edit.render();
1360 }1368 }
1361 if (Y.Lang.isValue(assignee_content)) {1369 if (Y.Lang.isValue(assignee_content)) {
1362 var assignee_picker = Y.lp.picker.addPickerPatcher(1370 if (Y.UA.webkit) {
1363 'ValidAssignee',1371 assignee_content.replaceChild(
1364 conf.bugtask_path,1372 Y.DOM.create(
1365 "assignee_link",1373 '<a href="+editstatus" ' +
1366 assignee_content.get('id'),1374 ' class="sprite edit yui-activator-act" />'),
1367 true,1375 assignee_content.query('.yui-activator-act'));
1368 true,1376 } else {
1369 {"step_title": "Search for people or teams",1377 var assignee_picker = Y.lp.picker.addPickerPatcher(
1370 "header": "Change assignee",1378 'ValidAssignee',
1371 "remove_button_text": "Remove asignee",1379 conf.bugtask_path,
1372 "null_display_value": "Unassigned"});1380 "assignee_link",
1373 assignee_picker.render()1381 assignee_content.get('id'),
1382 true,
1383 true,
1384 {"step_title": "Search for people or teams",
1385 "header": "Change assignee",
1386 "remove_button_text": "Remove asignee",
1387 "null_display_value": "Unassigned"});
1388 assignee_picker.render()
1389 }
1374 }1390 }
1375};1391};
13761392
13771393
=== removed file 'lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt'
--- lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/stories/duplicate-bug-handling/xx-bug-has-n-duplicates-message.txt 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
1A bug with duplicates shows a message of how many times it's been reported.
2
3 >>> user_browser.open("http://launchpad.dev/bugs/5")
4
5 >>> tag = find_tag_by_id(user_browser.contents, "number_of_dupes")
6 >>> print tag.renderContents()
7 (This bug has 1 duplicate)
80
=== modified file 'lib/lp/bugs/templates/bug-portlet-actions.pt'
--- lib/lp/bugs/templates/bug-portlet-actions.pt 2009-09-18 16:22:35 +0000
+++ lib/lp/bugs/templates/bug-portlet-actions.pt 2009-09-22 10:52:10 +0000
@@ -19,17 +19,19 @@
19 <tal:block19 <tal:block
20 tal:condition="context/duplicates"20 tal:condition="context/duplicates"
21 tal:define="number_of_dupes context/duplicates/count"21 tal:define="number_of_dupes context/duplicates/count"
22 ><span id="number_of_dupes">(This bug has22 >
23 <tal:num-dupes condition="python:number_of_dupes == 1">1
24 duplicate)</tal:num-dupes>
25 <tal:num-dupes condition="python:number_of_dupes > 1"
26 content="string:${number_of_dupes} duplicates)"
27 >2 duplicates</tal:num-dupes></span>
28 </tal:block>23 </tal:block>
29 <tal:block24 <tal:block
30 tal:define="duplicateof context/duplicateof"25 tal:define="duplicateof context/duplicateof"
31 tal:condition="duplicateof"26 tal:condition="duplicateof"
32 >27 >
28 <a
29 tal:define="link context_menu/markduplicate"
30 tal:condition="python: link.enabled"
31 id="change_duplicate_bug"
32 title="Edit or remove linked duplicate bug"
33 class="sprite edit"
34 tal:attributes="href link/url"></a>
33 <span id="mark-duplicate-text">Duplicate of35 <span id="mark-duplicate-text">Duplicate of
34 <a36 <a
35 tal:condition="duplicateof/required:launchpad.View"37 tal:condition="duplicateof/required:launchpad.View"
@@ -41,14 +43,6 @@
41 <span43 <span
42 tal:condition="not:duplicateof/required:launchpad.View"44 tal:condition="not:duplicateof/required:launchpad.View"
43 tal:replace="string:bug #${duplicateof/id}" />45 tal:replace="string:bug #${duplicateof/id}" />
44 <a
45 tal:define="link context_menu/markduplicate"
46 tal:condition="python: link.enabled"
47 id="change_duplicate_bug"
48 title="Edit or remove linked duplicate bug"
49 class="sprite edit"
50 tal:attributes="href link/url">
51 </a>
52 </span>46 </span>
53 </tal:block>47 </tal:block>
54 </div>48 </div>