Commit 5571d43e authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

series: Show triangle for expandable test results

Test results are listed on a series view. Some of them are expandable if
you click anywhere on their grey background.

This is not obvious and it's not indicated in any way.

This patch adds a triangle pointing down in the left corner to imply
this expand/collapse behavior.

The triangle starts pointing up when the section is expanded to indicate
that it is collapsible now.

Closes #35Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 08281810
Pipeline #95775 passed with stage
in 1 minute and 50 seconds
<div class="panel panel-default">
{% if test_result.summary %}
<div class="panel-heading small-panel-heading cursor-pointer" role="tab" data-toggle="collapse" href="#collapse-{{ revision.version }}-{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse-{{ revision.version}}-{{ forloop.counter }}" id="heading-{{ forloop.counter }}">
<span class="show-triangle">&#9660;</span><span style="display:none;" class="hide-triangle">&#9650;</span>
{% else %}
<div class="panel-heading small-panel-heading" role="tab" id="heading-{{ forloop.counter }}">
{% endif %}
......@@ -22,3 +23,16 @@
</div>
{% endif %}
</div>
<script type="text/javascript">
$('.panel-default').on('show.bs.collapse', function () {
console.log($(this).find('.hide-triangle'));
$(this).find('.hide-triangle').show();
$(this).find('.show-triangle').hide();
});
$('.panel-default').on('hide.bs.collapse', function () {
$(this).find('.hide-triangle').hide();
$(this).find('.show-triangle').show();
});
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment