mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 09:49:41 +02:00
re-hide advanced settings and show with collapsible
This commit is contained in:
parent
b650753e43
commit
3969288996
2 changed files with 19 additions and 1 deletions
|
@ -24,6 +24,10 @@
|
|||
<% return !value.deprecated %>
|
||||
<% })[0] %>
|
||||
|
||||
<% var split_settings = _.partition(group.settings, function(value, index) { %>
|
||||
<% return !value.advanced %>
|
||||
<% }) %>
|
||||
|
||||
<% isGrouped = !!group.name %>
|
||||
<% panelID = isGrouped ? group.name : group.html_id %>
|
||||
|
||||
|
@ -35,10 +39,20 @@
|
|||
<span class="badge"></span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<% _.each(settings, function(setting) { %>
|
||||
<% _.each(split_settings[0], function(setting) { %>
|
||||
<% keypath = isGrouped ? group.name + "." + setting.name : setting.name %>
|
||||
<%= getFormGroup(keypath, setting, values, false) %>
|
||||
<% }); %>
|
||||
|
||||
<% if (split_settings[1].length > 0) { %>
|
||||
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#<%- panelID %>-advanced">Advanced Settings <span class="caret"></span></button>
|
||||
<div id="<%- panelID %>-advanced" class="collapse advanced-settings-section">
|
||||
<% _.each(split_settings[1], function(setting) { %>
|
||||
<% keypath = isGrouped ? group.name + "." + setting.name : setting.name %>
|
||||
<%= getFormGroup(keypath, setting, values, true) %>
|
||||
<% }); %>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
|
|
@ -426,3 +426,7 @@ ul.nav li.dropdown ul.dropdown-menu .divider {
|
|||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.advanced-settings-section {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue