Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included.
It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story.
diff --git a/core/src/main/resources/hudson/model/Job/configure.jelly b/core/src/main/resources/hudson/model/Job/configure.jelly
index ec2a5b6..ac39d60 100644
--- a/core/src/main/resources/hudson/model/Job/configure.jelly
+++ b/core/src/main/resources/hudson/model/Job/configure.jelly
@@ -27,40 +27,51 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
- <l:layout title="${it.displayName} Config" norefresh="true" permission="${it.EXTENDED_READ}">
- <st:include page="sidepanel.jelly" />
- <f:breadcrumb-config-outline />
+
+ <l:layout norefresh="true" type="one-column" permission="${it.EXTENDED_READ}" title="${it.displayName} Config">
+
+ <l:js src="jsbundles/config-scrollspy.js" />
+ <l:css src="jsbundles/config-scrollspy.css" />
+
<l:main-panel>
- <div class="behavior-loading">${%LOADING}</div>
- <f:form method="post" action="configSubmit" name="config">
- <j:set var="descriptor" value="${it.descriptor}" />
- <j:set var="instance" value="${it}" />
+ <div class="container">
+ <div class="row">
+ <div class="col-md-offset-2 col-md-20">
+
+ <div class="behavior-loading">${%LOADING}</div>
+
+ <f:form method="post" action="configSubmit" name="config" tableClass="config-table scrollspy">
+ <j:set var="descriptor" value="${it.descriptor}" />
+ <j:set var="instance" value="${it}" />
... snip indentation changes ...
+ </div>
+ </div>
+ </div>
</l:main-panel>
</l:layout>
</j:jelly>
Based on the relevant diff for the Job configure.jelly, it seems it would indeed be difficult to support both the 1.x and 2.x UI. Besides the additional JS/CSS includes, there are some additional div elements for Bootstrap, and sidepanel.jelly is no longer included.
It appears some logic would be necessary to detect the Jenkins version (does not seem like a good idea to me) and decide whether to display a 1.x layout or 2.x layout. You could maybe get away with adding in the extra elements and styling changes and have it still look the same on 1.x, but sidepanel.jelly is a different story.