← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/filebug-choicepopup-fix into lp:launchpad

 

Ian Booth has proposed merging lp:~wallyworld/launchpad/filebug-choicepopup-fix into lp:launchpad.

Requested reviews:
  Curtis Hovey (sinzui)
Related bugs:
  Bug #1003748 in Launchpad itself: "filebug form choice widgets for importance, info type, "
  https://bugs.launchpad.net/launchpad/+bug/1003748

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/filebug-choicepopup-fix/+merge/108064

== Implementation ==

Fix the html used for the staus and importance popups to remove the img from the anchor and use a sprite.

== Tests ==

Update yui test.
Check using firefox and chrome.

== Lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/app/javascript/choice.js
  lib/lp/bugs/javascript/tests/test_filebug.js

-- 
https://code.launchpad.net/~wallyworld/launchpad/filebug-choicepopup-fix/+merge/108064
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/app/javascript/choice.js'
--- lib/lp/app/javascript/choice.js	2012-05-28 12:42:32 +0000
+++ lib/lp/app/javascript/choice.js	2012-05-30 21:38:20 +0000
@@ -62,7 +62,7 @@
 
     var choice_node = Y.Node.create([
         '<span id="' + field_name + '-content"><span class="value"></span>',
-        '<a href="#"><img class="sprite edit editicon"/>&nbsp;</a></span>'
+        '&nbsp;<a class="sprite edit" href="#"></a></span>'
         ].join(' '));
 
     legacy_field_node.insertBefore(choice_node, legacy_field_node);

=== modified file 'lib/lp/bugs/javascript/tests/test_filebug.js'
--- lib/lp/bugs/javascript/tests/test_filebug.js	2012-05-28 22:47:56 +0000
+++ lib/lp/bugs/javascript/tests/test_filebug.js	2012-05-30 21:38:20 +0000
@@ -119,7 +119,7 @@
             Y.lp.bugs.filebug.setup_filebug(true);
             var status_node = Y.one('#status-content .value');
             Y.Assert.areEqual('New', status_node.get('text'));
-            var status_edit_node = Y.one('#status-content a img.edit');
+            var status_edit_node = Y.one('#status-content a.sprite.edit');
             Y.Assert.isNotNull(status_edit_node);
             var legacy_dropdown = Y.one('[id=field.status]');
             Y.Assert.isTrue(legacy_dropdown.hasClass('unseen'));
@@ -130,7 +130,8 @@
             Y.lp.bugs.filebug.setup_filebug(true);
             var importance_node = Y.one('#importance-content .value');
             Y.Assert.areEqual('Undecided', importance_node.get('text'));
-            var importance_edit_node = Y.one('#status-content a img.edit');
+            var importance_edit_node =
+                Y.one('#importance-content a.sprite.edit');
             Y.Assert.isNotNull(importance_edit_node);
             var legacy_dropdown = Y.one('[id=field.importance]');
             Y.Assert.isTrue(legacy_dropdown.hasClass('unseen'));


Follow ups