Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16966

f:optionalBlock not indented correctly

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using an f:optionalBlock in a config.jelly file, the optional block is not indented like the other entries on the form. See the attachment for an example. See the URL for a config.jelly that exhibits this problem.

      In that code, I've worked around the problem with an explicit margin-left: 2em on the enclosing table.

      The layout issue might be related to the enclosing f:block and table elements, but if I leave those out, then the optionalBlock is always expanded when first opening the form, even if the checkbox is not checked.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Useful guide: http://wiki.eclipse.org/Writing_a_foldable_section_controlled_by_a_checkbox
          You can use <f:nested><table>...</table></f:nestedTable> wrapper

          BTW, this issue is quite confusing.

          Show
          oleg_nenashev Oleg Nenashev added a comment - Useful guide: http://wiki.eclipse.org/Writing_a_foldable_section_controlled_by_a_checkbox You can use <f:nested><table>...</table></f:nestedTable> wrapper BTW, this issue is quite confusing.
          Hide
          randycoulman Randy Coulman added a comment -

          I experimented with f:nested as well when I was working on this, and it didn't indent the checkbox correctly either. If I remember correctly, the optional block was indented much farther to the right than the rest of the form elements.

          I'd appreciate some feedback on how to make this issue clearer. There are two problems that I see:

          1. The f:optionalBlock is not indented the same way as the other configuration settings on the form.

          2. If I don't enclose the f:optionalBlock in f:block and table elements, then it always appears initially expanded, even if it is unchecked.

          Does that help clarify it?

          Show
          randycoulman Randy Coulman added a comment - I experimented with f:nested as well when I was working on this, and it didn't indent the checkbox correctly either. If I remember correctly, the optional block was indented much farther to the right than the rest of the form elements. I'd appreciate some feedback on how to make this issue clearer. There are two problems that I see: 1. The f:optionalBlock is not indented the same way as the other configuration settings on the form. 2. If I don't enclose the f:optionalBlock in f:block and table elements, then it always appears initially expanded, even if it is unchecked. Does that help clarify it?

            People

            • Assignee:
              Unassigned
              Reporter:
              randycoulman Randy Coulman
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: