Merge lp:~sinzui/launchpad/halt-when-done-2 into lp:launchpad

Proposed by Curtis Hovey on 2012-05-15
Status: Merged
Merged at revision: 15249
Proposed branch: lp:~sinzui/launchpad/halt-when-done-2
Merge into: lp:launchpad
Diff against target: 104 lines (+1/-31)
6 files modified
lib/lp/app/javascript/choice.js (+0/-5)
lib/lp/app/javascript/choiceedit/choiceedit.js (+0/-6)
lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js (+0/-7)
lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css (+1/-1)
lib/lp/bugs/javascript/bugtask_index.js (+0/-7)
lib/lp/code/templates/branchmergeproposal-index.pt (+0/-5)
To merge this branch: bzr merge lp:~sinzui/launchpad/halt-when-done-2
Reviewer Review Type Date Requested Status
Richard Harding (community) code 2012-05-15 Approve on 2012-05-15
Review via email: mp+105859@code.launchpad.net

Commit Message

Enable the choice picker for msie.

Description of the Change

Pre-implementation: wallyworld, wgrant

The ChoiseSource picker does not work in msie. Some preliminary work
to make it use halt() fixed some issues to setup the page. the onclick
event always returns early though in msie.

--------------------------------------------------------------------

RULES

    * YUI docs state that e.button is for mouseup events, not click event.
      http://yuilibrary.com/yui/docs/api/classes/DOMEventFacade.html#property_button
      http://yuilibrary.com/yui/docs/event/#mouse-event-properties
      * Remove the mouse button check because there is no use-case
        to support it.
    * Remove the secondary guards that block the setup of ChoiceSource.
      in many templates and modules.

    ADDENDUM
    * wgrant suggests an alternate combination of properties to create
      the overlay shadow in msie.
      https://bugs.launchpad.net/launchpad/+bug/998229

QA

    http://people.canonical.com/~curtis/msie-overlay-shadow.png
    demonstrated wgrant's fix for the box shadow.

    * Visit https://bugs.qastaging.launchpad.net/gdp/+bug/420173
    * Verify you can use the affects me.
    * Verify it has a shadow that fills all four corners.
    * Verify you can set the status.
    * Verify you can set the information type.
    * Visit https://code.qastaging.launchpad.net/~sinzui/gdp/packaging/+merge/94307
    * Verify you can change the merge proposal status.
    * Visit https://blueprints.qastaging.launchpad.net/gdp/+spec/gdplaunchpad
    * Verify you can change the direct approved.

LINT

    lib/lp/app/javascript/choice.js
    lib/lp/app/javascript/choiceedit/choiceedit.js
    lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js
    lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css
    lib/lp/bugs/javascript/bugtask_index.js
    lib/lp/code/templates/branchmergeproposal-index.pt

TEST

    ./bin/test -vvc --layer=YUITest -t 'lp/(app|bugs|code)' lp

IMPLEMENTATION

Updated the CSS to draw a shadow in all four cornders in msie.
    lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css

Removed the left button check from the onclick handler per YUI
documentation.
    lib/lp/app/javascript/choiceedit/choiceedit.js
    lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js

Enabled the boolean choice source on the blueprint page.
Enabled the enum choise source on the bugtask and merge proposal pages.
    lib/lp/app/javascript/choice.js
    lib/lp/bugs/javascript/bugtask_index.js
    lib/lp/code/templates/branchmergeproposal-index.pt

To post a comment you must log in.
Richard Harding (rharding) wrote :

Cool, glad to see some more IE love.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/javascript/choice.js'
2--- lib/lp/app/javascript/choice.js 2011-04-19 18:03:50 +0000
3+++ lib/lp/app/javascript/choice.js 2012-05-15 17:07:48 +0000
4@@ -22,11 +22,6 @@
5 }
6
7 namespace.addBinaryChoice = function(config, resource_uri, attribute) {
8-
9- if (Y.UA.ie) {
10- return;
11- }
12-
13 var widget = new Y.ChoiceSource(config);
14 widget.plug({
15 fn: Y.lp.client.plugins.PATCHPlugin,
16
17=== modified file 'lib/lp/app/javascript/choiceedit/choiceedit.js'
18--- lib/lp/app/javascript/choiceedit/choiceedit.js 2012-03-15 05:40:30 +0000
19+++ lib/lp/app/javascript/choiceedit/choiceedit.js 2012-05-15 17:07:48 +0000
20@@ -242,12 +242,6 @@
21 * @private
22 */
23 onClick: function(e) {
24-
25- // Only continue if the down button is the left one.
26- if (e.button !== LEFT_MOUSE_BUTTON) {
27- return;
28- }
29-
30 this._choice_list = new Y.ChoiceList({
31 value: this.get("value"),
32 title: this.get("title"),
33
34=== modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js'
35--- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2012-04-06 17:28:25 +0000
36+++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2012-05-15 17:07:48 +0000
37@@ -117,13 +117,6 @@
38 "ChoiceList HTML is not being added to the page");
39 },
40
41- test_right_clicking_doesnt_create_choicelist: function() {
42- simulate(this.choice_edit.get('boundingBox'),
43- '.value', 'click', { button: 2 });
44- Assert.isNull(Y.one(document).one(".yui3-ichoicelist"),
45- "ChoiceList created when the right mouse button was clicked");
46- },
47-
48 test_choicelist_has_correct_values: function() {
49 simulate(this.choice_edit.get('boundingBox'), '.value', 'click');
50 var that = this;
51
52=== modified file 'lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css'
53--- lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css 2012-05-12 01:55:23 +0000
54+++ lib/lp/app/javascript/overlay/assets/pretty-overlay-core.css 2012-05-15 17:07:48 +0000
55@@ -22,7 +22,7 @@
56 text-align: left;
57 border-radius: 5px;
58 -webkit-box-shadow: 0px 0px 20px 10px #aaa;
59- -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=135, Color='#aaaaaa'), progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=315, Color='#aaaaaa')";
60+ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=0, Color='#aaaaaa'), progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=90, Color='#aaaaaa'), progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=180, Color='#aaaaaa'), progid:DXImageTransform.Microsoft.Shadow(Strength=15, Direction=270, Color='#aaaaaa')";
61 box-shadow: 0px 0px 20px 10px #aaa;
62 }
63
64
65=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
66--- lib/lp/bugs/javascript/bugtask_index.js 2012-05-11 20:34:22 +0000
67+++ lib/lp/bugs/javascript/bugtask_index.js 2012-05-15 17:07:48 +0000
68@@ -889,10 +889,6 @@
69 /* ChoiceSource doesn't seem to function in IE at present, breaking
70 * all of this AJAX except the assignee and product pickers.
71 */
72- if (Y.UA.ie) {
73- return;
74- }
75-
76 var tr = Y.one('#' + conf.row_id);
77 var bugtarget_content = Y.one('#bugtarget-picker-' + conf.row_id);
78 var status_content = tr.one('.status-content');
79@@ -1194,9 +1190,6 @@
80 */
81 namespace.setup_me_too = function(user_is_affected, others_affected_count) {
82 /* ChoiceSource is broken in IE8, probably IE9. */
83- if (Y.UA.ie) {
84- return;
85- }
86 var me_too_content = Y.one('#affectsmetoo');
87 var me_too_edit = new MeTooChoiceSource({
88 contentBox: me_too_content, value: user_is_affected,
89
90=== modified file 'lib/lp/code/templates/branchmergeproposal-index.pt'
91--- lib/lp/code/templates/branchmergeproposal-index.pt 2012-02-01 15:31:32 +0000
92+++ lib/lp/code/templates/branchmergeproposal-index.pt 2012-05-15 17:07:48 +0000
93@@ -217,11 +217,6 @@
94 if (logged_in) {
95 var comment = new Y.lp.app.comment.CodeReviewComment();
96 comment.render();
97-
98- if(Y.UA.ie) {
99- return;
100- }
101-
102 Y.lp.code.branchmergeproposal.status.connect_status(conf);
103 }
104 Y.lp.code.branchmergeproposal.reviewcomment.connect_links();