← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~huwshimi/launchpad/checkbox-label-labels-894209 into lp:launchpad

 

Huw Wilkins has proposed merging lp:~huwshimi/launchpad/checkbox-label-labels-894209 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #894209 in Launchpad itself: "Custom bug listings "Visible information" checkbox labels aren't labels"
  https://bugs.launchpad.net/launchpad/+bug/894209

For more details, see:
https://code.launchpad.net/~huwshimi/launchpad/checkbox-label-labels-894209/+merge/84437

The bug listing config overlay options didn't use <label> for the checkbox labels. This branch fixes that. I also wrapped the options in a list instead of a div and now doesn't need to use "<br>" for each line.
-- 
https://code.launchpad.net/~huwshimi/launchpad/checkbox-label-labels-894209/+merge/84437
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~huwshimi/launchpad/checkbox-label-labels-894209 into lp:launchpad.
=== modified file 'lib/lp/bugs/javascript/buglisting_utils.js'
--- lib/lp/bugs/javascript/buglisting_utils.js	2011-11-28 21:28:44 +0000
+++ lib/lp/bugs/javascript/buglisting_utils.js	2011-12-05 06:10:28 +0000
@@ -100,8 +100,9 @@
     };
 
     BugListingConfigUtil.INPUT_TEMPLATE = [
-        '<input type="checkbox" class="{name}" name="{name}" ',
-        'value="{display_name}" {checked}> {display_name}<br />'].join('');
+        '<li><input type="checkbox" class="{name}" name="{name}" ',
+        'value="{display_name}" id="{name}" {checked}> ',
+        '<label for="{name}">{display_name}</label></li>'].join('');
 
     Y.extend(BugListingConfigUtil, Y.lp.configutils.BaseConfigUtil, {
 
@@ -192,7 +193,7 @@
          */
         buildFormContent: function() {
             var div = Y.Node.create(
-                '<div></div>').addClass('buglisting-opts');
+                '<ul></ul>').addClass('buglisting-opts');
             var inputs = this.getFormInputs();
             div.append(inputs);
             var link = this.getResetLink();