Skip to content

Commit

Permalink
#12619 Update edit content to match the rows and columns from content…
Browse files Browse the repository at this point in the history
… types
  • Loading branch information
freddyDOTCMS committed Sep 20, 2017
1 parent cbca707 commit f992f9e
Showing 1 changed file with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
.classAce{
display: none;
}
.lineDivider{
display: flex;
}
.tabDivider {
flex: 1;
}
</style>

<%
Expand Down Expand Up @@ -294,23 +301,28 @@ var editButtonRow="editContentletButtonRow";
</div>
<% } %>
<div class="lineDivider">
<span class="tabDivider">
<%-- Begin Looping over fields --%>
<% boolean fieldSetOpen = false;
int fieldCounter =0;
for (Field f : fields) {
int i = fields.get(0).getFieldType().equals(Field.FieldType.LINE_DIVIDER.toString()) ? 2 : 0;
for (; i < fields.size(); i++) {
Field f = fields.get(i);
if (fieldSetOpen &&
(f.getFieldType().equals(Field.FieldType.LINE_DIVIDER.toString()) ||
f.getFieldType().equals(Field.FieldType.TAB_DIVIDER.toString()) )) {
fieldSetOpen = false;%>
<%}%>
<%if(f.getFieldType().equals(Field.FieldType.LINE_DIVIDER.toString())) {%>
<div class="lineDividerTitle"><%=f.getFieldName() %></div>
<%}else if(f.getFieldType().equals(Field.FieldType.TAB_DIVIDER.toString())) {
tabDividerOpen = true;%>
</div>
</div>
<div id="<%=f.getVelocityVarName()%>" class="custom-tab" dojoType="dijit.layout.ContentPane" title="<%=f.getFieldName()%>">
<div class="wrapperRight">
</div>
<div class="lineDivider">
<%}else if(f.getFieldType().equals(Field.FieldType.TAB_DIVIDER.toString())) {%>
</span>
<span class="tabDivider">
<%}else if(f.getFieldType().equals(Field.FieldType.CATEGORIES_TAB.toString()) && !categoriesTabFieldExists) {
categoriesTabFieldExists = true;%>
<jsp:include page="/html/portlet/ext/contentlet/edit_contentlet_categories.jsp" />
Expand Down Expand Up @@ -426,7 +438,7 @@ var editButtonRow="editContentletButtonRow";
<jsp:include page="/html/portlet/ext/contentlet/field/edit_field.jsp" />
<%}%>
<%}%>
</div>
</span>
<!-- END START EDIT CONTENT FORM -->
</div>
<!-- END TABS -->
Expand Down

0 comments on commit f992f9e

Please sign in to comment.