diff --git a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy index 448e89241042..0d1634c99e32 100644 --- a/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy +++ b/core/src/main/resources/hudson/security/GlobalSecurityConfiguration/index.groovy @@ -30,19 +30,13 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP f.checkbox(title:_("Disable remember me"), field: "disableRememberMe") } - f.entry(title:_("Security Realm")) { - table(style:"width:100%") { - f.descriptorRadioList(title:_("Security Realm"),varName:"realm", instance:app.securityRealm, descriptors:h.filterDescriptors(app, SecurityRealm.all())) - } + div(style:"width:100%") { + f.descriptorRadioList(title:_("Security Realm"), varName:"realm", instance:app.securityRealm, descriptors: h.filterDescriptors(app, SecurityRealm.all())) } } - f.section(title:_("Authorization")) { - f.entry(title:_("Strategy")) { - table(style:"width:100%") { - f.descriptorRadioList(title:_("Authorization"), varName:"authorization", instance:app.authorizationStrategy, descriptors:h.filterDescriptors(app, AuthorizationStrategy.all())) - } - } + div(style:"width:100%") { + f.descriptorRadioList(title:_("Authorization"), varName:"authorization", instance:app.authorizationStrategy, descriptors:h.filterDescriptors(app, AuthorizationStrategy.all())) } f.section(title: _("Markup Formatter")) { @@ -66,7 +60,7 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP f.advanced(title: _("Agent protocols"), align:"left") { f.entry(title: _("Agent protocols")) { def agentProtocols = my.agentProtocols - table(width:"100%") { + div() { for (AgentProtocol p : AgentProtocol.all()) { if (p.name != null && !p.required) { f.block() { @@ -75,9 +69,8 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP checked: agentProtocols.contains(p.name), json: p.name) } - tr() { - td(colspan:"2") - td(class:"setting-description"){ + div(class: "tr") { + div(class:"setting-description"){ st.include(from:p, page: "description", optional:true) if (p.deprecated) { br() @@ -85,7 +78,6 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP st.include(from:p, page: "deprecationCause", optional:true) } } - td() } } } diff --git a/core/src/main/resources/hudson/tools/ToolInstallation/global.jelly b/core/src/main/resources/hudson/tools/ToolInstallation/global.jelly index 2e41ff6884e9..5ca723eb75ae 100644 --- a/core/src/main/resources/hudson/tools/ToolInstallation/global.jelly +++ b/core/src/main/resources/hudson/tools/ToolInstallation/global.jelly @@ -32,7 +32,7 @@ THE SOFTWARE. noAddButton="${readOnlyMode ? 'true' : null}" > - +
@@ -42,7 +42,7 @@ THE SOFTWARE.
-
+ @@ -52,19 +52,19 @@ THE SOFTWARE. - - +
+
- - +
+
-
-
- - +
+
+ +
diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config.groovy b/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config.groovy index 5698abc807d3..c3f8f14b0361 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config.groovy +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsConfiguration/config.groovy @@ -33,7 +33,7 @@ f.section(title: _("Administrative monitors configuration")) { f.advanced(title: _("Administrative monitors")) { f.entry(title: _("Enabled administrative monitors")) { p(_("blurb")) - table(width: "100%") { + div(width: "100%") { for (AdministrativeMonitor am : new ArrayList<>(AdministrativeMonitor.all()) .sort({ o1, o2 -> o1.getDisplayName() <=> o2.getDisplayName() })) { f.block() { @@ -42,12 +42,10 @@ f.section(title: _("Administrative monitors configuration")) { checked: am.enabled, json: am.id) } - tr() { - td(colspan: "2") - td(class: "setting-description") { + div(class: "tr") { + div(class: "setting-description") { st.include(from: am, page: "description", optional: true) } - td() } } } diff --git a/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config.groovy b/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config.groovy index 1d422ee10c07..4edce2f25ea1 100644 --- a/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config.groovy +++ b/core/src/main/resources/jenkins/model/GlobalProjectNamingStrategyConfiguration/config.groovy @@ -7,7 +7,7 @@ def f=namespace(lib.FormTagLib) f.optionalBlock( field:"useProjectNamingStrategy", title:_("useNamingStrategy"), checked:app.useProjectNamingStrategy) { f.entry(title:_("namingStrategyTitle")) { - table(style:"width:100%") { + div(style:"width:100%") { f.descriptorRadioList(title:_("strategy"), varName:"namingStrategy", instance:app.projectNamingStrategy, descriptors:ProjectNamingStrategy.all()) } } diff --git a/core/src/main/resources/lib/form/advanced.jelly b/core/src/main/resources/lib/form/advanced.jelly index 215822afa2b4..be1951308958 100644 --- a/core/src/main/resources/lib/form/advanced.jelly +++ b/core/src/main/resources/lib/form/advanced.jelly @@ -40,9 +40,8 @@ THE SOFTWARE. - - - +
+ - +
-
+
- - - + diff --git a/core/src/main/resources/lib/form/block.jelly b/core/src/main/resources/lib/form/block.jelly index 59f51c7a44a9..5662435cc2d0 100644 --- a/core/src/main/resources/lib/form/block.jelly +++ b/core/src/main/resources/lib/form/block.jelly @@ -27,9 +27,9 @@ THE SOFTWARE. Full-width space in the form table that can be filled with arbitrary HTML. - - +
+
- - - \ No newline at end of file +
+
+ diff --git a/core/src/main/resources/lib/form/checkbox.jelly b/core/src/main/resources/lib/form/checkbox.jelly index abea79dbb932..dc63a1ca9123 100644 --- a/core/src/main/resources/lib/form/checkbox.jelly +++ b/core/src/main/resources/lib/form/checkbox.jelly @@ -66,6 +66,7 @@ THE SOFTWARE. + - - - + ${customizedFields.add(name)} diff --git a/core/src/main/resources/lib/form/description.jelly b/core/src/main/resources/lib/form/description.jelly index 163ba0b7069b..12bc8ab80575 100644 --- a/core/src/main/resources/lib/form/description.jelly +++ b/core/src/main/resources/lib/form/description.jelly @@ -27,11 +27,11 @@ THE SOFTWARE. Renders a row that shows description text below an input field. - - - - - - - - \ No newline at end of file +
+
+
+ +
+
+
+ diff --git a/core/src/main/resources/lib/form/descriptorList.jelly b/core/src/main/resources/lib/form/descriptorList.jelly index ec74decd6e53..96e45f5f74b4 100644 --- a/core/src/main/resources/lib/form/descriptorList.jelly +++ b/core/src/main/resources/lib/form/descriptorList.jelly @@ -67,11 +67,11 @@ THE SOFTWARE. - - +
+
- - +
+
diff --git a/core/src/main/resources/lib/form/dragdrop/dragdrop.js b/core/src/main/resources/lib/form/dragdrop/dragdrop.js index 049a74e637e8..e2222ecba14d 100644 --- a/core/src/main/resources/lib/form/dragdrop/dragdrop.js +++ b/core/src/main/resources/lib/form/dragdrop/dragdrop.js @@ -40,7 +40,7 @@ var DragDrop = function(id, sGroup, config) { // set Y constraint to be within the container var totalHeight = el.parentNode.offsetHeight; var blockHeight = el.offsetHeight; - this.setYConstraint(el.offsetTop, totalHeight-blockHeight-el.offsetTop); + this.setYConstraint(el.offsetTop, el.offsetTop - totalHeight - blockHeight); el.style.visibility = "hidden"; diff --git a/core/src/main/resources/lib/form/dropdownList.jelly b/core/src/main/resources/lib/form/dropdownList.jelly index d2604784fc7b..71e63400f400 100644 --- a/core/src/main/resources/lib/form/dropdownList.jelly +++ b/core/src/main/resources/lib/form/dropdownList.jelly @@ -38,12 +38,15 @@ THE SOFTWARE. - - - +
+
${attrs.title} - - + +
+ + + +
- - - +
+
- - - - +
- - + + + - - - diff --git a/core/src/main/resources/lib/form/dropdownListBlock.jelly b/core/src/main/resources/lib/form/dropdownListBlock.jelly index 426c61fd41d0..65c457541fe1 100644 --- a/core/src/main/resources/lib/form/dropdownListBlock.jelly +++ b/core/src/main/resources/lib/form/dropdownListBlock.jelly @@ -50,10 +50,10 @@ THE SOFTWARE. - + - + @@ -64,7 +64,7 @@ THE SOFTWARE. - + diff --git a/core/src/main/resources/lib/form/entry.jelly b/core/src/main/resources/lib/form/entry.jelly index 0b1c06d1f1a9..b32d4aadb88c 100644 --- a/core/src/main/resources/lib/form/entry.jelly +++ b/core/src/main/resources/lib/form/entry.jelly @@ -68,24 +68,44 @@ THE SOFTWARE.
- - - - - - - - - - - - - - - - - - - - + +
+ + +
+ + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ + +
+ +
+ + + + + + +
+
+
diff --git a/core/src/main/resources/lib/form/expandableTextbox.jelly b/core/src/main/resources/lib/form/expandableTextbox.jelly index 2b0c9d2053b8..c31825ba6479 100644 --- a/core/src/main/resources/lib/form/expandableTextbox.jelly +++ b/core/src/main/resources/lib/form/expandableTextbox.jelly @@ -63,24 +63,23 @@ THE SOFTWARE. + - - - - - -
- - - - ${customizedFields.add(name)} - - - -
+
+
+ + + + ${customizedFields.add(name)} + +
+
+ +
+
diff --git a/core/src/main/resources/lib/form/form.jelly b/core/src/main/resources/lib/form/form.jelly index b55e82700c04..78095acbf5ba 100644 --- a/core/src/main/resources/lib/form/form.jelly +++ b/core/src/main/resources/lib/form/form.jelly @@ -53,9 +53,10 @@ THE SOFTWARE. Default: false +
- +
-
+
diff --git a/core/src/main/resources/lib/form/helpArea.jelly b/core/src/main/resources/lib/form/helpArea.jelly index dc5f8839aec3..721748914ddc 100644 --- a/core/src/main/resources/lib/form/helpArea.jelly +++ b/core/src/main/resources/lib/form/helpArea.jelly @@ -27,11 +27,7 @@ THE SOFTWARE. Place holder to lazy-load help text via AJAX. - - - +
${%Loading...}
- - - - \ No newline at end of file +
+ diff --git a/core/src/main/resources/lib/form/helpLink.jelly b/core/src/main/resources/lib/form/helpLink.jelly index bacefc2a8ce9..af1a1a7eafc3 100644 --- a/core/src/main/resources/lib/form/helpLink.jelly +++ b/core/src/main/resources/lib/form/helpLink.jelly @@ -54,14 +54,12 @@ THE SOFTWARE. - - - - - + + + - + diff --git a/core/src/main/resources/lib/form/hetero-list.jelly b/core/src/main/resources/lib/form/hetero-list.jelly index bf26d1414333..cdb6d653bbdd 100644 --- a/core/src/main/resources/lib/form/hetero-list.jelly +++ b/core/src/main/resources/lib/form/hetero-list.jelly @@ -80,17 +80,17 @@ THE SOFTWARE. - +
-
- - - + + @@ -107,7 +107,7 @@ THE SOFTWARE. -
+
+
${descriptor.displayName} +
-
+
@@ -148,7 +148,7 @@ THE SOFTWARE.
- + diff --git a/core/src/main/resources/lib/form/hetero-list/hetero-list.js b/core/src/main/resources/lib/form/hetero-list/hetero-list.js index c2aca7c411b8..849350bf1815 100644 --- a/core/src/main/resources/lib/form/hetero-list/hetero-list.js +++ b/core/src/main/resources/lib/form/hetero-list/hetero-list.js @@ -53,7 +53,7 @@ Behaviour.specify("DIV.hetero-list-container", 'hetero-list', -100, function(e) var scroll = document.body.scrollTop; - renderOnDemand(findElementsBySelector(nc,"TR.config-page")[0],function() { + renderOnDemand(findElementsBySelector(nc,"div.config-page")[0],function() { function findInsertionPoint() { // given the element to be inserted 'prospect', // and the array of existing items 'current', diff --git a/core/src/main/resources/lib/form/hetero-radio.jelly b/core/src/main/resources/lib/form/hetero-radio.jelly index 45eee1e30267..075757f47084 100644 --- a/core/src/main/resources/lib/form/hetero-radio.jelly +++ b/core/src/main/resources/lib/form/hetero-radio.jelly @@ -37,7 +37,7 @@ THE SOFTWARE. - +
@@ -50,6 +50,6 @@ THE SOFTWARE. -
+
diff --git a/core/src/main/resources/lib/form/invisibleEntry.jelly b/core/src/main/resources/lib/form/invisibleEntry.jelly index 9de583111fc1..615be896a844 100644 --- a/core/src/main/resources/lib/form/invisibleEntry.jelly +++ b/core/src/main/resources/lib/form/invisibleEntry.jelly @@ -27,9 +27,9 @@ THE SOFTWARE. Invisible <f:entry> type. Useful for adding hidden field values. - - + + diff --git a/core/src/main/resources/lib/form/nested.jelly b/core/src/main/resources/lib/form/nested.jelly index 7e54a44e3ef4..f63c122a4113 100644 --- a/core/src/main/resources/lib/form/nested.jelly +++ b/core/src/main/resources/lib/form/nested.jelly @@ -27,10 +27,10 @@ THE SOFTWARE. --> - - - - - - - \ No newline at end of file +
+
+
+ +
+
+ diff --git a/core/src/main/resources/lib/form/optionalBlock.jelly b/core/src/main/resources/lib/form/optionalBlock.jelly index 8133e4c7db25..da8f3603e99e 100644 --- a/core/src/main/resources/lib/form/optionalBlock.jelly +++ b/core/src/main/resources/lib/form/optionalBlock.jelly @@ -66,20 +66,24 @@ THE SOFTWARE. - - - - - - - - - - - - - +
+
+
+ + +
+
+ + + +
+
+ +
+ +
+
diff --git a/core/src/main/resources/lib/form/radioBlock.jelly b/core/src/main/resources/lib/form/radioBlock.jelly index c42dcbdea09b..9a9db5b37760 100644 --- a/core/src/main/resources/lib/form/radioBlock.jelly +++ b/core/src/main/resources/lib/form/radioBlock.jelly @@ -54,25 +54,29 @@ THE SOFTWARE. - - - - - - - - - - - - +
+
+
+ + +
+
+ + + +
+ +
+ + +
diff --git a/core/src/main/resources/lib/form/repeatableProperty.jelly b/core/src/main/resources/lib/form/repeatableProperty.jelly index b5aa38291c87..b63dd0363ff0 100644 --- a/core/src/main/resources/lib/form/repeatableProperty.jelly +++ b/core/src/main/resources/lib/form/repeatableProperty.jelly @@ -74,9 +74,9 @@ THE SOFTWARE. - +
-
+
diff --git a/core/src/main/resources/lib/form/rowSet.jelly b/core/src/main/resources/lib/form/rowSet.jelly index 9b1746395b50..0f6f863a9f77 100644 --- a/core/src/main/resources/lib/form/rowSet.jelly +++ b/core/src/main/resources/lib/form/rowSet.jelly @@ -37,15 +37,19 @@ THE SOFTWARE. - - - - - - - - - - - - \ No newline at end of file +
+ + + + + + + +
+ +
+
+
+
+
+ diff --git a/test/src/test/java/hudson/model/ParametersTest.java b/test/src/test/java/hudson/model/ParametersTest.java index b2b416d69412..dadb371f3807 100644 --- a/test/src/test/java/hudson/model/ParametersTest.java +++ b/test/src/test/java/hudson/model/ParametersTest.java @@ -61,33 +61,33 @@ public void parameterTypes() throws Exception { HtmlForm form = page.getFormByName("parameters"); - HtmlElement element = DomNodeUtil.selectSingleNode(form, "//tr[td/div/input/@value='string']"); + HtmlElement element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, "//div[input/@value='string']")).getParentNode(); assertNotNull(element); - assertEquals("string description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "td[@class='setting-description']")).getTextContent()); + assertEquals("string description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent()); HtmlTextInput stringParameterInput = DomNodeUtil.selectSingleNode(element, ".//input[@name='value']"); assertEquals("defaultValue", stringParameterInput.getAttribute("value")); - assertEquals("string", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-name']")).getTextContent()); + assertEquals("string", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent()); stringParameterInput.setAttribute("value", "newValue"); - element = DomNodeUtil.selectSingleNode(form, "//tr[td/div/input/@value='boolean']"); + element = DomNodeUtil.selectSingleNode(form, "//div[input/@value='boolean']"); assertNotNull(element); - assertEquals("boolean description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "td[@class='setting-description']")).getTextContent()); + assertEquals("boolean description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode().getNextSibling().getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent()); Object o = DomNodeUtil.selectSingleNode(element, ".//input[@name='value']"); System.out.println(o); HtmlCheckBoxInput booleanParameterInput = (HtmlCheckBoxInput) o; assertTrue(booleanParameterInput.isChecked()); - assertEquals("boolean", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-main']")).getTextContent()); + assertEquals("boolean", element.getTextContent()); - element = DomNodeUtil.selectSingleNode(form, ".//tr[td/div/input/@value='choice']"); + element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='choice']")).getParentNode(); assertNotNull(element); - assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "td[@class='setting-description']")).getTextContent()); - assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-name']")).getTextContent()); + assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent()); + assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent()); - element = DomNodeUtil.selectSingleNode(form, ".//tr[td/div/input/@value='run']"); + element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='run']")).getParentNode(); assertNotNull(element); - assertEquals("run description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "td[@class='setting-description']")).getTextContent()); - assertEquals("run", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-name']")).getTextContent()); + assertEquals("run description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent()); + assertEquals("run", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent()); j.submit(form); Queue.Item q = j.jenkins.getQueue().getItem(project); @@ -114,11 +114,11 @@ public void choiceWithLTGT() throws Exception { HtmlPage page = wc.goTo("job/" + project.getName() + "/build?delay=0sec"); HtmlForm form = page.getFormByName("parameters"); - HtmlElement element = DomNodeUtil.selectSingleNode(form, ".//tr[td/div/input/@value='choice']"); + HtmlElement element = (HtmlElement) ((HtmlElement) DomNodeUtil.selectSingleNode(form, ".//div[input/@value='choice']")).getParentNode(); assertNotNull(element); - assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "td[@class='setting-description']")).getTextContent()); - assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-name']")).getTextContent()); - HtmlOption opt = DomNodeUtil.selectSingleNode(element, "td/div/select/option[@value='Choice <2>']"); + assertEquals("choice description", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getNextSibling().getNextSibling(), "div[@class='setting-description']")).getTextContent()); + assertEquals("choice", ((HtmlElement) DomNodeUtil.selectSingleNode(element.getParentNode(), "div[contains(@class, 'setting-name')]")).getTextContent()); + HtmlOption opt = DomNodeUtil.selectSingleNode(element.getParentNode(), "div/div/select/option[@value='Choice <2>']"); assertNotNull(opt); assertEquals("Choice <2>", opt.asText()); opt.setSelected(true); diff --git a/test/src/test/java/hudson/pages/SystemConfigurationTestCase.java b/test/src/test/java/hudson/pages/SystemConfigurationTestCase.java index d724a499279a..30b702cbd22b 100644 --- a/test/src/test/java/hudson/pages/SystemConfigurationTestCase.java +++ b/test/src/test/java/hudson/pages/SystemConfigurationTestCase.java @@ -57,7 +57,7 @@ public void pageDecoratorIsListedInPage() throws Exception { PageDecorator.ALL.add(pageDecoratorImpl); HtmlPage page = j.createWebClient().goTo("configure"); - j.assertXPath(page, "//tr[@name='hudson-pages-SystemConfigurationTestCase$PageDecoratorImpl']"); + j.assertXPath(page, "//div[@name='hudson-pages-SystemConfigurationTestCase$PageDecoratorImpl']"); HtmlForm form = page.getFormByName("config"); form.getInputByName("_.decoratorId").setValueAttribute("this_is_a_profile"); diff --git a/war/src/main/js/widgets/config/model/ConfigTableMetaData.js b/war/src/main/js/widgets/config/model/ConfigTableMetaData.js index 38ab5decd9f3..4c35d0c92963 100644 --- a/war/src/main/js/widgets/config/model/ConfigTableMetaData.js +++ b/war/src/main/js/widgets/config/model/ConfigTableMetaData.js @@ -15,9 +15,9 @@ function markConfigTableParentForm(configTable) { function findConfigTables() { var $ = getJQuery(); - // The config tables are the immediate child elements of elements + // The config tables are the immediate child
elements of elements // with a name of "config"? - return $('form[name="config"] > table'); + return $('form[name="config"] > div'); } function closestTR(node) { diff --git a/war/src/main/less/base/style.less b/war/src/main/less/base/style.less index 24d569e37f58..df05a1ea6f4a 100644 --- a/war/src/main/less/base/style.less +++ b/war/src/main/less/base/style.less @@ -260,13 +260,13 @@ pre.console { } .setting-name { - //font-weight: 500; // TODO tables to divs needs this + font-weight: 500; margin-bottom: 0.5rem; white-space: nowrap; } .setting-checkbox { - //font-weight: 500; // TODO tables to divs needs this + font-weight: 500; } .setting-main { @@ -304,7 +304,7 @@ pre.console { } .setting-name, .setting-main > input, .setting-main > textarea { - //vertical-align: middle; // TODO tables to divs needs this + vertical-align: middle; margin-top: 0; } @@ -319,7 +319,7 @@ pre.console { } .setting-name, .setting-main > input, .setting-main > textarea { - //vertical-align: middle; // TODO tables to divs needs this + vertical-align: middle; margin-top: 0; } @@ -1193,7 +1193,7 @@ DIV.to-be-removed { display: none; } .radioBlock-container > .form-container, .dropdownList-container { margin-left: 0.25rem; - //border-left: 2px dashed rgba(0, 0, 0, 0.33); // TODO tables to divs needs this + border-left: 2px dashed rgba(0, 0, 0, 0.33); padding-left: 1rem; } diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index ae429c928c2f..f3a5e94f9cec 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -500,12 +500,13 @@ var tooltip; //======================================================== // using tag names in CSS selector makes the processing faster function registerValidator(e) { - var tr = findFollowingTR(e, "validation-error-area"); - if (!tr || !tr.firstChild) { - console.warn("Couldn't register validator, start element was", e); - return; + var settingMain = e.closest('.setting-main') + if (!settingMain) { + console.warn("Couldn't find the expected parent element (.setting-main) for element", e) + return; } - e.targetElement = tr.firstChild.nextSibling; + // find the validation-error-area + e.targetElement = settingMain.nextElementSibling; e.targetUrl = function() { var url = this.getAttribute("checkUrl"); var depends = this.getAttribute("checkDependsOn");