forked from lix-project/hydra
Fix broken logic for showing/hiding jobsets
This commit is contained in:
parent
ef711ce845
commit
9072adece8
|
@ -511,7 +511,7 @@ BLOCK renderJobsetOverview %]
|
||||||
<tbody>
|
<tbody>
|
||||||
[% FOREACH j IN jobsets %]
|
[% FOREACH j IN jobsets %]
|
||||||
[% successrate = 0 %]
|
[% successrate = 0 %]
|
||||||
<tr class="[% IF j.hidden && !showHidden %] hidden-jobset [% END %] [% IF !j.enabled %] disabled-jobset [% END %]" >
|
<tr class="jobset [% IF j.hidden && !showHidden %] hidden-jobset [% END %] [% IF !j.enabled %] disabled-jobset [% END %]" >
|
||||||
<td>
|
<td>
|
||||||
[% IF j.get_column('nrscheduled') > 0 %]
|
[% IF j.get_column('nrscheduled') > 0 %]
|
||||||
<img src="[% c.uri_for("/static/images/help_16.png") %]" alt="Scheduled" />
|
<img src="[% c.uri_for("/static/images/help_16.png") %]" alt="Scheduled" />
|
||||||
|
|
|
@ -27,22 +27,26 @@
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function showJobsets() {
|
||||||
|
var showHidden = $('#show-hidden').hasClass('active');
|
||||||
|
var showDisabled = $('#show-disabled').hasClass('active');
|
||||||
|
$('tr.jobset').map(function() {
|
||||||
|
var hide =
|
||||||
|
($(this).hasClass('hidden-jobset') && !showHidden) ||
|
||||||
|
($(this).hasClass('disabled-jobset') && !showDisabled);
|
||||||
|
if (hide) $(this).hide(); else $(this).show();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#show-hidden').on('click', function (e) {
|
$('#show-hidden, #show-disabled').on('click', function(e) {
|
||||||
var show = !$(this).hasClass('active');
|
$(this).toggleClass('active');
|
||||||
if (show)
|
showJobsets();
|
||||||
$('tr.hidden-jobset').show();
|
return false;
|
||||||
else
|
|
||||||
$('tr.hidden-jobset').hide();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#show-disabled').on('click', function (e) {
|
showJobsets();
|
||||||
var show = !$(this).hasClass('active');
|
|
||||||
if (show)
|
|
||||||
$('tr.disabled-jobset').show();
|
|
||||||
else
|
|
||||||
$('tr.disabled-jobset').hide();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,6 @@ span.hidden-project a, span.hidden-jobset a {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.hidden-jobset {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.info-table th {
|
table.info-table th {
|
||||||
padding-right: 1.0em;
|
padding-right: 1.0em;
|
||||||
padding-bottom: 0.2em;
|
padding-bottom: 0.2em;
|
||||||
|
|
Loading…
Reference in a new issue