mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 10:43:13 +02:00
hide panels if only advanced settings
This commit is contained in:
parent
ad48009ecd
commit
3f67f6fae7
1 changed files with 7 additions and 3 deletions
|
@ -32,12 +32,16 @@
|
|||
|
||||
<script id="panels-template" type="text/template">
|
||||
<% _.each(descriptions, function(group){ %>
|
||||
<div class="panel panel-default" id="<%- group.name %>">
|
||||
<% split_settings = _.partition(group.settings, function(value, index) { return !value.advanced }) %>
|
||||
<% isAdvanced = _.isEmpty(split_settings[0]) %>
|
||||
<% if (isAdvanced) { %>
|
||||
<% $("a[href=#" + group.name + "]").addClass('advanced-setting').hide() %>
|
||||
<% } %>
|
||||
<div class="panel panel-default <%- (isAdvanced) ? 'advanced-setting' : '' %>" id="<%- group.name %>">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><%- group.label %></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<% split_settings = _.partition(group.settings, function(value, index) { return !value.advanced }) %>
|
||||
<% _.each(split_settings[0], function(setting) { %>
|
||||
<%= getFormGroup(group.name, setting, values, false,
|
||||
(_.has(locked, group.name) && _.has(locked[group.name], setting.name))) %>
|
||||
|
@ -53,7 +57,7 @@
|
|||
</div>
|
||||
<% }); %>
|
||||
</script>
|
||||
|
||||
|
||||
<div id="panels"></div>
|
||||
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue