status.collapse
Show and hide a div or popup or collapse a section by a trigger item.
{{ status.collapse(id, item_trigger, value, action) }}
id
item_trigger
value
action
{{ status.collapse('w1', 'bath.alert.info', '0', 'hide') }}
<div class="hide" data-bind="w1">
...
</div>
<div id="status-popup" class="alert" data-bind="w2" data-role="popup" data-overlay-theme="a">
.... code for the popup
</div>
{{ status.collapse('w2', 'bath.alert.warning') }}
{{ status.collapse('w3', 'bath.alert.error') }}
<div class="block">
<div class="set-1" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
<div data-bind="w3" data-role="collapsible" data-collapsed="false">
<h3>Block</h3>
<p>Content</p>
</div>
</div>
</div>
Content
{{ status.collapse('w4', 'bath.multistate', [1, 2, 4]) }}
{{ status.collapse('w5', 'bath.multistate', [0, 3]) }}
<div class="hide" data-bind="w4">
{{ basic.symbol('', 'bath.multistate', '', ['secur_locked', 'audio_sound'], [0, 3]) }}
This section is collapsed if values match 1, 2 or 4
</div>
<div class="hide" data-bind="w5">
Now you've been choosing 1, 2 or 4.
{{ basic.symbol('', 'bath.multistate', '', ['audio_play', 'audio_pause', 'audio_stop'], [1, 2, 4]) }}
</div>