Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qvt accordion #221

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions template/screen-macro/DefaultScreenMacros.qvt.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -523,17 +523,13 @@ ${sri.renderIncludeScreen(.node["@location"], .node["@share-scope"]!)}
<#assign fgTitle = ec.getL10n().localize(.node["@title"]!)!>
<#if isAccordion!false>
<#assign accIsActive = accordionIndex?string == accordionActive>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="${accordionId}_heading${accordionIndex}"><h5 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#${accordionId}" href="#${accordionId}_collapse${accordionIndex}"
aria-expanded="true" aria-controls="${accordionId}_collapse${accordionIndex}"<#if !accIsActive> class="collapsed"</#if>>${fgTitle!"Fields"}</a>
</h5></div>
<div id="${accordionId}_collapse${accordionIndex}" class="panel-collapse collapse<#if accIsActive> in</#if>" role="tabpanel" aria-labelledby="${accordionId}_heading${accordionIndex}">
<q-list bordered padding>
<q-expansion-item switch-toggle-side group="${accordionId}" label="${fgTitle!"Fields"}" <#if accIsActive>default-opened</#if>>
<div class="panel-body<#if .node["@style"]?has_content> ${.node["@style"]}</#if>">
<#recurse .node/>
</div>
</div>
</div>
</q-expansion-item>
</q-list>
<#assign accordionIndex = accordionIndex + 1>
<#elseif .node["@box"]! == "true">
<div class="panel panel-default">
Expand All @@ -556,9 +552,9 @@ ${sri.renderIncludeScreen(.node["@location"], .node["@share-scope"]!)}
<#assign accordionIndex = 1>
<#assign accordionId = .node["@id"]!(formSingleId + "_accordion")>
<#assign accordionActive = .node["@active"]!"1">
<div class="panel-group" id="${accordionId}" role="tablist" aria-multiselectable="true">
<q-list>
<#recurse .node/>
</div><!-- accordionId ${accordionId} -->
</q-list><!-- accordionId ${accordionId} -->
<#assign isAccordion = false>
</#macro>
<#macro "field-col-row">
Expand Down