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>
|
||||
[% FOREACH j IN jobsets %]
|
||||
[% 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>
|
||||
[% IF j.get_column('nrscheduled') > 0 %]
|
||||
<img src="[% c.uri_for("/static/images/help_16.png") %]" alt="Scheduled" />
|
||||
|
|
|
@ -27,22 +27,26 @@
|
|||
<div class="tab-content">
|
||||
|
||||
<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() {
|
||||
$('#show-hidden').on('click', function (e) {
|
||||
var show = !$(this).hasClass('active');
|
||||
if (show)
|
||||
$('tr.hidden-jobset').show();
|
||||
else
|
||||
$('tr.hidden-jobset').hide();
|
||||
$('#show-hidden, #show-disabled').on('click', function(e) {
|
||||
$(this).toggleClass('active');
|
||||
showJobsets();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#show-disabled').on('click', function (e) {
|
||||
var show = !$(this).hasClass('active');
|
||||
if (show)
|
||||
$('tr.disabled-jobset').show();
|
||||
else
|
||||
$('tr.disabled-jobset').hide();
|
||||
});
|
||||
showJobsets();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -47,10 +47,6 @@ span.hidden-project a, span.hidden-jobset a {
|
|||
color: gray;
|
||||
}
|
||||
|
||||
tr.hidden-jobset {
|
||||
display: none;
|
||||
}
|
||||
|
||||
table.info-table th {
|
||||
padding-right: 1.0em;
|
||||
padding-bottom: 0.2em;
|
||||
|
|
Loading…
Reference in a new issue