mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs: Maintainers page fix maintainer count
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
e269d7853d
commit
c0840ce1b5
|
@ -21,7 +21,7 @@
|
||||||
<div class="navbar-inner table-controls">
|
<div class="navbar-inner table-controls">
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<span class="badge" style="margin-top:11px;">{{ maintainer_count }} maintainers</span>
|
<span class="badge" style="margin-top:11px;"></span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form class="navbar-form pull-right">
|
<form class="navbar-form pull-right">
|
||||||
|
@ -30,9 +30,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if maintainer_count == 0 %}
|
<div id="no_maintainers_alert" class="alert">
|
||||||
<div class="alert"> No maintainers found</div>
|
No maintainers found <a href="#" id="view-all-maintainers" style="margin-left:10px;">View all maintainers</a>
|
||||||
{% else %}
|
</div>
|
||||||
<table class="table table-bordered table-hovere" id="statistics-table">
|
<table class="table table-bordered table-hovere" id="statistics-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -100,7 +100,6 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
@ -111,6 +110,27 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
statisticsTable = $('#statistics-table');
|
statisticsTable = $('#statistics-table');
|
||||||
|
|
||||||
|
function updateMaintainerCount() {
|
||||||
|
$('#statistics-table').show()
|
||||||
|
$('#no_maintainers_alert').hide()
|
||||||
|
|
||||||
|
count = 0
|
||||||
|
$('tr:visible').each(function() {
|
||||||
|
count++
|
||||||
|
});
|
||||||
|
|
||||||
|
if (count == 1) {
|
||||||
|
$('#statistics-table').hide()
|
||||||
|
$('#no_maintainers_alert').show()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 2) {
|
||||||
|
$('.badge').html("1 maintainer");
|
||||||
|
} else {
|
||||||
|
$('.badge').html((count - 1) + " maintainers")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(statisticsTable).tablesorter({
|
$(statisticsTable).tablesorter({
|
||||||
sortList: [[0,0]],
|
sortList: [[0,0]],
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -133,7 +153,16 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$("#filter").keyup(function() {
|
$("#filter").keyup(function() {
|
||||||
$.uiTableFilter(statisticsTable, this.value);
|
$.uiTableFilter(statisticsTable, this.value);
|
||||||
|
updateMaintainerCount()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#view-all-maintainers").click(function() {
|
||||||
|
$.uiTableFilter(statisticsTable, '');
|
||||||
|
$("#filter").val('')
|
||||||
|
updateMaintainerCount()
|
||||||
|
});
|
||||||
|
|
||||||
|
updateMaintainerCount()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -246,8 +246,9 @@ $(document).ready(function() {
|
||||||
upstreamStatus = 'All'
|
upstreamStatus = 'All'
|
||||||
maintainer = 'All'
|
maintainer = 'All'
|
||||||
applyFilters()
|
applyFilters()
|
||||||
|
$("#filter").val('')
|
||||||
updateRecipeCount()
|
updateRecipeCount()
|
||||||
})
|
});
|
||||||
|
|
||||||
applyFilters()
|
applyFilters()
|
||||||
updateRecipeCount()
|
updateRecipeCount()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user